Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
|
Classes | |
class | Builder |
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 | FLOATING_POINT_OBJECTIVE_FIELD_NUMBER = 9 |
static final int | SEARCH_STRATEGY_FIELD_NUMBER = 5 |
static final int | SOLUTION_HINT_FIELD_NUMBER = 6 |
static final int | ASSUMPTIONS_FIELD_NUMBER = 7 |
static final int | SYMMETRY_FIELD_NUMBER = 8 |
Protected Member Functions | |
java.lang.Object | newInstance (UnusedPrivateParameter unused) |
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable | internalGetFieldAccessorTable () |
Builder | newBuilderForType (com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
A constraint programming problem.
Protobuf type operations_research.sat.CpModelProto
Definition at line 14 of file CpModelProto.java.
boolean com.google.ortools.sat.CpModelProto.equals | ( | final java.lang.Object | obj | ) |
Definition at line 716 of file CpModelProto.java.
int com.google.ortools.sat.CpModelProto.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;
index | The index of the element to return. |
Implements com.google.ortools.sat.CpModelProtoOrBuilder.
Definition at line 555 of file CpModelProto.java.
int com.google.ortools.sat.CpModelProto.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;
Implements com.google.ortools.sat.CpModelProtoOrBuilder.
Definition at line 531 of file CpModelProto.java.
java.util.List< java.lang.Integer > com.google.ortools.sat.CpModelProto.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;
Implements com.google.ortools.sat.CpModelProtoOrBuilder.
Definition at line 508 of file CpModelProto.java.
com.google.ortools.sat.ConstraintProto com.google.ortools.sat.CpModelProto.getConstraints | ( | int | index | ) |
repeated .operations_research.sat.ConstraintProto constraints = 3;
Implements com.google.ortools.sat.CpModelProtoOrBuilder.
Definition at line 189 of file CpModelProto.java.
int com.google.ortools.sat.CpModelProto.getConstraintsCount | ( | ) |
repeated .operations_research.sat.ConstraintProto constraints = 3;
Implements com.google.ortools.sat.CpModelProtoOrBuilder.
Definition at line 182 of file CpModelProto.java.
java.util.List< com.google.ortools.sat.ConstraintProto > com.google.ortools.sat.CpModelProto.getConstraintsList | ( | ) |
repeated .operations_research.sat.ConstraintProto constraints = 3;
Implements com.google.ortools.sat.CpModelProtoOrBuilder.
Definition at line 167 of file CpModelProto.java.
com.google.ortools.sat.ConstraintProtoOrBuilder com.google.ortools.sat.CpModelProto.getConstraintsOrBuilder | ( | int | index | ) |
repeated .operations_research.sat.ConstraintProto constraints = 3;
Implements com.google.ortools.sat.CpModelProtoOrBuilder.
Definition at line 196 of file CpModelProto.java.
java.util.List<? extends com.google.ortools.sat.ConstraintProtoOrBuilder > com.google.ortools.sat.CpModelProto.getConstraintsOrBuilderList | ( | ) |
repeated .operations_research.sat.ConstraintProto constraints = 3;
Implements com.google.ortools.sat.CpModelProtoOrBuilder.
Definition at line 175 of file CpModelProto.java.
|
static |
Definition at line 3549 of file CpModelProto.java.
com.google.ortools.sat.CpModelProto com.google.ortools.sat.CpModelProto.getDefaultInstanceForType | ( | ) |
Definition at line 3585 of file CpModelProto.java.
|
static |
Definition at line 39 of file CpModelProto.java.
com.google.ortools.sat.FloatObjectiveProto com.google.ortools.sat.CpModelProto.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;
Implements com.google.ortools.sat.CpModelProtoOrBuilder.
Definition at line 286 of file CpModelProto.java.
com.google.ortools.sat.FloatObjectiveProtoOrBuilder com.google.ortools.sat.CpModelProto.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 309 of file CpModelProto.java.
java.lang.String com.google.ortools.sat.CpModelProto.getName | ( | ) |
For debug/logging only. Can be empty.
string name = 1;
Implements com.google.ortools.sat.CpModelProtoOrBuilder.
Definition at line 64 of file CpModelProto.java.
com.google.protobuf.ByteString com.google.ortools.sat.CpModelProto.getNameBytes | ( | ) |
For debug/logging only. Can be empty.
string name = 1;
Implements com.google.ortools.sat.CpModelProtoOrBuilder.
Definition at line 86 of file CpModelProto.java.
com.google.ortools.sat.CpObjectiveProto com.google.ortools.sat.CpModelProto.getObjective | ( | ) |
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 224 of file CpModelProto.java.
com.google.ortools.sat.CpObjectiveProtoOrBuilder com.google.ortools.sat.CpModelProto.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 235 of file CpModelProto.java.
com.google.protobuf.Parser< CpModelProto > com.google.ortools.sat.CpModelProto.getParserForType | ( | ) |
Definition at line 3580 of file CpModelProto.java.
com.google.ortools.sat.DecisionStrategyProto com.google.ortools.sat.CpModelProto.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 390 of file CpModelProto.java.
int com.google.ortools.sat.CpModelProto.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 371 of file CpModelProto.java.
java.util.List< com.google.ortools.sat.DecisionStrategyProto > com.google.ortools.sat.CpModelProto.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 332 of file CpModelProto.java.
com.google.ortools.sat.DecisionStrategyProtoOrBuilder com.google.ortools.sat.CpModelProto.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 409 of file CpModelProto.java.
java.util.List<? extends com.google.ortools.sat.DecisionStrategyProtoOrBuilder > com.google.ortools.sat.CpModelProto.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 352 of file CpModelProto.java.
int com.google.ortools.sat.CpModelProto.getSerializedSize | ( | ) |
Definition at line 660 of file CpModelProto.java.
com.google.ortools.sat.PartialVariableAssignment com.google.ortools.sat.CpModelProto.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;
Implements com.google.ortools.sat.CpModelProtoOrBuilder.
Definition at line 457 of file CpModelProto.java.
com.google.ortools.sat.PartialVariableAssignmentOrBuilder com.google.ortools.sat.CpModelProto.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 478 of file CpModelProto.java.
com.google.ortools.sat.SymmetryProto com.google.ortools.sat.CpModelProto.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;
Implements com.google.ortools.sat.CpModelProtoOrBuilder.
Definition at line 591 of file CpModelProto.java.
com.google.ortools.sat.SymmetryProtoOrBuilder com.google.ortools.sat.CpModelProto.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 606 of file CpModelProto.java.
com.google.ortools.sat.IntegerVariableProto com.google.ortools.sat.CpModelProto.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 144 of file CpModelProto.java.
int com.google.ortools.sat.CpModelProto.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 133 of file CpModelProto.java.
java.util.List< com.google.ortools.sat.IntegerVariableProto > com.google.ortools.sat.CpModelProto.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 110 of file CpModelProto.java.
com.google.ortools.sat.IntegerVariableProtoOrBuilder com.google.ortools.sat.CpModelProto.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 155 of file CpModelProto.java.
java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder > com.google.ortools.sat.CpModelProto.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 122 of file CpModelProto.java.
boolean com.google.ortools.sat.CpModelProto.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;
Implements com.google.ortools.sat.CpModelProtoOrBuilder.
Definition at line 262 of file CpModelProto.java.
int com.google.ortools.sat.CpModelProto.hashCode | ( | ) |
Definition at line 760 of file CpModelProto.java.
boolean com.google.ortools.sat.CpModelProto.hasObjective | ( | ) |
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 212 of file CpModelProto.java.
boolean com.google.ortools.sat.CpModelProto.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;
Implements com.google.ortools.sat.CpModelProtoOrBuilder.
Definition at line 435 of file CpModelProto.java.
boolean com.google.ortools.sat.CpModelProto.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;
Implements com.google.ortools.sat.CpModelProtoOrBuilder.
Definition at line 575 of file CpModelProto.java.
|
protected |
Definition at line 45 of file CpModelProto.java.
final boolean com.google.ortools.sat.CpModelProto.isInitialized | ( | ) |
Definition at line 612 of file CpModelProto.java.
|
static |
Definition at line 879 of file CpModelProto.java.
|
static |
Definition at line 882 of file CpModelProto.java.
Builder com.google.ortools.sat.CpModelProto.newBuilderForType | ( | ) |
Definition at line 878 of file CpModelProto.java.
|
protected |
Definition at line 892 of file CpModelProto.java.
|
protected |
Definition at line 33 of file CpModelProto.java.
|
static |
Definition at line 850 of file CpModelProto.java.
|
static |
Definition at line 856 of file CpModelProto.java.
|
static |
Definition at line 827 of file CpModelProto.java.
|
static |
Definition at line 831 of file CpModelProto.java.
|
static |
Definition at line 816 of file CpModelProto.java.
|
static |
Definition at line 821 of file CpModelProto.java.
|
static |
Definition at line 863 of file CpModelProto.java.
|
static |
Definition at line 869 of file CpModelProto.java.
|
static |
Definition at line 837 of file CpModelProto.java.
|
static |
Definition at line 842 of file CpModelProto.java.
|
static |
Definition at line 805 of file CpModelProto.java.
|
static |
Definition at line 810 of file CpModelProto.java.
|
static |
Definition at line 3575 of file CpModelProto.java.
Builder com.google.ortools.sat.CpModelProto.toBuilder | ( | ) |
Definition at line 886 of file CpModelProto.java.
void com.google.ortools.sat.CpModelProto.writeTo | ( | com.google.protobuf.CodedOutputStream | output | ) | throws java.io.IOException |
Definition at line 622 of file CpModelProto.java.
|
static |
Definition at line 482 of file CpModelProto.java.
|
static |
Definition at line 160 of file CpModelProto.java.
|
static |
Definition at line 239 of file CpModelProto.java.
|
static |
Definition at line 52 of file CpModelProto.java.
|
static |
Definition at line 201 of file CpModelProto.java.
|
static |
Definition at line 313 of file CpModelProto.java.
|
static |
Definition at line 414 of file CpModelProto.java.
|
static |
Definition at line 560 of file CpModelProto.java.
|
static |
Definition at line 99 of file CpModelProto.java.