Java Reference
Java Reference
Detailed Description
A constraint programming problem.
Protobuf type
Definition at line 13 of file CpModelProto.java.
Classes | |
| class | Builder |
Public Member Functions | |
| .lang.Override final com.google.protobuf.UnknownFieldSet | getUnknownFields () |
| .lang.Override java.lang.String | getName () |
| .lang.Override com.google.protobuf.ByteString | getNameBytes () |
| .lang.Override java.util.List< com.google.ortools.sat.IntegerVariableProto > | getVariablesList () |
| .lang.Override java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder > | getVariablesOrBuilderList () |
| .lang.Override int | getVariablesCount () |
| .lang.Override com.google.ortools.sat.IntegerVariableProto | getVariables (int index) |
| .lang.Override com.google.ortools.sat.IntegerVariableProtoOrBuilder | getVariablesOrBuilder (int index) |
| .lang.Override java.util.List< com.google.ortools.sat.ConstraintProto > | getConstraintsList () |
repeated .operations_research.sat.ConstraintProto constraints = 3; More... | |
| .lang.Override java.util.List<? extends com.google.ortools.sat.ConstraintProtoOrBuilder > | getConstraintsOrBuilderList () |
repeated .operations_research.sat.ConstraintProto constraints = 3; More... | |
| .lang.Override int | getConstraintsCount () |
repeated .operations_research.sat.ConstraintProto constraints = 3; More... | |
| .lang.Override com.google.ortools.sat.ConstraintProto | getConstraints (int index) |
repeated .operations_research.sat.ConstraintProto constraints = 3; More... | |
| .lang.Override com.google.ortools.sat.ConstraintProtoOrBuilder | getConstraintsOrBuilder (int index) |
repeated .operations_research.sat.ConstraintProto constraints = 3; More... | |
| .lang.Override boolean | hasObjective () |
| .lang.Override com.google.ortools.sat.CpObjectiveProto | getObjective () |
| .lang.Override com.google.ortools.sat.CpObjectiveProtoOrBuilder | getObjectiveOrBuilder () |
| .lang.Override java.util.List< com.google.ortools.sat.DecisionStrategyProto > | getSearchStrategyList () |
| .lang.Override java.util.List<? extends com.google.ortools.sat.DecisionStrategyProtoOrBuilder > | getSearchStrategyOrBuilderList () |
| .lang.Override int | getSearchStrategyCount () |
| .lang.Override com.google.ortools.sat.DecisionStrategyProto | getSearchStrategy (int index) |
| .lang.Override com.google.ortools.sat.DecisionStrategyProtoOrBuilder | getSearchStrategyOrBuilder (int index) |
| .lang.Override boolean | hasSolutionHint () |
| .lang.Override com.google.ortools.sat.PartialVariableAssignment | getSolutionHint () |
| .lang.Override com.google.ortools.sat.PartialVariableAssignmentOrBuilder | getSolutionHintOrBuilder () |
| .lang.Override java.util.List< java.lang.Integer > | getAssumptionsList () |
| int | getAssumptionsCount () |
| int | getAssumptions (int index) |
| .lang.Override final boolean | isInitialized () |
| .lang.Override void | writeTo (com.google.protobuf.CodedOutputStream output) throws java.io.IOException |
| .lang.Override int | getSerializedSize () |
| .lang.Override boolean | equals (final java.lang.Object obj) |
| .lang.Override int | hashCode () |
| .lang.Override Builder | newBuilderForType () |
| .lang.Override Builder | toBuilder () |
| .lang.Override com.google.protobuf.Parser< CpModelProto > | getParserForType () |
| .lang.Override com.google.ortools.sat.CpModelProto | getDefaultInstanceForType () |
Static Public Member Functions | |
| static final com.google.protobuf.Descriptors.Descriptor | getDescriptor () |
| static com.google.ortools.sat.CpModelProto | parseFrom (java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.sat.CpModelProto | parseFrom (java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.sat.CpModelProto | parseFrom (com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.sat.CpModelProto | parseFrom (com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.sat.CpModelProto | parseFrom (byte[] data) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.sat.CpModelProto | parseFrom (byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.sat.CpModelProto | parseFrom (java.io.InputStream input) throws java.io.IOException |
| static com.google.ortools.sat.CpModelProto | parseFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException |
| static com.google.ortools.sat.CpModelProto | parseDelimitedFrom (java.io.InputStream input) throws java.io.IOException |
| static com.google.ortools.sat.CpModelProto | parseDelimitedFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException |
| static com.google.ortools.sat.CpModelProto | parseFrom (com.google.protobuf.CodedInputStream input) throws java.io.IOException |
| static com.google.ortools.sat.CpModelProto | parseFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException |
| static Builder | newBuilder () |
| static Builder | newBuilder (com.google.ortools.sat.CpModelProto prototype) |
| static com.google.ortools.sat.CpModelProto | getDefaultInstance () |
| static com.google.protobuf.Parser< CpModelProto > | parser () |
Static Public Attributes | |
| static final int | NAME_FIELD_NUMBER = 1 |
| static final int | VARIABLES_FIELD_NUMBER = 2 |
| static final int | CONSTRAINTS_FIELD_NUMBER = 3 |
| static final int | OBJECTIVE_FIELD_NUMBER = 4 |
| static final int | SEARCH_STRATEGY_FIELD_NUMBER = 5 |
| static final int | SOLUTION_HINT_FIELD_NUMBER = 6 |
| static final int | ASSUMPTIONS_FIELD_NUMBER = 7 |
Protected Member Functions | |
| .lang.Override java.lang.Object | newInstance (UnusedPrivateParameter unused) |
| .lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable | internalGetFieldAccessorTable () |
| .lang.Override Builder | newBuilderForType (com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
Member Function Documentation
◆ equals()
|
inline |
Definition at line 693 of file CpModelProto.java.
◆ getAssumptions()
|
inline |
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 logicially 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 of the element to return.
- Returns
- The assumptions at the given index.
Implements CpModelProtoOrBuilder.
Definition at line 596 of file CpModelProto.java.
◆ getAssumptionsCount()
|
inline |
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 logicially 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 CpModelProtoOrBuilder.
Definition at line 574 of file CpModelProto.java.
◆ getAssumptionsList()
|
inline |
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 logicially 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 CpModelProtoOrBuilder.
Definition at line 553 of file CpModelProto.java.
◆ getConstraints()
|
inline |
repeated .operations_research.sat.ConstraintProto constraints = 3;
Implements CpModelProtoOrBuilder.
Definition at line 319 of file CpModelProto.java.
◆ getConstraintsCount()
|
inline |
repeated .operations_research.sat.ConstraintProto constraints = 3;
Implements CpModelProtoOrBuilder.
Definition at line 312 of file CpModelProto.java.
◆ getConstraintsList()
|
inline |
repeated .operations_research.sat.ConstraintProto constraints = 3;
Implements CpModelProtoOrBuilder.
Definition at line 297 of file CpModelProto.java.
◆ getConstraintsOrBuilder()
|
inline |
repeated .operations_research.sat.ConstraintProto constraints = 3;
Implements CpModelProtoOrBuilder.
Definition at line 326 of file CpModelProto.java.
◆ getConstraintsOrBuilderList()
|
inline |
repeated .operations_research.sat.ConstraintProto constraints = 3;
Implements CpModelProtoOrBuilder.
Definition at line 305 of file CpModelProto.java.
◆ getDefaultInstance()
|
inlinestatic |
Definition at line 2863 of file CpModelProto.java.
◆ getDefaultInstanceForType()
|
inline |
Definition at line 2888 of file CpModelProto.java.
◆ getDescriptor()
|
inlinestatic |
Definition at line 173 of file CpModelProto.java.
◆ getName()
|
inline |
For debug/logging only. Can be empty.
string name = 1;
- Returns
- The name.
Implements CpModelProtoOrBuilder.
Definition at line 196 of file CpModelProto.java.
◆ getNameBytes()
|
inline |
For debug/logging only. Can be empty.
string name = 1;
- Returns
- The bytes for name.
Implements CpModelProtoOrBuilder.
Definition at line 218 of file CpModelProto.java.
◆ getObjective()
|
inline |
The objective to minimize. Can be empty for pure decision problems.
.operations_research.sat.CpObjectiveProto objective = 4;
- Returns
- The objective.
Implements CpModelProtoOrBuilder.
Definition at line 354 of file CpModelProto.java.
◆ getObjectiveOrBuilder()
|
inline |
The objective to minimize. Can be empty for pure decision problems.
.operations_research.sat.CpObjectiveProto objective = 4;
Implements CpModelProtoOrBuilder.
Definition at line 365 of file CpModelProto.java.
◆ getParserForType()
|
inline |
Definition at line 2883 of file CpModelProto.java.
◆ getSearchStrategy()
|
inline |
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 and this is why we have the solution_lower_bounds and solution_upper_bounds fields in the CpSolverResponse.
repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;
Implements CpModelProtoOrBuilder.
Definition at line 445 of file CpModelProto.java.
◆ getSearchStrategyCount()
|
inline |
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 and this is why we have the solution_lower_bounds and solution_upper_bounds fields in the CpSolverResponse.
repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;
Implements CpModelProtoOrBuilder.
Definition at line 426 of file CpModelProto.java.
◆ getSearchStrategyList()
|
inline |
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 and this is why we have the solution_lower_bounds and solution_upper_bounds fields in the CpSolverResponse.
repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;
Implements CpModelProtoOrBuilder.
Definition at line 387 of file CpModelProto.java.
◆ getSearchStrategyOrBuilder()
|
inline |
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 and this is why we have the solution_lower_bounds and solution_upper_bounds fields in the CpSolverResponse.
repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;
Implements CpModelProtoOrBuilder.
Definition at line 464 of file CpModelProto.java.
◆ getSearchStrategyOrBuilderList()
|
inline |
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 and this is why we have the solution_lower_bounds and solution_upper_bounds fields in the CpSolverResponse.
repeated .operations_research.sat.DecisionStrategyProto search_strategy = 5;
Implements CpModelProtoOrBuilder.
Definition at line 407 of file CpModelProto.java.
◆ getSerializedSize()
|
inline |
Definition at line 645 of file CpModelProto.java.
◆ getSolutionHint()
|
inline |
Solution hint. If a feasible or almost-feasible solution to the problem is already known, it may be helpful to pass it to the solver so that it can be used. 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 CpModelProtoOrBuilder.
Definition at line 508 of file CpModelProto.java.
◆ getSolutionHintOrBuilder()
|
inline |
Solution hint. If a feasible or almost-feasible solution to the problem is already known, it may be helpful to pass it to the solver so that it can be used. 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 CpModelProtoOrBuilder.
Definition at line 527 of file CpModelProto.java.
◆ getUnknownFields()
|
inline |
Definition at line 39 of file CpModelProto.java.
◆ getVariables()
|
inline |
The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
Implements CpModelProtoOrBuilder.
Definition at line 275 of file CpModelProto.java.
◆ getVariablesCount()
|
inline |
The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
Implements CpModelProtoOrBuilder.
Definition at line 264 of file CpModelProto.java.
◆ getVariablesList()
|
inline |
The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
Implements CpModelProtoOrBuilder.
Definition at line 241 of file CpModelProto.java.
◆ getVariablesOrBuilder()
|
inline |
The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
Implements CpModelProtoOrBuilder.
Definition at line 286 of file CpModelProto.java.
◆ getVariablesOrBuilderList()
|
inline |
The associated Protos should be referred by their index in these fields.
repeated .operations_research.sat.IntegerVariableProto variables = 2;
Implements CpModelProtoOrBuilder.
Definition at line 253 of file CpModelProto.java.
◆ hashCode()
|
inline |
Definition at line 727 of file CpModelProto.java.
◆ hasObjective()
|
inline |
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 CpModelProtoOrBuilder.
Definition at line 342 of file CpModelProto.java.
◆ hasSolutionHint()
|
inline |
Solution hint. If a feasible or almost-feasible solution to the problem is already known, it may be helpful to pass it to the solver so that it can be used. 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 CpModelProtoOrBuilder.
Definition at line 488 of file CpModelProto.java.
◆ internalGetFieldAccessorTable()
|
inlineprotected |
Definition at line 179 of file CpModelProto.java.
◆ isInitialized()
|
inline |
Definition at line 603 of file CpModelProto.java.
◆ newBuilder() [1/2]
|
inlinestatic |
Definition at line 836 of file CpModelProto.java.
◆ newBuilder() [2/2]
|
inlinestatic |
Definition at line 839 of file CpModelProto.java.
◆ newBuilderForType() [1/2]
|
inline |
Definition at line 835 of file CpModelProto.java.
◆ newBuilderForType() [2/2]
|
inlineprotected |
Definition at line 849 of file CpModelProto.java.
◆ newInstance()
|
inlineprotected |
Definition at line 32 of file CpModelProto.java.
◆ parseDelimitedFrom() [1/2]
|
inlinestatic |
Definition at line 808 of file CpModelProto.java.
◆ parseDelimitedFrom() [2/2]
|
inlinestatic |
Definition at line 813 of file CpModelProto.java.
◆ parseFrom() [1/10]
|
inlinestatic |
Definition at line 786 of file CpModelProto.java.
◆ parseFrom() [2/10]
|
inlinestatic |
Definition at line 790 of file CpModelProto.java.
◆ parseFrom() [3/10]
|
inlinestatic |
Definition at line 775 of file CpModelProto.java.
◆ parseFrom() [4/10]
|
inlinestatic |
Definition at line 780 of file CpModelProto.java.
◆ parseFrom() [5/10]
|
inlinestatic |
Definition at line 820 of file CpModelProto.java.
◆ parseFrom() [6/10]
|
inlinestatic |
Definition at line 826 of file CpModelProto.java.
◆ parseFrom() [7/10]
|
inlinestatic |
Definition at line 796 of file CpModelProto.java.
◆ parseFrom() [8/10]
|
inlinestatic |
Definition at line 801 of file CpModelProto.java.
◆ parseFrom() [9/10]
|
inlinestatic |
Definition at line 764 of file CpModelProto.java.
◆ parseFrom() [10/10]
|
inlinestatic |
Definition at line 769 of file CpModelProto.java.
◆ parser()
|
inlinestatic |
Definition at line 2878 of file CpModelProto.java.
◆ toBuilder()
|
inline |
Definition at line 843 of file CpModelProto.java.
◆ writeTo()
|
inline |
Definition at line 613 of file CpModelProto.java.
Member Data Documentation
◆ ASSUMPTIONS_FIELD_NUMBER
|
static |
Definition at line 531 of file CpModelProto.java.
◆ CONSTRAINTS_FIELD_NUMBER
|
static |
Definition at line 291 of file CpModelProto.java.
◆ NAME_FIELD_NUMBER
|
static |
Definition at line 185 of file CpModelProto.java.
◆ OBJECTIVE_FIELD_NUMBER
|
static |
Definition at line 331 of file CpModelProto.java.
◆ SEARCH_STRATEGY_FIELD_NUMBER
|
static |
Definition at line 369 of file CpModelProto.java.
◆ SOLUTION_HINT_FIELD_NUMBER
|
static |
Definition at line 469 of file CpModelProto.java.
◆ VARIABLES_FIELD_NUMBER
|
static |
Definition at line 231 of file CpModelProto.java.
The documentation for this class was generated from the following file: