Package com.google.ortools.linearsolver
Class MPModelDeltaProto
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.ortools.linearsolver.MPModelDeltaProto
-
- All Implemented Interfaces:
MPModelDeltaProtoOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,java.io.Serializable
public final class MPModelDeltaProto extends com.google.protobuf.GeneratedMessageV3 implements MPModelDeltaProtoOrBuilder
Encodes a full MPModelProto by way of referencing to a "baseline" MPModelProto stored in a file, and a "delta" to apply to this model.
Protobuf typeoperations_research.MPModelDeltaProto- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMPModelDeltaProto.BuilderEncodes a full MPModelProto by way of referencing to a "baseline" MPModelProto stored in a file, and a "delta" to apply to this model.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intBASELINE_MODEL_FILE_PATH_FIELD_NUMBERstatic intCONSTRAINT_OVERRIDES_FIELD_NUMBERstatic com.google.protobuf.Parser<MPModelDeltaProto>PARSERDeprecated.static intVARIABLE_OVERRIDES_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancontainsConstraintOverrides(int key)Constraints can be changed (or added) in the same way as variables, see above.booleancontainsVariableOverrides(int key)The variable protos listed here will override (via MergeFrom()) the ones in the baseline model: you only need to specify the fields that change.booleanequals(java.lang.Object obj)java.lang.StringgetBaselineModelFilePath()optional string baseline_model_file_path = 1;com.google.protobuf.ByteStringgetBaselineModelFilePathBytes()optional string baseline_model_file_path = 1;java.util.Map<java.lang.Integer,MPConstraintProto>getConstraintOverrides()Deprecated.intgetConstraintOverridesCount()Constraints can be changed (or added) in the same way as variables, see above.java.util.Map<java.lang.Integer,MPConstraintProto>getConstraintOverridesMap()Constraints can be changed (or added) in the same way as variables, see above.MPConstraintProtogetConstraintOverridesOrDefault(int key, MPConstraintProto defaultValue)Constraints can be changed (or added) in the same way as variables, see above.MPConstraintProtogetConstraintOverridesOrThrow(int key)Constraints can be changed (or added) in the same way as variables, see above.static MPModelDeltaProtogetDefaultInstance()MPModelDeltaProtogetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Parser<MPModelDeltaProto>getParserForType()intgetSerializedSize()java.util.Map<java.lang.Integer,MPVariableProto>getVariableOverrides()Deprecated.intgetVariableOverridesCount()The variable protos listed here will override (via MergeFrom()) the ones in the baseline model: you only need to specify the fields that change.java.util.Map<java.lang.Integer,MPVariableProto>getVariableOverridesMap()The variable protos listed here will override (via MergeFrom()) the ones in the baseline model: you only need to specify the fields that change.MPVariableProtogetVariableOverridesOrDefault(int key, MPVariableProto defaultValue)The variable protos listed here will override (via MergeFrom()) the ones in the baseline model: you only need to specify the fields that change.MPVariableProtogetVariableOverridesOrThrow(int key)The variable protos listed here will override (via MergeFrom()) the ones in the baseline model: you only need to specify the fields that change.booleanhasBaselineModelFilePath()optional string baseline_model_file_path = 1;inthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number)booleanisInitialized()static MPModelDeltaProto.BuildernewBuilder()static MPModelDeltaProto.BuildernewBuilder(MPModelDeltaProto prototype)MPModelDeltaProto.BuildernewBuilderForType()protected MPModelDeltaProto.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected java.lang.ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static MPModelDeltaProtoparseDelimitedFrom(java.io.InputStream input)static MPModelDeltaProtoparseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static MPModelDeltaProtoparseFrom(byte[] data)static MPModelDeltaProtoparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static MPModelDeltaProtoparseFrom(com.google.protobuf.ByteString data)static MPModelDeltaProtoparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static MPModelDeltaProtoparseFrom(com.google.protobuf.CodedInputStream input)static MPModelDeltaProtoparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static MPModelDeltaProtoparseFrom(java.io.InputStream input)static MPModelDeltaProtoparseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static MPModelDeltaProtoparseFrom(java.nio.ByteBuffer data)static MPModelDeltaProtoparseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<MPModelDeltaProto>parser()MPModelDeltaProto.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
BASELINE_MODEL_FILE_PATH_FIELD_NUMBER
public static final int BASELINE_MODEL_FILE_PATH_FIELD_NUMBER
- See Also:
- Constant Field Values
-
VARIABLE_OVERRIDES_FIELD_NUMBER
public static final int VARIABLE_OVERRIDES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
CONSTRAINT_OVERRIDES_FIELD_NUMBER
public static final int CONSTRAINT_OVERRIDES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PARSER
@Deprecated public static final com.google.protobuf.Parser<MPModelDeltaProto> PARSER
Deprecated.
-
-
Method Detail
-
newInstance
protected java.lang.Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
- Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessageV3
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
hasBaselineModelFilePath
public boolean hasBaselineModelFilePath()
optional string baseline_model_file_path = 1;- Specified by:
hasBaselineModelFilePathin interfaceMPModelDeltaProtoOrBuilder- Returns:
- Whether the baselineModelFilePath field is set.
-
getBaselineModelFilePath
public java.lang.String getBaselineModelFilePath()
optional string baseline_model_file_path = 1;- Specified by:
getBaselineModelFilePathin interfaceMPModelDeltaProtoOrBuilder- Returns:
- The baselineModelFilePath.
-
getBaselineModelFilePathBytes
public com.google.protobuf.ByteString getBaselineModelFilePathBytes()
optional string baseline_model_file_path = 1;- Specified by:
getBaselineModelFilePathBytesin interfaceMPModelDeltaProtoOrBuilder- Returns:
- The bytes for baselineModelFilePath.
-
getVariableOverridesCount
public int getVariableOverridesCount()
Description copied from interface:MPModelDeltaProtoOrBuilderThe variable protos listed here will override (via MergeFrom()) the ones in the baseline model: you only need to specify the fields that change. To add a new variable, add it with a new variable index (variable indices still need to span a dense integer interval). You can't "delete" a variable but you can "neutralize" it by fixing its value, setting its objective coefficient to zero, and by nullifying all the terms involving it in the constraints.
map<int32, .operations_research.MPVariableProto> variable_overrides = 2;- Specified by:
getVariableOverridesCountin interfaceMPModelDeltaProtoOrBuilder
-
containsVariableOverrides
public boolean containsVariableOverrides(int key)
The variable protos listed here will override (via MergeFrom()) the ones in the baseline model: you only need to specify the fields that change. To add a new variable, add it with a new variable index (variable indices still need to span a dense integer interval). You can't "delete" a variable but you can "neutralize" it by fixing its value, setting its objective coefficient to zero, and by nullifying all the terms involving it in the constraints.
map<int32, .operations_research.MPVariableProto> variable_overrides = 2;- Specified by:
containsVariableOverridesin interfaceMPModelDeltaProtoOrBuilder
-
getVariableOverrides
@Deprecated public java.util.Map<java.lang.Integer,MPVariableProto> getVariableOverrides()
Deprecated.UsegetVariableOverridesMap()instead.- Specified by:
getVariableOverridesin interfaceMPModelDeltaProtoOrBuilder
-
getVariableOverridesMap
public java.util.Map<java.lang.Integer,MPVariableProto> getVariableOverridesMap()
The variable protos listed here will override (via MergeFrom()) the ones in the baseline model: you only need to specify the fields that change. To add a new variable, add it with a new variable index (variable indices still need to span a dense integer interval). You can't "delete" a variable but you can "neutralize" it by fixing its value, setting its objective coefficient to zero, and by nullifying all the terms involving it in the constraints.
map<int32, .operations_research.MPVariableProto> variable_overrides = 2;- Specified by:
getVariableOverridesMapin interfaceMPModelDeltaProtoOrBuilder
-
getVariableOverridesOrDefault
public MPVariableProto getVariableOverridesOrDefault(int key, MPVariableProto defaultValue)
The variable protos listed here will override (via MergeFrom()) the ones in the baseline model: you only need to specify the fields that change. To add a new variable, add it with a new variable index (variable indices still need to span a dense integer interval). You can't "delete" a variable but you can "neutralize" it by fixing its value, setting its objective coefficient to zero, and by nullifying all the terms involving it in the constraints.
map<int32, .operations_research.MPVariableProto> variable_overrides = 2;- Specified by:
getVariableOverridesOrDefaultin interfaceMPModelDeltaProtoOrBuilder
-
getVariableOverridesOrThrow
public MPVariableProto getVariableOverridesOrThrow(int key)
The variable protos listed here will override (via MergeFrom()) the ones in the baseline model: you only need to specify the fields that change. To add a new variable, add it with a new variable index (variable indices still need to span a dense integer interval). You can't "delete" a variable but you can "neutralize" it by fixing its value, setting its objective coefficient to zero, and by nullifying all the terms involving it in the constraints.
map<int32, .operations_research.MPVariableProto> variable_overrides = 2;- Specified by:
getVariableOverridesOrThrowin interfaceMPModelDeltaProtoOrBuilder
-
getConstraintOverridesCount
public int getConstraintOverridesCount()
Description copied from interface:MPModelDeltaProtoOrBuilderConstraints can be changed (or added) in the same way as variables, see above. It's mostly like applying MergeFrom(), except that: - the "var_index" and "coefficient" fields will be overridden like a map: if a key pre-exists, we overwrite its value, otherwise we add it. - if you set the lower bound to -inf and the upper bound to +inf, thus effectively neutralizing the constraint, the solver will implicitly remove all of the constraint's terms.
map<int32, .operations_research.MPConstraintProto> constraint_overrides = 3;- Specified by:
getConstraintOverridesCountin interfaceMPModelDeltaProtoOrBuilder
-
containsConstraintOverrides
public boolean containsConstraintOverrides(int key)
Constraints can be changed (or added) in the same way as variables, see above. It's mostly like applying MergeFrom(), except that: - the "var_index" and "coefficient" fields will be overridden like a map: if a key pre-exists, we overwrite its value, otherwise we add it. - if you set the lower bound to -inf and the upper bound to +inf, thus effectively neutralizing the constraint, the solver will implicitly remove all of the constraint's terms.
map<int32, .operations_research.MPConstraintProto> constraint_overrides = 3;- Specified by:
containsConstraintOverridesin interfaceMPModelDeltaProtoOrBuilder
-
getConstraintOverrides
@Deprecated public java.util.Map<java.lang.Integer,MPConstraintProto> getConstraintOverrides()
Deprecated.UsegetConstraintOverridesMap()instead.- Specified by:
getConstraintOverridesin interfaceMPModelDeltaProtoOrBuilder
-
getConstraintOverridesMap
public java.util.Map<java.lang.Integer,MPConstraintProto> getConstraintOverridesMap()
Constraints can be changed (or added) in the same way as variables, see above. It's mostly like applying MergeFrom(), except that: - the "var_index" and "coefficient" fields will be overridden like a map: if a key pre-exists, we overwrite its value, otherwise we add it. - if you set the lower bound to -inf and the upper bound to +inf, thus effectively neutralizing the constraint, the solver will implicitly remove all of the constraint's terms.
map<int32, .operations_research.MPConstraintProto> constraint_overrides = 3;- Specified by:
getConstraintOverridesMapin interfaceMPModelDeltaProtoOrBuilder
-
getConstraintOverridesOrDefault
public MPConstraintProto getConstraintOverridesOrDefault(int key, MPConstraintProto defaultValue)
Constraints can be changed (or added) in the same way as variables, see above. It's mostly like applying MergeFrom(), except that: - the "var_index" and "coefficient" fields will be overridden like a map: if a key pre-exists, we overwrite its value, otherwise we add it. - if you set the lower bound to -inf and the upper bound to +inf, thus effectively neutralizing the constraint, the solver will implicitly remove all of the constraint's terms.
map<int32, .operations_research.MPConstraintProto> constraint_overrides = 3;- Specified by:
getConstraintOverridesOrDefaultin interfaceMPModelDeltaProtoOrBuilder
-
getConstraintOverridesOrThrow
public MPConstraintProto getConstraintOverridesOrThrow(int key)
Constraints can be changed (or added) in the same way as variables, see above. It's mostly like applying MergeFrom(), except that: - the "var_index" and "coefficient" fields will be overridden like a map: if a key pre-exists, we overwrite its value, otherwise we add it. - if you set the lower bound to -inf and the upper bound to +inf, thus effectively neutralizing the constraint, the solver will implicitly remove all of the constraint's terms.
map<int32, .operations_research.MPConstraintProto> constraint_overrides = 3;- Specified by:
getConstraintOverridesOrThrowin interfaceMPModelDeltaProtoOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
java.io.IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static MPModelDeltaProto parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MPModelDeltaProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MPModelDeltaProto parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MPModelDeltaProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MPModelDeltaProto parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MPModelDeltaProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MPModelDeltaProto parseFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static MPModelDeltaProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static MPModelDeltaProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static MPModelDeltaProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static MPModelDeltaProto parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static MPModelDeltaProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
newBuilderForType
public MPModelDeltaProto.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static MPModelDeltaProto.Builder newBuilder()
-
newBuilder
public static MPModelDeltaProto.Builder newBuilder(MPModelDeltaProto prototype)
-
toBuilder
public MPModelDeltaProto.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected MPModelDeltaProto.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static MPModelDeltaProto getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<MPModelDeltaProto> parser()
-
getParserForType
public com.google.protobuf.Parser<MPModelDeltaProto> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public MPModelDeltaProto getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-