DotNet Reference

.Net Reference

Detailed Description

A constraint programming problem.

Definition at line 7948 of file CpModel.pb.cs.

Public Member Functions

 CpModelProto ()
 
 CpModelProto (CpModelProto other)
 
CpModelProto Clone ()
 
override bool Equals (object other)
 
bool Equals (CpModelProto other)
 
override int GetHashCode ()
 
override string ToString ()
 
void WriteTo (pb::CodedOutputStream output)
 
int CalculateSize ()
 
void MergeFrom (CpModelProto other)
 
void MergeFrom (pb::CodedInputStream input)
 

Static Public Attributes

const int NameFieldNumber = 1
 Field number for the "name" field. More...
 
const int VariablesFieldNumber = 2
 Field number for the "variables" field. More...
 
const int ConstraintsFieldNumber = 3
 Field number for the "constraints" field. More...
 
const int ObjectiveFieldNumber = 4
 Field number for the "objective" field. More...
 
const int SearchStrategyFieldNumber = 5
 Field number for the "search_strategy" field. More...
 
const int SolutionHintFieldNumber = 6
 Field number for the "solution_hint" field. More...
 
const int AssumptionsFieldNumber = 7
 Field number for the "assumptions" field. More...
 
const int SymmetryFieldNumber = 8
 Field number for the "symmetry" field. More...
 

Properties

static pb::MessageParser< CpModelProtoParser [get]
 
static pbr::MessageDescriptor Descriptor [get]
 
string Name [get, set]
 For debug/logging only. More...
 
pbc::RepeatedField< global::Google.OrTools.Sat.IntegerVariableProto > Variables [get]
 The associated Protos should be referred by their index in these fields. More...
 
pbc::RepeatedField< global::Google.OrTools.Sat.ConstraintProto > Constraints [get]
 
global::Google.OrTools.Sat.CpObjectiveProto Objective [get, set]
 The objective to minimize. More...
 
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. More...
 
global::Google.OrTools.Sat.PartialVariableAssignment SolutionHint [get, set]
 Solution hint. More...
 
pbc::RepeatedField< int > Assumptions [get]
 A list of literals. More...
 
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. More...
 

Constructor & Destructor Documentation

◆ CpModelProto() [1/2]

CpModelProto ( )
inline

Definition at line 7969 of file CpModel.pb.cs.

◆ CpModelProto() [2/2]

CpModelProto ( CpModelProto  other)
inline

Definition at line 7976 of file CpModel.pb.cs.

Member Function Documentation

◆ CalculateSize()

int CalculateSize ( )
inline

Definition at line 8240 of file CpModel.pb.cs.

◆ Clone()

CpModelProto Clone ( )
inline

Definition at line 7989 of file CpModel.pb.cs.

◆ Equals() [1/2]

bool Equals ( CpModelProto  other)
inline

Definition at line 8139 of file CpModel.pb.cs.

◆ Equals() [2/2]

override bool Equals ( object  other)
inline

Definition at line 8134 of file CpModel.pb.cs.

◆ GetHashCode()

override int GetHashCode ( )
inline

Definition at line 8158 of file CpModel.pb.cs.

◆ MergeFrom() [1/2]

void MergeFrom ( CpModelProto  other)
inline

Definition at line 8265 of file CpModel.pb.cs.

◆ MergeFrom() [2/2]

void MergeFrom ( pb::CodedInputStream  input)
inline

Definition at line 8298 of file CpModel.pb.cs.

◆ ToString()

override string ToString ( )
inline

Definition at line 8175 of file CpModel.pb.cs.

◆ WriteTo()

void WriteTo ( pb::CodedOutputStream  output)
inline

Definition at line 8180 of file CpModel.pb.cs.

Member Data Documentation

◆ AssumptionsFieldNumber

const int AssumptionsFieldNumber = 7
static

Field number for the "assumptions" field.

Definition at line 8091 of file CpModel.pb.cs.

◆ ConstraintsFieldNumber

const int ConstraintsFieldNumber = 3
static

Field number for the "constraints" field.

Definition at line 8021 of file CpModel.pb.cs.

◆ NameFieldNumber

const int NameFieldNumber = 1
static

Field number for the "name" field.

Definition at line 7994 of file CpModel.pb.cs.

◆ ObjectiveFieldNumber

const int ObjectiveFieldNumber = 4
static

Field number for the "objective" field.

Definition at line 8031 of file CpModel.pb.cs.

◆ SearchStrategyFieldNumber

const int SearchStrategyFieldNumber = 5
static

Field number for the "search_strategy" field.

Definition at line 8045 of file CpModel.pb.cs.

◆ SolutionHintFieldNumber

const int SolutionHintFieldNumber = 6
static

Field number for the "solution_hint" field.

Definition at line 8067 of file CpModel.pb.cs.

◆ SymmetryFieldNumber

const int SymmetryFieldNumber = 8
static

Field number for the "symmetry" field.

Definition at line 8116 of file CpModel.pb.cs.

◆ VariablesFieldNumber

const int VariablesFieldNumber = 2
static

Field number for the "variables" field.

Definition at line 8008 of file CpModel.pb.cs.

Property Documentation

◆ Assumptions

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.

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.

Definition at line 8111 of file CpModel.pb.cs.

◆ Constraints

pbc.RepeatedField<global.Google.OrTools.Sat.ConstraintProto> Constraints
get

Definition at line 8026 of file CpModel.pb.cs.

◆ Descriptor

pbr.MessageDescriptor Descriptor
staticget

Definition at line 7959 of file CpModel.pb.cs.

◆ Name

string Name
getset

For debug/logging only.

Can be empty.

Definition at line 8000 of file CpModel.pb.cs.

◆ Objective

global.Google.OrTools.Sat.CpObjectiveProto Objective
getset

The objective to minimize.

Can be empty for pure decision problems.

Definition at line 8037 of file CpModel.pb.cs.

◆ Parser

pb.MessageParser<CpModelProto> Parser
staticget

Definition at line 7956 of file CpModel.pb.cs.

◆ SearchStrategy

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.

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.

Definition at line 8062 of file CpModel.pb.cs.

◆ SolutionHint

global.Google.OrTools.Sat.PartialVariableAssignment 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 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.

Definition at line 8083 of file CpModel.pb.cs.

◆ Symmetry

global.Google.OrTools.Sat.SymmetryProto 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 8126 of file CpModel.pb.cs.

◆ Variables

pbc.RepeatedField<global.Google.OrTools.Sat.IntegerVariableProto> Variables
get

The associated Protos should be referred by their index in these fields.

Definition at line 8016 of file CpModel.pb.cs.


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