Java Reference

Java Reference

MPModelDeltaProto.Builder

Detailed Description

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

Definition at line 638 of file MPModelDeltaProto.java.

Public Member Functions

.lang.Override Builder clear ()
 
.lang.Override com.google.protobuf.Descriptors.Descriptor getDescriptorForType ()
 
.lang.Override com.google.ortools.linearsolver.MPModelDeltaProto getDefaultInstanceForType ()
 
.lang.Override com.google.ortools.linearsolver.MPModelDeltaProto build ()
 
.lang.Override com.google.ortools.linearsolver.MPModelDeltaProto buildPartial ()
 
.lang.Override Builder clone ()
 
.lang.Override Builder setField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
 
.lang.Override Builder clearField (com.google.protobuf.Descriptors.FieldDescriptor field)
 
.lang.Override Builder clearOneof (com.google.protobuf.Descriptors.OneofDescriptor oneof)
 
.lang.Override Builder setRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
 
.lang.Override Builder addRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
 
.lang.Override Builder mergeFrom (com.google.protobuf.Message other)
 
Builder mergeFrom (com.google.ortools.linearsolver.MPModelDeltaProto other)
 
.lang.Override final boolean isInitialized ()
 
.lang.Override Builder mergeFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
boolean hasBaselineModelFilePath ()
 optional string baseline_model_file_path = 1; More...
 
java.lang.String getBaselineModelFilePath ()
 optional string baseline_model_file_path = 1; More...
 
com.google.protobuf.ByteString getBaselineModelFilePathBytes ()
 optional string baseline_model_file_path = 1; More...
 
Builder setBaselineModelFilePath (java.lang.String value)
 optional string baseline_model_file_path = 1; More...
 
Builder clearBaselineModelFilePath ()
 optional string baseline_model_file_path = 1; More...
 
Builder setBaselineModelFilePathBytes (com.google.protobuf.ByteString value)
 optional string baseline_model_file_path = 1; More...
 
int getVariableOverridesCount ()
 
.lang.Override boolean containsVariableOverrides (int key)
 
.lang.Override.lang.Deprecated java.util.Map< java.lang.Integer, com.google.ortools.linearsolver.MPVariableProtogetVariableOverrides ()
 Use getVariableOverridesMap() instead. More...
 
.lang.Override java.util.Map< java.lang.Integer, com.google.ortools.linearsolver.MPVariableProtogetVariableOverridesMap ()
 
.lang.Override com.google.ortools.linearsolver.MPVariableProto getVariableOverridesOrDefault (int key, com.google.ortools.linearsolver.MPVariableProto defaultValue)
 
.lang.Override com.google.ortools.linearsolver.MPVariableProto getVariableOverridesOrThrow (int key)
 
Builder clearVariableOverrides ()
 
Builder removeVariableOverrides (int key)
 
.lang.Deprecated java.util.Map< java.lang.Integer, com.google.ortools.linearsolver.MPVariableProtogetMutableVariableOverrides ()
 Use alternate mutation accessors instead. More...
 
Builder putVariableOverrides (int key, com.google.ortools.linearsolver.MPVariableProto value)
 
Builder putAllVariableOverrides (java.util.Map< java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto > values)
 
int getConstraintOverridesCount ()
 
.lang.Override boolean containsConstraintOverrides (int key)
 
.lang.Override.lang.Deprecated java.util.Map< java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProtogetConstraintOverrides ()
 Use getConstraintOverridesMap() instead. More...
 
.lang.Override java.util.Map< java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProtogetConstraintOverridesMap ()
 
.lang.Override com.google.ortools.linearsolver.MPConstraintProto getConstraintOverridesOrDefault (int key, com.google.ortools.linearsolver.MPConstraintProto defaultValue)
 
.lang.Override com.google.ortools.linearsolver.MPConstraintProto getConstraintOverridesOrThrow (int key)
 
Builder clearConstraintOverrides ()
 
Builder removeConstraintOverrides (int key)
 
