Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.sat.CpModelProto.Builder Class Reference
Inheritance diagram for com.google.ortools.sat.CpModelProto.Builder:
com.google.ortools.sat.CpModelProtoOrBuilder

Public Member Functions

Builder clear ()
 
com.google.protobuf.Descriptors.Descriptor getDescriptorForType ()
 
com.google.ortools.sat.CpModelProto getDefaultInstanceForType ()
 
com.google.ortools.sat.CpModelProto build ()
 
com.google.ortools.sat.CpModelProto buildPartial ()
 
Builder clone ()
 
Builder setField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
 
Builder clearField (com.google.protobuf.Descriptors.FieldDescriptor field)
 
Builder clearOneof (com.google.protobuf.Descriptors.OneofDescriptor oneof)
 
Builder setRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
 
Builder addRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
 
Builder mergeFrom (com.google.protobuf.Message other)
 
Builder mergeFrom (com.google.ortools.sat.CpModelProto other)
 
final boolean isInitialized ()
 
Builder mergeFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
java.lang.String getName ()
 
com.google.protobuf.ByteString getNameBytes ()
 
Builder setName (java.lang.String value)
 
Builder clearName ()
 
Builder setNameBytes (com.google.protobuf.ByteString value)
 
java.util.List< com.google.ortools.sat.IntegerVariableProtogetVariablesList ()
 
int getVariablesCount ()
 
com.google.ortools.sat.IntegerVariableProto getVariables (int index)
 
Builder setVariables (int index, com.google.ortools.sat.IntegerVariableProto value)
 
Builder setVariables (int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue)
 
Builder addVariables (com.google.ortools.sat.IntegerVariableProto value)
 
Builder addVariables (int index, com.google.ortools.sat.IntegerVariableProto value)
 
Builder addVariables (com.google.ortools.sat.IntegerVariableProto.Builder builderForValue)
 
Builder addVariables (int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue)
 
Builder addAllVariables (java.lang.Iterable<? extends com.google.ortools.sat.IntegerVariableProto > values)
 
Builder clearVariables ()
 
Builder removeVariables (int index)
 
com.google.ortools.sat.IntegerVariableProto.Builder getVariablesBuilder (int index)
 
com.google.ortools.sat.IntegerVariableProtoOrBuilder getVariablesOrBuilder (int index)
 
java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuildergetVariablesOrBuilderList ()
 
com.google.ortools.sat.IntegerVariableProto.Builder addVariablesBuilder ()
 
com.google.ortools.sat.IntegerVariableProto.Builder addVariablesBuilder (int index)
 
java.util.List< com.google.ortools.sat.IntegerVariableProto.BuildergetVariablesBuilderList ()
 
java.util.List< com.google.ortools.sat.ConstraintProtogetConstraintsList ()
 
int getConstraintsCount ()
 
com.google.ortools.sat.ConstraintProto getConstraints (int index)
 
Builder setConstraints (int index, com.google.ortools.sat.ConstraintProto value)
 
Builder setConstraints (int index, com.google.ortools.sat.ConstraintProto.Builder builderForValue)
 
Builder addConstraints (com.google.ortools.sat.ConstraintProto value)
 
Builder addConstraints (int index, com.google.ortools.sat.ConstraintProto value)
 
Builder addConstraints (com.google.ortools.sat.ConstraintProto.Builder builderForValue)
 
Builder addConstraints (int index, com.google.ortools.sat.ConstraintProto.Builder builderForValue)
 
Builder addAllConstraints (java.lang.Iterable<? extends com.google.ortools.sat.ConstraintProto > values)
 
Builder clearConstraints ()
 
Builder removeConstraints (int index)
 
com.google.ortools.sat.ConstraintProto.Builder getConstraintsBuilder (int index)
 
com.google.ortools.sat.ConstraintProtoOrBuilder getConstraintsOrBuilder (int index)
 
java.util.List<? extends com.google.ortools.sat.ConstraintProtoOrBuildergetConstraintsOrBuilderList ()
 
com.google.ortools.sat.ConstraintProto.Builder addConstraintsBuilder ()
 
com.google.ortools.sat.ConstraintProto.Builder addConstraintsBuilder (int index)
 
java.util.List< com.google.ortools.sat.ConstraintProto.BuildergetConstraintsBuilderList ()
 
boolean hasObjective ()
 
com.google.ortools.sat.CpObjectiveProto getObjective ()
 
Builder setObjective (com.google.ortools.sat.CpObjectiveProto value)
 
Builder setObjective (com.google.ortools.sat.CpObjectiveProto.Builder builderForValue)
 
Builder mergeObjective (com.google.ortools.sat.CpObjectiveProto value)
 
Builder clearObjective ()
 
com.google.ortools.sat.CpObjectiveProto.Builder getObjectiveBuilder ()
 
com.google.ortools.sat.CpObjectiveProtoOrBuilder getObjectiveOrBuilder ()
 
boolean hasFloatingPointObjective ()
 
com.google.ortools.sat.FloatObjectiveProto getFloatingPointObjective ()
 
Builder setFloatingPointObjective (com.google.ortools.sat.FloatObjectiveProto value)
 
Builder setFloatingPointObjective (com.google.ortools.sat.FloatObjectiveProto.Builder builderForValue)
 
Builder mergeFloatingPointObjective (com.google.ortools.sat.FloatObjectiveProto value)
 
Builder clearFloatingPointObjective ()
 
com.google.ortools.sat.FloatObjectiveProto.Builder getFloatingPointObjectiveBuilder ()
 
com.google.ortools.sat.FloatObjectiveProtoOrBuilder getFloatingPointObjectiveOrBuilder ()
 
java.util.List< com.google.ortools.sat.DecisionStrategyProtogetSearchStrategyList ()
 
int getSearchStrategyCount ()
 
com.google.ortools.sat.DecisionStrategyProto getSearchStrategy (int index)
 
Builder setSearchStrategy (int index, com.google.ortools.sat.DecisionStrategyProto value)
 
Builder setSearchStrategy (int index, com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue)
 
Builder addSearchStrategy (com.google.ortools.sat.DecisionStrategyProto value)
 
Builder addSearchStrategy (int index, com.google.ortools.sat.DecisionStrategyProto value)
 
Builder addSearchStrategy (com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue)
 
Builder addSearchStrategy (int index, com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue)
 
Builder addAllSearchStrategy (java.lang.Iterable<? extends com.google.ortools.sat.DecisionStrategyProto > values)
 
Builder clearSearchStrategy ()
 
Builder removeSearchStrategy (int index)
 
com.google.ortools.sat.DecisionStrategyProto.Builder getSearchStrategyBuilder (int index)
 
com.google.ortools.sat.DecisionStrategyProtoOrBuilder getSearchStrategyOrBuilder (int index)
 
java.util.List<? extends com.google.ortools.sat.DecisionStrategyProtoOrBuildergetSearchStrategyOrBuilderList ()
 
com.google.ortools.sat.DecisionStrategyProto.Builder addSearchStrategyBuilder ()
 
com.google.ortools.sat.DecisionStrategyProto.Builder addSearchStrategyBuilder (int index)
 
java.util.List< com.google.ortools.sat.DecisionStrategyProto.BuildergetSearchStrategyBuilderList ()
 
boolean hasSolutionHint ()
 
com.google.ortools.sat.PartialVariableAssignment getSolutionHint ()
 
Builder setSolutionHint (com.google.ortools.sat.PartialVariableAssignment value)
 
Builder setSolutionHint (com.google.ortools.sat.PartialVariableAssignment.Builder builderForValue)
 
Builder mergeSolutionHint (com.google.ortools.sat.PartialVariableAssignment value)
 
Builder clearSolutionHint ()
 
com.google.ortools.sat.PartialVariableAssignment.Builder getSolutionHintBuilder ()
 
com.google.ortools.sat.PartialVariableAssignmentOrBuilder getSolutionHintOrBuilder ()
 
java.util.List< java.lang.Integer > getAssumptionsList ()
 
int getAssumptionsCount ()
 
int getAssumptions (int index)
 
Builder setAssumptions (int index, int value)
 
Builder addAssumptions (int value)
 
Builder addAllAssumptions (java.lang.Iterable<? extends java.lang.Integer > values)
 
Builder clearAssumptions ()
 
boolean hasSymmetry ()
 
com.google.ortools.sat.SymmetryProto getSymmetry ()
 
Builder setSymmetry (com.google.ortools.sat.SymmetryProto value)
 
Builder setSymmetry (com.google.ortools.sat.SymmetryProto.Builder builderForValue)
 
Builder mergeSymmetry (com.google.ortools.sat.SymmetryProto value)
 
Builder clearSymmetry ()
 
com.google.ortools.sat.SymmetryProto.Builder getSymmetryBuilder ()
 
com.google.ortools.sat.SymmetryProtoOrBuilder getSymmetryOrBuilder ()
 
final Builder setUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields)
 
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.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable ()
 

Detailed Description

A constraint programming problem.

Protobuf type operations_research.sat.CpModelProto

Definition at line 904 of file CpModelProto.java.

Member Function Documentation

◆ addAllAssumptions()

Builder com.google.ortools.sat.CpModelProto.Builder.addAllAssumptions ( java.lang.Iterable<? extends java.lang.Integer > values)
A list of literals. The model will be solved assuming all these literals
are true. Compared to just fixing the domain of these literals, using this
mechanism is slower but allows in case the model is INFEASIBLE to get a
potentially small subset of them that can be used to explain the
infeasibility.

Think (IIS), except when you are only concerned by the provided
assumptions. This is powerful as it allows to group a set of logically
related constraint under only one enforcement literal which can potentially
give you a good and interpretable explanation for infeasiblity.

Such infeasibility explanation will be available in the
sufficient_assumptions_for_infeasibility response field.

repeated int32 assumptions = 7;

Parameters
valuesThe assumptions to add.
Returns
This builder for chaining.

Definition at line 3299 of file CpModelProto.java.

◆ addAllConstraints()

Builder com.google.ortools.sat.CpModelProto.Builder.addAllConstraints ( java.lang.Iterable<? extends com.google.ortools.sat.ConstraintProto > values)

repeated .operations_research.sat.ConstraintProto constraints = 3;

Definition at line 1911 of file CpModelProto.java.

◆ addAllSearchStrategy()

Builder com.google.ortools.sat.CpModelProto.Builder.addAllSearchStrategy ( java.lang.Iterable<? extends com.google.ortools.sat.DecisionStrategyProto > values)
Defines the strategy that the solver should follow when the
search_branching parameter is set to FIXED_SEARCH. Note that this strategy
is also used as a heuristic when we are not in fixed search.

Advanced Usage: if not all variables appears and the parameter
"instantiate_all_variables" is set to false, then the solver will not try
to instantiate the variables that do not appear. Thus, at the end of the
search, not all variables may be fixed. Currently, we will set them to
their lower bound in the solution.

repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;

Definition at line 2693 of file CpModelProto.java.

◆ addAllVariables()

Builder com.google.ortools.sat.CpModelProto.Builder.addAllVariables ( java.lang.Iterable<? extends com.google.ortools.sat.IntegerVariableProto > values)
The associated Protos should be referred by their index in these fields.

repeated .operations_research.sat.IntegerVariableProto variables = 2;

Definition at line 1639 of file CpModelProto.java.

◆ addAssumptions()

Builder com.google.ortools.sat.CpModelProto.Builder.addAssumptions ( int value)
A list of literals. The model will be solved assuming all these literals
are true. Compared to just fixing the domain of these literals, using this
mechanism is slower but allows in case the model is INFEASIBLE to get a
potentially small subset of them that can be used to explain the
infeasibility.

Think (IIS), except when you are only concerned by the provided
assumptions. This is powerful as it allows to group a set of logically
related constraint under only one enforcement literal which can potentially
give you a good and interpretable explanation for infeasiblity.

Such infeasibility explanation will be available in the
sufficient_assumptions_for_infeasibility response field.

repeated int32 assumptions = 7;

Parameters
valueThe assumptions to add.
Returns
This builder for chaining.

Definition at line 3270 of file CpModelProto.java.

◆ addConstraints() [1/4]

Builder com.google.ortools.sat.CpModelProto.Builder.addConstraints ( com.google.ortools.sat.ConstraintProto value)

repeated .operations_research.sat.ConstraintProto constraints = 3;

Definition at line 1850 of file CpModelProto.java.

◆ addConstraints() [2/4]

Builder com.google.ortools.sat.CpModelProto.Builder.addConstraints ( com.google.ortools.sat.ConstraintProto.Builder builderForValue)

repeated .operations_research.sat.ConstraintProto constraints = 3;

Definition at line 1883 of file CpModelProto.java.

◆ addConstraints() [3/4]

Builder com.google.ortools.sat.CpModelProto.Builder.addConstraints ( int index,
com.google.ortools.sat.ConstraintProto value )

repeated .operations_research.sat.ConstraintProto constraints = 3;

Definition at line 1866 of file CpModelProto.java.

◆ addConstraints() [4/4]

Builder com.google.ortools.sat.CpModelProto.Builder.addConstraints ( int index,
com.google.ortools.sat.ConstraintProto.Builder builderForValue )

repeated .operations_research.sat.ConstraintProto constraints = 3;

Definition at line 1897 of file CpModelProto.java.

◆ addConstraintsBuilder() [1/2]

com.google.ortools.sat.ConstraintProto.Builder com.google.ortools.sat.CpModelProto.Builder.addConstraintsBuilder ( )

repeated .operations_research.sat.ConstraintProto constraints = 3;

Definition at line 1980 of file CpModelProto.java.

◆ addConstraintsBuilder() [2/2]

com.google.ortools.sat.ConstraintProto.Builder com.google.ortools.sat.CpModelProto.Builder.addConstraintsBuilder ( int index)

repeated .operations_research.sat.ConstraintProto constraints = 3;

Definition at line 1987 of file CpModelProto.java.

◆ addRepeatedField()

Builder com.google.ortools.sat.CpModelProto.Builder.addRepeatedField ( com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value )

Definition at line 1116 of file CpModelProto.java.

◆ addSearchStrategy() [1/4]

Builder com.google.ortools.sat.CpModelProto.Builder.addSearchStrategy ( com.google.ortools.sat.DecisionStrategyProto value)
Defines the strategy that the solver should follow when the
search_branching parameter is set to FIXED_SEARCH. Note that this strategy
is also used as a heuristic when we are not in fixed search.

Advanced Usage: if not all variables appears and the parameter
"instantiate_all_variables" is set to false, then the solver will not try
to instantiate the variables that do not appear. Thus, at the end of the
search, not all variables may be fixed. Currently, we will set them to
their lower bound in the solution.

repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;

Definition at line 2584 of file CpModelProto.java.

◆ addSearchStrategy() [2/4]

Builder com.google.ortools.sat.CpModelProto.Builder.addSearchStrategy ( com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue)
Defines the strategy that the solver should follow when the
search_branching parameter is set to FIXED_SEARCH. Note that this strategy
is also used as a heuristic when we are not in fixed search.

Advanced Usage: if not all variables appears and the parameter
"instantiate_all_variables" is set to false, then the solver will not try
to instantiate the variables that do not appear. Thus, at the end of the
search, not all variables may be fixed. Currently, we will set them to
their lower bound in the solution.

repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;

Definition at line 2641 of file CpModelProto.java.

◆ addSearchStrategy() [3/4]

Builder com.google.ortools.sat.CpModelProto.Builder.addSearchStrategy ( int index,
com.google.ortools.sat.DecisionStrategyProto value )
Defines the strategy that the solver should follow when the
search_branching parameter is set to FIXED_SEARCH. Note that this strategy
is also used as a heuristic when we are not in fixed search.

Advanced Usage: if not all variables appears and the parameter
"instantiate_all_variables" is set to false, then the solver will not try
to instantiate the variables that do not appear. Thus, at the end of the
search, not all variables may be fixed. Currently, we will set them to
their lower bound in the solution.

repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;

Definition at line 2612 of file CpModelProto.java.

◆ addSearchStrategy() [4/4]

Builder com.google.ortools.sat.CpModelProto.Builder.addSearchStrategy ( int index,
com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue )
Defines the strategy that the solver should follow when the
search_branching parameter is set to FIXED_SEARCH. Note that this strategy
is also used as a heuristic when we are not in fixed search.

Advanced Usage: if not all variables appears and the parameter
"instantiate_all_variables" is set to false, then the solver will not try
to instantiate the variables that do not appear. Thus, at the end of the
search, not all variables may be fixed. Currently, we will set them to
their lower bound in the solution.

repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;

Definition at line 2667 of file CpModelProto.java.

◆ addSearchStrategyBuilder() [1/2]

com.google.ortools.sat.DecisionStrategyProto.Builder com.google.ortools.sat.CpModelProto.Builder.addSearchStrategyBuilder ( )
Defines the strategy that the solver should follow when the
search_branching parameter is set to FIXED_SEARCH. Note that this strategy
is also used as a heuristic when we are not in fixed search.

Advanced Usage: if not all variables appears and the parameter
"instantiate_all_variables" is set to false, then the solver will not try
to instantiate the variables that do not appear. Thus, at the end of the
search, not all variables may be fixed. Currently, we will set them to
their lower bound in the solution.

repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;

Definition at line 2834 of file CpModelProto.java.

◆ addSearchStrategyBuilder() [2/2]

com.google.ortools.sat.DecisionStrategyProto.Builder com.google.ortools.sat.CpModelProto.Builder.addSearchStrategyBuilder ( int index)
Defines the strategy that the solver should follow when the
search_branching parameter is set to FIXED_SEARCH. Note that this strategy
is also used as a heuristic when we are not in fixed search.

Advanced Usage: if not all variables appears and the parameter
"instantiate_all_variables" is set to false, then the solver will not try
to instantiate the variables that do not appear. Thus, at the end of the
search, not all variables may be fixed. Currently, we will set them to
their lower bound in the solution.

repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;

Definition at line 2853 of file CpModelProto.java.

◆ addVariables() [1/4]

Builder com.google.ortools.sat.CpModelProto.Builder.addVariables ( com.google.ortools.sat.IntegerVariableProto value)
The associated Protos should be referred by their index in these fields.

repeated .operations_research.sat.IntegerVariableProto variables = 2;

Definition at line 1562 of file CpModelProto.java.

◆ addVariables() [2/4]

Builder com.google.ortools.sat.CpModelProto.Builder.addVariables ( com.google.ortools.sat.IntegerVariableProto.Builder builderForValue)
The associated Protos should be referred by their index in these fields.

repeated .operations_research.sat.IntegerVariableProto variables = 2;

Definition at line 1603 of file CpModelProto.java.

◆ addVariables() [3/4]

Builder com.google.ortools.sat.CpModelProto.Builder.addVariables ( int index,
com.google.ortools.sat.IntegerVariableProto value )
The associated Protos should be referred by their index in these fields.

repeated .operations_research.sat.IntegerVariableProto variables = 2;

Definition at line 1582 of file CpModelProto.java.

◆ addVariables() [4/4]

Builder com.google.ortools.sat.CpModelProto.Builder.addVariables ( int index,
com.google.ortools.sat.IntegerVariableProto.Builder builderForValue )
The associated Protos should be referred by their index in these fields.

repeated .operations_research.sat.IntegerVariableProto variables = 2;

Definition at line 1621 of file CpModelProto.java.

◆ addVariablesBuilder() [1/2]

com.google.ortools.sat.IntegerVariableProto.Builder com.google.ortools.sat.CpModelProto.Builder.addVariablesBuilder ( )
The associated Protos should be referred by their index in these fields.

repeated .operations_research.sat.IntegerVariableProto variables = 2;

Definition at line 1732 of file CpModelProto.java.

◆ addVariablesBuilder() [2/2]

com.google.ortools.sat.IntegerVariableProto.Builder com.google.ortools.sat.CpModelProto.Builder.addVariablesBuilder ( int index)
The associated Protos should be referred by their index in these fields.

repeated .operations_research.sat.IntegerVariableProto variables = 2;

Definition at line 1743 of file CpModelProto.java.

◆ build()

com.google.ortools.sat.CpModelProto com.google.ortools.sat.CpModelProto.Builder.build ( )

Definition at line 1005 of file CpModelProto.java.

◆ buildPartial()

com.google.ortools.sat.CpModelProto com.google.ortools.sat.CpModelProto.Builder.buildPartial ( )

Definition at line 1014 of file CpModelProto.java.

◆ clear()

Builder com.google.ortools.sat.CpModelProto.Builder.clear ( )

Definition at line 944 of file CpModelProto.java.

◆ clearAssumptions()

Builder com.google.ortools.sat.CpModelProto.Builder.clearAssumptions ( )
A list of literals. The model will be solved assuming all these literals
are true. Compared to just fixing the domain of these literals, using this
mechanism is slower but allows in case the model is INFEASIBLE to get a
potentially small subset of them that can be used to explain the
infeasibility.

Think (IIS), except when you are only concerned by the provided
assumptions. This is powerful as it allows to group a set of logically
related constraint under only one enforcement literal which can potentially
give you a good and interpretable explanation for infeasiblity.

Such infeasibility explanation will be available in the
sufficient_assumptions_for_infeasibility response field.

repeated int32 assumptions = 7;

Returns
This builder for chaining.

Definition at line 3328 of file CpModelProto.java.

◆ clearConstraints()

Builder com.google.ortools.sat.CpModelProto.Builder.clearConstraints ( )

repeated .operations_research.sat.ConstraintProto constraints = 3;

Definition at line 1926 of file CpModelProto.java.

◆ clearField()

Builder com.google.ortools.sat.CpModelProto.Builder.clearField ( com.google.protobuf.Descriptors.FieldDescriptor field)

Definition at line 1100 of file CpModelProto.java.

◆ clearFloatingPointObjective()

Builder com.google.ortools.sat.CpModelProto.Builder.clearFloatingPointObjective ( )
Advanced usage.
It is invalid to have both an objective and a floating point objective.

The objective of the model, in floating point format. The solver will
automatically scale this to integer during expansion and thus convert it to
a normal CpObjectiveProto. See the mip* parameters to control how this is
scaled. In most situation the precision will be good enough, but you can
see the logs to see what are the precision guaranteed when this is
converted to a fixed point representation.

Note that even if the precision is bad, the returned objective_value and
best_objective_bound will be computed correctly. So at the end of the solve
you can check the gap if you only want precise optimal.

.operations_research.sat.FloatObjectiveProto floating_point_objective = 9;

Definition at line 2342 of file CpModelProto.java.

◆ clearName()

Builder com.google.ortools.sat.CpModelProto.Builder.clearName ( )
For debug/logging only. Can be empty.

string name = 1;

Returns
This builder for chaining.

Definition at line 1437 of file CpModelProto.java.

◆ clearObjective()

Builder com.google.ortools.sat.CpModelProto.Builder.clearObjective ( )
The objective to minimize. Can be empty for pure decision problems.

.operations_research.sat.CpObjectiveProto objective = 4;

Definition at line 2113 of file CpModelProto.java.

◆ clearOneof()

Builder com.google.ortools.sat.CpModelProto.Builder.clearOneof ( com.google.protobuf.Descriptors.OneofDescriptor oneof)

Definition at line 1105 of file CpModelProto.java.

◆ clearSearchStrategy()

Builder com.google.ortools.sat.CpModelProto.Builder.clearSearchStrategy ( )
Defines the strategy that the solver should follow when the
search_branching parameter is set to FIXED_SEARCH. Note that this strategy
is also used as a heuristic when we are not in fixed search.

Advanced Usage: if not all variables appears and the parameter
"instantiate_all_variables" is set to false, then the solver will not try
to instantiate the variables that do not appear. Thus, at the end of the
search, not all variables may be fixed. Currently, we will set them to
their lower bound in the solution.

repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;

Definition at line 2720 of file CpModelProto.java.

◆ clearSolutionHint()

Builder com.google.ortools.sat.CpModelProto.Builder.clearSolutionHint ( )
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. The
solver 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.

.operations_research.sat.PartialVariableAssignment solution_hint = 6;

Definition at line 3051 of file CpModelProto.java.

◆ clearSymmetry()

Builder com.google.ortools.sat.CpModelProto.Builder.clearSymmetry ( )
For now, this is not meant to be filled by a client writing a model, but
by our preprocessing step.

Information about the symmetries of the feasible solution space.
These usually leaves the objective invariant.

.operations_research.sat.SymmetryProto symmetry = 8;

Definition at line 3458 of file CpModelProto.java.

◆ clearVariables()

Builder com.google.ortools.sat.CpModelProto.Builder.clearVariables ( )
The associated Protos should be referred by their index in these fields.

repeated .operations_research.sat.IntegerVariableProto variables = 2;

Definition at line 1658 of file CpModelProto.java.

◆ clone()

Builder com.google.ortools.sat.CpModelProto.Builder.clone ( )

Definition at line 1090 of file CpModelProto.java.

◆ getAssumptions()

int com.google.ortools.sat.CpModelProto.Builder.getAssumptions ( int index)
A list of literals. The model will be solved assuming all these literals
are true. Compared to just fixing the domain of these literals, using this
mechanism is slower but allows in case the model is INFEASIBLE to get a
potentially small subset of them that can be used to explain the
infeasibility.

Think (IIS), except when you are only concerned by the provided
assumptions. This is powerful as it allows to group a set of logically
related constraint under only one enforcement literal which can potentially
give you a good and interpretable explanation for infeasiblity.

Such infeasibility explanation will be available in the
sufficient_assumptions_for_infeasibility response field.

repeated int32 assumptions = 7;

Parameters
indexThe index of the element to return.
Returns
The assumptions at the given index.

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 3215 of file CpModelProto.java.

◆ getAssumptionsCount()

int com.google.ortools.sat.CpModelProto.Builder.getAssumptionsCount ( )
A list of literals. The model will be solved assuming all these literals
are true. Compared to just fixing the domain of these literals, using this
mechanism is slower but allows in case the model is INFEASIBLE to get a
potentially small subset of them that can be used to explain the
infeasibility.

Think (IIS), except when you are only concerned by the provided
assumptions. This is powerful as it allows to group a set of logically
related constraint under only one enforcement literal which can potentially
give you a good and interpretable explanation for infeasiblity.

Such infeasibility explanation will be available in the
sufficient_assumptions_for_infeasibility response field.

repeated int32 assumptions = 7;

Returns
The count of assumptions.

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 3191 of file CpModelProto.java.

◆ getAssumptionsList()

java.util.List< java.lang.Integer > com.google.ortools.sat.CpModelProto.Builder.getAssumptionsList ( )
A list of literals. The model will be solved assuming all these literals
are true. Compared to just fixing the domain of these literals, using this
mechanism is slower but allows in case the model is INFEASIBLE to get a
potentially small subset of them that can be used to explain the
infeasibility.

Think (IIS), except when you are only concerned by the provided
assumptions. This is powerful as it allows to group a set of logically
related constraint under only one enforcement literal which can potentially
give you a good and interpretable explanation for infeasiblity.

Such infeasibility explanation will be available in the
sufficient_assumptions_for_infeasibility response field.

repeated int32 assumptions = 7;

Returns
A list containing the assumptions.

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 3167 of file CpModelProto.java.

◆ getConstraints()

com.google.ortools.sat.ConstraintProto com.google.ortools.sat.CpModelProto.Builder.getConstraints ( int index)

repeated .operations_research.sat.ConstraintProto constraints = 3;

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 1809 of file CpModelProto.java.

◆ getConstraintsBuilder()

com.google.ortools.sat.ConstraintProto.Builder com.google.ortools.sat.CpModelProto.Builder.getConstraintsBuilder ( int index)

repeated .operations_research.sat.ConstraintProto constraints = 3;

Definition at line 1952 of file CpModelProto.java.

◆ getConstraintsBuilderList()

java.util.List< com.google.ortools.sat.ConstraintProto.Builder > com.google.ortools.sat.CpModelProto.Builder.getConstraintsBuilderList ( )

repeated .operations_research.sat.ConstraintProto constraints = 3;

Definition at line 1996 of file CpModelProto.java.

◆ getConstraintsCount()

int com.google.ortools.sat.CpModelProto.Builder.getConstraintsCount ( )

repeated .operations_research.sat.ConstraintProto constraints = 3;

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 1799 of file CpModelProto.java.

◆ getConstraintsList()

java.util.List< com.google.ortools.sat.ConstraintProto > com.google.ortools.sat.CpModelProto.Builder.getConstraintsList ( )

repeated .operations_research.sat.ConstraintProto constraints = 3;

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 1789 of file CpModelProto.java.

◆ getConstraintsOrBuilder()

com.google.ortools.sat.ConstraintProtoOrBuilder com.google.ortools.sat.CpModelProto.Builder.getConstraintsOrBuilder ( int index)

repeated .operations_research.sat.ConstraintProto constraints = 3;

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 1959 of file CpModelProto.java.

◆ getConstraintsOrBuilderList()

java.util.List<? extends com.google.ortools.sat.ConstraintProtoOrBuilder > com.google.ortools.sat.CpModelProto.Builder.getConstraintsOrBuilderList ( )

repeated .operations_research.sat.ConstraintProto constraints = 3;

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 1970 of file CpModelProto.java.

◆ getDefaultInstanceForType()

com.google.ortools.sat.CpModelProto com.google.ortools.sat.CpModelProto.Builder.getDefaultInstanceForType ( )

Definition at line 1000 of file CpModelProto.java.

◆ getDescriptor()

static final com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.CpModelProto.Builder.getDescriptor ( )
static

Definition at line 909 of file CpModelProto.java.

◆ getDescriptorForType()

com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.CpModelProto.Builder.getDescriptorForType ( )

Definition at line 995 of file CpModelProto.java.

◆ getFloatingPointObjective()

com.google.ortools.sat.FloatObjectiveProto com.google.ortools.sat.CpModelProto.Builder.getFloatingPointObjective ( )
Advanced usage.
It is invalid to have both an objective and a floating point objective.

The objective of the model, in floating point format. The solver will
automatically scale this to integer during expansion and thus convert it to
a normal CpObjectiveProto. See the mip* parameters to control how this is
scaled. In most situation the precision will be good enough, but you can
see the logs to see what are the precision guaranteed when this is
converted to a fixed point representation.

Note that even if the precision is bad, the returned objective_value and
best_objective_bound will be computed correctly. So at the end of the solve
you can check the gap if you only want precise optimal.

.operations_research.sat.FloatObjectiveProto floating_point_objective = 9;

Returns
The floatingPointObjective.

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 2217 of file CpModelProto.java.

◆ getFloatingPointObjectiveBuilder()

com.google.ortools.sat.FloatObjectiveProto.Builder com.google.ortools.sat.CpModelProto.Builder.getFloatingPointObjectiveBuilder ( )
Advanced usage.
It is invalid to have both an objective and a floating point objective.

The objective of the model, in floating point format. The solver will
automatically scale this to integer during expansion and thus convert it to
a normal CpObjectiveProto. See the mip* parameters to control how this is
scaled. In most situation the precision will be good enough, but you can
see the logs to see what are the precision guaranteed when this is
converted to a fixed point representation.

Note that even if the precision is bad, the returned objective_value and
best_objective_bound will be computed correctly. So at the end of the solve
you can check the gap if you only want precise optimal.

.operations_research.sat.FloatObjectiveProto floating_point_objective = 9;

Definition at line 2371 of file CpModelProto.java.

◆ getFloatingPointObjectiveOrBuilder()

com.google.ortools.sat.FloatObjectiveProtoOrBuilder com.google.ortools.sat.CpModelProto.Builder.getFloatingPointObjectiveOrBuilder ( )
Advanced usage.
It is invalid to have both an objective and a floating point objective.

The objective of the model, in floating point format. The solver will
automatically scale this to integer during expansion and thus convert it to
a normal CpObjectiveProto. See the mip* parameters to control how this is
scaled. In most situation the precision will be good enough, but you can
see the logs to see what are the precision guaranteed when this is
converted to a fixed point representation.

Note that even if the precision is bad, the returned objective_value and
best_objective_bound will be computed correctly. So at the end of the solve
you can check the gap if you only want precise optimal.

.operations_research.sat.FloatObjectiveProto floating_point_objective = 9;

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 2395 of file CpModelProto.java.

◆ getName()

java.lang.String com.google.ortools.sat.CpModelProto.Builder.getName ( )
For debug/logging only. Can be empty.

string name = 1;

Returns
The name.

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 1379 of file CpModelProto.java.

◆ getNameBytes()

com.google.protobuf.ByteString com.google.ortools.sat.CpModelProto.Builder.getNameBytes ( )
For debug/logging only. Can be empty.

string name = 1;

Returns
The bytes for name.

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 1400 of file CpModelProto.java.

◆ getObjective()

com.google.ortools.sat.CpObjectiveProto com.google.ortools.sat.CpModelProto.Builder.getObjective ( )
The objective to minimize. Can be empty for pure decision problems.

.operations_research.sat.CpObjectiveProto objective = 4;

Returns
The objective.

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 2036 of file CpModelProto.java.

◆ getObjectiveBuilder()

com.google.ortools.sat.CpObjectiveProto.Builder com.google.ortools.sat.CpModelProto.Builder.getObjectiveBuilder ( )
The objective to minimize. Can be empty for pure decision problems.

.operations_research.sat.CpObjectiveProto objective = 4;

Definition at line 2130 of file CpModelProto.java.

◆ getObjectiveOrBuilder()

com.google.ortools.sat.CpObjectiveProtoOrBuilder com.google.ortools.sat.CpModelProto.Builder.getObjectiveOrBuilder ( )
The objective to minimize. Can be empty for pure decision problems.

.operations_research.sat.CpObjectiveProto objective = 4;

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 2142 of file CpModelProto.java.

◆ getSearchStrategy()

com.google.ortools.sat.DecisionStrategyProto com.google.ortools.sat.CpModelProto.Builder.getSearchStrategy ( int index)
Defines the strategy that the solver should follow when the
search_branching parameter is set to FIXED_SEARCH. Note that this strategy
is also used as a heuristic when we are not in fixed search.

Advanced Usage: if not all variables appears and the parameter
"instantiate_all_variables" is set to false, then the solver will not try
to instantiate the variables that do not appear. Thus, at the end of the
search, not all variables may be fixed. Currently, we will set them to
their lower bound in the solution.

repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 2507 of file CpModelProto.java.

◆ getSearchStrategyBuilder()

com.google.ortools.sat.DecisionStrategyProto.Builder com.google.ortools.sat.CpModelProto.Builder.getSearchStrategyBuilder ( int index)
Defines the strategy that the solver should follow when the
search_branching parameter is set to FIXED_SEARCH. Note that this strategy
is also used as a heuristic when we are not in fixed search.

Advanced Usage: if not all variables appears and the parameter
"instantiate_all_variables" is set to false, then the solver will not try
to instantiate the variables that do not appear. Thus, at the end of the
search, not all variables may be fixed. Currently, we will set them to
their lower bound in the solution.

repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;

Definition at line 2770 of file CpModelProto.java.

◆ getSearchStrategyBuilderList()

java.util.List< com.google.ortools.sat.DecisionStrategyProto.Builder > com.google.ortools.sat.CpModelProto.Builder.getSearchStrategyBuilderList ( )
Defines the strategy that the solver should follow when the
search_branching parameter is set to FIXED_SEARCH. Note that this strategy
is also used as a heuristic when we are not in fixed search.

Advanced Usage: if not all variables appears and the parameter
"instantiate_all_variables" is set to false, then the solver will not try
to instantiate the variables that do not appear. Thus, at the end of the
search, not all variables may be fixed. Currently, we will set them to
their lower bound in the solution.

repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;

Definition at line 2874 of file CpModelProto.java.

◆ getSearchStrategyCount()

int com.google.ortools.sat.CpModelProto.Builder.getSearchStrategyCount ( )
Defines the strategy that the solver should follow when the
search_branching parameter is set to FIXED_SEARCH. Note that this strategy
is also used as a heuristic when we are not in fixed search.

Advanced Usage: if not all variables appears and the parameter
"instantiate_all_variables" is set to false, then the solver will not try
to instantiate the variables that do not appear. Thus, at the end of the
search, not all variables may be fixed. Currently, we will set them to
their lower bound in the solution.

repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 2485 of file CpModelProto.java.

◆ getSearchStrategyList()

java.util.List< com.google.ortools.sat.DecisionStrategyProto > com.google.ortools.sat.CpModelProto.Builder.getSearchStrategyList ( )
Defines the strategy that the solver should follow when the
search_branching parameter is set to FIXED_SEARCH. Note that this strategy
is also used as a heuristic when we are not in fixed search.

Advanced Usage: if not all variables appears and the parameter
"instantiate_all_variables" is set to false, then the solver will not try
to instantiate the variables that do not appear. Thus, at the end of the
search, not all variables may be fixed. Currently, we will set them to
their lower bound in the solution.

repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 2463 of file CpModelProto.java.

◆ getSearchStrategyOrBuilder()

com.google.ortools.sat.DecisionStrategyProtoOrBuilder com.google.ortools.sat.CpModelProto.Builder.getSearchStrategyOrBuilder ( int index)
Defines the strategy that the solver should follow when the
search_branching parameter is set to FIXED_SEARCH. Note that this strategy
is also used as a heuristic when we are not in fixed search.

Advanced Usage: if not all variables appears and the parameter
"instantiate_all_variables" is set to false, then the solver will not try
to instantiate the variables that do not appear. Thus, at the end of the
search, not all variables may be fixed. Currently, we will set them to
their lower bound in the solution.

repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 2789 of file CpModelProto.java.

◆ getSearchStrategyOrBuilderList()

java.util.List<? extends com.google.ortools.sat.DecisionStrategyProtoOrBuilder > com.google.ortools.sat.CpModelProto.Builder.getSearchStrategyOrBuilderList ( )
Defines the strategy that the solver should follow when the
search_branching parameter is set to FIXED_SEARCH. Note that this strategy
is also used as a heuristic when we are not in fixed search.

Advanced Usage: if not all variables appears and the parameter
"instantiate_all_variables" is set to false, then the solver will not try
to instantiate the variables that do not appear. Thus, at the end of the
search, not all variables may be fixed. Currently, we will set them to
their lower bound in the solution.

repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 2812 of file CpModelProto.java.

◆ getSolutionHint()

com.google.ortools.sat.PartialVariableAssignment com.google.ortools.sat.CpModelProto.Builder.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. The
solver 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.

.operations_research.sat.PartialVariableAssignment solution_hint = 6;

Returns
The solutionHint.

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 2934 of file CpModelProto.java.

◆ getSolutionHintBuilder()

com.google.ortools.sat.PartialVariableAssignment.Builder com.google.ortools.sat.CpModelProto.Builder.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. The
solver 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.

.operations_research.sat.PartialVariableAssignment solution_hint = 6;

Definition at line 3078 of file CpModelProto.java.

◆ getSolutionHintOrBuilder()

com.google.ortools.sat.PartialVariableAssignmentOrBuilder com.google.ortools.sat.CpModelProto.Builder.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. The
solver 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.

.operations_research.sat.PartialVariableAssignment solution_hint = 6;

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 3100 of file CpModelProto.java.

◆ getSymmetry()

com.google.ortools.sat.SymmetryProto com.google.ortools.sat.CpModelProto.Builder.getSymmetry ( )
For now, this is not meant to be filled by a client writing a model, but
by our preprocessing step.

Information about the symmetries of the feasible solution space.
These usually leaves the objective invariant.

.operations_research.sat.SymmetryProto symmetry = 8;

Returns
The symmetry.

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 3365 of file CpModelProto.java.

◆ getSymmetryBuilder()

com.google.ortools.sat.SymmetryProto.Builder com.google.ortools.sat.CpModelProto.Builder.getSymmetryBuilder ( )
For now, this is not meant to be filled by a client writing a model, but
by our preprocessing step.

Information about the symmetries of the feasible solution space.
These usually leaves the objective invariant.

.operations_research.sat.SymmetryProto symmetry = 8;

Definition at line 3479 of file CpModelProto.java.

◆ getSymmetryOrBuilder()

com.google.ortools.sat.SymmetryProtoOrBuilder com.google.ortools.sat.CpModelProto.Builder.getSymmetryOrBuilder ( )
For now, this is not meant to be filled by a client writing a model, but
by our preprocessing step.

Information about the symmetries of the feasible solution space.
These usually leaves the objective invariant.

.operations_research.sat.SymmetryProto symmetry = 8;

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 3495 of file CpModelProto.java.

◆ getVariables()

com.google.ortools.sat.IntegerVariableProto com.google.ortools.sat.CpModelProto.Builder.getVariables ( int index)
The associated Protos should be referred by their index in these fields.

repeated .operations_research.sat.IntegerVariableProto variables = 2;

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 1509 of file CpModelProto.java.

◆ getVariablesBuilder()

com.google.ortools.sat.IntegerVariableProto.Builder com.google.ortools.sat.CpModelProto.Builder.getVariablesBuilder ( int index)
The associated Protos should be referred by their index in these fields.

repeated .operations_research.sat.IntegerVariableProto variables = 2;

Definition at line 1692 of file CpModelProto.java.

◆ getVariablesBuilderList()

java.util.List< com.google.ortools.sat.IntegerVariableProto.Builder > com.google.ortools.sat.CpModelProto.Builder.getVariablesBuilderList ( )
The associated Protos should be referred by their index in these fields.

repeated .operations_research.sat.IntegerVariableProto variables = 2;

Definition at line 1756 of file CpModelProto.java.

◆ getVariablesCount()

int com.google.ortools.sat.CpModelProto.Builder.getVariablesCount ( )
The associated Protos should be referred by their index in these fields.

repeated .operations_research.sat.IntegerVariableProto variables = 2;

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 1495 of file CpModelProto.java.

◆ getVariablesList()

java.util.List< com.google.ortools.sat.IntegerVariableProto > com.google.ortools.sat.CpModelProto.Builder.getVariablesList ( )
The associated Protos should be referred by their index in these fields.

repeated .operations_research.sat.IntegerVariableProto variables = 2;

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 1481 of file CpModelProto.java.

◆ getVariablesOrBuilder()

com.google.ortools.sat.IntegerVariableProtoOrBuilder com.google.ortools.sat.CpModelProto.Builder.getVariablesOrBuilder ( int index)
The associated Protos should be referred by their index in these fields.

repeated .operations_research.sat.IntegerVariableProto variables = 2;

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 1703 of file CpModelProto.java.

◆ getVariablesOrBuilderList()

java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder > com.google.ortools.sat.CpModelProto.Builder.getVariablesOrBuilderList ( )
The associated Protos should be referred by their index in these fields.

repeated .operations_research.sat.IntegerVariableProto variables = 2;

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 1718 of file CpModelProto.java.

◆ hasFloatingPointObjective()

boolean com.google.ortools.sat.CpModelProto.Builder.hasFloatingPointObjective ( )
Advanced usage.
It is invalid to have both an objective and a floating point objective.

