Java Reference

Java Reference

MPModelProto.Builder

Detailed Description

MPModelProto contains all the information for a Linear Programming model.

Protobuf type

operations_research.MPModelProto

Definition at line 845 of file MPModelProto.java.

Public Member Functions

.lang.Override Builder clear ()
 
.lang.Override com.google.protobuf.Descriptors.Descriptor getDescriptorForType ()
 
.lang.Override com.google.ortools.linearsolver.MPModelProto getDefaultInstanceForType ()
 
.lang.Override com.google.ortools.linearsolver.MPModelProto build ()
 
.lang.Override com.google.ortools.linearsolver.MPModelProto 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.MPModelProto other)
 
.lang.Override final boolean isInitialized ()
 
.lang.Override Builder mergeFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
java.util.List< com.google.ortools.linearsolver.MPVariableProtogetVariableList ()
 
int getVariableCount ()
 
com.google.ortools.linearsolver.MPVariableProto getVariable (int index)
 
Builder setVariable (int index, com.google.ortools.linearsolver.MPVariableProto value)
 
Builder setVariable (int index, com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue)
 
Builder addVariable (com.google.ortools.linearsolver.MPVariableProto value)
 
Builder addVariable (int index, com.google.ortools.linearsolver.MPVariableProto value)
 
Builder addVariable (com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue)
 
Builder addVariable (int index, com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue)
 
Builder addAllVariable (java.lang.Iterable<? extends com.google.ortools.linearsolver.MPVariableProto > values)
 
Builder clearVariable ()
 
Builder removeVariable (int index)
 
com.google.ortools.linearsolver.MPVariableProto.Builder getVariableBuilder (int index)
 
com.google.ortools.linearsolver.MPVariableProtoOrBuilder getVariableOrBuilder (int index)
 
java.util.List<? extends com.google.ortools.linearsolver.MPVariableProtoOrBuildergetVariableOrBuilderList ()
 
com.google.ortools.linearsolver.MPVariableProto.Builder addVariableBuilder ()
 
com.google.ortools.linearsolver.MPVariableProto.Builder addVariableBuilder (int index)
 
java.util.List< com.google.ortools.linearsolver.MPVariableProto.BuildergetVariableBuilderList ()
 
java.util.List< com.google.ortools.linearsolver.MPConstraintProtogetConstraintList ()
 
int getConstraintCount ()
 
com.google.ortools.linearsolver.MPConstraintProto getConstraint (int index)
 
Builder setConstraint (int index, com.google.ortools.linearsolver.MPConstraintProto value)
 
Builder setConstraint (int index, com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue)
 
Builder addConstraint (com.google.ortools.linearsolver.MPConstraintProto value)
 
Builder addConstraint (int index, com.google.ortools.linearsolver.MPConstraintProto value)
 
Builder addConstraint (com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue)
 
Builder addConstraint (int index, com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue)
 
Builder addAllConstraint (java.lang.Iterable<? extends com.google.ortools.linearsolver.MPConstraintProto > values)
 
Builder clearConstraint ()
 
Builder removeConstraint (int index)
 
com.google.ortools.linearsolver.MPConstraintProto.Builder getConstraintBuilder (int index)
 
com.google.ortools.linearsolver.MPConstraintProtoOrBuilder getConstraintOrBuilder (int index)
 
java.util.List<? extends com.google.ortools.linearsolver.MPConstraintProtoOrBuildergetConstraintOrBuilderList ()
 
com.google.ortools.linearsolver.MPConstraintProto.Builder addConstraintBuilder ()
 
com.google.ortools.linearsolver.MPConstraintProto.Builder addConstraintBuilder (int index)
 
java.util.List< com.google.ortools.linearsolver.MPConstraintProto.BuildergetConstraintBuilderList ()
 
java.util.List< com.google.ortools.linearsolver.MPGeneralConstraintProtogetGeneralConstraintList ()
 
int getGeneralConstraintCount ()
 
com.google.ortools.linearsolver.MPGeneralConstraintProto getGeneralConstraint (int index)
 
Builder setGeneralConstraint (int index, com.google.ortools.linearsolver.MPGeneralConstraintProto value)
 
Builder setGeneralConstraint (int index, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue)
 
Builder addGeneralConstraint (com.google.ortools.linearsolver.MPGeneralConstraintProto value)
 
Builder addGeneralConstraint (int index, com.google.ortools.linearsolver.MPGeneralConstraintProto value)
 
Builder addGeneralConstraint (com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue)
 
Builder addGeneralConstraint (int index, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue)
 
Builder addAllGeneralConstraint (java.lang.Iterable<? extends com.google.ortools.linearsolver.MPGeneralConstraintProto > values)
 
Builder clearGeneralConstraint ()
 
Builder removeGeneralConstraint (int index)
 
com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder getGeneralConstraintBuilder (int index)
 
com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder getGeneralConstraintOrBuilder (int index)
 
java.util.List<? extends com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuildergetGeneralConstraintOrBuilderList ()
 
com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder addGeneralConstraintBuilder ()
 
com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder addGeneralConstraintBuilder (int index)
 
java.util.List< com.google.ortools.linearsolver.MPGeneralConstraintProto.BuildergetGeneralConstraintBuilderList ()
 
.lang.Override boolean hasMaximize ()
 
.lang.Override boolean getMaximize ()
 
Builder setMaximize (boolean value)
 
Builder clearMaximize ()
 
.lang.Override boolean hasObjectiveOffset ()
 
.lang.Override double getObjectiveOffset ()
 
Builder setObjectiveOffset (double value)
 
Builder clearObjectiveOffset ()
 
boolean hasQuadraticObjective ()
 
com.google.ortools.linearsolver.MPQuadraticObjective getQuadraticObjective ()
 
Builder setQuadraticObjective (com.google.ortools.linearsolver.MPQuadraticObjective value)
 
Builder setQuadraticObjective (com.google.ortools.linearsolver.MPQuadraticObjective.Builder builderForValue)
 
Builder mergeQuadraticObjective (com.google.ortools.linearsolver.MPQuadraticObjective value)
 
Builder clearQuadraticObjective ()
 
com.google.ortools.linearsolver.MPQuadraticObjective.Builder getQuadraticObjectiveBuilder ()
 
com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder getQuadraticObjectiveOrBuilder ()
 
boolean hasName ()
 
java.lang.String getName ()
 
com.google.protobuf.ByteString getNameBytes ()
 
Builder setName (java.lang.String value)
 
Builder clearName ()
 
Builder setNameBytes (com.google.protobuf.ByteString value)
 
boolean hasSolutionHint ()
 
com.google.ortools.linearsolver.PartialVariableAssignment getSolutionHint ()
 
Builder setSolutionHint (com.google.ortools.linearsolver.PartialVariableAssignment value)
 
Builder setSolutionHint (com.google.ortools.linearsolver.PartialVariableAssignment.Builder builderForValue)
 
Builder mergeSolutionHint (com.google.ortools.linearsolver.PartialVariableAssignment value)
 
Builder clearSolutionHint ()
 
com.google.ortools.linearsolver.PartialVariableAssignment.Builder getSolutionHintBuilder ()
 
com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder getSolutionHintOrBuilder ()
 
.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

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

Member Function Documentation

◆ addAllConstraint()

Builder addAllConstraint ( java.lang.Iterable<? extends com.google.ortools.linearsolver.MPConstraintProto values)
inline
All the constraints appearing in the model.

repeated .operations_research.MPConstraintProto constraint = 4;

Definition at line 1667 of file MPModelProto.java.

◆ addAllGeneralConstraint()

Builder addAllGeneralConstraint ( java.lang.Iterable<? extends com.google.ortools.linearsolver.MPGeneralConstraintProto values)
inline
All the general constraints appearing in the model. Note that not all
solvers support all types of general constraints.

repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;

Definition at line 1989 of file MPModelProto.java.

◆ addAllVariable()

Builder addAllVariable ( java.lang.Iterable<? extends com.google.ortools.linearsolver.MPVariableProto values)
inline
All the variables appearing in the model.

repeated .operations_research.MPVariableProto variable = 3;

Definition at line 1355 of file MPModelProto.java.

◆ addConstraint() [1/4]

All the constraints appearing in the model.

repeated .operations_research.MPConstraintProto constraint = 4;

Definition at line 1590 of file MPModelProto.java.

◆ addConstraint() [2/4]

Builder addConstraint ( com.google.ortools.linearsolver.MPConstraintProto.Builder  builderForValue)
inline
All the constraints appearing in the model.

repeated .operations_research.MPConstraintProto constraint = 4;

Definition at line 1631 of file MPModelProto.java.

◆ addConstraint() [3/4]

Builder addConstraint ( int  index,
com.google.ortools.linearsolver.MPConstraintProto  value 
)
inline
All the constraints appearing in the model.

repeated .operations_research.MPConstraintProto constraint = 4;

Definition at line 1610 of file MPModelProto.java.

◆ addConstraint() [4/4]

Builder addConstraint ( int  index,
com.google.ortools.linearsolver.MPConstraintProto.Builder  builderForValue 
)
inline
All the constraints appearing in the model.

repeated .operations_research.MPConstraintProto constraint = 4;

Definition at line 1649 of file MPModelProto.java.

◆ addConstraintBuilder() [1/2]

All the constraints appearing in the model.

repeated .operations_research.MPConstraintProto constraint = 4;

Definition at line 1760 of file MPModelProto.java.

◆ addConstraintBuilder() [2/2]

com.google.ortools.linearsolver.MPConstraintProto.Builder addConstraintBuilder ( int  index)
inline
All the constraints appearing in the model.

repeated .operations_research.MPConstraintProto constraint = 4;

Definition at line 1771 of file MPModelProto.java.

◆ addGeneralConstraint() [1/4]

Builder addGeneralConstraint ( com.google.ortools.linearsolver.MPGeneralConstraintProto  value)
inline
All the general constraints appearing in the model. Note that not all
solvers support all types of general constraints.

repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;

Definition at line 1908 of file MPModelProto.java.

◆ addGeneralConstraint() [2/4]

Builder addGeneralConstraint ( com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder  builderForValue)
inline
All the general constraints appearing in the model. Note that not all
solvers support all types of general constraints.

repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;

Definition at line 1951 of file MPModelProto.java.

◆ addGeneralConstraint() [3/4]

Builder addGeneralConstraint ( int  index,
com.google.ortools.linearsolver.MPGeneralConstraintProto  value 
)
inline
All the general constraints appearing in the model. Note that not all
solvers support all types of general constraints.

repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;

Definition at line 1929 of file MPModelProto.java.

◆ addGeneralConstraint() [4/4]

Builder addGeneralConstraint ( int  index,
com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder  builderForValue 
)
inline
All the general constraints appearing in the model. Note that not all
solvers support all types of general constraints.

repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;

Definition at line 1970 of file MPModelProto.java.

◆ addGeneralConstraintBuilder() [1/2]

All the general constraints appearing in the model. Note that not all
solvers support all types of general constraints.

repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;

Definition at line 2088 of file MPModelProto.java.

◆ addGeneralConstraintBuilder() [2/2]

com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder addGeneralConstraintBuilder ( int  index)
inline
All the general constraints appearing in the model. Note that not all
solvers support all types of general constraints.

repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;

Definition at line 2100 of file MPModelProto.java.

◆ addRepeatedField()

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

Definition at line 1036 of file MPModelProto.java.

◆ addVariable() [1/4]

All the variables appearing in the model.

repeated .operations_research.MPVariableProto variable = 3;

Definition at line 1278 of file MPModelProto.java.

◆ addVariable() [2/4]

Builder addVariable ( com.google.ortools.linearsolver.MPVariableProto.Builder  builderForValue)
inline
All the variables appearing in the model.

repeated .operations_research.MPVariableProto variable = 3;

Definition at line 1319 of file MPModelProto.java.

◆ addVariable() [3/4]

Builder addVariable ( int  index,
com.google.ortools.linearsolver.MPVariableProto  value 
)
inline
All the variables appearing in the model.

repeated .operations_research.MPVariableProto variable = 3;

Definition at line 1298 of file MPModelProto.java.

◆ addVariable() [4/4]

Builder addVariable ( int  index,
com.google.ortools.linearsolver.MPVariableProto.Builder  builderForValue 
)
inline
All the variables appearing in the model.

repeated .operations_research.MPVariableProto variable = 3;

Definition at line 1337 of file MPModelProto.java.

◆ addVariableBuilder() [1/2]

All the variables appearing in the model.

repeated .operations_research.MPVariableProto variable = 3;

Definition at line 1448 of file MPModelProto.java.

◆ addVariableBuilder() [2/2]

com.google.ortools.linearsolver.MPVariableProto.Builder addVariableBuilder ( int  index)
inline
All the variables appearing in the model.

repeated .operations_research.MPVariableProto variable = 3;

Definition at line 1459 of file MPModelProto.java.

◆ build()

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

Definition at line 936 of file MPModelProto.java.

◆ buildPartial()

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

Definition at line 945 of file MPModelProto.java.

◆ clear()

.lang.Override Builder clear ( )
inline

Definition at line 883 of file MPModelProto.java.