.lang.Deprecated java.util.Map< java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProtogetMutableConstraintOverrides ()
 Use alternate mutation accessors instead. More...
 
Builder putConstraintOverrides (int key, com.google.ortools.linearsolver.MPConstraintProto value)
 
Builder putAllConstraintOverrides (java.util.Map< java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto > values)
 
.lang.Override final Builder setUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields)
 
.lang.Override final Builder mergeUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields)
 

Static Public Member Functions

static final com.google.protobuf.Descriptors.Descriptor getDescriptor ()
 

Protected Member Functions

com.google.protobuf.MapField internalGetMapField (int number)
 
com.google.protobuf.MapField internalGetMutableMapField (int number)
 
.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable ()
 

Member Function Documentation

◆ addRepeatedField()

.lang.Override Builder addRepeatedField ( com.google.protobuf.Descriptors.FieldDescriptor  field,
java.lang.Object  value 
)
inline

Definition at line 771 of file MPModelDeltaProto.java.

◆ build()

.lang.Override com.google.ortools.linearsolver.MPModelDeltaProto build ( )
inline

Definition at line 718 of file MPModelDeltaProto.java.

◆ buildPartial()

.lang.Override com.google.ortools.linearsolver.MPModelDeltaProto buildPartial ( )
inline

Definition at line 727 of file MPModelDeltaProto.java.

◆ clear()

.lang.Override Builder clear ( )
inline

Definition at line 697 of file MPModelDeltaProto.java.

◆ clearBaselineModelFilePath()

Builder clearBaselineModelFilePath ( )
inline

optional string baseline_model_file_path = 1;

Returns
This builder for chaining.

Definition at line 889 of file MPModelDeltaProto.java.

◆ clearConstraintOverrides()

Builder clearConstraintOverrides ( )
inline

Definition at line 1230 of file MPModelDeltaProto.java.

◆ clearField()

.lang.Override Builder clearField ( com.google.protobuf.Descriptors.FieldDescriptor  field)
inline

Definition at line 755 of file MPModelDeltaProto.java.

◆ clearOneof()

.lang.Override Builder clearOneof ( com.google.protobuf.Descriptors.OneofDescriptor  oneof)
inline

Definition at line 760 of file MPModelDeltaProto.java.

◆ clearVariableOverrides()

Builder clearVariableOverrides ( )
inline

Definition at line 1032 of file MPModelDeltaProto.java.

◆ clone()

.lang.Override Builder clone ( )
inline

Definition at line 745 of file MPModelDeltaProto.java.

◆ containsConstraintOverrides()

.lang.Override boolean containsConstraintOverrides ( int  key)
inline
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;

Implements MPModelDeltaProtoOrBuilder.

Definition at line 1150 of file MPModelDeltaProto.java.

◆ containsVariableOverrides()

.lang.Override boolean containsVariableOverrides ( int  key)
inline
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;

Implements MPModelDeltaProtoOrBuilder.

Definition at line 952 of file MPModelDeltaProto.java.

◆ getBaselineModelFilePath()

java.lang.String getBaselineModelFilePath ( )
inline

optional string baseline_model_file_path = 1;

Returns
The baselineModelFilePath.

Implements MPModelDeltaProtoOrBuilder.

Definition at line 839 of file MPModelDeltaProto.java.

◆ getBaselineModelFilePathBytes()

com.google.protobuf.ByteString getBaselineModelFilePathBytes ( )
inline

optional string baseline_model_file_path = 1;

Returns
The bytes for baselineModelFilePath.

Implements MPModelDeltaProtoOrBuilder.

Definition at line 858 of file MPModelDeltaProto.java.

◆ getConstraintOverrides()

.lang.Override.lang.Deprecated java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto> getConstraintOverrides ( )
inline

Use getConstraintOverridesMap() instead.

Implements MPModelDeltaProtoOrBuilder.

Definition at line 1160 of file MPModelDeltaProto.java.