The objective of the model, in floating point format. The solver will
automatically scale this to integer during expansion and thus convert it to
a normal CpObjectiveProto. See the mip* parameters to control how this is
scaled. In most situation the precision will be good enough, but you can
see the logs to see what are the precision guaranteed when this is
converted to a fixed point representation.

Note that even if the precision is bad, the returned objective_value and
best_objective_bound will be computed correctly. So at the end of the solve
you can check the gap if you only want precise optimal.

.operations_research.sat.FloatObjectiveProto floating_point_objective = 9;

Returns
Whether the floatingPointObjective field is set.

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 2194 of file CpModelProto.java.

◆ hasObjective()

boolean com.google.ortools.sat.CpModelProto.Builder.hasObjective ( )
The objective to minimize. Can be empty for pure decision problems.

.operations_research.sat.CpObjectiveProto objective = 4;

Returns
Whether the objective field is set.

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 2025 of file CpModelProto.java.

◆ hasSolutionHint()

boolean com.google.ortools.sat.CpModelProto.Builder.hasSolutionHint ( )
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. The
solver 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.

.operations_research.sat.PartialVariableAssignment solution_hint = 6;

Returns
Whether the solutionHint field is set.

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 2913 of file CpModelProto.java.

◆ hasSymmetry()

boolean com.google.ortools.sat.CpModelProto.Builder.hasSymmetry ( )
For now, this is not meant to be filled by a client writing a model, but
by our preprocessing step.

Information about the symmetries of the feasible solution space.
These usually leaves the objective invariant.

.operations_research.sat.SymmetryProto symmetry = 8;

Returns
Whether the symmetry field is set.

Implements com.google.ortools.sat.CpModelProtoOrBuilder.

Definition at line 3350 of file CpModelProto.java.

◆ internalGetFieldAccessorTable()

com.google.protobuf.GeneratedMessageV3.FieldAccessorTable com.google.ortools.sat.CpModelProto.Builder.internalGetFieldAccessorTable ( )
protected

Definition at line 915 of file CpModelProto.java.

◆ isInitialized()

final boolean com.google.ortools.sat.CpModelProto.Builder.isInitialized ( )

Definition at line 1245 of file CpModelProto.java.

◆ mergeFloatingPointObjective()

Builder com.google.ortools.sat.CpModelProto.Builder.mergeFloatingPointObjective ( com.google.ortools.sat.FloatObjectiveProto value)
Advanced usage.
It is invalid to have both an objective and a floating point objective.

The objective of the model, in floating point format. The solver will
automatically scale this to integer during expansion and thus convert it to
a normal CpObjectiveProto. See the mip* parameters to control how this is
scaled. In most situation the precision will be good enough, but you can
see the logs to see what are the precision guaranteed when this is
converted to a fixed point representation.

Note that even if the precision is bad, the returned objective_value and
best_objective_bound will be computed correctly. So at the end of the solve
you can check the gap if you only want precise optimal.

.operations_research.sat.FloatObjectiveProto floating_point_objective = 9;

Definition at line 2305 of file CpModelProto.java.

◆ mergeFrom() [1/3]

Builder com.google.ortools.sat.CpModelProto.Builder.mergeFrom ( com.google.ortools.sat.CpModelProto other)

Definition at line 1131 of file CpModelProto.java.

◆ mergeFrom() [2/3]

Builder com.google.ortools.sat.CpModelProto.Builder.mergeFrom ( com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws java.io.IOException

Definition at line 1250 of file CpModelProto.java.

◆ mergeFrom() [3/3]

Builder com.google.ortools.sat.CpModelProto.Builder.mergeFrom ( com.google.protobuf.Message other)

Definition at line 1122 of file CpModelProto.java.

◆ mergeObjective()

Builder com.google.ortools.sat.CpModelProto.Builder.mergeObjective ( com.google.ortools.sat.CpObjectiveProto value)
The objective to minimize. Can be empty for pure decision problems.

.operations_research.sat.CpObjectiveProto objective = 4;

Definition at line 2088 of file CpModelProto.java.

◆ mergeSolutionHint()

Builder com.google.ortools.sat.CpModelProto.Builder.mergeSolutionHint ( com.google.ortools.sat.PartialVariableAssignment value)
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. The
solver 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.

.operations_research.sat.PartialVariableAssignment solution_hint = 6;

Definition at line 3016 of file CpModelProto.java.

◆ mergeSymmetry()

Builder com.google.ortools.sat.CpModelProto.Builder.mergeSymmetry ( com.google.ortools.sat.SymmetryProto value)
For now, this is not meant to be filled by a client writing a model, but
by our preprocessing step.

Information about the symmetries of the feasible solution space.
These usually leaves the objective invariant.

.operations_research.sat.SymmetryProto symmetry = 8;

Definition at line 3429 of file CpModelProto.java.

◆ mergeUnknownFields()

final Builder com.google.ortools.sat.CpModelProto.Builder.mergeUnknownFields ( final com.google.protobuf.UnknownFieldSet unknownFields)

Definition at line 3534 of file CpModelProto.java.

◆ removeConstraints()

Builder com.google.ortools.sat.CpModelProto.Builder.removeConstraints ( int index)

repeated .operations_research.sat.ConstraintProto constraints = 3;

Definition at line 1939 of file CpModelProto.java.

◆ removeSearchStrategy()

Builder com.google.ortools.sat.CpModelProto.Builder.removeSearchStrategy ( int index)
Defines the strategy that the solver should follow when the
search_branching parameter is set to FIXED_SEARCH. Note that this strategy
is also used as a heuristic when we are not in fixed search.

Advanced Usage: if not all variables appears and the parameter
"instantiate_all_variables" is set to false, then the solver will not try
to instantiate the variables that do not appear. Thus, at the end of the
search, not all variables may be fixed. Currently, we will set them to
their lower bound in the solution.

repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;

Definition at line 2745 of file CpModelProto.java.

◆ removeVariables()

Builder com.google.ortools.sat.CpModelProto.Builder.removeVariables ( int index)
The associated Protos should be referred by their index in these fields.

repeated .operations_research.sat.IntegerVariableProto variables = 2;

Definition at line 1675 of file CpModelProto.java.

◆ setAssumptions()

Builder com.google.ortools.sat.CpModelProto.Builder.setAssumptions ( int index,
int value )
A list of literals. The model will be solved assuming all these literals
are true. Compared to just fixing the domain of these literals, using this
mechanism is slower but allows in case the model is INFEASIBLE to get a
potentially small subset of them that can be used to explain the
infeasibility.

Think (IIS), except when you are only concerned by the provided
assumptions. This is powerful as it allows to group a set of logically
related constraint under only one enforcement literal which can potentially
give you a good and interpretable explanation for infeasiblity.

Such infeasibility explanation will be available in the
sufficient_assumptions_for_infeasibility response field.

repeated int32 assumptions = 7;

Parameters
indexThe index to set the value at.
valueThe assumptions to set.
Returns
This builder for chaining.

Definition at line 3240 of file CpModelProto.java.

◆ setConstraints() [1/2]

Builder com.google.ortools.sat.CpModelProto.Builder.setConstraints ( int index,
com.google.ortools.sat.ConstraintProto value )

repeated .operations_research.sat.ConstraintProto constraints = 3;

Definition at line 1819 of file CpModelProto.java.

◆ setConstraints() [2/2]

Builder com.google.ortools.sat.CpModelProto.Builder.setConstraints ( int index,
com.google.ortools.sat.ConstraintProto.Builder builderForValue )

repeated .operations_research.sat.ConstraintProto constraints = 3;

Definition at line 1836 of file CpModelProto.java.

◆ setField()

Builder com.google.ortools.sat.CpModelProto.Builder.setField ( com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value )

Definition at line 1094 of file CpModelProto.java.

◆ setFloatingPointObjective() [1/2]

Builder com.google.ortools.sat.CpModelProto.Builder.setFloatingPointObjective ( com.google.ortools.sat.FloatObjectiveProto value)
Advanced usage.
It is invalid to have both an objective and a floating point objective.

The objective of the model, in floating point format. The solver will
automatically scale this to integer during expansion and thus convert it to
a normal CpObjectiveProto. See the mip* parameters to control how this is
scaled. In most situation the precision will be good enough, but you can
see the logs to see what are the precision guaranteed when this is
converted to a fixed point representation.

Note that even if the precision is bad, the returned objective_value and
best_objective_bound will be computed correctly. So at the end of the solve
you can check the gap if you only want precise optimal.

.operations_research.sat.FloatObjectiveProto floating_point_objective = 9;

Definition at line 2243 of file CpModelProto.java.

◆ setFloatingPointObjective() [2/2]

Builder com.google.ortools.sat.CpModelProto.Builder.setFloatingPointObjective ( com.google.ortools.sat.FloatObjectiveProto.Builder builderForValue)
Advanced usage.
It is invalid to have both an objective and a floating point objective.

The objective of the model, in floating point format. The solver will
automatically scale this to integer during expansion and thus convert it to
a normal CpObjectiveProto. See the mip* parameters to control how this is
scaled. In most situation the precision will be good enough, but you can
see the logs to see what are the precision guaranteed when this is
converted to a fixed point representation.

Note that even if the precision is bad, the returned objective_value and
best_objective_bound will be computed correctly. So at the end of the solve
you can check the gap if you only want precise optimal.

.operations_research.sat.FloatObjectiveProto floating_point_objective = 9;

Definition at line 2275 of file CpModelProto.java.

◆ setName()

Builder com.google.ortools.sat.CpModelProto.Builder.setName ( java.lang.String value)
For debug/logging only. Can be empty.

string name = 1;

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

Definition at line 1421 of file CpModelProto.java.

◆ setNameBytes()

Builder com.google.ortools.sat.CpModelProto.Builder.setNameBytes ( com.google.protobuf.ByteString value)
For debug/logging only. Can be empty.

string name = 1;

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

Definition at line 1452 of file CpModelProto.java.

◆ setObjective() [1/2]

Builder com.google.ortools.sat.CpModelProto.Builder.setObjective ( com.google.ortools.sat.CpObjectiveProto value)
The objective to minimize. Can be empty for pure decision problems.

.operations_research.sat.CpObjectiveProto objective = 4;

Definition at line 2050 of file CpModelProto.java.

◆ setObjective() [2/2]

Builder com.google.ortools.sat.CpModelProto.Builder.setObjective ( com.google.ortools.sat.CpObjectiveProto.Builder builderForValue)
The objective to minimize. Can be empty for pure decision problems.

.operations_research.sat.CpObjectiveProto objective = 4;

Definition at line 2070 of file CpModelProto.java.

◆ setRepeatedField()

Builder com.google.ortools.sat.CpModelProto.Builder.setRepeatedField ( com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value )

Definition at line 1110 of file CpModelProto.java.

◆ setSearchStrategy() [1/2]

Builder com.google.ortools.sat.CpModelProto.Builder.setSearchStrategy ( int index,
com.google.ortools.sat.DecisionStrategyProto value )
Defines the strategy that the solver should follow when the
search_branching parameter is set to FIXED_SEARCH. Note that this strategy
is also used as a heuristic when we are not in fixed search.

Advanced Usage: if not all variables appears and the parameter
"instantiate_all_variables" is set to false, then the solver will not try
to instantiate the variables that do not appear. Thus, at the end of the
search, not all variables may be fixed. Currently, we will set them to
their lower bound in the solution.

repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;

Definition at line 2529 of file CpModelProto.java.

◆ setSearchStrategy() [2/2]

Builder com.google.ortools.sat.CpModelProto.Builder.setSearchStrategy ( int index,
com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue )
Defines the strategy that the solver should follow when the
search_branching parameter is set to FIXED_SEARCH. Note that this strategy
is also used as a heuristic when we are not in fixed search.

Advanced Usage: if not all variables appears and the parameter
"instantiate_all_variables" is set to false, then the solver will not try
to instantiate the variables that do not appear. Thus, at the end of the
search, not all variables may be fixed. Currently, we will set them to
their lower bound in the solution.

repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;

Definition at line 2558 of file CpModelProto.java.

◆ setSolutionHint() [1/2]

Builder com.google.ortools.sat.CpModelProto.Builder.setSolutionHint ( com.google.ortools.sat.PartialVariableAssignment value)
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. The
solver 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.

.operations_research.sat.PartialVariableAssignment solution_hint = 6;

Definition at line 2958 of file CpModelProto.java.

◆ setSolutionHint() [2/2]

Builder com.google.ortools.sat.CpModelProto.Builder.setSolutionHint ( com.google.ortools.sat.PartialVariableAssignment.Builder builderForValue)
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. The
solver 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.

.operations_research.sat.PartialVariableAssignment solution_hint = 6;

Definition at line 2988 of file CpModelProto.java.

◆ setSymmetry() [1/2]

Builder com.google.ortools.sat.CpModelProto.Builder.setSymmetry ( com.google.ortools.sat.SymmetryProto value)
For now, this is not meant to be filled by a client writing a model, but
by our preprocessing step.

Information about the symmetries of the feasible solution space.
These usually leaves the objective invariant.

.operations_research.sat.SymmetryProto symmetry = 8;

Definition at line 3383 of file CpModelProto.java.

◆ setSymmetry() [2/2]

Builder com.google.ortools.sat.CpModelProto.Builder.setSymmetry ( com.google.ortools.sat.SymmetryProto.Builder builderForValue)
For now, this is not meant to be filled by a client writing a model, but
by our preprocessing step.

Information about the symmetries of the feasible solution space.
These usually leaves the objective invariant.

.operations_research.sat.SymmetryProto symmetry = 8;

Definition at line 3407 of file CpModelProto.java.

◆ setUnknownFields()

final Builder com.google.ortools.sat.CpModelProto.Builder.setUnknownFields ( final com.google.protobuf.UnknownFieldSet unknownFields)

Definition at line 3528 of file CpModelProto.java.

◆ setVariables() [1/2]

Builder com.google.ortools.sat.CpModelProto.Builder.setVariables ( int index,
com.google.ortools.sat.IntegerVariableProto value )
The associated Protos should be referred by their index in these fields.

repeated .operations_research.sat.IntegerVariableProto variables = 2;

Definition at line 1523 of file CpModelProto.java.

◆ setVariables() [2/2]

Builder com.google.ortools.sat.CpModelProto.Builder.setVariables ( int index,
com.google.ortools.sat.IntegerVariableProto.Builder builderForValue )
The associated Protos should be referred by their index in these fields.

repeated .operations_research.sat.IntegerVariableProto variables = 2;

Definition at line 1544 of file CpModelProto.java.


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