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;
boolean
containsConstraintOverrides
(int key) Constraints can be changed (or added) in the same way as variables, see above.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.optional string baseline_model_file_path = 1;
com.google.protobuf.ByteString
optional string baseline_model_file_path = 1;
Deprecated.int
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.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.Descriptor
com.google.protobuf.Descriptors.Descriptor
Deprecated.Deprecated.Deprecated.int
The 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.boolean
optional string baseline_model_file_path = 1;
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
protected com.google.protobuf.MapFieldReflectionAccessor
internalGetMapFieldReflection
(int number) protected com.google.protobuf.MapFieldReflectionAccessor
internalGetMutableMapFieldReflection
(int number) final boolean
mergeFrom
(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, 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
Methods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFrom
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods 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:
internalGetMapFieldReflection
in classcom.google.protobuf.GeneratedMessage.Builder<MPModelDeltaProto.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflection
in classcom.google.protobuf.GeneratedMessage.Builder<MPModelDeltaProto.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessage.Builder<MPModelDeltaProto.Builder>
-
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessage.Builder<MPModelDeltaProto.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessage.Builder<MPModelDeltaProto.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<MPModelDeltaProto.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in 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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<MPModelDeltaProto.Builder>
- Throws:
IOException
-
hasBaselineModelFilePath
public boolean hasBaselineModelFilePath()optional string baseline_model_file_path = 1;
- Specified by:
hasBaselineModelFilePath
in interfaceMPModelDeltaProtoOrBuilder
- Returns:
- Whether the baselineModelFilePath field is set.
-
getBaselineModelFilePath
optional string baseline_model_file_path = 1;
- Specified by:
getBaselineModelFilePath
in interfaceMPModelDeltaProtoOrBuilder
- Returns:
- The baselineModelFilePath.
-
getBaselineModelFilePathBytes
public com.google.protobuf.ByteString getBaselineModelFilePathBytes()optional string baseline_model_file_path = 1;
- Specified by:
getBaselineModelFilePathBytes
in 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:MPModelDeltaProtoOrBuilder
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:
getVariableOverridesCount
in 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:
containsVariableOverrides
in interfaceMPModelDeltaProtoOrBuilder
-
getVariableOverrides
Deprecated.UsegetVariableOverridesMap()
instead.- Specified by:
getVariableOverrides
in 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:
getVariableOverridesMap
in 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:
getVariableOverridesOrDefault
in 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:
getVariableOverridesOrThrow
in 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:MPModelDeltaProtoOrBuilder
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:
getConstraintOverridesCount
in 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:
containsConstraintOverrides
in interfaceMPModelDeltaProtoOrBuilder
-
getConstraintOverrides
Deprecated.UsegetConstraintOverridesMap()
instead.- Specified by:
getConstraintOverrides
in 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:
getConstraintOverridesMap
in 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:
getConstraintOverridesOrDefault
in 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:
getConstraintOverridesOrThrow
in 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;
-