◆ getConstraintOverridesCount()

int getConstraintOverridesCount ( )
inline
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;

Implements MPModelDeltaProtoOrBuilder.

Definition at line 1132 of file MPModelDeltaProto.java.

◆ getConstraintOverridesMap()

.lang.Override java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto> getConstraintOverridesMap ( )
inline
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;

Implements MPModelDeltaProtoOrBuilder.

Definition at line 1178 of file MPModelDeltaProto.java.

◆ getConstraintOverridesOrDefault()

.lang.Override com.google.ortools.linearsolver.MPConstraintProto getConstraintOverridesOrDefault ( int  key,
com.google.ortools.linearsolver.MPConstraintProto  defaultValue 
)
inline
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;

Implements MPModelDeltaProtoOrBuilder.

Definition at line 1196 of file MPModelDeltaProto.java.

◆ getConstraintOverridesOrThrow()

.lang.Override com.google.ortools.linearsolver.MPConstraintProto getConstraintOverridesOrThrow ( int  key)
inline
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;

Implements MPModelDeltaProtoOrBuilder.

Definition at line 1219 of file MPModelDeltaProto.java.

◆ getDefaultInstanceForType()

.lang.Override com.google.ortools.linearsolver.MPModelDeltaProto getDefaultInstanceForType ( )
inline

Definition at line 713 of file MPModelDeltaProto.java.

◆ getDescriptor()

static final com.google.protobuf.Descriptors.Descriptor getDescriptor ( )
inlinestatic

Definition at line 643 of file MPModelDeltaProto.java.

◆ getDescriptorForType()

.lang.Override com.google.protobuf.Descriptors.Descriptor getDescriptorForType ( )
inline

Definition at line 708 of file MPModelDeltaProto.java.

◆ getMutableConstraintOverrides()

.lang.Deprecated java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto> getMutableConstraintOverrides ( )
inline

Use alternate mutation accessors instead.

Definition at line 1261 of file MPModelDeltaProto.java.

◆ getMutableVariableOverrides()

.lang.Deprecated java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto> getMutableVariableOverrides ( )
inline

Use alternate mutation accessors instead.

Definition at line 1063 of file MPModelDeltaProto.java.

◆ getVariableOverrides()

.lang.Override.lang.Deprecated java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto> getVariableOverrides ( )
inline

Use getVariableOverridesMap() instead.

Implements MPModelDeltaProtoOrBuilder.

Definition at line 962 of file MPModelDeltaProto.java.

◆ getVariableOverridesCount()

int getVariableOverridesCount ( )
inline
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;

Implements MPModelDeltaProtoOrBuilder.

Definition at line 934 of file MPModelDeltaProto.java.

◆ getVariableOverridesMap()

.lang.Override java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto> getVariableOverridesMap ( )
inline
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;

Implements MPModelDeltaProtoOrBuilder.

Definition at line 980 of file MPModelDeltaProto.java.

◆ getVariableOverridesOrDefault()

.lang.Override com.google.ortools.linearsolver.MPVariableProto getVariableOverridesOrDefault ( int  key,
com.google.ortools.linearsolver.MPVariableProto  defaultValue 
)
inline
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;

Implements MPModelDeltaProtoOrBuilder.

Definition at line 998 of file MPModelDeltaProto.java.

◆ getVariableOverridesOrThrow()

.lang.Override com.google.ortools.linearsolver.MPVariableProto getVariableOverridesOrThrow ( int  key)
inline
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;

Implements MPModelDeltaProtoOrBuilder.

Definition at line 1021 of file MPModelDeltaProto.java.

◆ hasBaselineModelFilePath()

boolean hasBaselineModelFilePath ( )
inline

optional string baseline_model_file_path = 1;

Returns
Whether the baselineModelFilePath field is set.

Implements MPModelDeltaProtoOrBuilder.

Definition at line 832 of file MPModelDeltaProto.java.

◆ internalGetFieldAccessorTable()

.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable ( )
inlineprotected

