OR-Tools  9.6
PresolveContext

Detailed Description

Definition at line 83 of file presolve_context.h.

Public Member Functions

 PresolveContext (Model *model, CpModelProto *cp_model, CpModelProto *mapping)
 
int NewIntVar (const Domain &domain)
 
int NewBoolVar ()
 
int GetTrueLiteral ()
 
int GetFalseLiteral ()
 
void AddImplication (int a, int b)
 
void AddImplyInDomain (int b, int x, const Domain &domain)
 
bool DomainIsEmpty (int ref) const
 
bool IsFixed (int ref) const
 
bool CanBeUsedAsLiteral (int ref) const
 
bool LiteralIsTrue (int lit) const
 
bool LiteralIsFalse (int lit) const
 
int64_t MinOf (int ref) const
 
int64_t MaxOf (int ref) const
 
int64_t FixedValue (int ref) const
 
bool DomainContains (int ref, int64_t value) const
 
Domain DomainOf (int ref) const
 
bool IntervalIsConstant (int ct_ref) const
 
int64_t StartMin (int ct_ref) const
 
int64_t StartMax (int ct_ref) const
 
int64_t SizeMin (int ct_ref) const
 
int64_t SizeMax (int ct_ref) const
 
int64_t EndMin (int ct_ref) const
 
int64_t EndMax (int ct_ref) const
 
std::string IntervalDebugString (int ct_ref) const
 
int64_t MinOf (const LinearExpressionProto &expr) const
 
int64_t MaxOf (const LinearExpressionProto &expr) const
 
bool IsFixed (const LinearExpressionProto &expr) const
 
int64_t FixedValue (const LinearExpressionProto &expr) const
 
template<typename ProtoWithVarsAndCoeffs >
std::pair< int64_t, int64_t > ComputeMinMaxActivity (const ProtoWithVarsAndCoeffs &proto) const
 
bool DomainContains (const LinearExpressionProto &expr, int64_t value) const
 
Domain DomainSuperSetOf (const LinearExpressionProto &expr) const
 
bool ExpressionIsAffineBoolean (const LinearExpressionProto &expr) const
 
int LiteralForExpressionMax (const LinearExpressionProto &expr) const
 
bool ExpressionIsSingleVariable (const LinearExpressionProto &expr) const
 
bool ExpressionIsALiteral (const LinearExpressionProto &expr, int *literal=nullptr) const
 
bool DomainOfVarIsIncludedIn (int var, const Domain &domain)
 
bool VariableIsUniqueAndRemovable (int ref) const
 
bool VariableIsNotUsedAnymore (int ref) const
 
void MarkVariableAsRemoved (int ref)
 
bool VariableWasRemoved (int ref) const
 
bool VariableWithCostIsUnique (int ref) const
 
bool VariableWithCostIsUniqueAndRemovable (int ref) const
 
bool VariableIsOnlyUsedInEncodingAndMaybeInObjective (int ref) const
 
ABSL_MUST_USE_RESULT bool IntersectDomainWith (int ref, const Domain &domain, bool *domain_modified=nullptr)
 
ABSL_MUST_USE_RESULT bool SetLiteralToFalse (int lit)
 
ABSL_MUST_USE_RESULT bool SetLiteralToTrue (int lit)
 
ABSL_MUST_USE_RESULT bool IntersectDomainWith (const LinearExpressionProto &expr, const Domain &domain, bool *domain_modified=nullptr)
 
ABSL_MUST_USE_RESULT bool NotifyThatModelIsUnsat (const std::string &message="")
 
bool ModelIsUnsat () const
 
void UpdateRuleStats (const std::string &name, int num_times=1)
 
void UpdateConstraintVariableUsage (int c)
 
bool ConstraintVariableGraphIsUpToDate () const
 
void UpdateNewConstraintsVariableUsage ()
 
bool ConstraintVariableUsageIsConsistent ()
 
void CanonicalizeVariable (int ref)
 
bool CanonicalizeAffineVariable (int ref, int64_t coeff, int64_t mod, int64_t rhs)
 
bool StoreAffineRelation (int ref_x, int ref_y, int64_t coeff, int64_t offset, bool debug_no_recursion=false)
 
bool StoreBooleanEqualityRelation (int ref_a, int ref_b)
 
bool StoreAbsRelation (int target_ref, int ref)
 
bool GetAbsRelation (int target_ref, int *ref)
 
int GetLiteralRepresentative (int ref) const
 
int GetVariableRepresentative (int ref) const
 
int NumAffineRelations () const
 
AffineRelation::Relation GetAffineRelation (int ref) const
 
std::string RefDebugString (int ref) const
 
std::string AffineRelationDebugString (int ref) const
 
bool PropagateAffineRelation (int ref)
 
bool PropagateAffineRelation (int ref, int rep, int64_t coeff, int64_t offset)
 
void InitializeNewDomains ()
 
void ClearStats ()
 
bool InsertVarValueEncoding (int literal, int ref, int64_t value)
 
int GetOrCreateVarValueEncoding (int ref, int64_t value)
 
int GetOrCreateAffineValueEncoding (const LinearExpressionProto &expr, int64_t value)
 
void CanonicalizeDomainOfSizeTwo (int var)
 
bool HasVarValueEncoding (int ref, int64_t value, int *literal=nullptr)
 
bool IsFullyEncoded (int ref) const
 
bool IsFullyEncoded (const LinearExpressionProto &expr) const
 
bool StoreLiteralImpliesVarEqValue (int literal, int var, int64_t value)
 
bool StoreLiteralImpliesVarNEqValue (int literal, int var, int64_t value)
 
void ReadObjectiveFromProto ()
 
bool AddToObjectiveOffset (int64_t delta)
 
ABSL_MUST_USE_RESULT bool CanonicalizeOneObjectiveVariable (int var)
 
ABSL_MUST_USE_RESULT bool CanonicalizeObjective (bool simplify_domain=true)
 
void WriteObjectiveToProto () const
 
ABSL_MUST_USE_RESULT bool ScaleFloatingPointObjective ()
 
bool RecomputeSingletonObjectiveDomain ()
 
void WriteVariableDomainsToProto () const
 
bool ExploitExactlyOneInObjective (absl::Span< const int > exactly_one)
 
bool ShiftCostInExactlyOne (absl::Span< const int > exactly_one, int64_t shift)
 
void RemoveVariableFromObjective (int ref)
 
void AddToObjective (int var, int64_t value)
 
void AddLiteralToObjective (int ref, int64_t value)
 
ABSL_MUST_USE_RESULT bool SubstituteVariableInObjective (int var_in_equality, int64_t coeff_in_equality, const ConstraintProto &equality)
 
const DomainObjectiveDomain () const
 
const absl::flat_hash_map< int, int64_t > & ObjectiveMap () const
 
int64_t ObjectiveCoeff (int var) const
 
bool ObjectiveDomainIsConstraining () const
 
void RemoveVariableFromAffineRelation (int var)
 
void RemoveAllVariablesFromAffineRelationConstraint ()
 
const std::vector< std::vector< int > > & ConstraintToVarsGraph () const
 
const std::vector< int > & ConstraintToVars (int c) const
 
const absl::flat_hash_set< int > & VarToConstraints (int var) const
 
int IntervalUsage (int c) const
 
bool ConstraintIsInactive (int ct_index) const
 
bool ConstraintIsOptional (int ct_ref) const
 
void RegisterVariablesUsedInAssumptions ()
 
bool ModelIsExpanded () const
 
void NotifyThatModelIsExpanded ()
 
int GetOrCreateReifiedPrecedenceLiteral (const LinearExpressionProto &time_i, const LinearExpressionProto &time_j, int active_i, int active_j)
 
std::tuple< int, int64_t, int, int64_t, int64_t, int, int > GetReifiedPrecedenceKey (const LinearExpressionProto &time_i, const LinearExpressionProto &time_j, int active_i, int active_j)
 
void ClearPrecedenceCache ()
 
void LogInfo ()
 
int GetIntervalRepresentative (int index)
 
SolverLoggerlogger () const
 
const SatParameters & params () const
 
TimeLimittime_limit ()
 
ModelRandomGeneratorrandom ()
 

Public Attributes

CpModelProto * working_model = nullptr
 
CpModelProto * mapping_model = nullptr
 
bool keep_all_feasible_solutions = false
 
int64_t num_presolve_operations = 0
 
std::vector< int > tmp_literals
 
std::vector< Domaintmp_term_domains
 
std::vector< Domaintmp_left_domains
 
absl::flat_hash_set< int > tmp_literal_set
 
SparseBitset< int > modified_domains
 
SparseBitset< int > var_with_reduced_small_degree
 
DomainDeductions deductions
 

Constructor & Destructor Documentation

◆ PresolveContext()

PresolveContext ( Model model,
CpModelProto *  cp_model,
CpModelProto *  mapping 
)
inline

Definition at line 85 of file presolve_context.h.

Member Function Documentation

◆ AddImplication()

void AddImplication ( int  a,
int  b 
)

Definition at line 84 of file presolve_context.cc.

◆ AddImplyInDomain()

void AddImplyInDomain ( int  b,
int  x,
const Domain domain 
)

Definition at line 91 of file presolve_context.cc.

◆ AddLiteralToObjective()

void AddLiteralToObjective ( int  ref,
int64_t  value 
)

Definition at line 1727 of file presolve_context.cc.

◆ AddToObjective()

void AddToObjective ( int  var,
int64_t  value 
)

Definition at line 1716 of file presolve_context.cc.

◆ AddToObjectiveOffset()

bool AddToObjectiveOffset ( int64_t  delta)

Definition at line 1743 of file presolve_context.cc.

◆ AffineRelationDebugString()

std::string AffineRelationDebugString ( int  ref) const

Definition at line 1154 of file presolve_context.cc.

◆ CanBeUsedAsLiteral()

bool CanBeUsedAsLiteral ( int  ref) const

Definition at line 113 of file presolve_context.cc.

◆ CanonicalizeAffineVariable()

bool CanonicalizeAffineVariable ( int  ref,
int64_t  coeff,
int64_t  mod,
int64_t  rhs 
)

Definition at line 817 of file presolve_context.cc.

◆ CanonicalizeDomainOfSizeTwo()

void CanonicalizeDomainOfSizeTwo ( int  var)

Definition at line 1175 of file presolve_context.cc.

◆ CanonicalizeObjective()

bool CanonicalizeObjective ( bool  simplify_domain = true)

Definition at line 1603 of file presolve_context.cc.

◆ CanonicalizeOneObjectiveVariable()

bool CanonicalizeOneObjectiveVariable ( int  var)

Definition at line 1550 of file presolve_context.cc.

◆ CanonicalizeVariable()

void CanonicalizeVariable ( int  ref)

Definition at line 787 of file presolve_context.cc.

◆ ClearPrecedenceCache()

void ClearPrecedenceCache ( )

Definition at line 2045 of file presolve_context.cc.

◆ ClearStats()

void ClearStats ( )

Definition at line 62 of file presolve_context.cc.

◆ ComputeMinMaxActivity()

std::pair<int64_t, int64_t> ComputeMinMaxActivity ( const ProtoWithVarsAndCoeffs &  proto) const
inline

Definition at line 145 of file presolve_context.h.

◆ ConstraintIsInactive()

bool ConstraintIsInactive ( int  ct_index) const

Definition at line 483 of file presolve_context.cc.

◆ ConstraintIsOptional()

bool ConstraintIsOptional ( int  ct_ref) const

Definition at line 495 of file presolve_context.cc.

◆ ConstraintToVars()

const std::vector<int>& ConstraintToVars ( int  c) const
inline

Definition at line 485 of file presolve_context.h.

◆ ConstraintToVarsGraph()

const std::vector<std::vector<int> >& ConstraintToVarsGraph ( ) const
inline

Definition at line 481 of file presolve_context.h.

◆ ConstraintVariableGraphIsUpToDate()

bool ConstraintVariableGraphIsUpToDate ( ) const

Definition at line 589 of file presolve_context.cc.

◆ ConstraintVariableUsageIsConsistent()

bool ConstraintVariableUsageIsConsistent ( )

Definition at line 608 of file presolve_context.cc.

◆ DomainContains() [1/2]

bool DomainContains ( const LinearExpressionProto &  expr,
int64_t  value 
) const

Definition at line 404 of file presolve_context.cc.

◆ DomainContains() [2/2]

bool DomainContains ( int  ref,
int64_t  value 
) const

Definition at line 397 of file presolve_context.cc.

◆ DomainIsEmpty()

bool DomainIsEmpty ( int  ref) const

Definition at line 103 of file presolve_context.cc.

◆ DomainOf()

Domain DomainOf ( int  ref) const

Definition at line 387 of file presolve_context.cc.

◆ DomainOfVarIsIncludedIn()

bool DomainOfVarIsIncludedIn ( int  var,
const Domain domain 
)
inline

Definition at line 183 of file presolve_context.h.

◆ DomainSuperSetOf()

Domain DomainSuperSetOf ( const LinearExpressionProto &  expr) const

Definition at line 197 of file presolve_context.cc.

◆ EndMax()

int64_t EndMax ( int  ct_ref) const

Definition at line 300 of file presolve_context.cc.

◆ EndMin()

int64_t EndMin ( int  ct_ref) const

Definition at line 294 of file presolve_context.cc.

◆ ExploitExactlyOneInObjective()

bool ExploitExactlyOneInObjective ( absl::Span< const int >  exactly_one)

Definition at line 1831 of file presolve_context.cc.

◆ ExpressionIsAffineBoolean()

bool ExpressionIsAffineBoolean ( const LinearExpressionProto &  expr) const

Definition at line 207 of file presolve_context.cc.

◆ ExpressionIsALiteral()

bool ExpressionIsALiteral ( const LinearExpressionProto &  expr,
int *  literal = nullptr 
) const

Definition at line 224 of file presolve_context.cc.

◆ ExpressionIsSingleVariable()

bool ExpressionIsSingleVariable ( const LinearExpressionProto &  expr) const

Definition at line 219 of file presolve_context.cc.

◆ FixedValue() [1/2]

int64_t FixedValue ( const LinearExpressionProto &  expr) const

Definition at line 188 of file presolve_context.cc.

◆ FixedValue() [2/2]

int64_t FixedValue ( int  ref) const

Definition at line 148 of file presolve_context.cc.

◆ GetAbsRelation()

bool GetAbsRelation ( int  target_ref,
int *  ref 
)

Definition at line 1090 of file presolve_context.cc.

◆ GetAffineRelation()

AffineRelation::Relation GetAffineRelation ( int  ref) const

Definition at line 1140 of file presolve_context.cc.

◆ GetFalseLiteral()

int GetFalseLiteral ( )

Definition at line 81 of file presolve_context.cc.

◆ GetIntervalRepresentative()

int GetIntervalRepresentative ( int  index)

Definition at line 2123 of file presolve_context.cc.

◆ GetLiteralRepresentative()

int GetLiteralRepresentative ( int  ref) const

Definition at line 1109 of file presolve_context.cc.

◆ GetOrCreateAffineValueEncoding()

int GetOrCreateAffineValueEncoding ( const LinearExpressionProto &  expr,
int64_t  value 
)

Definition at line 1477 of file presolve_context.cc.

◆ GetOrCreateReifiedPrecedenceLiteral()

int GetOrCreateReifiedPrecedenceLiteral ( const LinearExpressionProto &  time_i,
const LinearExpressionProto &  time_j,
int  active_i,
int  active_j 
)

Definition at line 1945 of file presolve_context.cc.

◆ GetOrCreateVarValueEncoding()

int GetOrCreateVarValueEncoding ( int  ref,
int64_t  value 
)

Definition at line 1405 of file presolve_context.cc.

◆ GetReifiedPrecedenceKey()

std::tuple< int, int64_t, int, int64_t, int64_t, int, int > GetReifiedPrecedenceKey ( const LinearExpressionProto &  time_i,
const LinearExpressionProto &  time_j,
int  active_i,
int  active_j 
)

Definition at line 2026 of file presolve_context.cc.

◆ GetTrueLiteral()

int GetTrueLiteral ( )

Definition at line 73 of file presolve_context.cc.

◆ GetVariableRepresentative()

int GetVariableRepresentative ( int  ref) const

◆ HasVarValueEncoding()

bool HasVarValueEncoding ( int  ref,
int64_t  value,
int *  literal = nullptr 
)

Definition at line 1375 of file presolve_context.cc.

◆ InitializeNewDomains()

void InitializeNewDomains ( )

Definition at line 1161 of file presolve_context.cc.

◆ InsertVarValueEncoding()

bool InsertVarValueEncoding ( int  literal,
int  ref,
int64_t  value 
)

Definition at line 1351 of file presolve_context.cc.

◆ IntersectDomainWith() [1/2]

ABSL_MUST_USE_RESULT bool IntersectDomainWith ( const LinearExpressionProto &  expr,
const Domain domain,
bool *  domain_modified = nullptr 
)

Definition at line 451 of file presolve_context.cc.

◆ IntersectDomainWith() [2/2]

ABSL_MUST_USE_RESULT bool IntersectDomainWith ( int  ref,
const Domain domain,
bool *  domain_modified = nullptr 
)

Definition at line 414 of file presolve_context.cc.

◆ IntervalDebugString()

std::string IntervalDebugString ( int  ct_ref) const

Definition at line 256 of file presolve_context.cc.

◆ IntervalIsConstant()

bool IntervalIsConstant ( int  ct_ref) const

Definition at line 247 of file presolve_context.cc.

◆ IntervalUsage()

int IntervalUsage ( int  c) const
inline

Definition at line 493 of file presolve_context.h.

◆ IsFixed() [1/2]

bool IsFixed ( const LinearExpressionProto &  expr) const

Definition at line 181 of file presolve_context.cc.

◆ IsFixed() [2/2]

bool IsFixed ( int  ref) const

Definition at line 107 of file presolve_context.cc.

◆ IsFullyEncoded() [1/2]

bool IsFullyEncoded ( const LinearExpressionProto &  expr) const

Definition at line 1399 of file presolve_context.cc.

◆ IsFullyEncoded() [2/2]

bool IsFullyEncoded ( int  ref) const

Definition at line 1391 of file presolve_context.cc.

◆ LiteralForExpressionMax()

int LiteralForExpressionMax ( const LinearExpressionProto &  expr) const

Definition at line 213 of file presolve_context.cc.

◆ LiteralIsFalse()

bool LiteralIsFalse ( int  lit) const

Definition at line 127 of file presolve_context.cc.

◆ LiteralIsTrue()

bool LiteralIsTrue ( int  lit) const

Definition at line 118 of file presolve_context.cc.

◆ logger()

SolverLogger* logger ( ) const
inline

Definition at line 545 of file presolve_context.h.

◆ LogInfo()

void LogInfo ( )

Definition at line 2049 of file presolve_context.cc.

◆ MarkVariableAsRemoved()

void MarkVariableAsRemoved ( int  ref)

Definition at line 353 of file presolve_context.cc.

◆ MaxOf() [1/2]

int64_t MaxOf ( const LinearExpressionProto &  expr) const

Definition at line 168 of file presolve_context.cc.

◆ MaxOf() [2/2]

int64_t MaxOf ( int  ref) const

Definition at line 142 of file presolve_context.cc.

◆ MinOf() [1/2]

int64_t MinOf ( const LinearExpressionProto &  expr) const

Definition at line 155 of file presolve_context.cc.

◆ MinOf() [2/2]

int64_t MinOf ( int  ref) const

Definition at line 136 of file presolve_context.cc.

◆ ModelIsExpanded()

bool ModelIsExpanded ( ) const
inline

Definition at line 517 of file presolve_context.h.

◆ ModelIsUnsat()

bool ModelIsUnsat ( ) const
inline

Definition at line 235 of file presolve_context.h.

◆ NewBoolVar()

int NewBoolVar ( )

Definition at line 71 of file presolve_context.cc.

◆ NewIntVar()

int NewIntVar ( const Domain domain)

Definition at line 64 of file presolve_context.cc.

◆ NotifyThatModelIsExpanded()

void NotifyThatModelIsExpanded ( )
inline

Definition at line 518 of file presolve_context.h.

◆ NotifyThatModelIsUnsat()

ABSL_MUST_USE_RESULT bool NotifyThatModelIsUnsat ( const std::string &  message = "")
inline

Definition at line 227 of file presolve_context.h.

◆ NumAffineRelations()

int NumAffineRelations ( ) const
inline

Definition at line 314 of file presolve_context.h.

◆ ObjectiveCoeff()

int64_t ObjectiveCoeff ( int  var) const
inline

Definition at line 461 of file presolve_context.h.

◆ ObjectiveDomain()

const Domain& ObjectiveDomain ( ) const
inline

Definition at line 457 of file presolve_context.h.

◆ ObjectiveDomainIsConstraining()

bool ObjectiveDomainIsConstraining ( ) const
inline

Definition at line 466 of file presolve_context.h.

◆ ObjectiveMap()

const absl::flat_hash_map<int, int64_t>& ObjectiveMap ( ) const
inline

Definition at line 458 of file presolve_context.h.

◆ params()

const SatParameters& params ( ) const
inline

Definition at line 546 of file presolve_context.h.

◆ PropagateAffineRelation() [1/2]

bool PropagateAffineRelation ( int  ref)

Definition at line 715 of file presolve_context.cc.

◆ PropagateAffineRelation() [2/2]

bool PropagateAffineRelation ( int  ref,
int  rep,
int64_t  coeff,
int64_t  offset 
)

Definition at line 722 of file presolve_context.cc.

◆ random()

ModelRandomGenerator* random ( )
inline

Definition at line 548 of file presolve_context.h.

◆ ReadObjectiveFromProto()

void ReadObjectiveFromProto ( )

Definition at line 1496 of file presolve_context.cc.

◆ RecomputeSingletonObjectiveDomain()

bool RecomputeSingletonObjectiveDomain ( )

Definition at line 1693 of file presolve_context.cc.

◆ RefDebugString()

std::string RefDebugString ( int  ref) const

Definition at line 1149 of file presolve_context.cc.

◆ RegisterVariablesUsedInAssumptions()

void RegisterVariablesUsedInAssumptions ( )
inline

Definition at line 508 of file presolve_context.h.

◆ RemoveAllVariablesFromAffineRelationConstraint()

void RemoveAllVariablesFromAffineRelationConstraint ( )

Definition at line 750 of file presolve_context.cc.

◆ RemoveVariableFromAffineRelation()

void RemoveVariableFromAffineRelation ( int  var)

Definition at line 759 of file presolve_context.cc.

◆ RemoveVariableFromObjective()

void RemoveVariableFromObjective ( int  ref)

Definition at line 1710 of file presolve_context.cc.

◆ ScaleFloatingPointObjective()

bool ScaleFloatingPointObjective ( )

Definition at line 798 of file presolve_context.cc.

◆ SetLiteralToFalse()

ABSL_MUST_USE_RESULT bool SetLiteralToFalse ( int  lit)

Definition at line 473 of file presolve_context.cc.

◆ SetLiteralToTrue()

ABSL_MUST_USE_RESULT bool SetLiteralToTrue ( int  lit)

Definition at line 479 of file presolve_context.cc.

◆ ShiftCostInExactlyOne()

bool ShiftCostInExactlyOne ( absl::Span< const int >  exactly_one,
int64_t  shift 
)

Definition at line 1853 of file presolve_context.cc.

◆ SizeMax()

int64_t SizeMax ( int  ct_ref) const

Definition at line 312 of file presolve_context.cc.

◆ SizeMin()

int64_t SizeMin ( int  ct_ref) const

Definition at line 306 of file presolve_context.cc.

◆ StartMax()

int64_t StartMax ( int  ct_ref) const

Definition at line 288 of file presolve_context.cc.

◆ StartMin()

int64_t StartMin ( int  ct_ref) const

Definition at line 282 of file presolve_context.cc.

◆ StoreAbsRelation()

bool StoreAbsRelation ( int  target_ref,
int  ref 
)

Definition at line 1075 of file presolve_context.cc.

◆ StoreAffineRelation()

bool StoreAffineRelation ( int  ref_x,
int  ref_y,
int64_t  coeff,
int64_t  offset,
bool  debug_no_recursion = false 
)

Definition at line 881 of file presolve_context.cc.

◆ StoreBooleanEqualityRelation()

bool StoreBooleanEqualityRelation ( int  ref_a,
int  ref_b 
)

Definition at line 1052 of file presolve_context.cc.

◆ StoreLiteralImpliesVarEqValue()

bool StoreLiteralImpliesVarEqValue ( int  literal,
int  var,
int64_t  value 
)

Definition at line 1361 of file presolve_context.cc.

◆ StoreLiteralImpliesVarNEqValue()

bool StoreLiteralImpliesVarNEqValue ( int  literal,
int  var,
int64_t  value 
)

Definition at line 1368 of file presolve_context.cc.

◆ SubstituteVariableInObjective()

bool SubstituteVariableInObjective ( int  var_in_equality,
int64_t  coeff_in_equality,
const ConstraintProto &  equality 
)

Definition at line 1755 of file presolve_context.cc.

◆ time_limit()

TimeLimit* time_limit ( )
inline

Definition at line 547 of file presolve_context.h.

◆ UpdateConstraintVariableUsage()

void UpdateConstraintVariableUsage ( int  c)

Definition at line 553 of file presolve_context.cc.

◆ UpdateNewConstraintsVariableUsage()

void UpdateNewConstraintsVariableUsage ( )

Definition at line 593 of file presolve_context.cc.

◆ UpdateRuleStats()

void UpdateRuleStats ( const std::string &  name,
int  num_times = 1 
)

Definition at line 505 of file presolve_context.cc.

◆ VariableIsNotUsedAnymore()

bool VariableIsNotUsedAnymore ( int  ref) const

Definition at line 348 of file presolve_context.cc.

◆ VariableIsOnlyUsedInEncodingAndMaybeInObjective()

bool VariableIsOnlyUsedInEncodingAndMaybeInObjective ( int  ref) const

Definition at line 378 of file presolve_context.cc.

◆ VariableIsUniqueAndRemovable()

bool VariableIsUniqueAndRemovable ( int  ref) const

Definition at line 322 of file presolve_context.cc.

◆ VariableWasRemoved()

bool VariableWasRemoved ( int  ref) const

Definition at line 360 of file presolve_context.cc.

◆ VariableWithCostIsUnique()

bool VariableWithCostIsUnique ( int  ref) const

Definition at line 328 of file presolve_context.cc.

◆ VariableWithCostIsUniqueAndRemovable()

bool VariableWithCostIsUniqueAndRemovable ( int  ref) const

Definition at line 339 of file presolve_context.cc.

◆ VarToConstraints()

const absl::flat_hash_set<int>& VarToConstraints ( int  var) const
inline

Definition at line 489 of file presolve_context.h.

◆ WriteObjectiveToProto()

void WriteObjectiveToProto ( ) const

Definition at line 1912 of file presolve_context.cc.

◆ WriteVariableDomainsToProto()

void WriteVariableDomainsToProto ( ) const

Definition at line 1939 of file presolve_context.cc.

Member Data Documentation

◆ deductions

DomainDeductions deductions

Definition at line 581 of file presolve_context.h.

◆ keep_all_feasible_solutions

bool keep_all_feasible_solutions = false

Definition at line 558 of file presolve_context.h.

◆ mapping_model

CpModelProto* mapping_model = nullptr

Definition at line 551 of file presolve_context.h.

◆ modified_domains

SparseBitset<int> modified_domains

Definition at line 574 of file presolve_context.h.

◆ num_presolve_operations

int64_t num_presolve_operations = 0

Definition at line 565 of file presolve_context.h.

◆ tmp_left_domains

std::vector<Domain> tmp_left_domains

Definition at line 570 of file presolve_context.h.

◆ tmp_literal_set

absl::flat_hash_set<int> tmp_literal_set

Definition at line 571 of file presolve_context.h.

◆ tmp_literals

std::vector<int> tmp_literals

Definition at line 568 of file presolve_context.h.

◆ tmp_term_domains

std::vector<Domain> tmp_term_domains

Definition at line 569 of file presolve_context.h.

◆ var_with_reduced_small_degree

SparseBitset<int> var_with_reduced_small_degree

Definition at line 578 of file presolve_context.h.

◆ working_model

CpModelProto* working_model = nullptr

Definition at line 550 of file presolve_context.h.


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