A constraint programming problem.
More...
|
static pb::MessageParser< CpModelProto > | Parser [get] |
|
static pbr::MessageDescriptor | Descriptor [get] |
|
string | Name [get, set] |
| For debug/logging only. Can be empty.
|
|
pbc::RepeatedField< global::Google.OrTools.Sat.IntegerVariableProto > | Variables [get] |
| The associated Protos should be referred by their index in these fields.
|
|
pbc::RepeatedField< global::Google.OrTools.Sat.ConstraintProto > | Constraints [get] |
|
global::Google.OrTools.Sat.CpObjectiveProto | Objective [get, set] |
| The objective to minimize. Can be empty for pure decision problems.
|
|
global::Google.OrTools.Sat.FloatObjectiveProto | FloatingPointObjective [get, set] |
| Advanced usage. It is invalid to have both an objective and a floating point objective.
|
|
pbc::RepeatedField< global::Google.OrTools.Sat.DecisionStrategyProto > | SearchStrategy [get] |
| 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.
|
|
global::Google.OrTools.Sat.PartialVariableAssignment | SolutionHint [get, set] |
| Solution hint.
|
|
pbc::RepeatedField< int > | Assumptions [get] |
| 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.
|
|
global::Google.OrTools.Sat.SymmetryProto | Symmetry [get, set] |
| For now, this is not meant to be filled by a client writing a model, but by our preprocessing step.
|
|
A constraint programming problem.
Definition at line 8459 of file CpModel.pb.cs.
◆ CpModelProto() [1/2]
Google.OrTools.Sat.CpModelProto.CpModelProto |
( |
| ) |
|
|
inline |
◆ CpModelProto() [2/2]
Google.OrTools.Sat.CpModelProto.CpModelProto |
( |
CpModelProto | other | ) |
|
|
inline |
◆ CalculateSize()
int Google.OrTools.Sat.CpModelProto.CalculateSize |
( |
| ) |
|
|
inline |
◆ Clone()
◆ Equals() [1/2]
bool Google.OrTools.Sat.CpModelProto.Equals |
( |
CpModelProto | other | ) |
|
|
inline |
◆ Equals() [2/2]
override bool Google.OrTools.Sat.CpModelProto.Equals |
( |
object | other | ) |
|
|
inline |
◆ GetHashCode()
override int Google.OrTools.Sat.CpModelProto.GetHashCode |
( |
| ) |
|
|
inline |
◆ MergeFrom() [1/2]
void Google.OrTools.Sat.CpModelProto.MergeFrom |
( |
CpModelProto | other | ) |
|
|
inline |
◆ MergeFrom() [2/2]
void Google.OrTools.Sat.CpModelProto.MergeFrom |
( |
pb.CodedInputStream | input | ) |
|
|
inline |
◆ ToString()
override string Google.OrTools.Sat.CpModelProto.ToString |
( |
| ) |
|
|
inline |
◆ WriteTo()
void Google.OrTools.Sat.CpModelProto.WriteTo |
( |
pb.CodedOutputStream | output | ) |
|
|
inline |
◆ AssumptionsFieldNumber
const int Google.OrTools.Sat.CpModelProto.AssumptionsFieldNumber = 7 |
|
static |
Field number for the "assumptions" field.
Definition at line 8646 of file CpModel.pb.cs.
◆ ConstraintsFieldNumber
const int Google.OrTools.Sat.CpModelProto.ConstraintsFieldNumber = 3 |
|
static |
Field number for the "constraints" field.
Definition at line 8541 of file CpModel.pb.cs.
◆ FloatingPointObjectiveFieldNumber
const int Google.OrTools.Sat.CpModelProto.FloatingPointObjectiveFieldNumber = 9 |
|
static |
Field number for the "floating_point_objective" field.
Definition at line 8567 of file CpModel.pb.cs.
◆ NameFieldNumber
const int Google.OrTools.Sat.CpModelProto.NameFieldNumber = 1 |
|
static |
◆ ObjectiveFieldNumber
const int Google.OrTools.Sat.CpModelProto.ObjectiveFieldNumber = 4 |
|
static |
Field number for the "objective" field.
Definition at line 8552 of file CpModel.pb.cs.
◆ SearchStrategyFieldNumber
const int Google.OrTools.Sat.CpModelProto.SearchStrategyFieldNumber = 5 |
|
static |
Field number for the "search_strategy" field.
Definition at line 8596 of file CpModel.pb.cs.
◆ SolutionHintFieldNumber
const int Google.OrTools.Sat.CpModelProto.SolutionHintFieldNumber = 6 |
|
static |
Field number for the "solution_hint" field.
Definition at line 8619 of file CpModel.pb.cs.
◆ SymmetryFieldNumber
const int Google.OrTools.Sat.CpModelProto.SymmetryFieldNumber = 8 |
|
static |
Field number for the "symmetry" field.
Definition at line 8674 of file CpModel.pb.cs.
◆ VariablesFieldNumber
const int Google.OrTools.Sat.CpModelProto.VariablesFieldNumber = 2 |
|
static |
Field number for the "variables" field.
Definition at line 8527 of file CpModel.pb.cs.
◆ Assumptions
pbc.RepeatedField<int> Google.OrTools.Sat.CpModelProto.Assumptions |
|
get |
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.
Definition at line 8669 of file CpModel.pb.cs.
◆ Constraints
pbc.RepeatedField<global.Google.OrTools.Sat.ConstraintProto> Google.OrTools.Sat.CpModelProto.Constraints |
|
get |
◆ Descriptor
pbr.MessageDescriptor Google.OrTools.Sat.CpModelProto.Descriptor |
|
staticget |
◆ FloatingPointObjective
global.Google.OrTools.Sat.FloatObjectiveProto Google.OrTools.Sat.CpModelProto.FloatingPointObjective |
|
getset |
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
- 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.
Definition at line 8588 of file CpModel.pb.cs.
◆ Name
string Google.OrTools.Sat.CpModelProto.Name |
|
getset |
◆ Objective
global.Google.OrTools.Sat.CpObjectiveProto Google.OrTools.Sat.CpModelProto.Objective |
|
getset |
The objective to minimize. Can be empty for pure decision problems.
Definition at line 8559 of file CpModel.pb.cs.
◆ Parser
pb.MessageParser<CpModelProto> Google.OrTools.Sat.CpModelProto.Parser |
|
staticget |
◆ SearchStrategy
pbc.RepeatedField<global.Google.OrTools.Sat.DecisionStrategyProto> Google.OrTools.Sat.CpModelProto.SearchStrategy |
|
get |
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.
Definition at line 8614 of file CpModel.pb.cs.
◆ SolutionHint
global.Google.OrTools.Sat.PartialVariableAssignment Google.OrTools.Sat.CpModelProto.SolutionHint |
|
getset |
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
- 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.
Definition at line 8638 of file CpModel.pb.cs.
◆ Symmetry
global.Google.OrTools.Sat.SymmetryProto Google.OrTools.Sat.CpModelProto.Symmetry |
|
getset |
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.
Definition at line 8686 of file CpModel.pb.cs.
◆ Variables
pbc.RepeatedField<global.Google.OrTools.Sat.IntegerVariableProto> Google.OrTools.Sat.CpModelProto.Variables |
|
get |
The associated Protos should be referred by their index in these fields.
Definition at line 8536 of file CpModel.pb.cs.
The documentation for this class was generated from the following file: