Class MPModelDeltaProto.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<MPModelDeltaProto.Builder>
com.google.protobuf.GeneratedMessage.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,Cloneable
- Enclosing class:
MPModelDeltaProto
public static final class MPModelDeltaProto.Builder
extends com.google.protobuf.GeneratedMessage.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 type
operations_research.MPModelDeltaProto-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()optional string baseline_model_file_path = 1;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.optional string baseline_model_file_path = 1;com.google.protobuf.ByteStringoptional string baseline_model_file_path = 1;Deprecated.intConstraints can be changed (or added) in the same way as variables, see above.Constraints can be changed (or added) in the same way as variables, see above.getConstraintOverridesOrDefault(int key, MPConstraintProto defaultValue) Constraints can be changed (or added) in the same way as variables, see above.getConstraintOverridesOrThrow(int key) Constraints can be changed (or added) in the same way as variables, see above.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorDeprecated.Deprecated.Deprecated.intThe variable protos listed here will override (via MergeFrom()) the ones in the baseline model: you only need to specify the fields that change.The variable protos listed here will override (via MergeFrom()) the ones in the baseline model: you only need to specify the fields that change.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.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.booleanoptional string baseline_model_file_path = 1;protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanmergeFrom(MPModelDeltaProto other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) putAllConstraintOverrides(Map<Integer, MPConstraintProto> values) Constraints can be changed (or added) in the same way as variables, see above.putAllVariableOverrides(Map<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.putConstraintOverrides(int key, MPConstraintProto value) Constraints can be changed (or added) in the same way as variables, see above.Constraints can be changed (or added) in the same way as variables, see above.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.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.removeConstraintOverrides(int key) Constraints can be changed (or added) in the same way as variables, see above.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.setBaselineModelFilePath(String value) optional string baseline_model_file_path = 1;setBaselineModelFilePathBytes(com.google.protobuf.ByteString value) optional string baseline_model_file_path = 1;Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<MPModelDeltaProto.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<MPModelDeltaProto.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<MPModelDeltaProto.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.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.GeneratedMessage.Builder<MPModelDeltaProto.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<MPModelDeltaProto.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<MPModelDeltaProto.Builder>
-
mergeFrom
public MPModelDeltaProto.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws 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:
IOException
-
hasBaselineModelFilePath
public boolean hasBaselineModelFilePath()optional string baseline_model_file_path = 1;- Specified by:
hasBaselineModelFilePathin interfaceMPModelDeltaProtoOrBuilder- Returns:
- Whether the baselineModelFilePath field is set.
-
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
optional string baseline_model_file_path = 1;- Parameters:
value- The baselineModelFilePath to set.- Returns:
- This builder for chaining.
-
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.UsegetVariableOverridesMap()instead.- Specified by:
getVariableOverridesin interfaceMPModelDeltaProtoOrBuilder
-
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
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
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
-
removeVariableOverrides
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.Use alternate mutation accessors instead. -
putVariableOverrides
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
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
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.UsegetConstraintOverridesMap()instead.- Specified by:
getConstraintOverridesin interfaceMPModelDeltaProtoOrBuilder
-
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
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
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
-
removeConstraintOverrides
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.Use alternate mutation accessors instead. -
putConstraintOverrides
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
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
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;
-