Class CpModelProto.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<CpModelProto.Builder>
com.google.protobuf.GeneratedMessage.Builder<CpModelProto.Builder>
com.google.ortools.sat.CpModelProto.Builder
- All Implemented Interfaces:
CpModelProtoOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
CpModelProto
public static final class CpModelProto.Builder
extends com.google.protobuf.GeneratedMessage.Builder<CpModelProto.Builder>
implements CpModelProtoOrBuilder
A constraint programming problem.Protobuf type
operations_research.sat.CpModelProto
-
Method Summary
Modifier and TypeMethodDescriptionaddAllAssumptions
(Iterable<? extends Integer> values) A list of literals.addAllConstraints
(Iterable<? extends ConstraintProto> values) repeated .operations_research.sat.ConstraintProto constraints = 3;
addAllSearchStrategy
(Iterable<? extends DecisionStrategyProto> values) Defines the strategy that the solver should follow when the search_branching parameter is set to FIXED_SEARCH.addAllVariables
(Iterable<? extends IntegerVariableProto> values) The associated Protos should be referred by their index in these fields.addAssumptions
(int value) A list of literals.addConstraints
(int index, ConstraintProto value) repeated .operations_research.sat.ConstraintProto constraints = 3;
addConstraints
(int index, ConstraintProto.Builder builderForValue) repeated .operations_research.sat.ConstraintProto constraints = 3;
addConstraints
(ConstraintProto value) repeated .operations_research.sat.ConstraintProto constraints = 3;
addConstraints
(ConstraintProto.Builder builderForValue) repeated .operations_research.sat.ConstraintProto constraints = 3;
repeated .operations_research.sat.ConstraintProto constraints = 3;
addConstraintsBuilder
(int index) repeated .operations_research.sat.ConstraintProto constraints = 3;
addSearchStrategy
(int index, DecisionStrategyProto value) Defines the strategy that the solver should follow when the search_branching parameter is set to FIXED_SEARCH.addSearchStrategy
(int index, DecisionStrategyProto.Builder builderForValue) Defines the strategy that the solver should follow when the search_branching parameter is set to FIXED_SEARCH.Defines the strategy that the solver should follow when the search_branching parameter is set to FIXED_SEARCH.addSearchStrategy
(DecisionStrategyProto.Builder builderForValue) Defines the strategy that the solver should follow when the search_branching parameter is set to FIXED_SEARCH.Defines the strategy that the solver should follow when the search_branching parameter is set to FIXED_SEARCH.addSearchStrategyBuilder
(int index) Defines the strategy that the solver should follow when the search_branching parameter is set to FIXED_SEARCH.addVariables
(int index, IntegerVariableProto value) The associated Protos should be referred by their index in these fields.addVariables
(int index, IntegerVariableProto.Builder builderForValue) The associated Protos should be referred by their index in these fields.addVariables
(IntegerVariableProto value) The associated Protos should be referred by their index in these fields.addVariables
(IntegerVariableProto.Builder builderForValue) The associated Protos should be referred by their index in these fields.The associated Protos should be referred by their index in these fields.addVariablesBuilder
(int index) The associated Protos should be referred by their index in these fields.build()
clear()
A list of literals.repeated .operations_research.sat.ConstraintProto constraints = 3;
Advanced usage.For debug/logging only.The objective to minimize.Defines the strategy that the solver should follow when the search_branching parameter is set to FIXED_SEARCH.Solution hint.For now, this is not meant to be filled by a client writing a model, but by our preprocessing step.The associated Protos should be referred by their index in these fields.int
getAssumptions
(int index) A list of literals.int
A list of literals.A list of literals.getConstraints
(int index) repeated .operations_research.sat.ConstraintProto constraints = 3;
getConstraintsBuilder
(int index) repeated .operations_research.sat.ConstraintProto constraints = 3;
repeated .operations_research.sat.ConstraintProto constraints = 3;
int
repeated .operations_research.sat.ConstraintProto constraints = 3;
repeated .operations_research.sat.ConstraintProto constraints = 3;
getConstraintsOrBuilder
(int index) repeated .operations_research.sat.ConstraintProto constraints = 3;
List
<? extends ConstraintProtoOrBuilder> repeated .operations_research.sat.ConstraintProto constraints = 3;
static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
Advanced usage.Advanced usage.Advanced usage.getName()
For debug/logging only.com.google.protobuf.ByteString
For debug/logging only.The objective to minimize.The objective to minimize.The objective to minimize.getSearchStrategy
(int index) Defines the strategy that the solver should follow when the search_branching parameter is set to FIXED_SEARCH.getSearchStrategyBuilder
(int index) Defines the strategy that the solver should follow when the search_branching parameter is set to FIXED_SEARCH.Defines the strategy that the solver should follow when the search_branching parameter is set to FIXED_SEARCH.int
Defines the strategy that the solver should follow when the search_branching parameter is set to FIXED_SEARCH.Defines the strategy that the solver should follow when the search_branching parameter is set to FIXED_SEARCH.getSearchStrategyOrBuilder
(int index) Defines the strategy that the solver should follow when the search_branching parameter is set to FIXED_SEARCH.List
<? extends DecisionStrategyProtoOrBuilder> Defines the strategy that the solver should follow when the search_branching parameter is set to FIXED_SEARCH.Solution hint.Solution hint.Solution hint.For now, this is not meant to be filled by a client writing a model, but by our preprocessing step.For now, this is not meant to be filled by a client writing a model, but by our preprocessing step.For now, this is not meant to be filled by a client writing a model, but by our preprocessing step.getVariables
(int index) The associated Protos should be referred by their index in these fields.getVariablesBuilder
(int index) The associated Protos should be referred by their index in these fields.The associated Protos should be referred by their index in these fields.int
The associated Protos should be referred by their index in these fields.The associated Protos should be referred by their index in these fields.getVariablesOrBuilder
(int index) The associated Protos should be referred by their index in these fields.List
<? extends IntegerVariableProtoOrBuilder> The associated Protos should be referred by their index in these fields.boolean
Advanced usage.boolean
The objective to minimize.boolean
Solution hint.boolean
For now, this is not meant to be filled by a client writing a model, but by our preprocessing step.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
final boolean
Advanced usage.mergeFrom
(CpModelProto other) mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) mergeObjective
(CpObjectiveProto value) The objective to minimize.Solution hint.mergeSymmetry
(SymmetryProto value) For now, this is not meant to be filled by a client writing a model, but by our preprocessing step.removeConstraints
(int index) repeated .operations_research.sat.ConstraintProto constraints = 3;
removeSearchStrategy
(int index) Defines the strategy that the solver should follow when the search_branching parameter is set to FIXED_SEARCH.removeVariables
(int index) The associated Protos should be referred by their index in these fields.setAssumptions
(int index, int value) A list of literals.setConstraints
(int index, ConstraintProto value) repeated .operations_research.sat.ConstraintProto constraints = 3;
setConstraints
(int index, ConstraintProto.Builder builderForValue) repeated .operations_research.sat.ConstraintProto constraints = 3;
Advanced usage.setFloatingPointObjective
(FloatObjectiveProto.Builder builderForValue) Advanced usage.For debug/logging only.setNameBytes
(com.google.protobuf.ByteString value) For debug/logging only.setObjective
(CpObjectiveProto value) The objective to minimize.setObjective
(CpObjectiveProto.Builder builderForValue) The objective to minimize.setSearchStrategy
(int index, DecisionStrategyProto value) Defines the strategy that the solver should follow when the search_branching parameter is set to FIXED_SEARCH.setSearchStrategy
(int index, DecisionStrategyProto.Builder builderForValue) Defines the strategy that the solver should follow when the search_branching parameter is set to FIXED_SEARCH.Solution hint.setSolutionHint
(PartialVariableAssignment.Builder builderForValue) Solution hint.setSymmetry
(SymmetryProto value) For now, this is not meant to be filled by a client writing a model, but by our preprocessing step.setSymmetry
(SymmetryProto.Builder builderForValue) For now, this is not meant to be filled by a client writing a model, but by our preprocessing step.setVariables
(int index, IntegerVariableProto value) The associated Protos should be referred by their index in these fields.setVariables
(int index, IntegerVariableProto.Builder builderForValue) The associated Protos should be referred by their index in these fields.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFrom
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessage.Builder<CpModelProto.Builder>
-
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessage.Builder<CpModelProto.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessage.Builder<CpModelProto.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<CpModelProto.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage.Builder<CpModelProto.Builder>
-
mergeFrom
public CpModelProto.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<CpModelProto.Builder>
- Throws:
IOException
-
getName
For debug/logging only. Can be empty.
string name = 1;
- Specified by:
getName
in interfaceCpModelProtoOrBuilder
- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()For debug/logging only. Can be empty.
string name = 1;
- Specified by:
getNameBytes
in interfaceCpModelProtoOrBuilder
- Returns:
- The bytes for name.
-
setName
For debug/logging only. Can be empty.
string name = 1;
- Parameters:
value
- The name to set.- Returns:
- This builder for chaining.
-
clearName
For debug/logging only. Can be empty.
string name = 1;
- Returns:
- This builder for chaining.
-
setNameBytes
For debug/logging only. Can be empty.
string name = 1;
- Parameters:
value
- The bytes for name to set.- Returns:
- This builder for chaining.
-
getVariablesList
The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
- Specified by:
getVariablesList
in interfaceCpModelProtoOrBuilder
-
getVariablesCount
public int getVariablesCount()The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
- Specified by:
getVariablesCount
in interfaceCpModelProtoOrBuilder
-
getVariables
The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
- Specified by:
getVariables
in interfaceCpModelProtoOrBuilder
-
setVariables
The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
-
setVariables
The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
-
addVariables
The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
-
addVariables
The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
-
addVariables
The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
-
addVariables
The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
-
addAllVariables
The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
-
clearVariables
The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
-
removeVariables
The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
-
getVariablesBuilder
The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
-
getVariablesOrBuilder
The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
- Specified by:
getVariablesOrBuilder
in interfaceCpModelProtoOrBuilder
-
getVariablesOrBuilderList
The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
- Specified by:
getVariablesOrBuilderList
in interfaceCpModelProtoOrBuilder
-
addVariablesBuilder
The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
-
addVariablesBuilder
The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
-
getVariablesBuilderList
The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
-
getConstraintsList
repeated .operations_research.sat.ConstraintProto constraints = 3;
- Specified by:
getConstraintsList
in interfaceCpModelProtoOrBuilder
-
getConstraintsCount
public int getConstraintsCount()repeated .operations_research.sat.ConstraintProto constraints = 3;
- Specified by:
getConstraintsCount
in interfaceCpModelProtoOrBuilder
-
getConstraints
repeated .operations_research.sat.ConstraintProto constraints = 3;
- Specified by:
getConstraints
in interfaceCpModelProtoOrBuilder
-
setConstraints
repeated .operations_research.sat.ConstraintProto constraints = 3;
-
setConstraints
repeated .operations_research.sat.ConstraintProto constraints = 3;
-
addConstraints
repeated .operations_research.sat.ConstraintProto constraints = 3;
-
addConstraints
repeated .operations_research.sat.ConstraintProto constraints = 3;
-
addConstraints
repeated .operations_research.sat.ConstraintProto constraints = 3;
-
addConstraints
repeated .operations_research.sat.ConstraintProto constraints = 3;
-
addAllConstraints
repeated .operations_research.sat.ConstraintProto constraints = 3;
-
clearConstraints
repeated .operations_research.sat.ConstraintProto constraints = 3;
-
removeConstraints
repeated .operations_research.sat.ConstraintProto constraints = 3;
-
getConstraintsBuilder
repeated .operations_research.sat.ConstraintProto constraints = 3;
-
getConstraintsOrBuilder
repeated .operations_research.sat.ConstraintProto constraints = 3;
- Specified by:
getConstraintsOrBuilder
in interfaceCpModelProtoOrBuilder
-
getConstraintsOrBuilderList
repeated .operations_research.sat.ConstraintProto constraints = 3;
- Specified by:
getConstraintsOrBuilderList
in interfaceCpModelProtoOrBuilder
-
addConstraintsBuilder
repeated .operations_research.sat.ConstraintProto constraints = 3;
-
addConstraintsBuilder
repeated .operations_research.sat.ConstraintProto constraints = 3;
-
getConstraintsBuilderList
repeated .operations_research.sat.ConstraintProto constraints = 3;
-
hasObjective
public boolean hasObjective()The objective to minimize. Can be empty for pure decision problems.
.operations_research.sat.CpObjectiveProto objective = 4;
- Specified by:
hasObjective
in interfaceCpModelProtoOrBuilder
- Returns:
- Whether the objective field is set.
-
getObjective
The objective to minimize. Can be empty for pure decision problems.
.operations_research.sat.CpObjectiveProto objective = 4;
- Specified by:
getObjective
in interfaceCpModelProtoOrBuilder
- Returns:
- The objective.
-
setObjective
The objective to minimize. Can be empty for pure decision problems.
.operations_research.sat.CpObjectiveProto objective = 4;
-
setObjective
The objective to minimize. Can be empty for pure decision problems.
.operations_research.sat.CpObjectiveProto objective = 4;
-
mergeObjective
The objective to minimize. Can be empty for pure decision problems.
.operations_research.sat.CpObjectiveProto objective = 4;
-
clearObjective
The objective to minimize. Can be empty for pure decision problems.
.operations_research.sat.CpObjectiveProto objective = 4;
-
getObjectiveBuilder
The objective to minimize. Can be empty for pure decision problems.
.operations_research.sat.CpObjectiveProto objective = 4;
-
getObjectiveOrBuilder
The objective to minimize. Can be empty for pure decision problems.
.operations_research.sat.CpObjectiveProto objective = 4;
- Specified by:
getObjectiveOrBuilder
in interfaceCpModelProtoOrBuilder
-
hasFloatingPointObjective
public boolean 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;
- Specified by:
hasFloatingPointObjective
in interfaceCpModelProtoOrBuilder
- Returns:
- Whether the floatingPointObjective field is set.
-
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;
- Specified by:
getFloatingPointObjective
in interfaceCpModelProtoOrBuilder
- Returns:
- The floatingPointObjective.
-
setFloatingPointObjective
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;
-
setFloatingPointObjective
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;
-
mergeFloatingPointObjective
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;
-
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;
-
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;
-
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;
- Specified by:
getFloatingPointObjectiveOrBuilder
in interfaceCpModelProtoOrBuilder
-
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;
- Specified by:
getSearchStrategyList
in interfaceCpModelProtoOrBuilder
-
getSearchStrategyCount
public int 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;
- Specified by:
getSearchStrategyCount
in interfaceCpModelProtoOrBuilder
-
getSearchStrategy
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;
- Specified by:
getSearchStrategy
in interfaceCpModelProtoOrBuilder
-
setSearchStrategy
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;
-
setSearchStrategy
public CpModelProto.Builder setSearchStrategy(int index, 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;
-
addSearchStrategy
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;
-
addSearchStrategy
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;
-
addSearchStrategy
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;
-
addSearchStrategy
public CpModelProto.Builder addSearchStrategy(int index, 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;
-
addAllSearchStrategy
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;
-
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;
-
removeSearchStrategy
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;
-
getSearchStrategyBuilder
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;
-
getSearchStrategyOrBuilder
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;
- Specified by:
getSearchStrategyOrBuilder
in interfaceCpModelProtoOrBuilder
-
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;
- Specified by:
getSearchStrategyOrBuilderList
in interfaceCpModelProtoOrBuilder
-
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;
-
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;
-
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;
-
hasSolutionHint
public boolean 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;
- Specified by:
hasSolutionHint
in interfaceCpModelProtoOrBuilder
- Returns:
- Whether the solutionHint field is set.
-
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;
- Specified by:
getSolutionHint
in interfaceCpModelProtoOrBuilder
- Returns:
- The solutionHint.
-
setSolutionHint
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;
-
setSolutionHint
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;
-
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. 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;
-
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;
-
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;
-
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;
- Specified by:
getSolutionHintOrBuilder
in interfaceCpModelProtoOrBuilder
-
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;
- Specified by:
getAssumptionsList
in interfaceCpModelProtoOrBuilder
- Returns:
- A list containing the assumptions.
-
getAssumptionsCount
public int 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;
- Specified by:
getAssumptionsCount
in interfaceCpModelProtoOrBuilder
- Returns:
- The count of assumptions.
-
getAssumptions
public int 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;
- Specified by:
getAssumptions
in interfaceCpModelProtoOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The assumptions at the given index.
-
setAssumptions
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:
index
- The index to set the value at.value
- The assumptions to set.- Returns:
- This builder for chaining.
-
addAssumptions
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:
value
- The assumptions to add.- Returns:
- This builder for chaining.
-
addAllAssumptions
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:
values
- The assumptions to add.- Returns:
- This builder for chaining.
-
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.
-
hasSymmetry
public boolean 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;
- Specified by:
hasSymmetry
in interfaceCpModelProtoOrBuilder
- Returns:
- Whether the symmetry field is set.
-
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;
- Specified by:
getSymmetry
in interfaceCpModelProtoOrBuilder
- Returns:
- The symmetry.
-
setSymmetry
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;
-
setSymmetry
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;
-
mergeSymmetry
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;
-
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;
-
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;
-
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;
- Specified by:
getSymmetryOrBuilder
in interfaceCpModelProtoOrBuilder
-