Package com.google.ortools.linearsolver
Class MPModelDeltaProto.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<MPModelDeltaProto.Builder>
-
- com.google.ortools.linearsolver.MPModelDeltaProto.Builder
-
- All Implemented Interfaces:
MPModelDeltaProtoOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,java.lang.Cloneable
- Enclosing class:
- MPModelDeltaProto
public static final class MPModelDeltaProto.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<MPModelDeltaProto.Builder> 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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description MPModelDeltaProto.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)MPModelDeltaProtobuild()MPModelDeltaProtobuildPartial()MPModelDeltaProto.Builderclear()MPModelDeltaProto.BuilderclearBaselineModelFilePath()optional string baseline_model_file_path = 1;MPModelDeltaProto.BuilderclearConstraintOverrides()MPModelDeltaProto.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)MPModelDeltaProto.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)MPModelDeltaProto.BuilderclearVariableOverrides()MPModelDeltaProto.Builderclone()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.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.MPModelDeltaProtogetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()java.util.Map<java.lang.Integer,MPConstraintProto>getMutableConstraintOverrides()Deprecated.java.util.Map<java.lang.Integer,MPVariableProto>getMutableVariableOverrides()Deprecated.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;protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number)protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number)booleanisInitialized()MPModelDeltaProto.BuildermergeFrom(MPModelDeltaProto other)MPModelDeltaProto.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)MPModelDeltaProto.BuildermergeFrom(com.google.protobuf.Message other)MPModelDeltaProto.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)MPModelDeltaProto.BuilderputAllConstraintOverrides(java.util.Map<java.lang.Integer,MPConstraintProto> values)Constraints can be changed (or added) in the same way as variables, see above.MPModelDeltaProto.BuilderputAllVariableOverrides(java.util.Map<java.lang.Integer,MPVariableProto> values)The variable protos listed here will override (via MergeFrom()) the ones in the baseline model: you only need to specify the fields that change.MPModelDeltaProto.BuilderputConstraintOverrides(int key, MPConstraintProto value)Constraints can be changed (or added) in the same way as variables, see above.MPConstraintProto.BuilderputConstraintOverridesBuilderIfAbsent(int key)Constraints can be changed (or added) in the same way as variables, see above.MPModelDeltaProto.BuilderputVariableOverrides(int key, MPVariableProto value)The variable protos listed here will override (via MergeFrom()) the ones in the baseline model: you only need to specify the fields that change.MPVariableProto.BuilderputVariableOverridesBuilderIfAbsent(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.MPModelDeltaProto.BuilderremoveConstraintOverrides(int key)Constraints can be changed (or added) in the same way as variables, see above.MPModelDeltaProto.BuilderremoveVariableOverrides(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.MPModelDeltaProto.BuildersetBaselineModelFilePath(java.lang.String value)optional string baseline_model_file_path = 1;MPModelDeltaProto.BuildersetBaselineModelFilePathBytes(com.google.protobuf.ByteString value)optional string baseline_model_file_path = 1;MPModelDeltaProto.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)MPModelDeltaProto.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)MPModelDeltaProto.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
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.Builder<MPModelDeltaProto.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
- Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessageV3.Builder<MPModelDeltaProto.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<MPModelDeltaProto.Builder>
-
clear
public MPModelDeltaProto.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<MPModelDeltaProto.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<MPModelDeltaProto.Builder>
-
getDefaultInstanceForType
public MPModelDeltaProto getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public MPModelDeltaProto build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public MPModelDeltaProto buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public MPModelDeltaProto.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<MPModelDeltaProto.Builder>
-
setField
public MPModelDeltaProto.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<MPModelDeltaProto.Builder>
-
clearField
public MPModelDeltaProto.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<MPModelDeltaProto.Builder>
-
clearOneof
public MPModelDeltaProto.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<MPModelDeltaProto.Builder>
-
setRepeatedField
public MPModelDeltaProto.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<MPModelDeltaProto.Builder>
-
addRepeatedField
public MPModelDeltaProto.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<MPModelDeltaProto.Builder>
-
mergeFrom
public MPModelDeltaProto.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<MPModelDeltaProto.Builder>
-
mergeFrom
public MPModelDeltaProto.Builder mergeFrom(MPModelDeltaProto other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<MPModelDeltaProto.Builder>
-
mergeFrom
public MPModelDeltaProto.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<MPModelDeltaProto.Builder>- Throws:
java.io.IOException
-
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.
-
setBaselineModelFilePath
public MPModelDeltaProto.Builder setBaselineModelFilePath(java.lang.String value)
optional string baseline_model_file_path = 1;- Parameters:
value- The baselineModelFilePath to set.- Returns:
- This builder for chaining.
-
clearBaselineModelFilePath
public MPModelDeltaProto.Builder clearBaselineModelFilePath()
optional string baseline_model_file_path = 1;- Returns:
- This builder for chaining.
-
setBaselineModelFilePathBytes
public MPModelDeltaProto.Builder setBaselineModelFilePathBytes(com.google.protobuf.ByteString value)
optional string baseline_model_file_path = 1;- Parameters:
value- The bytes for baselineModelFilePath to set.- Returns:
- This builder for chaining.
-
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
-
clearVariableOverrides
public MPModelDeltaProto.Builder clearVariableOverrides()
-
removeVariableOverrides
public MPModelDeltaProto.Builder removeVariableOverrides(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;
-
getMutableVariableOverrides
@Deprecated public java.util.Map<java.lang.Integer,MPVariableProto> getMutableVariableOverrides()
Deprecated.Use alternate mutation accessors instead.
-
putVariableOverrides
public MPModelDeltaProto.Builder putVariableOverrides(int key, MPVariableProto value)
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;
-
putAllVariableOverrides
public MPModelDeltaProto.Builder putAllVariableOverrides(java.util.Map<java.lang.Integer,MPVariableProto> values)
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;
-
putVariableOverridesBuilderIfAbsent
public MPVariableProto.Builder putVariableOverridesBuilderIfAbsent(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;
-
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
-
clearConstraintOverrides
public MPModelDeltaProto.Builder clearConstraintOverrides()
-
removeConstraintOverrides
public MPModelDeltaProto.Builder removeConstraintOverrides(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;
-
getMutableConstraintOverrides
@Deprecated public java.util.Map<java.lang.Integer,MPConstraintProto> getMutableConstraintOverrides()
Deprecated.Use alternate mutation accessors instead.
-
putConstraintOverrides
public MPModelDeltaProto.Builder putConstraintOverrides(int key, MPConstraintProto value)
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;
-
putAllConstraintOverrides
public MPModelDeltaProto.Builder putAllConstraintOverrides(java.util.Map<java.lang.Integer,MPConstraintProto> values)
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;
-
putConstraintOverridesBuilderIfAbsent
public MPConstraintProto.Builder putConstraintOverridesBuilderIfAbsent(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;
-
setUnknownFields
public final MPModelDeltaProto.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<MPModelDeltaProto.Builder>
-
mergeUnknownFields
public final MPModelDeltaProto.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<MPModelDeltaProto.Builder>
-
-