C++ Reference

C++ Reference: CP-SAT

operations_research::sat Namespace Reference

Classes

class  AutomatonConstraint
 Specialized automaton constraint. More...
 
class  BoolVar
 A Boolean variable. More...
 
class  CircuitConstraint
 Specialized circuit constraint. More...
 
class  Constraint
 A constraint. More...
 
class  CpModelBuilder
 Wrapper class around the cp_model proto. More...
 
class  CumulativeConstraint
 Specialized cumulative constraint. More...
 
class  IntervalVar
 Represents a Interval variable. More...
 
class  IntVar
 An integer variable. More...
 
class  LinearExpr
 A dedicated container for linear expressions. More...
 
class  Model
 Class that owns everything related to a particular optimization model. More...
 
class  MultipleCircuitConstraint
 Specialized circuit constraint. More...
 
class  NoOverlap2DConstraint
 Specialized no_overlap2D constraint. More...
 
class  PROTOBUF_FINAL
 
class  ReservoirConstraint
 Specialized reservoir constraint. More...
 
class  TableConstraint
 Specialized assignment constraint. More...
 

Enumerations

enum  DecisionStrategyProto_VariableSelectionStrategy : int {
  DecisionStrategyProto_VariableSelectionStrategy_CHOOSE_FIRST = 0, DecisionStrategyProto_VariableSelectionStrategy_CHOOSE_LOWEST_MIN = 1, DecisionStrategyProto_VariableSelectionStrategy_CHOOSE_HIGHEST_MAX = 2, DecisionStrategyProto_VariableSelectionStrategy_CHOOSE_MIN_DOMAIN_SIZE = 3,
  DecisionStrategyProto_VariableSelectionStrategy_CHOOSE_MAX_DOMAIN_SIZE = 4, DecisionStrategyProto_VariableSelectionStrategy_DecisionStrategyProto_VariableSelectionStrategy_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), DecisionStrategyProto_VariableSelectionStrategy_DecisionStrategyProto_VariableSelectionStrategy_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max()
}
 
enum  DecisionStrategyProto_DomainReductionStrategy : int {
  DecisionStrategyProto_DomainReductionStrategy_SELECT_MIN_VALUE = 0, DecisionStrategyProto_DomainReductionStrategy_SELECT_MAX_VALUE = 1, DecisionStrategyProto_DomainReductionStrategy_SELECT_LOWER_HALF = 2, DecisionStrategyProto_DomainReductionStrategy_SELECT_UPPER_HALF = 3,
  DecisionStrategyProto_DomainReductionStrategy_SELECT_MEDIAN_VALUE = 4, DecisionStrategyProto_DomainReductionStrategy_DecisionStrategyProto_DomainReductionStrategy_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), DecisionStrategyProto_DomainReductionStrategy_DecisionStrategyProto_DomainReductionStrategy_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max()
}
 
enum  CpSolverStatus : int {
  UNKNOWN = 0, MODEL_INVALID = 1, FEASIBLE = 2, INFEASIBLE = 3,
  OPTIMAL = 4, CpSolverStatus_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), CpSolverStatus_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max()
}
 
enum  SatParameters_VariableOrder : int { SatParameters_VariableOrder_IN_ORDER = 0, SatParameters_VariableOrder_IN_REVERSE_ORDER = 1, SatParameters_VariableOrder_IN_RANDOM_ORDER = 2 }
 
enum  SatParameters_Polarity : int {
  SatParameters_Polarity_POLARITY_TRUE = 0, SatParameters_Polarity_POLARITY_FALSE = 1, SatParameters_Polarity_POLARITY_RANDOM = 2, SatParameters_Polarity_POLARITY_WEIGHTED_SIGN = 3,
  SatParameters_Polarity_POLARITY_REVERSE_WEIGHTED_SIGN = 4
}
 
enum  SatParameters_ConflictMinimizationAlgorithm : int { SatParameters_ConflictMinimizationAlgorithm_NONE = 0, SatParameters_ConflictMinimizationAlgorithm_SIMPLE = 1, SatParameters_ConflictMinimizationAlgorithm_RECURSIVE = 2, SatParameters_ConflictMinimizationAlgorithm_EXPERIMENTAL = 3 }
 
enum  SatParameters_BinaryMinizationAlgorithm : int {
  SatParameters_BinaryMinizationAlgorithm_NO_BINARY_MINIMIZATION = 0, SatParameters_BinaryMinizationAlgorithm_BINARY_MINIMIZATION_FIRST = 1, SatParameters_BinaryMinizationAlgorithm_BINARY_MINIMIZATION_FIRST_WITH_TRANSITIVE_REDUCTION = 4, SatParameters_BinaryMinizationAlgorithm_BINARY_MINIMIZATION_WITH_REACHABILITY = 2,
  SatParameters_BinaryMinizationAlgorithm_EXPERIMENTAL_BINARY_MINIMIZATION = 3
}
 
enum  SatParameters_ClauseProtection : int { SatParameters_ClauseProtection_PROTECTION_NONE = 0, SatParameters_ClauseProtection_PROTECTION_ALWAYS = 1, SatParameters_ClauseProtection_PROTECTION_LBD = 2 }
 
enum  SatParameters_ClauseOrdering : int { SatParameters_ClauseOrdering_CLAUSE_ACTIVITY = 0, SatParameters_ClauseOrdering_CLAUSE_LBD = 1 }
 
enum  SatParameters_RestartAlgorithm : int {
  SatParameters_RestartAlgorithm_NO_RESTART = 0, SatParameters_RestartAlgorithm_LUBY_RESTART = 1, SatParameters_RestartAlgorithm_DL_MOVING_AVERAGE_RESTART = 2, SatParameters_RestartAlgorithm_LBD_MOVING_AVERAGE_RESTART = 3,
  SatParameters_RestartAlgorithm_FIXED_RESTART = 4
}
 
enum  SatParameters_MaxSatAssumptionOrder : int { SatParameters_MaxSatAssumptionOrder_DEFAULT_ASSUMPTION_ORDER = 0, SatParameters_MaxSatAssumptionOrder_ORDER_ASSUMPTION_BY_DEPTH = 1, SatParameters_MaxSatAssumptionOrder_ORDER_ASSUMPTION_BY_WEIGHT = 2 }
 
enum  SatParameters_MaxSatStratificationAlgorithm : int { SatParameters_MaxSatStratificationAlgorithm_STRATIFICATION_NONE = 0, SatParameters_MaxSatStratificationAlgorithm_STRATIFICATION_DESCENT = 1, SatParameters_MaxSatStratificationAlgorithm_STRATIFICATION_ASCENT = 2 }
 
enum  SatParameters_SearchBranching : int {
  SatParameters_SearchBranching_AUTOMATIC_SEARCH = 0, SatParameters_SearchBranching_FIXED_SEARCH = 1, SatParameters_SearchBranching_PORTFOLIO_SEARCH = 2, SatParameters_SearchBranching_LP_SEARCH = 3,
  SatParameters_SearchBranching_PSEUDO_COST_SEARCH = 4, SatParameters_SearchBranching_PORTFOLIO_WITH_QUICK_RESTART_SEARCH = 5, SatParameters_SearchBranching_HINT_SEARCH = 6
}
 
enum  SatParameters_FPRoundingMethod : int { SatParameters_FPRoundingMethod_NEAREST_INTEGER = 0, SatParameters_FPRoundingMethod_LOCK_BASED = 1, SatParameters_FPRoundingMethod_ACTIVE_LOCK_BASED = 3, SatParameters_FPRoundingMethod_PROPAGATION_ASSISTED = 2 }
 

Functions

std::ostream & operator<< (std::ostream &os, const BoolVar &var)
 
BoolVar Not (BoolVar x)
 A convenient wrapper so we can write Not(x) instead of x.Not() which is sometimes clearer. More...
 
std::ostream & operator<< (std::ostream &os, const IntVar &var)
 
std::ostream & operator<< (std::ostream &os, const IntervalVar &var)
 
int64 SolutionIntegerValue (const CpSolverResponse &r, const LinearExpr &expr)
 Evaluates the value of an linear expression in a solver response. More...
 
int64 SolutionIntegerMin (const CpSolverResponse &r, IntVar x)
 Returns the min of an integer variable in a solution. More...
 
int64 SolutionIntegerMax (const CpSolverResponse &r, IntVar x)
 Returns the max of an integer variable in a solution. More...
 
bool SolutionBooleanValue (const CpSolverResponse &r, BoolVar x)
 Evaluates the value of a Boolean literal in a solver response. More...
 
CpSolverResponse Solve (const CpModelProto &model_proto)
 Solves the given CpModelProto and returns an instance of CpSolverResponse. More...
 
CpSolverResponse SolveWithParameters (const CpModelProto &model_proto, const SatParameters &params)
 Solves the given CpModelProto with the given parameters. More...
 
std::string CpModelStats (const CpModelProto &model)
 Returns a string with some statistics on the given CpModelProto. More...
 
std::string CpSolverResponseStats (const CpSolverResponse &response, bool has_objective=true)
 Returns a string with some statistics on the solver response. More...
 
CpSolverResponse SolveCpModel (const CpModelProto &model_proto, Model *model)
 Solves the given CpModelProto. More...
 
CpSolverResponse SolveWithParameters (const CpModelProto &model_proto, const std::string &params)
 Solves the given CpModelProto with the given sat parameters as string in JSon format, and returns an instance of CpSolverResponse. More...
 
std::function< void(Model *)> NewFeasibleSolutionObserver (const std::function< void(const CpSolverResponse &response)> &observer)
 Creates a solution observer with the model with model.Add(NewFeasibleSolutionObserver([](response){...}));. More...
 
void SetSynchronizationFunction (std::function< CpSolverResponse()> f, Model *model)
 If set, the underlying solver will call this function regularly in a deterministic way. More...
 
std::function< SatParameters(Model *)> NewSatParameters (const std::string &params)
 Creates parameters for the solver, which you can add to the model with. More...
 
std::function< SatParameters(Model *)> NewSatParameters (const SatParameters &parameters)
 
bool DecisionStrategyProto_VariableSelectionStrategy_IsValid (int value)
 
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * DecisionStrategyProto_VariableSelectionStrategy_descriptor ()
 
template<typename T >
const std::string & DecisionStrategyProto_VariableSelectionStrategy_Name (T enum_t_value)
 
bool DecisionStrategyProto_VariableSelectionStrategy_Parse (::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DecisionStrategyProto_VariableSelectionStrategy *value)
 
bool DecisionStrategyProto_DomainReductionStrategy_IsValid (int value)
 
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * DecisionStrategyProto_DomainReductionStrategy_descriptor ()
 
template<typename T >
const std::string & DecisionStrategyProto_DomainReductionStrategy_Name (T enum_t_value)
 
bool DecisionStrategyProto_DomainReductionStrategy_Parse (::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DecisionStrategyProto_DomainReductionStrategy *value)
 
bool CpSolverStatus_IsValid (int value)
 
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * CpSolverStatus_descriptor ()
 
template<typename T >
const std::string & CpSolverStatus_Name (T enum_t_value)
 
bool CpSolverStatus_Parse (::PROTOBUF_NAMESPACE_ID::ConstStringParam name, CpSolverStatus *value)
 
bool SatParameters_VariableOrder_IsValid (int value)
 
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * SatParameters_VariableOrder_descriptor ()
 
template<typename T >
const std::string & SatParameters_VariableOrder_Name (T enum_t_value)
 
bool SatParameters_VariableOrder_Parse (::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SatParameters_VariableOrder *value)
 
bool SatParameters_Polarity_IsValid (int value)
 
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * SatParameters_Polarity_descriptor ()
 
template<typename T >
const std::string & SatParameters_Polarity_Name (T enum_t_value)
 
bool SatParameters_Polarity_Parse (::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SatParameters_Polarity *value)
 
bool SatParameters_ConflictMinimizationAlgorithm_IsValid (int value)
 
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * SatParameters_ConflictMinimizationAlgorithm_descriptor ()
 
template<typename T >
const std::string & SatParameters_ConflictMinimizationAlgorithm_Name (T enum_t_value)
 
bool SatParameters_ConflictMinimizationAlgorithm_Parse (::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SatParameters_ConflictMinimizationAlgorithm *value)
 
bool SatParameters_BinaryMinizationAlgorithm_IsValid (int value)
 
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * SatParameters_BinaryMinizationAlgorithm_descriptor ()
 
template<typename T >
const std::string & SatParameters_BinaryMinizationAlgorithm_Name (T enum_t_value)
 
bool SatParameters_BinaryMinizationAlgorithm_Parse (::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SatParameters_BinaryMinizationAlgorithm *value)
 
bool SatParameters_ClauseProtection_IsValid (int value)
 
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * SatParameters_ClauseProtection_descriptor ()
 
template<typename T >
const std::string & SatParameters_ClauseProtection_Name (T enum_t_value)
 
bool SatParameters_ClauseProtection_Parse (::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SatParameters_ClauseProtection *value)
 
bool SatParameters_ClauseOrdering_IsValid (int value)
 
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * SatParameters_ClauseOrdering_descriptor ()
 
template<typename T >
const std::string & SatParameters_ClauseOrdering_Name (T enum_t_value)
 
bool SatParameters_ClauseOrdering_Parse (::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SatParameters_ClauseOrdering *value)
 
bool SatParameters_RestartAlgorithm_IsValid (int value)
 
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * SatParameters_RestartAlgorithm_descriptor ()
 
template<typename T >
const std::string & SatParameters_RestartAlgorithm_Name (T enum_t_value)
 
bool SatParameters_RestartAlgorithm_Parse (::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SatParameters_RestartAlgorithm *value)
 
bool SatParameters_MaxSatAssumptionOrder_IsValid (int value)
 
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * SatParameters_MaxSatAssumptionOrder_descriptor ()
 
template<typename T >
const std::string & SatParameters_MaxSatAssumptionOrder_Name (T enum_t_value)
 
bool SatParameters_MaxSatAssumptionOrder_Parse (::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SatParameters_MaxSatAssumptionOrder *value)
 
bool SatParameters_MaxSatStratificationAlgorithm_IsValid (int value)
 
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * SatParameters_MaxSatStratificationAlgorithm_descriptor ()
 
template<typename T >
const std::string & SatParameters_MaxSatStratificationAlgorithm_Name (T enum_t_value)
 
bool SatParameters_MaxSatStratificationAlgorithm_Parse (::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SatParameters_MaxSatStratificationAlgorithm *value)
 
bool SatParameters_SearchBranching_IsValid (int value)
 
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * SatParameters_SearchBranching_descriptor ()
 
template<typename T >
const std::string & SatParameters_SearchBranching_Name (T enum_t_value)
 
bool SatParameters_SearchBranching_Parse (::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SatParameters_SearchBranching *value)
 
bool SatParameters_FPRoundingMethod_IsValid (int value)
 
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * SatParameters_FPRoundingMethod_descriptor ()
 
template<typename T >
const std::string & SatParameters_FPRoundingMethod_Name (T enum_t_value)
 
bool SatParameters_FPRoundingMethod_Parse (::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SatParameters_FPRoundingMethod *value)
 

Variables

BooleanAssignmentDefaultTypeInternal _BooleanAssignment_default_instance_
 
LinearBooleanConstraintDefaultTypeInternal _LinearBooleanConstraint_default_instance_
 
LinearBooleanProblemDefaultTypeInternal _LinearBooleanProblem_default_instance_
 
LinearObjectiveDefaultTypeInternal _LinearObjective_default_instance_
 
AllDifferentConstraintProtoDefaultTypeInternal _AllDifferentConstraintProto_default_instance_
 
AutomatonConstraintProtoDefaultTypeInternal _AutomatonConstraintProto_default_instance_
 
BoolArgumentProtoDefaultTypeInternal _BoolArgumentProto_default_instance_
 
CircuitConstraintProtoDefaultTypeInternal _CircuitConstraintProto_default_instance_
 
ConstraintProtoDefaultTypeInternal _ConstraintProto_default_instance_
 
CpModelProtoDefaultTypeInternal _CpModelProto_default_instance_
 
CpObjectiveProtoDefaultTypeInternal _CpObjectiveProto_default_instance_
 
CpSolverResponseDefaultTypeInternal _CpSolverResponse_default_instance_
 
CumulativeConstraintProtoDefaultTypeInternal _CumulativeConstraintProto_default_instance_
 
DecisionStrategyProtoDefaultTypeInternal _DecisionStrategyProto_default_instance_
 
DecisionStrategyProto_AffineTransformationDefaultTypeInternal _DecisionStrategyProto_AffineTransformation_default_instance_
 
ElementConstraintProtoDefaultTypeInternal _ElementConstraintProto_default_instance_
 
IntegerArgumentProtoDefaultTypeInternal _IntegerArgumentProto_default_instance_
 
IntegerVariableProtoDefaultTypeInternal _IntegerVariableProto_default_instance_
 
IntervalConstraintProtoDefaultTypeInternal _IntervalConstraintProto_default_instance_
 
InverseConstraintProtoDefaultTypeInternal _InverseConstraintProto_default_instance_
 
LinearArgumentProtoDefaultTypeInternal _LinearArgumentProto_default_instance_
 
LinearConstraintProtoDefaultTypeInternal _LinearConstraintProto_default_instance_
 
LinearExpressionProtoDefaultTypeInternal _LinearExpressionProto_default_instance_
 
NoOverlap2DConstraintProtoDefaultTypeInternal _NoOverlap2DConstraintProto_default_instance_
 
NoOverlapConstraintProtoDefaultTypeInternal _NoOverlapConstraintProto_default_instance_
 
PartialVariableAssignmentDefaultTypeInternal _PartialVariableAssignment_default_instance_
 
ReservoirConstraintProtoDefaultTypeInternal _ReservoirConstraintProto_default_instance_
 
RoutesConstraintProtoDefaultTypeInternal _RoutesConstraintProto_default_instance_
 
TableConstraintProtoDefaultTypeInternal _TableConstraintProto_default_instance_
 
constexpr DecisionStrategyProto_VariableSelectionStrategy DecisionStrategyProto_VariableSelectionStrategy_VariableSelectionStrategy_MIN = DecisionStrategyProto_VariableSelectionStrategy_CHOOSE_FIRST
 
constexpr DecisionStrategyProto_VariableSelectionStrategy DecisionStrategyProto_VariableSelectionStrategy_VariableSelectionStrategy_MAX = DecisionStrategyProto_VariableSelectionStrategy_CHOOSE_MAX_DOMAIN_SIZE
 
constexpr int DecisionStrategyProto_VariableSelectionStrategy_VariableSelectionStrategy_ARRAYSIZE = DecisionStrategyProto_VariableSelectionStrategy_VariableSelectionStrategy_MAX + 1
 
constexpr DecisionStrategyProto_DomainReductionStrategy DecisionStrategyProto_DomainReductionStrategy_DomainReductionStrategy_MIN = DecisionStrategyProto_DomainReductionStrategy_SELECT_MIN_VALUE
 
constexpr DecisionStrategyProto_DomainReductionStrategy DecisionStrategyProto_DomainReductionStrategy_DomainReductionStrategy_MAX = DecisionStrategyProto_DomainReductionStrategy_SELECT_MEDIAN_VALUE
 
constexpr int DecisionStrategyProto_DomainReductionStrategy_DomainReductionStrategy_ARRAYSIZE = DecisionStrategyProto_DomainReductionStrategy_DomainReductionStrategy_MAX + 1
 
constexpr CpSolverStatus CpSolverStatus_MIN = UNKNOWN
 
constexpr CpSolverStatus CpSolverStatus_MAX = OPTIMAL
 
constexpr int CpSolverStatus_ARRAYSIZE = CpSolverStatus_MAX + 1
 
SatParametersDefaultTypeInternal _SatParameters_default_instance_
 
constexpr SatParameters_VariableOrder SatParameters_VariableOrder_VariableOrder_MIN = SatParameters_VariableOrder_IN_ORDER
 
constexpr SatParameters_VariableOrder SatParameters_VariableOrder_VariableOrder_MAX = SatParameters_VariableOrder_IN_RANDOM_ORDER
 
constexpr int SatParameters_VariableOrder_VariableOrder_ARRAYSIZE = SatParameters_VariableOrder_VariableOrder_MAX + 1
 
constexpr SatParameters_Polarity SatParameters_Polarity_Polarity_MIN = SatParameters_Polarity_POLARITY_TRUE
 
constexpr SatParameters_Polarity SatParameters_Polarity_Polarity_MAX = SatParameters_Polarity_POLARITY_REVERSE_WEIGHTED_SIGN
 
constexpr int SatParameters_Polarity_Polarity_ARRAYSIZE = SatParameters_Polarity_Polarity_MAX + 1
 
constexpr SatParameters_ConflictMinimizationAlgorithm SatParameters_ConflictMinimizationAlgorithm_ConflictMinimizationAlgorithm_MIN = SatParameters_ConflictMinimizationAlgorithm_NONE
 
constexpr SatParameters_ConflictMinimizationAlgorithm SatParameters_ConflictMinimizationAlgorithm_ConflictMinimizationAlgorithm_MAX = SatParameters_ConflictMinimizationAlgorithm_EXPERIMENTAL
 
constexpr int SatParameters_ConflictMinimizationAlgorithm_ConflictMinimizationAlgorithm_ARRAYSIZE = SatParameters_ConflictMinimizationAlgorithm_ConflictMinimizationAlgorithm_MAX + 1
 
constexpr SatParameters_BinaryMinizationAlgorithm SatParameters_BinaryMinizationAlgorithm_BinaryMinizationAlgorithm_MIN = SatParameters_BinaryMinizationAlgorithm_NO_BINARY_MINIMIZATION
 
constexpr SatParameters_BinaryMinizationAlgorithm SatParameters_BinaryMinizationAlgorithm_BinaryMinizationAlgorithm_MAX = SatParameters_BinaryMinizationAlgorithm_BINARY_MINIMIZATION_FIRST_WITH_TRANSITIVE_REDUCTION
 
constexpr int SatParameters_BinaryMinizationAlgorithm_BinaryMinizationAlgorithm_ARRAYSIZE = SatParameters_BinaryMinizationAlgorithm_BinaryMinizationAlgorithm_MAX + 1
 
constexpr SatParameters_ClauseProtection SatParameters_ClauseProtection_ClauseProtection_MIN = SatParameters_ClauseProtection_PROTECTION_NONE
 
constexpr SatParameters_ClauseProtection SatParameters_ClauseProtection_ClauseProtection_MAX = SatParameters_ClauseProtection_PROTECTION_LBD
 
constexpr int SatParameters_ClauseProtection_ClauseProtection_ARRAYSIZE = SatParameters_ClauseProtection_ClauseProtection_MAX + 1
 
constexpr SatParameters_ClauseOrdering SatParameters_ClauseOrdering_ClauseOrdering_MIN = SatParameters_ClauseOrdering_CLAUSE_ACTIVITY
 
constexpr SatParameters_ClauseOrdering SatParameters_ClauseOrdering_ClauseOrdering_MAX = SatParameters_ClauseOrdering_CLAUSE_LBD
 
constexpr int SatParameters_ClauseOrdering_ClauseOrdering_ARRAYSIZE = SatParameters_ClauseOrdering_ClauseOrdering_MAX + 1
 
constexpr SatParameters_RestartAlgorithm SatParameters_RestartAlgorithm_RestartAlgorithm_MIN = SatParameters_RestartAlgorithm_NO_RESTART
 
constexpr SatParameters_RestartAlgorithm SatParameters_RestartAlgorithm_RestartAlgorithm_MAX = SatParameters_RestartAlgorithm_FIXED_RESTART
 
constexpr int SatParameters_RestartAlgorithm_RestartAlgorithm_ARRAYSIZE = SatParameters_RestartAlgorithm_RestartAlgorithm_MAX + 1
 
constexpr SatParameters_MaxSatAssumptionOrder SatParameters_MaxSatAssumptionOrder_MaxSatAssumptionOrder_MIN = SatParameters_MaxSatAssumptionOrder_DEFAULT_ASSUMPTION_ORDER
 
constexpr SatParameters_MaxSatAssumptionOrder SatParameters_MaxSatAssumptionOrder_MaxSatAssumptionOrder_MAX = SatParameters_MaxSatAssumptionOrder_ORDER_ASSUMPTION_BY_WEIGHT
 
constexpr int SatParameters_MaxSatAssumptionOrder_MaxSatAssumptionOrder_ARRAYSIZE = SatParameters_MaxSatAssumptionOrder_MaxSatAssumptionOrder_MAX + 1
 
constexpr SatParameters_MaxSatStratificationAlgorithm SatParameters_MaxSatStratificationAlgorithm_MaxSatStratificationAlgorithm_MIN = SatParameters_MaxSatStratificationAlgorithm_STRATIFICATION_NONE
 
constexpr SatParameters_MaxSatStratificationAlgorithm SatParameters_MaxSatStratificationAlgorithm_MaxSatStratificationAlgorithm_MAX = SatParameters_MaxSatStratificationAlgorithm_STRATIFICATION_ASCENT
 
constexpr int SatParameters_MaxSatStratificationAlgorithm_MaxSatStratificationAlgorithm_ARRAYSIZE = SatParameters_MaxSatStratificationAlgorithm_MaxSatStratificationAlgorithm_MAX + 1
 
constexpr SatParameters_SearchBranching SatParameters_SearchBranching_SearchBranching_MIN = SatParameters_SearchBranching_AUTOMATIC_SEARCH
 
constexpr SatParameters_SearchBranching SatParameters_SearchBranching_SearchBranching_MAX = SatParameters_SearchBranching_HINT_SEARCH
 
constexpr int SatParameters_SearchBranching_SearchBranching_ARRAYSIZE = SatParameters_SearchBranching_SearchBranching_MAX + 1
 
constexpr SatParameters_FPRoundingMethod SatParameters_FPRoundingMethod_FPRoundingMethod_MIN = SatParameters_FPRoundingMethod_NEAREST_INTEGER
 
constexpr SatParameters_FPRoundingMethod SatParameters_FPRoundingMethod_FPRoundingMethod_MAX = SatParameters_FPRoundingMethod_ACTIVE_LOCK_BASED
 
constexpr int SatParameters_FPRoundingMethod_FPRoundingMethod_ARRAYSIZE = SatParameters_FPRoundingMethod_FPRoundingMethod_MAX + 1
 

Enumeration Type Documentation

◆ CpSolverStatus

enum CpSolverStatus : int
Enumerator
UNKNOWN 
MODEL_INVALID 
FEASIBLE 
INFEASIBLE 
OPTIMAL 
CpSolverStatus_INT_MIN_SENTINEL_DO_NOT_USE_ 
CpSolverStatus_INT_MAX_SENTINEL_DO_NOT_USE_ 

Definition at line 222 of file cp_model.pb.h.

◆ DecisionStrategyProto_DomainReductionStrategy

Enumerator
DecisionStrategyProto_DomainReductionStrategy_SELECT_MIN_VALUE 
DecisionStrategyProto_DomainReductionStrategy_SELECT_MAX_VALUE 
DecisionStrategyProto_DomainReductionStrategy_SELECT_LOWER_HALF 
DecisionStrategyProto_DomainReductionStrategy_SELECT_UPPER_HALF 
DecisionStrategyProto_DomainReductionStrategy_SELECT_MEDIAN_VALUE 
DecisionStrategyProto_DomainReductionStrategy_DecisionStrategyProto_DomainReductionStrategy_INT_MIN_SENTINEL_DO_NOT_USE_ 
DecisionStrategyProto_DomainReductionStrategy_DecisionStrategyProto_DomainReductionStrategy_INT_MAX_SENTINEL_DO_NOT_USE_ 

Definition at line 194 of file cp_model.pb.h.

◆ DecisionStrategyProto_VariableSelectionStrategy

Enumerator
DecisionStrategyProto_VariableSelectionStrategy_CHOOSE_FIRST 
DecisionStrategyProto_VariableSelectionStrategy_CHOOSE_LOWEST_MIN 
DecisionStrategyProto_VariableSelectionStrategy_CHOOSE_HIGHEST_MAX 
DecisionStrategyProto_VariableSelectionStrategy_CHOOSE_MIN_DOMAIN_SIZE 
DecisionStrategyProto_VariableSelectionStrategy_CHOOSE_MAX_DOMAIN_SIZE 
DecisionStrategyProto_VariableSelectionStrategy_DecisionStrategyProto_VariableSelectionStrategy_INT_MIN_SENTINEL_DO_NOT_USE_ 
DecisionStrategyProto_VariableSelectionStrategy_DecisionStrategyProto_VariableSelectionStrategy_INT_MAX_SENTINEL_DO_NOT_USE_ 

Definition at line 166 of file cp_model.pb.h.

◆ SatParameters_BinaryMinizationAlgorithm

Enumerator
SatParameters_BinaryMinizationAlgorithm_NO_BINARY_MINIMIZATION 
SatParameters_BinaryMinizationAlgorithm_BINARY_MINIMIZATION_FIRST 
SatParameters_BinaryMinizationAlgorithm_BINARY_MINIMIZATION_FIRST_WITH_TRANSITIVE_REDUCTION 
SatParameters_BinaryMinizationAlgorithm_BINARY_MINIMIZATION_WITH_REACHABILITY 
SatParameters_BinaryMinizationAlgorithm_EXPERIMENTAL_BINARY_MINIMIZATION 

Definition at line 145 of file sat_parameters.pb.h.

◆ SatParameters_ClauseOrdering

Enumerator
SatParameters_ClauseOrdering_CLAUSE_ACTIVITY 
SatParameters_ClauseOrdering_CLAUSE_LBD 

Definition at line 195 of file sat_parameters.pb.h.

◆ SatParameters_ClauseProtection

Enumerator
SatParameters_ClauseProtection_PROTECTION_NONE 
SatParameters_ClauseProtection_PROTECTION_ALWAYS 
SatParameters_ClauseProtection_PROTECTION_LBD 

Definition at line 171 of file sat_parameters.pb.h.

◆ SatParameters_ConflictMinimizationAlgorithm

Enumerator
SatParameters_ConflictMinimizationAlgorithm_NONE 
SatParameters_ConflictMinimizationAlgorithm_SIMPLE 
SatParameters_ConflictMinimizationAlgorithm_RECURSIVE 
SatParameters_ConflictMinimizationAlgorithm_EXPERIMENTAL 

Definition at line 120 of file sat_parameters.pb.h.

◆ SatParameters_FPRoundingMethod

Enumerator
SatParameters_FPRoundingMethod_NEAREST_INTEGER 
SatParameters_FPRoundingMethod_LOCK_BASED 
SatParameters_FPRoundingMethod_ACTIVE_LOCK_BASED 
SatParameters_FPRoundingMethod_PROPAGATION_ASSISTED 

Definition at line 320 of file sat_parameters.pb.h.

◆ SatParameters_MaxSatAssumptionOrder

Enumerator
SatParameters_MaxSatAssumptionOrder_DEFAULT_ASSUMPTION_ORDER 
SatParameters_MaxSatAssumptionOrder_ORDER_ASSUMPTION_BY_DEPTH 
SatParameters_MaxSatAssumptionOrder_ORDER_ASSUMPTION_BY_WEIGHT 

Definition at line 244 of file sat_parameters.pb.h.

◆ SatParameters_MaxSatStratificationAlgorithm

Enumerator
SatParameters_MaxSatStratificationAlgorithm_STRATIFICATION_NONE 
SatParameters_MaxSatStratificationAlgorithm_STRATIFICATION_DESCENT 
SatParameters_MaxSatStratificationAlgorithm_STRATIFICATION_ASCENT 

Definition at line 268 of file sat_parameters.pb.h.

◆ SatParameters_Polarity

Enumerator
SatParameters_Polarity_POLARITY_TRUE 
SatParameters_Polarity_POLARITY_FALSE 
SatParameters_Polarity_POLARITY_RANDOM 
SatParameters_Polarity_POLARITY_WEIGHTED_SIGN 
SatParameters_Polarity_POLARITY_REVERSE_WEIGHTED_SIGN 

Definition at line 94 of file sat_parameters.pb.h.

◆ SatParameters_RestartAlgorithm

Enumerator
SatParameters_RestartAlgorithm_NO_RESTART 
SatParameters_RestartAlgorithm_LUBY_RESTART 
SatParameters_RestartAlgorithm_DL_MOVING_AVERAGE_RESTART 
SatParameters_RestartAlgorithm_LBD_MOVING_AVERAGE_RESTART 
SatParameters_RestartAlgorithm_FIXED_RESTART 

Definition at line 218 of file sat_parameters.pb.h.

◆ SatParameters_SearchBranching

Enumerator
SatParameters_SearchBranching_AUTOMATIC_SEARCH 
SatParameters_SearchBranching_FIXED_SEARCH 
SatParameters_SearchBranching_PORTFOLIO_SEARCH 
SatParameters_SearchBranching_LP_SEARCH 
SatParameters_SearchBranching_PSEUDO_COST_SEARCH 
SatParameters_SearchBranching_PORTFOLIO_WITH_QUICK_RESTART_SEARCH 
SatParameters_SearchBranching_HINT_SEARCH 

Definition at line 292 of file sat_parameters.pb.h.

◆ SatParameters_VariableOrder

Enumerator
SatParameters_VariableOrder_IN_ORDER 
SatParameters_VariableOrder_IN_REVERSE_ORDER 
SatParameters_VariableOrder_IN_RANDOM_ORDER 

Definition at line 70 of file sat_parameters.pb.h.

Function Documentation

◆ CpModelStats()

std::string operations_research::sat::CpModelStats ( const CpModelProto &  model)

Returns a string with some statistics on the given CpModelProto.

◆ CpSolverResponseStats()

std::string operations_research::sat::CpSolverResponseStats ( const CpSolverResponse &  response,
bool  has_objective = true 
)

Returns a string with some statistics on the solver response.

If the second argument is false, we will just display NA for the objective value instead of zero. It is not really needed but it makes things a bit clearer to see that there is no objective.

◆ CpSolverStatus_descriptor()

const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* operations_research::sat::CpSolverStatus_descriptor ( )

◆ CpSolverStatus_IsValid()

bool operations_research::sat::CpSolverStatus_IsValid ( int  value)

◆ CpSolverStatus_Name()

const std::string& operations_research::sat::CpSolverStatus_Name ( enum_t_value)
inline

Definition at line 238 of file cp_model.pb.h.

◆ CpSolverStatus_Parse()

bool operations_research::sat::CpSolverStatus_Parse ( ::PROTOBUF_NAMESPACE_ID::ConstStringParam  name,
CpSolverStatus value 
)
inline

Definition at line 245 of file cp_model.pb.h.

◆ DecisionStrategyProto_DomainReductionStrategy_descriptor()

const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* operations_research::sat::DecisionStrategyProto_DomainReductionStrategy_descriptor ( )

◆ DecisionStrategyProto_DomainReductionStrategy_IsValid()

bool operations_research::sat::DecisionStrategyProto_DomainReductionStrategy_IsValid ( int  value)

◆ DecisionStrategyProto_DomainReductionStrategy_Name()

const std::string& operations_research::sat::DecisionStrategyProto_DomainReductionStrategy_Name ( enum_t_value)
inline

Definition at line 210 of file cp_model.pb.h.

◆ DecisionStrategyProto_DomainReductionStrategy_Parse()

bool operations_research::sat::DecisionStrategyProto_DomainReductionStrategy_Parse ( ::PROTOBUF_NAMESPACE_ID::ConstStringParam  name,
DecisionStrategyProto_DomainReductionStrategy value 
)
inline

Definition at line 217 of file cp_model.pb.h.

◆ DecisionStrategyProto_VariableSelectionStrategy_descriptor()

const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* operations_research::sat::DecisionStrategyProto_VariableSelectionStrategy_descriptor ( )

◆ DecisionStrategyProto_VariableSelectionStrategy_IsValid()

bool operations_research::sat::DecisionStrategyProto_VariableSelectionStrategy_IsValid ( int  value)

◆ DecisionStrategyProto_VariableSelectionStrategy_Name()

const std::string& operations_research::sat::DecisionStrategyProto_VariableSelectionStrategy_Name ( enum_t_value)
inline

Definition at line 182 of file cp_model.pb.h.

◆ DecisionStrategyProto_VariableSelectionStrategy_Parse()

bool operations_research::sat::DecisionStrategyProto_VariableSelectionStrategy_Parse ( ::PROTOBUF_NAMESPACE_ID::ConstStringParam  name,
DecisionStrategyProto_VariableSelectionStrategy value 
)
inline

Definition at line 189 of file cp_model.pb.h.

◆ NewFeasibleSolutionObserver()

std::function<void(Model*)> operations_research::sat::NewFeasibleSolutionObserver ( const std::function< void(const CpSolverResponse &response)> &  observer)

Creates a solution observer with the model with model.Add(NewFeasibleSolutionObserver([](response){...}));.

The given function will be called on each improving feasible solution found during the search. For a non-optimization problem, if the option to find all solution was set, then this will be called on each new solution.

◆ NewSatParameters() [1/2]

std::function<SatParameters(Model*)> operations_research::sat::NewSatParameters ( const SatParameters &  parameters)

◆ NewSatParameters() [2/2]

std::function<SatParameters(Model*)> operations_research::sat::NewSatParameters ( const std::string &  params)

Creates parameters for the solver, which you can add to the model with.

model->Add(NewSatParameters(parameters_as_string_or_proto))

before calling SolveCpModel().

◆ Not()

BoolVar operations_research::sat::Not ( BoolVar  x)

A convenient wrapper so we can write Not(x) instead of x.Not() which is sometimes clearer.

◆ operator<<() [1/3]

std::ostream& operations_research::sat::operator<< ( std::ostream &  os,
const BoolVar var 
)

◆ operator<<() [2/3]

std::ostream& operations_research::sat::operator<< ( std::ostream &  os,
const IntervalVar var 
)

◆ operator<<() [3/3]

std::ostream& operations_research::sat::operator<< ( std::ostream &  os,
const IntVar var 
)

◆ SatParameters_BinaryMinizationAlgorithm_descriptor()

const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* operations_research::sat::SatParameters_BinaryMinizationAlgorithm_descriptor ( )

◆ SatParameters_BinaryMinizationAlgorithm_IsValid()

bool operations_research::sat::SatParameters_BinaryMinizationAlgorithm_IsValid ( int  value)

◆ SatParameters_BinaryMinizationAlgorithm_Name()

const std::string& operations_research::sat::SatParameters_BinaryMinizationAlgorithm_Name ( enum_t_value)
inline

Definition at line 159 of file sat_parameters.pb.h.

◆ SatParameters_BinaryMinizationAlgorithm_Parse()

bool operations_research::sat::SatParameters_BinaryMinizationAlgorithm_Parse ( ::PROTOBUF_NAMESPACE_ID::ConstStringParam  name,
SatParameters_BinaryMinizationAlgorithm value 
)
inline

Definition at line 166 of file sat_parameters.pb.h.

◆ SatParameters_ClauseOrdering_descriptor()

const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* operations_research::sat::SatParameters_ClauseOrdering_descriptor ( )

◆ SatParameters_ClauseOrdering_IsValid()

bool operations_research::sat::SatParameters_ClauseOrdering_IsValid ( int  value)

◆ SatParameters_ClauseOrdering_Name()

const std::string& operations_research::sat::SatParameters_ClauseOrdering_Name ( enum_t_value)
inline

Definition at line 206 of file sat_parameters.pb.h.

◆ SatParameters_ClauseOrdering_Parse()

bool operations_research::sat::SatParameters_ClauseOrdering_Parse ( ::PROTOBUF_NAMESPACE_ID::ConstStringParam  name,
SatParameters_ClauseOrdering value 
)
inline

Definition at line 213 of file sat_parameters.pb.h.

◆ SatParameters_ClauseProtection_descriptor()

const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* operations_research::sat::SatParameters_ClauseProtection_descriptor ( )

◆ SatParameters_ClauseProtection_IsValid()

bool operations_research::sat::SatParameters_ClauseProtection_IsValid ( int  value)

◆ SatParameters_ClauseProtection_Name()

const std::string& operations_research::sat::SatParameters_ClauseProtection_Name ( enum_t_value)
inline

Definition at line 183 of file sat_parameters.pb.h.

◆ SatParameters_ClauseProtection_Parse()

bool operations_research::sat::SatParameters_ClauseProtection_Parse ( ::PROTOBUF_NAMESPACE_ID::ConstStringParam  name,
SatParameters_ClauseProtection value 
)
inline

Definition at line 190 of file sat_parameters.pb.h.

◆ SatParameters_ConflictMinimizationAlgorithm_descriptor()

const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* operations_research::sat::SatParameters_ConflictMinimizationAlgorithm_descriptor ( )

◆ SatParameters_ConflictMinimizationAlgorithm_IsValid()

bool operations_research::sat::SatParameters_ConflictMinimizationAlgorithm_IsValid ( int  value)

◆ SatParameters_ConflictMinimizationAlgorithm_Name()

const std::string& operations_research::sat::SatParameters_ConflictMinimizationAlgorithm_Name ( enum_t_value)
inline

Definition at line 133 of file sat_parameters.pb.h.

◆ SatParameters_ConflictMinimizationAlgorithm_Parse()

bool operations_research::sat::SatParameters_ConflictMinimizationAlgorithm_Parse ( ::PROTOBUF_NAMESPACE_ID::ConstStringParam  name,
SatParameters_ConflictMinimizationAlgorithm value 
)
inline

Definition at line 140 of file sat_parameters.pb.h.

◆ SatParameters_FPRoundingMethod_descriptor()

const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* operations_research::sat::SatParameters_FPRoundingMethod_descriptor ( )

◆ SatParameters_FPRoundingMethod_IsValid()

bool operations_research::sat::SatParameters_FPRoundingMethod_IsValid ( int  value)

◆ SatParameters_FPRoundingMethod_Name()

const std::string& operations_research::sat::SatParameters_FPRoundingMethod_Name ( enum_t_value)
inline

Definition at line 333 of file sat_parameters.pb.h.

◆ SatParameters_FPRoundingMethod_Parse()

bool operations_research::sat::SatParameters_FPRoundingMethod_Parse ( ::PROTOBUF_NAMESPACE_ID::ConstStringParam  name,
SatParameters_FPRoundingMethod value 
)
inline

Definition at line 340 of file sat_parameters.pb.h.

◆ SatParameters_MaxSatAssumptionOrder_descriptor()

const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* operations_research::sat::SatParameters_MaxSatAssumptionOrder_descriptor ( )

◆ SatParameters_MaxSatAssumptionOrder_IsValid()

bool operations_research::sat::SatParameters_MaxSatAssumptionOrder_IsValid ( int  value)

◆ SatParameters_MaxSatAssumptionOrder_Name()

const std::string& operations_research::sat::SatParameters_MaxSatAssumptionOrder_Name ( enum_t_value)
inline

Definition at line 256 of file sat_parameters.pb.h.

◆ SatParameters_MaxSatAssumptionOrder_Parse()

bool operations_research::sat::SatParameters_MaxSatAssumptionOrder_Parse ( ::PROTOBUF_NAMESPACE_ID::ConstStringParam  name,
SatParameters_MaxSatAssumptionOrder value 
)
inline

Definition at line 263 of file sat_parameters.pb.h.

◆ SatParameters_MaxSatStratificationAlgorithm_descriptor()

const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* operations_research::sat::SatParameters_MaxSatStratificationAlgorithm_descriptor ( )

◆ SatParameters_MaxSatStratificationAlgorithm_IsValid()

bool operations_research::sat::SatParameters_MaxSatStratificationAlgorithm_IsValid ( int  value)

◆ SatParameters_MaxSatStratificationAlgorithm_Name()

const std::string& operations_research::sat::SatParameters_MaxSatStratificationAlgorithm_Name ( enum_t_value)
inline

Definition at line 280 of file sat_parameters.pb.h.

◆ SatParameters_MaxSatStratificationAlgorithm_Parse()

bool operations_research::sat::SatParameters_MaxSatStratificationAlgorithm_Parse ( ::PROTOBUF_NAMESPACE_ID::ConstStringParam  name,
SatParameters_MaxSatStratificationAlgorithm value 
)
inline

Definition at line 287 of file sat_parameters.pb.h.

◆ SatParameters_Polarity_descriptor()

const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* operations_research::sat::SatParameters_Polarity_descriptor ( )

◆ SatParameters_Polarity_IsValid()

bool operations_research::sat::SatParameters_Polarity_IsValid ( int  value)

◆ SatParameters_Polarity_Name()

const std::string& operations_research::sat::SatParameters_Polarity_Name ( enum_t_value)
inline

Definition at line 108 of file sat_parameters.pb.h.

◆ SatParameters_Polarity_Parse()

bool operations_research::sat::SatParameters_Polarity_Parse ( ::PROTOBUF_NAMESPACE_ID::ConstStringParam  name,
SatParameters_Polarity value 
)
inline

Definition at line 115 of file sat_parameters.pb.h.

◆ SatParameters_RestartAlgorithm_descriptor()

const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* operations_research::sat::SatParameters_RestartAlgorithm_descriptor ( )

◆ SatParameters_RestartAlgorithm_IsValid()

bool operations_research::sat::SatParameters_RestartAlgorithm_IsValid ( int  value)

◆ SatParameters_RestartAlgorithm_Name()

const std::string& operations_research::sat::SatParameters_RestartAlgorithm_Name ( enum_t_value)
inline

Definition at line 232 of file sat_parameters.pb.h.

◆ SatParameters_RestartAlgorithm_Parse()

bool operations_research::sat::SatParameters_RestartAlgorithm_Parse ( ::PROTOBUF_NAMESPACE_ID::ConstStringParam  name,
SatParameters_RestartAlgorithm value 
)
inline

Definition at line 239 of file sat_parameters.pb.h.

◆ SatParameters_SearchBranching_descriptor()

const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* operations_research::sat::SatParameters_SearchBranching_descriptor ( )

◆ SatParameters_SearchBranching_IsValid()

bool operations_research::sat::SatParameters_SearchBranching_IsValid ( int  value)

◆ SatParameters_SearchBranching_Name()

const std::string& operations_research::sat::SatParameters_SearchBranching_Name ( enum_t_value)
inline

Definition at line 308 of file sat_parameters.pb.h.

◆ SatParameters_SearchBranching_Parse()

bool operations_research::sat::SatParameters_SearchBranching_Parse ( ::PROTOBUF_NAMESPACE_ID::ConstStringParam  name,
SatParameters_SearchBranching value 
)
inline

Definition at line 315 of file sat_parameters.pb.h.

◆ SatParameters_VariableOrder_descriptor()

const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* operations_research::sat::SatParameters_VariableOrder_descriptor ( )

◆ SatParameters_VariableOrder_IsValid()

bool operations_research::sat::SatParameters_VariableOrder_IsValid ( int  value)

◆ SatParameters_VariableOrder_Name()

const std::string& operations_research::sat::SatParameters_VariableOrder_Name ( enum_t_value)
inline

Definition at line 82 of file sat_parameters.pb.h.

◆ SatParameters_VariableOrder_Parse()

bool operations_research::sat::SatParameters_VariableOrder_Parse ( ::PROTOBUF_NAMESPACE_ID::ConstStringParam  name,
SatParameters_VariableOrder value 
)
inline

Definition at line 89 of file sat_parameters.pb.h.

◆ SetSynchronizationFunction()

void operations_research::sat::SetSynchronizationFunction ( std::function< CpSolverResponse()>  f,
Model model 
)

If set, the underlying solver will call this function regularly in a deterministic way.

It will then wait until this function returns with the current best information about the current problem.

This is meant to be used in a multi-threaded environment with many parallel solving process. If the returned current "best" response only uses information derived at a lower deterministic time (possibly with offset) than the deterministic time of the current thread, the whole process can be made deterministic.

◆ SolutionBooleanValue()

bool operations_research::sat::SolutionBooleanValue ( const CpSolverResponse &  r,
BoolVar  x 
)

Evaluates the value of a Boolean literal in a solver response.

◆ SolutionIntegerMax()

int64 operations_research::sat::SolutionIntegerMax ( const CpSolverResponse &  r,
IntVar  x 
)

Returns the max of an integer variable in a solution.

◆ SolutionIntegerMin()

int64 operations_research::sat::SolutionIntegerMin ( const CpSolverResponse &  r,
IntVar  x 
)

Returns the min of an integer variable in a solution.

◆ SolutionIntegerValue()

int64 operations_research::sat::SolutionIntegerValue ( const CpSolverResponse &  r,
const LinearExpr expr 
)

Evaluates the value of an linear expression in a solver response.

◆ Solve()

CpSolverResponse operations_research::sat::Solve ( const CpModelProto &  model_proto)

Solves the given CpModelProto and returns an instance of CpSolverResponse.

◆ SolveCpModel()

CpSolverResponse operations_research::sat::SolveCpModel ( const CpModelProto &  model_proto,
Model model 
)

Solves the given CpModelProto.

This advanced API accept a Model* which allows to access more adavanced features by configuring some classes in the Model before solve.

For instance:

  • model->Add(NewSatParameters(parameters_as_string_or_proto));
  • model->GetOrCreate<TimeLimit>()->RegisterExternalBooleanAsLimit(&stop);
  • model->Add(NewFeasibleSolutionObserver(observer));

◆ SolveWithParameters() [1/2]

CpSolverResponse operations_research::sat::SolveWithParameters ( const CpModelProto &  model_proto,
const SatParameters &  params 
)

Solves the given CpModelProto with the given parameters.

◆ SolveWithParameters() [2/2]

CpSolverResponse operations_research::sat::SolveWithParameters ( const CpModelProto &  model_proto,
const std::string &  params 
)

Solves the given CpModelProto with the given sat parameters as string in JSon format, and returns an instance of CpSolverResponse.

Variable Documentation

◆ _AllDifferentConstraintProto_default_instance_

AllDifferentConstraintProtoDefaultTypeInternal _AllDifferentConstraintProto_default_instance_
extern

◆ _AutomatonConstraintProto_default_instance_

AutomatonConstraintProtoDefaultTypeInternal _AutomatonConstraintProto_default_instance_
extern

◆ _BoolArgumentProto_default_instance_

BoolArgumentProtoDefaultTypeInternal _BoolArgumentProto_default_instance_
extern

◆ _BooleanAssignment_default_instance_

BooleanAssignmentDefaultTypeInternal _BooleanAssignment_default_instance_
extern

◆ _CircuitConstraintProto_default_instance_

CircuitConstraintProtoDefaultTypeInternal _CircuitConstraintProto_default_instance_
extern

◆ _ConstraintProto_default_instance_

ConstraintProtoDefaultTypeInternal _ConstraintProto_default_instance_
extern

◆ _CpModelProto_default_instance_

CpModelProtoDefaultTypeInternal _CpModelProto_default_instance_
extern

◆ _CpObjectiveProto_default_instance_

CpObjectiveProtoDefaultTypeInternal _CpObjectiveProto_default_instance_
extern

◆ _CpSolverResponse_default_instance_

CpSolverResponseDefaultTypeInternal _CpSolverResponse_default_instance_
extern

◆ _CumulativeConstraintProto_default_instance_

CumulativeConstraintProtoDefaultTypeInternal _CumulativeConstraintProto_default_instance_
extern

◆ _DecisionStrategyProto_AffineTransformation_default_instance_

DecisionStrategyProto_AffineTransformationDefaultTypeInternal _DecisionStrategyProto_AffineTransformation_default_instance_
extern

◆ _DecisionStrategyProto_default_instance_

DecisionStrategyProtoDefaultTypeInternal _DecisionStrategyProto_default_instance_
extern

◆ _ElementConstraintProto_default_instance_

ElementConstraintProtoDefaultTypeInternal _ElementConstraintProto_default_instance_
extern

◆ _IntegerArgumentProto_default_instance_

IntegerArgumentProtoDefaultTypeInternal _IntegerArgumentProto_default_instance_
extern

◆ _IntegerVariableProto_default_instance_

IntegerVariableProtoDefaultTypeInternal _IntegerVariableProto_default_instance_
extern

◆ _IntervalConstraintProto_default_instance_

IntervalConstraintProtoDefaultTypeInternal _IntervalConstraintProto_default_instance_
extern

◆ _InverseConstraintProto_default_instance_

InverseConstraintProtoDefaultTypeInternal _InverseConstraintProto_default_instance_
extern

◆ _LinearArgumentProto_default_instance_

LinearArgumentProtoDefaultTypeInternal _LinearArgumentProto_default_instance_
extern

◆ _LinearBooleanConstraint_default_instance_

LinearBooleanConstraintDefaultTypeInternal _LinearBooleanConstraint_default_instance_
extern

◆ _LinearBooleanProblem_default_instance_

LinearBooleanProblemDefaultTypeInternal _LinearBooleanProblem_default_instance_
extern

◆ _LinearConstraintProto_default_instance_

LinearConstraintProtoDefaultTypeInternal _LinearConstraintProto_default_instance_
extern

◆ _LinearExpressionProto_default_instance_

LinearExpressionProtoDefaultTypeInternal _LinearExpressionProto_default_instance_
extern

◆ _LinearObjective_default_instance_

LinearObjectiveDefaultTypeInternal _LinearObjective_default_instance_
extern

◆ _NoOverlap2DConstraintProto_default_instance_

NoOverlap2DConstraintProtoDefaultTypeInternal _NoOverlap2DConstraintProto_default_instance_
extern

◆ _NoOverlapConstraintProto_default_instance_

NoOverlapConstraintProtoDefaultTypeInternal _NoOverlapConstraintProto_default_instance_
extern

◆ _PartialVariableAssignment_default_instance_

PartialVariableAssignmentDefaultTypeInternal _PartialVariableAssignment_default_instance_
extern

◆ _ReservoirConstraintProto_default_instance_

ReservoirConstraintProtoDefaultTypeInternal _ReservoirConstraintProto_default_instance_
extern

◆ _RoutesConstraintProto_default_instance_

RoutesConstraintProtoDefaultTypeInternal _RoutesConstraintProto_default_instance_
extern

◆ _SatParameters_default_instance_

SatParametersDefaultTypeInternal _SatParameters_default_instance_
extern

◆ _TableConstraintProto_default_instance_

TableConstraintProtoDefaultTypeInternal _TableConstraintProto_default_instance_
extern

◆ CpSolverStatus_ARRAYSIZE

constexpr int CpSolverStatus_ARRAYSIZE = CpSolverStatus_MAX + 1
constexpr

Definition at line 234 of file cp_model.pb.h.

◆ CpSolverStatus_MAX

constexpr CpSolverStatus CpSolverStatus_MAX = OPTIMAL
constexpr

Definition at line 233 of file cp_model.pb.h.

◆ CpSolverStatus_MIN

constexpr CpSolverStatus CpSolverStatus_MIN = UNKNOWN
constexpr

Definition at line 232 of file cp_model.pb.h.

◆ DecisionStrategyProto_DomainReductionStrategy_DomainReductionStrategy_ARRAYSIZE

constexpr int DecisionStrategyProto_DomainReductionStrategy_DomainReductionStrategy_ARRAYSIZE = DecisionStrategyProto_DomainReductionStrategy_DomainReductionStrategy_MAX + 1
constexpr

Definition at line 206 of file cp_model.pb.h.

◆ DecisionStrategyProto_DomainReductionStrategy_DomainReductionStrategy_MAX

constexpr DecisionStrategyProto_DomainReductionStrategy DecisionStrategyProto_DomainReductionStrategy_DomainReductionStrategy_MAX = DecisionStrategyProto_DomainReductionStrategy_SELECT_MEDIAN_VALUE
constexpr

Definition at line 205 of file cp_model.pb.h.

◆ DecisionStrategyProto_DomainReductionStrategy_DomainReductionStrategy_MIN

constexpr DecisionStrategyProto_DomainReductionStrategy DecisionStrategyProto_DomainReductionStrategy_DomainReductionStrategy_MIN = DecisionStrategyProto_DomainReductionStrategy_SELECT_MIN_VALUE
constexpr

Definition at line 204 of file cp_model.pb.h.

◆ DecisionStrategyProto_VariableSelectionStrategy_VariableSelectionStrategy_ARRAYSIZE

constexpr int DecisionStrategyProto_VariableSelectionStrategy_VariableSelectionStrategy_ARRAYSIZE = DecisionStrategyProto_VariableSelectionStrategy_VariableSelectionStrategy_MAX + 1
constexpr

Definition at line 178 of file cp_model.pb.h.

◆ DecisionStrategyProto_VariableSelectionStrategy_VariableSelectionStrategy_MAX

constexpr DecisionStrategyProto_VariableSelectionStrategy DecisionStrategyProto_VariableSelectionStrategy_VariableSelectionStrategy_MAX = DecisionStrategyProto_VariableSelectionStrategy_CHOOSE_MAX_DOMAIN_SIZE
constexpr

Definition at line 177 of file cp_model.pb.h.

◆ DecisionStrategyProto_VariableSelectionStrategy_VariableSelectionStrategy_MIN

constexpr DecisionStrategyProto_VariableSelectionStrategy DecisionStrategyProto_VariableSelectionStrategy_VariableSelectionStrategy_MIN = DecisionStrategyProto_VariableSelectionStrategy_CHOOSE_FIRST
constexpr

Definition at line 176 of file cp_model.pb.h.

◆ SatParameters_BinaryMinizationAlgorithm_BinaryMinizationAlgorithm_ARRAYSIZE

constexpr int SatParameters_BinaryMinizationAlgorithm_BinaryMinizationAlgorithm_ARRAYSIZE = SatParameters_BinaryMinizationAlgorithm_BinaryMinizationAlgorithm_MAX + 1
constexpr

Definition at line 155 of file sat_parameters.pb.h.

◆ SatParameters_BinaryMinizationAlgorithm_BinaryMinizationAlgorithm_MAX

constexpr SatParameters_BinaryMinizationAlgorithm SatParameters_BinaryMinizationAlgorithm_BinaryMinizationAlgorithm_MAX = SatParameters_BinaryMinizationAlgorithm_BINARY_MINIMIZATION_FIRST_WITH_TRANSITIVE_REDUCTION
constexpr

Definition at line 154 of file sat_parameters.pb.h.

◆ SatParameters_BinaryMinizationAlgorithm_BinaryMinizationAlgorithm_MIN

constexpr SatParameters_BinaryMinizationAlgorithm SatParameters_BinaryMinizationAlgorithm_BinaryMinizationAlgorithm_MIN = SatParameters_BinaryMinizationAlgorithm_NO_BINARY_MINIMIZATION
constexpr

Definition at line 153 of file sat_parameters.pb.h.

◆ SatParameters_ClauseOrdering_ClauseOrdering_ARRAYSIZE

constexpr int SatParameters_ClauseOrdering_ClauseOrdering_ARRAYSIZE = SatParameters_ClauseOrdering_ClauseOrdering_MAX + 1
constexpr

Definition at line 202 of file sat_parameters.pb.h.

◆ SatParameters_ClauseOrdering_ClauseOrdering_MAX

constexpr SatParameters_ClauseOrdering SatParameters_ClauseOrdering_ClauseOrdering_MAX = SatParameters_ClauseOrdering_CLAUSE_LBD
constexpr

Definition at line 201 of file sat_parameters.pb.h.

◆ SatParameters_ClauseOrdering_ClauseOrdering_MIN

constexpr SatParameters_ClauseOrdering SatParameters_ClauseOrdering_ClauseOrdering_MIN = SatParameters_ClauseOrdering_CLAUSE_ACTIVITY
constexpr

Definition at line 200 of file sat_parameters.pb.h.

◆ SatParameters_ClauseProtection_ClauseProtection_ARRAYSIZE

constexpr int SatParameters_ClauseProtection_ClauseProtection_ARRAYSIZE = SatParameters_ClauseProtection_ClauseProtection_MAX + 1
constexpr

Definition at line 179 of file sat_parameters.pb.h.

◆ SatParameters_ClauseProtection_ClauseProtection_MAX

constexpr SatParameters_ClauseProtection SatParameters_ClauseProtection_ClauseProtection_MAX = SatParameters_ClauseProtection_PROTECTION_LBD
constexpr

Definition at line 178 of file sat_parameters.pb.h.

◆ SatParameters_ClauseProtection_ClauseProtection_MIN

constexpr SatParameters_ClauseProtection SatParameters_ClauseProtection_ClauseProtection_MIN = SatParameters_ClauseProtection_PROTECTION_NONE
constexpr

Definition at line 177 of file sat_parameters.pb.h.

◆ SatParameters_ConflictMinimizationAlgorithm_ConflictMinimizationAlgorithm_ARRAYSIZE

constexpr int SatParameters_ConflictMinimizationAlgorithm_ConflictMinimizationAlgorithm_ARRAYSIZE = SatParameters_ConflictMinimizationAlgorithm_ConflictMinimizationAlgorithm_MAX + 1
constexpr

Definition at line 129 of file sat_parameters.pb.h.

◆ SatParameters_ConflictMinimizationAlgorithm_ConflictMinimizationAlgorithm_MAX

constexpr SatParameters_ConflictMinimizationAlgorithm SatParameters_ConflictMinimizationAlgorithm_ConflictMinimizationAlgorithm_MAX = SatParameters_ConflictMinimizationAlgorithm_EXPERIMENTAL
constexpr

Definition at line 128 of file sat_parameters.pb.h.

◆ SatParameters_ConflictMinimizationAlgorithm_ConflictMinimizationAlgorithm_MIN

constexpr SatParameters_ConflictMinimizationAlgorithm SatParameters_ConflictMinimizationAlgorithm_ConflictMinimizationAlgorithm_MIN = SatParameters_ConflictMinimizationAlgorithm_NONE
constexpr

Definition at line 127 of file sat_parameters.pb.h.

◆ SatParameters_FPRoundingMethod_FPRoundingMethod_ARRAYSIZE

constexpr int SatParameters_FPRoundingMethod_FPRoundingMethod_ARRAYSIZE = SatParameters_FPRoundingMethod_FPRoundingMethod_MAX + 1
constexpr

Definition at line 329 of file sat_parameters.pb.h.

◆ SatParameters_FPRoundingMethod_FPRoundingMethod_MAX

constexpr SatParameters_FPRoundingMethod SatParameters_FPRoundingMethod_FPRoundingMethod_MAX = SatParameters_FPRoundingMethod_ACTIVE_LOCK_BASED
constexpr

Definition at line 328 of file sat_parameters.pb.h.

◆ SatParameters_FPRoundingMethod_FPRoundingMethod_MIN

constexpr SatParameters_FPRoundingMethod SatParameters_FPRoundingMethod_FPRoundingMethod_MIN = SatParameters_FPRoundingMethod_NEAREST_INTEGER
constexpr

Definition at line 327 of file sat_parameters.pb.h.

◆ SatParameters_MaxSatAssumptionOrder_MaxSatAssumptionOrder_ARRAYSIZE

constexpr int SatParameters_MaxSatAssumptionOrder_MaxSatAssumptionOrder_ARRAYSIZE = SatParameters_MaxSatAssumptionOrder_MaxSatAssumptionOrder_MAX + 1
constexpr

Definition at line 252 of file sat_parameters.pb.h.

◆ SatParameters_MaxSatAssumptionOrder_MaxSatAssumptionOrder_MAX

constexpr SatParameters_MaxSatAssumptionOrder SatParameters_MaxSatAssumptionOrder_MaxSatAssumptionOrder_MAX = SatParameters_MaxSatAssumptionOrder_ORDER_ASSUMPTION_BY_WEIGHT
constexpr

Definition at line 251 of file sat_parameters.pb.h.

◆ SatParameters_MaxSatAssumptionOrder_MaxSatAssumptionOrder_MIN

constexpr SatParameters_MaxSatAssumptionOrder SatParameters_MaxSatAssumptionOrder_MaxSatAssumptionOrder_MIN = SatParameters_MaxSatAssumptionOrder_DEFAULT_ASSUMPTION_ORDER
constexpr

Definition at line 250 of file sat_parameters.pb.h.

◆ SatParameters_MaxSatStratificationAlgorithm_MaxSatStratificationAlgorithm_ARRAYSIZE

constexpr int SatParameters_MaxSatStratificationAlgorithm_MaxSatStratificationAlgorithm_ARRAYSIZE = SatParameters_MaxSatStratificationAlgorithm_MaxSatStratificationAlgorithm_MAX + 1
constexpr

Definition at line 276 of file sat_parameters.pb.h.

◆ SatParameters_MaxSatStratificationAlgorithm_MaxSatStratificationAlgorithm_MAX

constexpr SatParameters_MaxSatStratificationAlgorithm SatParameters_MaxSatStratificationAlgorithm_MaxSatStratificationAlgorithm_MAX = SatParameters_MaxSatStratificationAlgorithm_STRATIFICATION_ASCENT
constexpr

Definition at line 275 of file sat_parameters.pb.h.

◆ SatParameters_MaxSatStratificationAlgorithm_MaxSatStratificationAlgorithm_MIN

constexpr SatParameters_MaxSatStratificationAlgorithm SatParameters_MaxSatStratificationAlgorithm_MaxSatStratificationAlgorithm_MIN = SatParameters_MaxSatStratificationAlgorithm_STRATIFICATION_NONE
constexpr

Definition at line 274 of file sat_parameters.pb.h.

◆ SatParameters_Polarity_Polarity_ARRAYSIZE

constexpr int SatParameters_Polarity_Polarity_ARRAYSIZE = SatParameters_Polarity_Polarity_MAX + 1
constexpr

Definition at line 104 of file sat_parameters.pb.h.

◆ SatParameters_Polarity_Polarity_MAX

constexpr SatParameters_Polarity SatParameters_Polarity_Polarity_MAX = SatParameters_Polarity_POLARITY_REVERSE_WEIGHTED_SIGN
constexpr

Definition at line 103 of file sat_parameters.pb.h.

◆ SatParameters_Polarity_Polarity_MIN

constexpr SatParameters_Polarity SatParameters_Polarity_Polarity_MIN = SatParameters_Polarity_POLARITY_TRUE
constexpr

Definition at line 102 of file sat_parameters.pb.h.

◆ SatParameters_RestartAlgorithm_RestartAlgorithm_ARRAYSIZE

constexpr int SatParameters_RestartAlgorithm_RestartAlgorithm_ARRAYSIZE = SatParameters_RestartAlgorithm_RestartAlgorithm_MAX + 1
constexpr

Definition at line 228 of file sat_parameters.pb.h.

◆ SatParameters_RestartAlgorithm_RestartAlgorithm_MAX

constexpr SatParameters_RestartAlgorithm SatParameters_RestartAlgorithm_RestartAlgorithm_MAX = SatParameters_RestartAlgorithm_FIXED_RESTART
constexpr

Definition at line 227 of file sat_parameters.pb.h.

◆ SatParameters_RestartAlgorithm_RestartAlgorithm_MIN

constexpr SatParameters_RestartAlgorithm SatParameters_RestartAlgorithm_RestartAlgorithm_MIN = SatParameters_RestartAlgorithm_NO_RESTART
constexpr

Definition at line 226 of file sat_parameters.pb.h.

◆ SatParameters_SearchBranching_SearchBranching_ARRAYSIZE

constexpr int SatParameters_SearchBranching_SearchBranching_ARRAYSIZE = SatParameters_SearchBranching_SearchBranching_MAX + 1
constexpr

Definition at line 304 of file sat_parameters.pb.h.

◆ SatParameters_SearchBranching_SearchBranching_MAX

constexpr SatParameters_SearchBranching SatParameters_SearchBranching_SearchBranching_MAX = SatParameters_SearchBranching_HINT_SEARCH
constexpr

Definition at line 303 of file sat_parameters.pb.h.

◆ SatParameters_SearchBranching_SearchBranching_MIN

constexpr SatParameters_SearchBranching SatParameters_SearchBranching_SearchBranching_MIN = SatParameters_SearchBranching_AUTOMATIC_SEARCH
constexpr

Definition at line 302 of file sat_parameters.pb.h.

◆ SatParameters_VariableOrder_VariableOrder_ARRAYSIZE

constexpr int SatParameters_VariableOrder_VariableOrder_ARRAYSIZE = SatParameters_VariableOrder_VariableOrder_MAX + 1
constexpr

Definition at line 78 of file sat_parameters.pb.h.

◆ SatParameters_VariableOrder_VariableOrder_MAX

constexpr SatParameters_VariableOrder SatParameters_VariableOrder_VariableOrder_MAX = SatParameters_VariableOrder_IN_RANDOM_ORDER
constexpr

Definition at line 77 of file sat_parameters.pb.h.

◆ SatParameters_VariableOrder_VariableOrder_MIN

constexpr SatParameters_VariableOrder SatParameters_VariableOrder_VariableOrder_MIN = SatParameters_VariableOrder_IN_ORDER
constexpr

Definition at line 76 of file sat_parameters.pb.h.

std::function< SatParameters(Model *)> NewSatParameters(const std::string &params)
Creates parameters for the solver, which you can add to the model with.