◆ clearConstraint()

Builder clearConstraint ( )
inline
All the constraints appearing in the model.

repeated .operations_research.MPConstraintProto constraint = 4;

Definition at line 1686 of file MPModelProto.java.

◆ clearField()

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

Definition at line 1020 of file MPModelProto.java.

◆ clearGeneralConstraint()

Builder clearGeneralConstraint ( )
inline
All the general constraints appearing in the model. Note that not all
solvers support all types of general constraints.

repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;

Definition at line 2009 of file MPModelProto.java.

◆ clearMaximize()

Builder clearMaximize ( )
inline
True if the problem is a maximization problem. Minimize by default.

optional bool maximize = 1 [default = false];

Returns
This builder for chaining.

Definition at line 2180 of file MPModelProto.java.

◆ clearName()

Builder clearName ( )
inline
Name of the model.

optional string name = 5 [default = ""];

Returns
This builder for chaining.

Definition at line 2489 of file MPModelProto.java.

◆ clearObjectiveOffset()

Builder clearObjectiveOffset ( )
inline
Offset for the objective function. Must be finite.

optional double objective_offset = 2 [default = 0];

Returns
This builder for chaining.

Definition at line 2235 of file MPModelProto.java.

◆ clearOneof()

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

Definition at line 1025 of file MPModelProto.java.

◆ clearQuadraticObjective()

Builder clearQuadraticObjective ( )
inline
Optionally, a quadratic objective.
As of 2019/06, only SCIP and Gurobi support quadratic objectives.

optional .operations_research.MPQuadraticObjective quadratic_objective = 8;

Definition at line 2346 of file MPModelProto.java.

◆ clearSolutionHint()

Builder clearSolutionHint ( )
inline
Solution hint.
If a feasible or almost-feasible solution to the problem is already known,
it may be helpful to pass it to the solver so that it can be used. A solver
that supports this feature will try to use this information to create its
initial feasible solution.
Note that it may not always be faster to give a hint like this to the
solver. There is also no guarantee that the solver will use this hint or
try to return a solution "close" to this assignment in case of multiple
optimal solutions.

optional .operations_research.PartialVariableAssignment solution_hint = 6;

Definition at line 2661 of file MPModelProto.java.

◆ clearVariable()

Builder clearVariable ( )
inline
All the variables appearing in the model.

repeated .operations_research.MPVariableProto variable = 3;

Definition at line 1374 of file MPModelProto.java.

◆ clone()

.lang.Override Builder clone ( )
inline

Definition at line 1010 of file MPModelProto.java.

◆ getConstraint()

com.google.ortools.linearsolver.MPConstraintProto getConstraint ( int  index)
inline
All the constraints appearing in the model.

repeated .operations_research.MPConstraintProto constraint = 4;

Implements MPModelProtoOrBuilder.

Definition at line 1537 of file MPModelProto.java.

◆ getConstraintBuilder()

com.google.ortools.linearsolver.MPConstraintProto.Builder getConstraintBuilder ( int  index)
inline
All the constraints appearing in the model.

repeated .operations_research.MPConstraintProto constraint = 4;

Definition at line 1720 of file MPModelProto.java.

◆ getConstraintBuilderList()

java.util.List<com.google.ortools.linearsolver.MPConstraintProto.Builder> getConstraintBuilderList ( )
inline
All the constraints appearing in the model.

repeated .operations_research.MPConstraintProto constraint = 4;

Definition at line 1784 of file MPModelProto.java.

◆ getConstraintCount()

int getConstraintCount ( )
inline
All the constraints appearing in the model.

repeated .operations_research.MPConstraintProto constraint = 4;

Implements MPModelProtoOrBuilder.

Definition at line 1523 of file MPModelProto.java.

◆ getConstraintList()

java.util.List<com.google.ortools.linearsolver.MPConstraintProto> getConstraintList ( )
inline
All the constraints appearing in the model.

repeated .operations_research.MPConstraintProto constraint = 4;

Implements MPModelProtoOrBuilder.

Definition at line 1509 of file MPModelProto.java.

◆ getConstraintOrBuilder()

com.google.ortools.linearsolver.MPConstraintProtoOrBuilder getConstraintOrBuilder ( int  index)
inline
All the constraints appearing in the model.

repeated .operations_research.MPConstraintProto constraint = 4;

Implements MPModelProtoOrBuilder.

Definition at line 1731 of file MPModelProto.java.

◆ getConstraintOrBuilderList()

java.util.List<? extends com.google.ortools.linearsolver.MPConstraintProtoOrBuilder> getConstraintOrBuilderList ( )
inline
All the constraints appearing in the model.

repeated .operations_research.MPConstraintProto constraint = 4;

Implements MPModelProtoOrBuilder.

Definition at line 1746 of file MPModelProto.java.

◆ getDefaultInstanceForType()

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

Definition at line 931 of file MPModelProto.java.

◆ getDescriptor()

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

Definition at line 850 of file MPModelProto.java.

◆ getDescriptorForType()

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

Definition at line 926 of file MPModelProto.java.

◆ getGeneralConstraint()

com.google.ortools.linearsolver.MPGeneralConstraintProto getGeneralConstraint ( int  index)
inline
All the general constraints appearing in the model. Note that not all
solvers support all types of general constraints.

repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;

Implements MPModelProtoOrBuilder.

Definition at line 1852 of file MPModelProto.java.

◆ getGeneralConstraintBuilder()

com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder getGeneralConstraintBuilder ( int  index)
inline
All the general constraints appearing in the model. Note that not all
solvers support all types of general constraints.

repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;

Definition at line 2045 of file MPModelProto.java.

◆ getGeneralConstraintBuilderList()

java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder> getGeneralConstraintBuilderList ( )
inline
All the general constraints appearing in the model. Note that not all
solvers support all types of general constraints.

repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;

Definition at line 2114 of file MPModelProto.java.

◆ getGeneralConstraintCount()

int getGeneralConstraintCount ( )
inline
All the general constraints appearing in the model. Note that not all
solvers support all types of general constraints.

repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;

Implements MPModelProtoOrBuilder.

Definition at line 1837 of file MPModelProto.java.

◆ getGeneralConstraintList()

java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto> getGeneralConstraintList ( )
inline
All the general constraints appearing in the model. Note that not all
solvers support all types of general constraints.

repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;

Implements MPModelProtoOrBuilder.

Definition at line 1822 of file MPModelProto.java.

◆ getGeneralConstraintOrBuilder()

com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder getGeneralConstraintOrBuilder ( int  index)
inline
All the general constraints appearing in the model. Note that not all
solvers support all types of general constraints.

repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;

Implements MPModelProtoOrBuilder.

Definition at line 2057 of file MPModelProto.java.

◆ getGeneralConstraintOrBuilderList()

java.util.List<? extends com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder> getGeneralConstraintOrBuilderList ( )
inline
All the general constraints appearing in the model. Note that not all
solvers support all types of general constraints.

repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;

Implements MPModelProtoOrBuilder.

Definition at line 2073 of file MPModelProto.java.

◆ getMaximize()

.lang.Override boolean getMaximize ( )
inline
True if the problem is a maximization problem. Minimize by default.

optional bool maximize = 1 [default = false];

Returns
The maximize.

Implements MPModelProtoOrBuilder.

Definition at line 2154 of file MPModelProto.java.

◆ getName()

java.lang.String getName ( )
inline
Name of the model.

optional string name = 5 [default = ""];

Returns
The name.

Implements MPModelProtoOrBuilder.

Definition at line 2427 of file MPModelProto.java.

◆ getNameBytes()

com.google.protobuf.ByteString getNameBytes ( )
inline
Name of the model.

optional string name = 5 [default = ""];

Returns
The bytes for name.

Implements MPModelProtoOrBuilder.

Definition at line 2450 of file MPModelProto.java.

◆ getObjectiveOffset()

.lang.Override double getObjectiveOffset ( )
inline
Offset for the objective function. Must be finite.

optional double objective_offset = 2 [default = 0];

Returns
The objectiveOffset.

Implements MPModelProtoOrBuilder.

Definition at line 2209 of file MPModelProto.java.

◆ getQuadraticObjective()

com.google.ortools.linearsolver.MPQuadraticObjective getQuadraticObjective ( )
inline
Optionally, a quadratic objective.
As of 2019/06, only SCIP and Gurobi support quadratic objectives.

optional .operations_research.MPQuadraticObjective quadratic_objective = 8;

Returns
The quadraticObjective.

Implements MPModelProtoOrBuilder.

Definition at line 2266 of file MPModelProto.java.

◆ getQuadraticObjectiveBuilder()

com.google.ortools.linearsolver.MPQuadraticObjective.Builder getQuadraticObjectiveBuilder ( )
inline
Optionally, a quadratic objective.
As of 2019/06, only SCIP and Gurobi support quadratic objectives.

optional .operations_research.MPQuadraticObjective quadratic_objective = 8;

Definition at line 2364 of file MPModelProto.java.

◆ getQuadraticObjectiveOrBuilder()

com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder getQuadraticObjectiveOrBuilder ( )
inline
Optionally, a quadratic objective.
As of 2019/06, only SCIP and Gurobi support quadratic objectives.

optional .operations_research.MPQuadraticObjective quadratic_objective = 8;

Implements MPModelProtoOrBuilder.

Definition at line 2377 of file MPModelProto.java.

◆ getSolutionHint()

Solution hint.
If a feasible or almost-feasible solution to the problem is already known,
it may be helpful to pass it to the solver so that it can be used. A solver
that supports this feature will try to use this information to create its
initial feasible solution.
Note that it may not always be faster to give a hint like this to the
solver. There is also no guarantee that the solver will use this hint or
try to return a solution "close" to this assignment in case of multiple
optimal solutions.

optional .operations_research.PartialVariableAssignment solution_hint = 6;

Returns
The solutionHint.

Implements MPModelProtoOrBuilder.

Definition at line 2553 of file MPModelProto.java.

◆ getSolutionHintBuilder()

Solution hint.
If a feasible or almost-feasible solution to the problem is already known,
it may be helpful to pass it to the solver so that it can be used. A solver
that supports this feature will try to use this information to create its
initial feasible solution.
Note that it may not always be faster to give a hint like this to the
solver. There is also no guarantee that the solver will use this hint or
try to return a solution "close" to this assignment in case of multiple
optimal solutions.

optional .operations_research.PartialVariableAssignment solution_hint = 6;

Definition at line 2686 of file MPModelProto.java.

◆ getSolutionHintOrBuilder()

Solution hint.
If a feasible or almost-feasible solution to the problem is already known,
it may be helpful to pass it to the solver so that it can be used. A solver
that supports this feature will try to use this information to create its
initial feasible solution.
Note that it may not always be faster to give a hint like this to the
solver. There is also no guarantee that the solver will use this hint or
try to return a solution "close" to this assignment in case of multiple
optimal solutions.

optional .operations_research.PartialVariableAssignment solution_hint = 6;

Implements MPModelProtoOrBuilder.

Definition at line 2706 of file MPModelProto.java.

◆ getVariable()

com.google.ortools.linearsolver.MPVariableProto getVariable ( int  index)
inline
All the variables appearing in the model.

repeated .operations_research.MPVariableProto variable = 3;

Implements MPModelProtoOrBuilder.

Definition at line 1225 of file MPModelProto.java.

◆ getVariableBuilder()

com.google.ortools.linearsolver.MPVariableProto.Builder getVariableBuilder ( int  index)
inline
All the variables appearing in the model.

repeated .operations_research.MPVariableProto variable = 3;

Definition at line 1408 of file MPModelProto.java.

◆ getVariableBuilderList()

java.util.List<com.google.ortools.linearsolver.MPVariableProto.Builder> getVariableBuilderList ( )
inline
All the variables appearing in the model.

repeated .operations_research.MPVariableProto variable = 3;

Definition at line 1472 of file MPModelProto.java.

◆ getVariableCount()

int getVariableCount ( )
inline
All the variables appearing in the model.

repeated .operations_research.MPVariableProto variable = 3;

Implements MPModelProtoOrBuilder.

Definition at line 1211 of file MPModelProto.java.

◆ getVariableList()

java.util.List<com.google.ortools.linearsolver.MPVariableProto> getVariableList ( )
inline
All the variables appearing in the model.

repeated .operations_research.MPVariableProto variable = 3;

Implements MPModelProtoOrBuilder.

Definition at line 1197 of file MPModelProto.java.

◆ getVariableOrBuilder()

com.google.ortools.linearsolver.MPVariableProtoOrBuilder getVariableOrBuilder ( int  index)
inline
All the variables appearing in the model.

repeated .operations_research.MPVariableProto variable = 3;

Implements MPModelProtoOrBuilder.

Definition at line 1419 of file MPModelProto.java.

◆ getVariableOrBuilderList()

java.util.List<? extends com.google.ortools.linearsolver.MPVariableProtoOrBuilder> getVariableOrBuilderList ( )
inline
All the variables appearing in the model.

repeated .operations_research.MPVariableProto variable = 3;

Implements MPModelProtoOrBuilder.

Definition at line 1434 of file MPModelProto.java.

◆ hasMaximize()