Definition at line 675 of file MPModelDeltaProto.java.

◆ internalGetMapField()

com.google.protobuf.MapField internalGetMapField ( int  number)
inlineprotected

Definition at line 648 of file MPModelDeltaProto.java.

◆ internalGetMutableMapField()

com.google.protobuf.MapField internalGetMutableMapField ( int  number)
inlineprotected

Definition at line 661 of file MPModelDeltaProto.java.

◆ isInitialized()

.lang.Override final boolean isInitialized ( )
inline

Definition at line 803 of file MPModelDeltaProto.java.

◆ mergeFrom() [1/3]

Definition at line 786 of file MPModelDeltaProto.java.

◆ mergeFrom() [2/3]

.lang.Override Builder mergeFrom ( com.google.protobuf.CodedInputStream  input,
com.google.protobuf.ExtensionRegistryLite  extensionRegistry 
) throws java.io.IOException
inline

Definition at line 808 of file MPModelDeltaProto.java.

◆ mergeFrom() [3/3]

.lang.Override Builder mergeFrom ( com.google.protobuf.Message  other)
inline

Definition at line 777 of file MPModelDeltaProto.java.

◆ mergeUnknownFields()

.lang.Override final Builder mergeUnknownFields ( final com.google.protobuf.UnknownFieldSet  unknownFields)
inline

Definition at line 1313 of file MPModelDeltaProto.java.

◆ putAllConstraintOverrides()

Builder putAllConstraintOverrides ( java.util.Map< java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto values)
inline
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;

Definition at line 1300 of file MPModelDeltaProto.java.

◆ putAllVariableOverrides()

Builder putAllVariableOverrides ( java.util.Map< java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto values)
inline
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;

Definition at line 1102 of file MPModelDeltaProto.java.

◆ putConstraintOverrides()

Builder putConstraintOverrides ( int  key,
com.google.ortools.linearsolver.MPConstraintProto  value 
)
inline
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;

Definition at line 1277 of file MPModelDeltaProto.java.

◆ putVariableOverrides()

Builder putVariableOverrides ( int  key,
com.google.ortools.linearsolver.MPVariableProto  value 
)
inline
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;

Definition at line 1079 of file MPModelDeltaProto.java.

◆ removeConstraintOverrides()

Builder removeConstraintOverrides ( int  key)
inline
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;

Definition at line 1249 of file MPModelDeltaProto.java.

◆ removeVariableOverrides()

Builder removeVariableOverrides ( int  key)
inline
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;

Definition at line 1051 of file MPModelDeltaProto.java.

◆ setBaselineModelFilePath()

Builder setBaselineModelFilePath ( java.lang.String  value)
inline

optional string baseline_model_file_path = 1;

Parameters
valueThe baselineModelFilePath to set.
Returns
This builder for chaining.

Definition at line 875 of file MPModelDeltaProto.java.

◆ setBaselineModelFilePathBytes()

Builder setBaselineModelFilePathBytes ( com.google.protobuf.ByteString  value)
inline

optional string baseline_model_file_path = 1;

Parameters
valueThe bytes for baselineModelFilePath to set.
Returns
This builder for chaining.

Definition at line 900 of file MPModelDeltaProto.java.

◆ setField()

.lang.Override Builder setField ( com.google.protobuf.Descriptors.FieldDescriptor  field,
java.lang.Object  value 
)
inline

Definition at line 749 of file MPModelDeltaProto.java.

◆ setRepeatedField()

.lang.Override Builder setRepeatedField ( com.google.protobuf.Descriptors.FieldDescriptor  field,
int  index,
java.lang.Object  value 
)
inline

Definition at line 765 of file MPModelDeltaProto.java.

◆ setUnknownFields()

.lang.Override final Builder setUnknownFields ( final com.google.protobuf.UnknownFieldSet  unknownFields)
inline

Definition at line 1307 of file MPModelDeltaProto.java.


The documentation for this class was generated from the following file: