OR-Tools  8.1
cp_model_utils.h File Reference

Go to the source code of this file.

Classes

struct  IndexReferences
 

Namespaces

 operations_research
 The vehicle routing library lets one model and solve generic vehicle routing problems ranging from the Traveling Salesman Problem to more complex problems such as the Capacitated Vehicle Routing Problem with Time Windows.
 
 operations_research::sat
 

Functions

int NegatedRef (int ref)
 
int PositiveRef (int ref)
 
bool RefIsPositive (int ref)
 
bool HasEnforcementLiteral (const ConstraintProto &ct)
 
int EnforcementLiteral (const ConstraintProto &ct)
 
void SetToNegatedLinearExpression (const LinearExpressionProto &input_expr, LinearExpressionProto *output_negated_expr)
 
IndexReferences GetReferencesUsedByConstraint (const ConstraintProto &ct)
 
void ApplyToAllVariableIndices (const std::function< void(int *)> &f, ConstraintProto *ct)
 
void ApplyToAllLiteralIndices (const std::function< void(int *)> &f, ConstraintProto *ct)
 
void ApplyToAllIntervalIndices (const std::function< void(int *)> &f, ConstraintProto *ct)
 
std::string ConstraintCaseName (ConstraintProto::ConstraintCase constraint_case)
 
std::vector< int > UsedVariables (const ConstraintProto &ct)
 
std::vector< int > UsedIntervals (const ConstraintProto &ct)
 
template<typename ProtoWithDomain >
bool DomainInProtoContains (const ProtoWithDomain &proto, int64 value)
 
template<typename ProtoWithDomain >
void FillDomainInProto (const Domain &domain, ProtoWithDomain *proto)
 
template<typename ProtoWithDomain >
Domain ReadDomainFromProto (const ProtoWithDomain &proto)
 
template<typename ProtoWithDomain >
std::vector< int64AllValuesInDomain (const ProtoWithDomain &proto)
 
double ScaleObjectiveValue (const CpObjectiveProto &proto, int64 value)
 
double UnscaleObjectiveValue (const CpObjectiveProto &proto, double value)
 
int64 ComputeInnerObjective (const CpObjectiveProto &objective, const CpSolverResponse &response)