.lang.Override boolean hasMaximize ( )
inline
True if the problem is a maximization problem. Minimize by default.

optional bool maximize = 1 [default = false];

Returns
Whether the maximize field is set.

Implements MPModelProtoOrBuilder.

Definition at line 2142 of file MPModelProto.java.

◆ hasName()

boolean hasName ( )
inline
Name of the model.

optional string name = 5 [default = ""];

Returns
Whether the name field is set.

Implements MPModelProtoOrBuilder.

Definition at line 2416 of file MPModelProto.java.

◆ hasObjectiveOffset()

.lang.Override boolean hasObjectiveOffset ( )
inline
Offset for the objective function. Must be finite.

optional double objective_offset = 2 [default = 0];

Returns
Whether the objectiveOffset field is set.

Implements MPModelProtoOrBuilder.

Definition at line 2197 of file MPModelProto.java.

◆ hasQuadraticObjective()

boolean hasQuadraticObjective ( )
inline
Optionally, a quadratic objective.
As of 2019/06, only SCIP and Gurobi support quadratic objectives.

optional .operations_research.MPQuadraticObjective quadratic_objective = 8;

Returns
Whether the quadraticObjective field is set.

Implements MPModelProtoOrBuilder.

Definition at line 2254 of file MPModelProto.java.

◆ hasSolutionHint()

boolean hasSolutionHint ( )
inline
Solution hint.
If a feasible or almost-feasible solution to the problem is already known,
it may be helpful to pass it to the solver so that it can be used. A solver
that supports this feature will try to use this information to create its
initial feasible solution.
Note that it may not always be faster to give a hint like this to the
solver. There is also no guarantee that the solver will use this hint or
try to return a solution "close" to this assignment in case of multiple
optimal solutions.

optional .operations_research.PartialVariableAssignment solution_hint = 6;

Returns
Whether the solutionHint field is set.

Implements MPModelProtoOrBuilder.

Definition at line 2534 of file MPModelProto.java.

◆ internalGetFieldAccessorTable()

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

Definition at line 856 of file MPModelProto.java.

◆ isInitialized()

.lang.Override final boolean isInitialized ( )
inline

Definition at line 1154 of file MPModelProto.java.

◆ mergeFrom() [1/3]

Definition at line 1051 of file MPModelProto.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 1159 of file MPModelProto.java.

◆ mergeFrom() [3/3]

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

Definition at line 1042 of file MPModelProto.java.

◆ mergeQuadraticObjective()

Builder mergeQuadraticObjective ( com.google.ortools.linearsolver.MPQuadraticObjective  value)
inline
Optionally, a quadratic objective.
As of 2019/06, only SCIP and Gurobi support quadratic objectives.

optional .operations_research.MPQuadraticObjective quadratic_objective = 8;

Definition at line 2321 of file MPModelProto.java.

◆ mergeSolutionHint()

Solution hint.
If a feasible or almost-feasible solution to the problem is already known,
it may be helpful to pass it to the solver so that it can be used. A solver
that supports this feature will try to use this information to create its
initial feasible solution.
Note that it may not always be faster to give a hint like this to the
solver. There is also no guarantee that the solver will use this hint or
try to return a solution "close" to this assignment in case of multiple
optimal solutions.

optional .operations_research.PartialVariableAssignment solution_hint = 6;

Definition at line 2629 of file MPModelProto.java.

◆ mergeUnknownFields()

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

Definition at line 2749 of file MPModelProto.java.

◆ removeConstraint()

Builder removeConstraint ( int  index)
inline
All the constraints appearing in the model.

repeated .operations_research.MPConstraintProto constraint = 4;

Definition at line 1703 of file MPModelProto.java.

◆ removeGeneralConstraint()

Builder removeGeneralConstraint ( int  index)
inline
All the general constraints appearing in the model. Note that not all
solvers support all types of general constraints.

repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;

Definition at line 2027 of file MPModelProto.java.

◆ removeVariable()

Builder removeVariable ( int  index)
inline
All the variables appearing in the model.

repeated .operations_research.MPVariableProto variable = 3;

Definition at line 1391 of file MPModelProto.java.

◆ setConstraint() [1/2]

Builder setConstraint ( int  index,
com.google.ortools.linearsolver.MPConstraintProto  value 
)
inline
All the constraints appearing in the model.

repeated .operations_research.MPConstraintProto constraint = 4;

Definition at line 1551 of file MPModelProto.java.

◆ setConstraint() [2/2]

Builder setConstraint ( int  index,
com.google.ortools.linearsolver.MPConstraintProto.Builder  builderForValue 
)
inline
All the constraints appearing in the model.

repeated .operations_research.MPConstraintProto constraint = 4;

Definition at line 1572 of file MPModelProto.java.

◆ setField()

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

Definition at line 1014 of file MPModelProto.java.

◆ setGeneralConstraint() [1/2]

Builder setGeneralConstraint ( int  index,
com.google.ortools.linearsolver.MPGeneralConstraintProto  value 
)
inline
All the general constraints appearing in the model. Note that not all
solvers support all types of general constraints.

repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;

Definition at line 1867 of file MPModelProto.java.

◆ setGeneralConstraint() [2/2]

Builder setGeneralConstraint ( int  index,
com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder  builderForValue 
)
inline
All the general constraints appearing in the model. Note that not all
solvers support all types of general constraints.

repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;

Definition at line 1889 of file MPModelProto.java.

◆ setMaximize()

Builder setMaximize ( boolean  value)
inline
True if the problem is a maximization problem. Minimize by default.

optional bool maximize = 1 [default = false];

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

Definition at line 2166 of file MPModelProto.java.

◆ setName()

Builder setName ( java.lang.String  value)
inline
Name of the model.

optional string name = 5 [default = ""];

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

Definition at line 2471 of file MPModelProto.java.

◆ setNameBytes()

Builder setNameBytes ( com.google.protobuf.ByteString  value)
inline
Name of the model.

optional string name = 5 [default = ""];

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

Definition at line 2504 of file MPModelProto.java.

◆ setObjectiveOffset()

Builder setObjectiveOffset ( double  value)
inline
Offset for the objective function. Must be finite.

optional double objective_offset = 2 [default = 0];

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

Definition at line 2221 of file MPModelProto.java.

◆ setQuadraticObjective() [1/2]

Builder setQuadraticObjective ( com.google.ortools.linearsolver.MPQuadraticObjective  value)
inline
Optionally, a quadratic objective.
As of 2019/06, only SCIP and Gurobi support quadratic objectives.

optional .operations_research.MPQuadraticObjective quadratic_objective = 8;

Definition at line 2281 of file MPModelProto.java.

◆ setQuadraticObjective() [2/2]

Builder setQuadraticObjective ( com.google.ortools.linearsolver.MPQuadraticObjective.Builder  builderForValue)
inline
Optionally, a quadratic objective.
As of 2019/06, only SCIP and Gurobi support quadratic objectives.

optional .operations_research.MPQuadraticObjective quadratic_objective = 8;

Definition at line 2302 of file MPModelProto.java.

◆ setRepeatedField()

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

Definition at line 1030 of file MPModelProto.java.

◆ setSolutionHint() [1/2]

Solution hint.
If a feasible or almost-feasible solution to the problem is already known,
it may be helpful to pass it to the solver so that it can be used. A solver
that supports this feature will try to use this information to create its
initial feasible solution.
Note that it may not always be faster to give a hint like this to the
solver. There is also no guarantee that the solver will use this hint or
try to return a solution "close" to this assignment in case of multiple
optimal solutions.

optional .operations_research.PartialVariableAssignment solution_hint = 6;

Definition at line 2575 of file MPModelProto.java.

◆ setSolutionHint() [2/2]

Solution hint.
If a feasible or almost-feasible solution to the problem is already known,
it may be helpful to pass it to the solver so that it can be used. A solver
that supports this feature will try to use this information to create its
initial feasible solution.
Note that it may not always be faster to give a hint like this to the
solver. There is also no guarantee that the solver will use this hint or
try to return a solution "close" to this assignment in case of multiple
optimal solutions.

optional .operations_research.PartialVariableAssignment solution_hint = 6;

Definition at line 2603 of file MPModelProto.java.

◆ setUnknownFields()

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

Definition at line 2743 of file MPModelProto.java.

◆ setVariable() [1/2]

Builder setVariable ( int  index,
com.google.ortools.linearsolver.MPVariableProto  value 
)
inline
All the variables appearing in the model.

repeated .operations_research.MPVariableProto variable = 3;

Definition at line 1239 of file MPModelProto.java.

◆ setVariable() [2/2]

Builder setVariable ( int  index,
com.google.ortools.linearsolver.MPVariableProto.Builder  builderForValue 
)
inline
All the variables appearing in the model.

repeated .operations_research.MPVariableProto variable = 3;

Definition at line 1260 of file MPModelProto.java.


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