OR-Tools  9.3
operations_research::sat Namespace Reference

Classes

struct  AffineExpression
 
class  AllDifferentBoundsPropagator
 
class  AllDifferentConstraint
 
class  AllIntervalsHelper
 
struct  AssignmentInfo
 
struct  AssignmentType
 
class  AutomatonConstraint
 Specialized automaton constraint. More...
 
struct  BinaryClause
 
class  BinaryClauseManager
 
class  BinaryImplicationGraph
 
class  BlockedClauseSimplifier
 
struct  BooleanOrIntegerLiteral
 
struct  BooleanOrIntegerVariable
 
class  BooleanXorPropagator
 
class  BoolVar
 A Boolean variable. More...
 
class  BoundedVariableElimination
 
class  CanonicalBooleanLinearProblem
 
class  CapacityProfile
 
class  CircuitConstraint
 Specialized circuit constraint. More...
 
class  CircuitCoveringPropagator
 
class  CircuitPropagator
 
struct  ClauseInfo
 
class  CombinedDisjunctive
 
class  CompactVectorVector
 
class  ConsecutiveConstraintsRelaxationNeighborhoodGenerator
 
class  Constraint
 A constraint. More...
 
class  ConstraintGraphNeighborhoodGenerator
 
class  ContinuousProber
 
class  CoreBasedOptimizer
 
class  CoverCutHelper
 
class  CpModelBuilder
 Wrapper class around the cp_model proto. More...
 
class  CpModelMapping
 
class  CpModelPresolver
 
class  CpModelView
 
struct  CtEvent
 
class  CumulativeConstraint
 Specialized cumulative constraint. More...
 
class  CumulativeEnergyConstraint
 
class  CumulativeIsAfterSubsetConstraint
 
struct  CutGenerator
 
struct  DebugSolution
 
class  DisjunctiveDetectablePrecedences
 
class  DisjunctiveEdgeFinding
 
class  DisjunctiveNotLast
 
class  DisjunctiveOverloadChecker
 
class  DisjunctivePrecedences
 
class  DisjunctiveWithTwoItems
 
class  DivisionPropagator
 
class  DomainDeductions
 
class  DoubleLinearExpr
 A dedicated container for linear expressions with double coefficients. More...
 
class  DratChecker
 
class  DratProofHandler
 
class  DratWriter
 
class  DualBoundStrengthening
 
class  EncodingNode
 
struct  EnergyEvent
 
class  ExponentialMovingAverage
 
class  FeasibilityPump
 
class  FixedDivisionPropagator
 
class  FixedModuloPropagator
 
class  GenericLiteralWatcher
 
class  GreaterThanAtLeastOneOfPropagator
 
class  HittingSetOptimizer
 
struct  ImpliedBoundEntry
 
class  ImpliedBounds
 
class  ImpliedBoundsProcessor
 
class  InclusionDetector
 
class  IncrementalAverage
 
struct  IndexedInterval
 
struct  IndexReferences
 
class  Inprocessing
 
struct  IntegerDomains
 
class  IntegerEncoder
 
struct  IntegerLiteral
 
class  IntegerRoundingCutHelper
 
class  IntegerSearchHelper
 
class  IntegerSumLE
 
class  IntegerTrail
 
class  IntervalsRepository
 
class  IntervalVar
 Represents a Interval variable. More...
 
class  IntVar
 An integer variable. More...
 
struct  KnapsackItem
 
class  LbTreeSearch
 
struct  LevelZeroCallbackHelper
 
class  LevelZeroEquality
 
struct  LinearConstraint
 
class  LinearConstraintBuilder
 
class  LinearConstraintManager
 
class  LinearExpr
 A dedicated container for linear expressions. More...
 
struct  LinearExpression
 
class  LinearProgrammingConstraint
 
class  LinearProgrammingConstraintCollection
 
struct  LinearProgrammingConstraintLpSolution
 
class  LinearProgrammingDispatcher
 
struct  LinearRelaxation
 
class  LinMinPropagator
 
class  Literal
 
class  LiteralWatchers
 
struct  LiteralWithCoeff
 
struct  LPSolveInfo
 
struct  LPVariable
 
struct  LPVariables
 
class  MinPropagator
 
class  Model
 Class that owns everything related to a particular optimization model. More...
 
class  ModelCopy
 
class  ModelRandomGenerator
 
class  ModelSharedTimeLimit
 
class  MultipleCircuitConstraint
 Specialized circuit constraint. More...
 
class  MutableUpperBoundedLinearConstraint
 
struct  Neighborhood
 
class  NeighborhoodGenerator
 
class  NeighborhoodGeneratorHelper
 
class  NonOverlappingRectanglesDisjunctivePropagator
 
class  NonOverlappingRectanglesEnergyPropagator
 
class  NoOverlap2DConstraint
 Specialized no_overlap2D constraint. More...
 
struct  ObjectiveDefinition
 
class  PbConstraints
 
struct  PbConstraintsEnqueueHelper
 
class  Percentile
 
struct  PostsolveClauses
 
struct  PrecedenceEvent
 
class  PrecedencesPropagator
 
class  PresolveContext
 
class  Prober
 
struct  ProbingOptions
 
class  ProductPropagator
 
class  PropagationGraph
 
class  PropagatorInterface
 
class  PseudoCosts
 
struct  Rectangle
 
class  RelaxationInducedNeighborhoodGenerator
 
class  RelaxRandomConstraintsGenerator
 
class  RelaxRandomVariablesGenerator
 
class  ReservoirConstraint
 Specialized reservoir constraint. More...
 
class  ReservoirTimeTabling
 
class  RestartPolicy
 
class  RevIntegerValueRepository
 
class  RevIntRepository
 
struct  RINSNeighborhood
 
struct  RoundingOptions
 
class  RoutingFullPathNeighborhoodGenerator
 
class  RoutingPathNeighborhoodGenerator
 
class  RoutingRandomNeighborhoodGenerator
 
class  SatClause
 
class  SatDecisionPolicy
 
class  SatPostsolver
 
struct  SatPresolveOptions
 
class  SatPresolver
 
class  SatPropagator
 
class  SatSolver
 
class  SavedLiteral
 
class  SavedVariable
 
class  ScatteredIntegerVector
 
class  SccGraph
 
class  SchedulingConstraintHelper
 
class  SchedulingNeighborhoodGenerator
 
class  SchedulingTimeWindowNeighborhoodGenerator
 
struct  SearchHeuristics
 
class  SelectedMinPropagator
 
class  SharedBoundsManager
 
class  SharedClausesManager
 
class  SharedIncompleteSolutionManager
 
class  SharedLPSolutionRepository
 
class  SharedRelaxationSolutionRepository
 
class  SharedResponseManager
 
class  SharedSolutionRepository
 
struct  SolutionObservers
 
class  SquarePropagator
 
class  StampingSimplifier
 
class  SubSolver
 
class  SymmetryPropagator
 
class  SynchronizationPoint
 
class  TableConstraint
 Specialized assignment constraint. More...
 
class  TaskSet
 
struct  TaskTime
 
class  ThetaLambdaTree
 
class  TimeTableEdgeFinding
 
class  TimeTablingPerTask
 
class  TopN
 
class  TopNCuts
 
class  Trail
 
class  UpperBoundedLinearConstraint
 
struct  ValueLiteralPair
 
class  VarDomination
 
class  VariableGraphNeighborhoodGenerator
 
class  VariablesAssignment
 
class  VariableWithSameReasonIdentifier
 
struct  VarValue
 
class  WeightedRandomRelaxationNeighborhoodGenerator
 
class  ZeroHalfCutHelper
 

Typedefs

using InlinedIntegerLiteralVector = absl::InlinedVector< IntegerLiteral, 2 >
 

Enumerations

enum  SatFormat { DIMACS , DRAT }
 
enum  LogBehavior { DEFAULT_LOG , STDOUT_LOG }
 

Functions

void SolveFzWithCpModelProto (const fz::Model &fz_model, const fz::FlatzincSatParameters &p, const std::string &sat_params, SolverLogger *logger, SolverLogger *solution_logger)
 
std::function< void(Model *)> AllDifferentBinary (const std::vector< IntegerVariable > &vars)
 
std::function< void(Model *)> AllDifferentOnBounds (const std::vector< AffineExpression > &expressions)
 
std::function< void(Model *)> AllDifferentOnBounds (const std::vector< IntegerVariable > &vars)
 
std::function< void(Model *)> AllDifferentAC (const std::vector< IntegerVariable > &variables)
 
void ExtractAssignment (const LinearBooleanProblem &problem, const SatSolver &solver, std::vector< bool > *assignment)
 
absl::Status ValidateBooleanProblem (const LinearBooleanProblem &problem)
 
CpModelProto BooleanProblemToCpModelproto (const LinearBooleanProblem &problem)
 
void ChangeOptimizationDirection (LinearBooleanProblem *problem)
 
bool LoadBooleanProblem (const LinearBooleanProblem &problem, SatSolver *solver)
 
bool LoadAndConsumeBooleanProblem (LinearBooleanProblem *problem, SatSolver *solver)
 
void UseObjectiveForSatAssignmentPreference (const LinearBooleanProblem &problem, SatSolver *solver)
 
bool AddObjectiveUpperBound (const LinearBooleanProblem &problem, Coefficient upper_bound, SatSolver *solver)
 
bool AddObjectiveConstraint (const LinearBooleanProblem &problem, bool use_lower_bound, Coefficient lower_bound, bool use_upper_bound, Coefficient upper_bound, SatSolver *solver)
 
Coefficient ComputeObjectiveValue (const LinearBooleanProblem &problem, const std::vector< bool > &assignment)
 
bool IsAssignmentValid (const LinearBooleanProblem &problem, const std::vector< bool > &assignment)
 
std::string LinearBooleanProblemToCnfString (const LinearBooleanProblem &problem)
 
void StoreAssignment (const VariablesAssignment &assignment, BooleanAssignment *output)
 
void ExtractSubproblem (const LinearBooleanProblem &problem, const std::vector< int > &constraint_indices, LinearBooleanProblem *subproblem)
 
template<typename Graph >
Graph * GenerateGraphForSymmetryDetection (const LinearBooleanProblem &problem, std::vector< int > *initial_equivalence_classes)
 
void MakeAllLiteralsPositive (LinearBooleanProblem *problem)
 
void FindLinearBooleanProblemSymmetries (const LinearBooleanProblem &problem, std::vector< std::unique_ptr< SparsePermutation > > *generators)
 
void ApplyLiteralMappingToBooleanProblem (const absl::StrongVector< LiteralIndex, LiteralIndex > &mapping, LinearBooleanProblem *problem)
 
void ProbeAndSimplifyProblem (SatPostsolver *postsolver, LinearBooleanProblem *problem)
 
double AddOffsetAndScaleObjectiveValue (const LinearBooleanProblem &problem, Coefficient v)
 
std::function< void(Model *)> ExactlyOnePerRowAndPerColumn (const std::vector< std::vector< Literal > > &graph)
 
std::function< void(Model *)> SubcircuitConstraint (int num_nodes, const std::vector< int > &tails, const std::vector< int > &heads, const std::vector< Literal > &literals, bool multiple_subcircuit_through_zero)
 
std::function< void(Model *)> CircuitCovering (const std::vector< std::vector< Literal > > &graph, const std::vector< int > &distinguished_nodes)
 
template<class IntContainer >
int ReindexArcs (IntContainer *tails, IntContainer *heads)
 
std::vector< IntegerValue > ToIntegerValueVector (const std::vector< int64_t > &input)
 
std::function< void(Model *)> LiteralXorIs (const std::vector< Literal > &literals, bool value)
 
std::function< void(Model *)> GreaterThanAtLeastOneOf (IntegerVariable target_var, const absl::Span< const IntegerVariable > vars, const absl::Span< const IntegerValue > offsets, const absl::Span< const Literal > selectors)
 
std::function< void(Model *)> GreaterThanAtLeastOneOf (IntegerVariable target_var, const absl::Span< const IntegerVariable > vars, const absl::Span< const IntegerValue > offsets, const absl::Span< const Literal > selectors, const absl::Span< const Literal > enforcements)
 
std::function< void(Model *)> PartialIsOneOfVar (IntegerVariable target_var, const std::vector< IntegerVariable > &vars, const std::vector< Literal > &selectors)
 
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 BoolVar &var)
 
std::string VarDebugString (const CpModelProto &proto, int index)
 
std::ostream & operator<< (std::ostream &os, const IntVar &var)
 
std::ostream & operator<< (std::ostream &os, const LinearExpr &e)
 
std::ostream & operator<< (std::ostream &os, const DoubleLinearExpr &e)
 
std::ostream & operator<< (std::ostream &os, const IntervalVar &var)
 
int64_t SolutionIntegerValue (const CpSolverResponse &r, const LinearExpr &expr)
 Evaluates the value of an linear expression in a solver response. More...
 
bool SolutionBooleanValue (const CpSolverResponse &r, BoolVar x)
 Evaluates the value of a Boolean literal in a solver response. More...
 
LinearExpr operator- (LinearExpr expr)
 
LinearExpr operator+ (const LinearExpr &lhs, const LinearExpr &rhs)
 
LinearExpr operator+ (LinearExpr &&lhs, const LinearExpr &rhs)
 
LinearExpr operator+ (const LinearExpr &lhs, LinearExpr &&rhs)
 
LinearExpr operator+ (LinearExpr &&lhs, LinearExpr &&rhs)
 
LinearExpr operator- (const LinearExpr &lhs, const LinearExpr &rhs)
 
LinearExpr operator- (LinearExpr &&lhs, const LinearExpr &rhs)
 
LinearExpr operator- (const LinearExpr &lhs, LinearExpr &&rhs)
 
LinearExpr operator- (LinearExpr &&lhs, LinearExpr &&rhs)
 
LinearExpr operator* (LinearExpr expr, int64_t factor)
 
LinearExpr operator* (int64_t factor, LinearExpr expr)
 
DoubleLinearExpr operator- (DoubleLinearExpr expr)
 
DoubleLinearExpr operator+ (const DoubleLinearExpr &lhs, const DoubleLinearExpr &rhs)
 
DoubleLinearExpr operator+ (DoubleLinearExpr &&lhs, const DoubleLinearExpr &rhs)
 
DoubleLinearExpr operator+ (const DoubleLinearExpr &lhs, DoubleLinearExpr &&rhs)
 
DoubleLinearExpr operator+ (DoubleLinearExpr &&lhs, DoubleLinearExpr &&rhs)
 
DoubleLinearExpr operator+ (DoubleLinearExpr expr, double rhs)
 
DoubleLinearExpr operator+ (double lhs, DoubleLinearExpr expr)
 
DoubleLinearExpr operator- (const DoubleLinearExpr &lhs, const DoubleLinearExpr &rhs)
 
DoubleLinearExpr operator- (DoubleLinearExpr &&lhs, const DoubleLinearExpr &rhs)
 
DoubleLinearExpr operator- (const DoubleLinearExpr &lhs, DoubleLinearExpr &&rhs)
 
DoubleLinearExpr operator- (DoubleLinearExpr &&lhs, DoubleLinearExpr &&rhs)
 
DoubleLinearExpr operator- (DoubleLinearExpr epxr, double rhs)
 
DoubleLinearExpr operator- (double lhs, DoubleLinearExpr expr)
 
DoubleLinearExpr operator* (DoubleLinearExpr expr, double factor)
 
DoubleLinearExpr operator* (double factor, DoubleLinearExpr expr)
 
std::string ValidateCpModel (const CpModelProto &model, bool after_presolve)
 
std::string ValidateInputCpModel (const SatParameters &params, const CpModelProto &model)
 
bool SolutionIsFeasible (const CpModelProto &model, const std::vector< int64_t > &variable_values, const CpModelProto *mapping_proto, const std::vector< int > *postsolve_mapping)
 
void ExpandCpModel (PresolveContext *context)
 
Neighborhood GenerateSchedulingNeighborhoodForRelaxation (const absl::Span< const int > intervals_to_relax, const CpSolverResponse &initial_solution, const NeighborhoodGeneratorHelper &helper)
 
void LoadVariables (const CpModelProto &model_proto, bool view_all_booleans_as_integers, Model *m)
 
void LoadBooleanSymmetries (const CpModelProto &model_proto, Model *m)
 
void ExtractEncoding (const CpModelProto &model_proto, Model *m)
 
void ExtractElementEncoding (const CpModelProto &model_proto, Model *m)
 
void PropagateEncodingFromEquivalenceRelations (const CpModelProto &model_proto, Model *m)
 
void DetectOptionalVariables (const CpModelProto &model_proto, Model *m)
 
void AddFullEncodingFromSearchBranching (const CpModelProto &model_proto, Model *m)
 
void LoadBoolOrConstraint (const ConstraintProto &ct, Model *m)
 
void LoadBoolAndConstraint (const ConstraintProto &ct, Model *m)
 
void LoadAtMostOneConstraint (const ConstraintProto &ct, Model *m)
 
void LoadExactlyOneConstraint (const ConstraintProto &ct, Model *m)
 
void LoadBoolXorConstraint (const ConstraintProto &ct, Model *m)
 
void LoadLinearConstraint (const ConstraintProto &ct, Model *m)
 
void LoadAllDiffConstraint (const ConstraintProto &ct, Model *m)
 
void LoadIntProdConstraint (const ConstraintProto &ct, Model *m)
 
void LoadIntDivConstraint (const ConstraintProto &ct, Model *m)
 
void LoadIntModConstraint (const ConstraintProto &ct, Model *m)
 
void LoadLinMaxConstraint (const ConstraintProto &ct, Model *m)
 
void LoadNoOverlapConstraint (const ConstraintProto &ct, Model *m)
 
void LoadNoOverlap2dConstraint (const ConstraintProto &ct, Model *m)
 
void LoadCumulativeConstraint (const ConstraintProto &ct, Model *m)
 
void LoadCircuitConstraint (const ConstraintProto &ct, Model *m)
 
void LoadRoutesConstraint (const ConstraintProto &ct, Model *m)
 
bool LoadConstraint (const ConstraintProto &ct, Model *m)
 
void LoadIntMinConstraint (const ConstraintProto &ct, Model *m)
 
void LoadIntMaxConstraint (const ConstraintProto &ct, Model *m)
 
void LoadCircuitCoveringConstraint (const ConstraintProto &ct, Model *m)
 
void EncodeObjectiveAsSingleVariable (CpModelProto *cp_model)
 
void PostsolveClause (const ConstraintProto &ct, std::vector< Domain > *domains)
 
void PostsolveExactlyOne (const ConstraintProto &ct, std::vector< Domain > *domains)
 
void SetEnforcementLiteralToFalse (const ConstraintProto &ct, std::vector< Domain > *domains)
 
void PostsolveLinear (const ConstraintProto &ct, std::vector< Domain > *domains)
 
void PostsolveLinMax (const ConstraintProto &ct, std::vector< Domain > *domains)
 
void PostsolveElement (const ConstraintProto &ct, std::vector< Domain > *domains)
 
void PostsolveResponse (const int64_t num_variables_in_original_model, const CpModelProto &mapping_proto, const std::vector< int > &postsolve_mapping, std::vector< int64_t > *solution)
 
bool ImportModelWithBasicPresolveIntoContext (const CpModelProto &in_model, PresolveContext *context)
 
void CopyEverythingExceptVariablesAndConstraintsFieldsIntoContext (const CpModelProto &in_model, PresolveContext *context)
 
CpSolverStatus PresolveCpModel (PresolveContext *context, std::vector< int > *postsolve_mapping)
 
void ApplyVariableMapping (const std::vector< int > &mapping, const PresolveContext &context)
 
std::vector< std::pair< int, int > > FindDuplicateConstraints (const CpModelProto &model_proto)
 
const std::function< BooleanOrIntegerLiteral()> ConstructSearchStrategyInternal (const std::vector< DecisionStrategyProto > &strategies, Model *model)
 
std::function< BooleanOrIntegerLiteral()> ConstructSearchStrategy (const CpModelProto &cp_model_proto, const std::vector< IntegerVariable > &variable_mapping, IntegerVariable objective_var, Model *model)
 
std::function< BooleanOrIntegerLiteral()> InstrumentSearchStrategy (const CpModelProto &cp_model_proto, const std::vector< IntegerVariable > &variable_mapping, const std::function< BooleanOrIntegerLiteral()> &instrumented_strategy, Model *model)
 
std::vector< SatParameters > GetDiverseSetOfParameters (const SatParameters &base_params, const CpModelProto &cp_model)
 
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...
 
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...
 
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 sat::SatParameters &parameters)
 
CpSolverResponse SolveCpModel (const CpModelProto &model_proto, Model *model)
 Solves the given CpModelProto. 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...
 
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< SatParameters(Model *)> NewSatParameters (const SatParameters &parameters)
 
void FindCpModelSymmetries (const SatParameters &params, const CpModelProto &problem, std::vector< std::unique_ptr< SparsePermutation > > *generators, double deterministic_limit, SolverLogger *logger)
 
void DetectAndAddSymmetryToProto (const SatParameters &params, CpModelProto *proto, SolverLogger *logger)
 
bool DetectAndExploitSymmetriesInPresolve (PresolveContext *context)
 
void SetToNegatedLinearExpression (const LinearExpressionProto &input_expr, LinearExpressionProto *output_negated_expr)
 
IndexReferences GetReferencesUsedByConstraint (const ConstraintProto &ct)
 
void ApplyToAllLiteralIndices (const std::function< void(int *)> &f, ConstraintProto *ct)
 
void ApplyToAllVariableIndices (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)
 
int64_t ComputeInnerObjective (const CpObjectiveProto &objective, const CpSolverResponse &response)
 
bool ExpressionContainsSingleRef (const LinearExpressionProto &expr)
 
bool ExpressionIsAffine (const LinearExpressionProto &expr)
 
int GetSingleRefFromExpression (const LinearExpressionProto &expr)
 
void AddLinearExpressionToLinearConstraint (const LinearExpressionProto &expr, int64_t coefficient, LinearConstraintProto *linear)
 
bool LinearExpressionProtosAreEqual (const LinearExpressionProto &a, const LinearExpressionProto &b, int64_t b_scaling)
 
int NegatedRef (int ref)
 
int PositiveRef (int ref)
 
bool RefIsPositive (int ref)
 
bool HasEnforcementLiteral (const ConstraintProto &ct)
 
int EnforcementLiteral (const ConstraintProto &ct)
 
template<typename ProtoWithDomain >
bool DomainInProtoContains (const ProtoWithDomain &proto, int64_t value)
 
template<typename ProtoWithDomain >
void FillDomainInProto (const Domain &domain, ProtoWithDomain *proto)
 
template<typename ProtoWithDomain >
Domain ReadDomainFromProto (const ProtoWithDomain &proto)
 
template<typename ProtoWithDomain >
std::vector< int64_t > AllValuesInDomain (const ProtoWithDomain &proto)
 
double ScaleObjectiveValue (const CpObjectiveProto &proto, int64_t value)
 
int64_t ScaleInnerObjectiveValue (const CpObjectiveProto &proto, int64_t value)
 
double UnscaleObjectiveValue (const CpObjectiveProto &proto, double value)
 
std::function< void(Model *)> Cumulative (const std::vector< IntervalVariable > &vars, const std::vector< AffineExpression > &demands, AffineExpression capacity, SchedulingConstraintHelper *helper)
 
std::function< void(Model *)> CumulativeTimeDecomposition (const std::vector< IntervalVariable > &vars, const std::vector< AffineExpression > &demands, AffineExpression capacity, SchedulingConstraintHelper *helper)
 
std::function< void(Model *)> CumulativeUsingReservoir (const std::vector< IntervalVariable > &vars, const std::vector< AffineExpression > &demands, AffineExpression capacity, SchedulingConstraintHelper *helper)
 
void AddCumulativeEnergyConstraint (std::vector< AffineExpression > energies, AffineExpression capacity, SchedulingConstraintHelper *helper, Model *model)
 
void AddCumulativeOverloadChecker (const std::vector< AffineExpression > &demands, AffineExpression capacity, SchedulingConstraintHelper *helper, Model *model)
 
bool LiftKnapsackCut (const LinearConstraint &constraint, const absl::StrongVector< IntegerVariable, double > &lp_values, const std::vector< IntegerValue > &cut_vars_original_coefficients, const IntegerTrail &integer_trail, TimeLimit *time_limit, LinearConstraint *cut)
 
LinearConstraint GetPreprocessedLinearConstraint (const LinearConstraint &constraint, const absl::StrongVector< IntegerVariable, double > &lp_values, const IntegerTrail &integer_trail)
 
bool ConstraintIsTriviallyTrue (const LinearConstraint &constraint, const IntegerTrail &integer_trail)
 
bool CanBeFilteredUsingCutLowerBound (const LinearConstraint &preprocessed_constraint, const absl::StrongVector< IntegerVariable, double > &lp_values, const IntegerTrail &integer_trail)
 
double GetKnapsackUpperBound (std::vector< KnapsackItem > items, const double capacity)
 
bool CanBeFilteredUsingKnapsackUpperBound (const LinearConstraint &constraint, const absl::StrongVector< IntegerVariable, double > &lp_values, const IntegerTrail &integer_trail)
 
bool CanFormValidKnapsackCover (const LinearConstraint &preprocessed_constraint, const absl::StrongVector< IntegerVariable, double > &lp_values, const IntegerTrail &integer_trail)
 
void ConvertToKnapsackForm (const LinearConstraint &constraint, std::vector< LinearConstraint > *knapsack_constraints, IntegerTrail *integer_trail)
 
CutGenerator CreateKnapsackCoverCutGenerator (const std::vector< LinearConstraint > &base_constraints, const std::vector< IntegerVariable > &vars, Model *model)
 
IntegerValue GetFactorT (IntegerValue rhs_remainder, IntegerValue divisor, IntegerValue max_t)
 
std::function< IntegerValue(IntegerValue)> GetSuperAdditiveRoundingFunction (IntegerValue rhs_remainder, IntegerValue divisor, IntegerValue t, IntegerValue max_scaling)
 
CutGenerator CreatePositiveMultiplicationCutGenerator (AffineExpression z, AffineExpression x, AffineExpression y, int linearization_level, Model *model)
 
CutGenerator CreateSquareCutGenerator (AffineExpression y, AffineExpression x, int linearization_level, Model *model)
 
CutGenerator CreateAllDifferentCutGenerator (const std::vector< AffineExpression > &exprs, Model *model)
 
CutGenerator CreateLinMaxCutGenerator (const IntegerVariable target, const std::vector< LinearExpression > &exprs, const std::vector< IntegerVariable > &z_vars, Model *model)
 
LinearConstraint BuildMaxAffineUpConstraint (const LinearExpression &target, IntegerVariable var, const std::vector< std::pair< IntegerValue, IntegerValue > > &affines, Model *model)
 
CutGenerator CreateMaxAffineCutGenerator (LinearExpression target, IntegerVariable var, std::vector< std::pair< IntegerValue, IntegerValue > > affines, const std::string cut_name, Model *model)
 
CutGenerator CreateCliqueCutGenerator (const std::vector< IntegerVariable > &base_variables, Model *model)
 
void AddDiffnCumulativeRelationOnX (const std::vector< IntervalVariable > &x_intervals, SchedulingConstraintHelper *x, SchedulingConstraintHelper *y, Model *model)
 
std::function< void(Model *)> NonOverlappingRectangles (const std::vector< IntervalVariable > &x, const std::vector< IntervalVariable > &y, bool is_strict, bool add_cumulative_relaxation=true)
 
std::vector< absl::Span< int > > GetOverlappingRectangleComponents (const std::vector< Rectangle > &rectangles, absl::Span< int > active_rectangles)
 
bool ReportEnergyConflict (Rectangle bounding_box, absl::Span< const int > boxes, SchedulingConstraintHelper *x, SchedulingConstraintHelper *y)
 
bool BoxesAreInEnergyConflict (const std::vector< Rectangle > &rectangles, const std::vector< IntegerValue > &energies, absl::Span< const int > boxes, Rectangle *conflict)
 
bool AnalyzeIntervals (bool transpose, absl::Span< const int > local_boxes, const std::vector< Rectangle > &rectangles, const std::vector< IntegerValue > &rectangle_energies, IntegerValue *x_threshold, IntegerValue *y_threshold, Rectangle *conflict)
 
absl::Span< int > FilterBoxesAndRandomize (const std::vector< Rectangle > &cached_rectangles, absl::Span< int > boxes, IntegerValue threshold_x, IntegerValue threshold_y, absl::BitGenRef random)
 
absl::Span< int > FilterBoxesThatAreTooLarge (const std::vector< Rectangle > &cached_rectangles, const std::vector< IntegerValue > &energies, absl::Span< int > boxes)
 
std::ostream & operator<< (std::ostream &out, const IndexedInterval &interval)
 
void ConstructOverlappingSets (bool already_sorted, std::vector< IndexedInterval > *intervals, std::vector< std::vector< int > > *result)
 
void GetOverlappingIntervalComponents (std::vector< IndexedInterval > *intervals, std::vector< std::vector< int > > *components)
 
std::vector< int > GetIntervalArticulationPoints (std::vector< IndexedInterval > *intervals)
 
std::function< void(Model *)> Disjunctive (const std::vector< IntervalVariable > &vars)
 
std::function< void(Model *)> DisjunctiveWithBooleanPrecedencesOnly (const std::vector< IntervalVariable > &vars)
 
std::function< void(Model *)> DisjunctiveWithBooleanPrecedences (const std::vector< IntervalVariable > &vars)
 
bool ContainsLiteral (absl::Span< const Literal > clause, Literal literal)
 
bool Resolve (absl::Span< const Literal > clause, absl::Span< const Literal > other_clause, Literal complementary_literal, VariablesAssignment *assignment, std::vector< Literal > *resolvent)
 
bool AddProblemClauses (const std::string &file_path, DratChecker *drat_checker)
 
bool AddInferedAndDeletedClauses (const std::string &file_path, DratChecker *drat_checker)
 
bool PrintClauses (const std::string &file_path, SatFormat format, const std::vector< std::vector< Literal > > &clauses, int num_variables)
 
 DEFINE_STRONG_INDEX_TYPE (ClauseIndex)
 
const ClauseIndex kNoClauseIndex (-1)
 
EncodingNode LazyMerge (EncodingNode *a, EncodingNode *b, SatSolver *solver)
 
void IncreaseNodeSize (EncodingNode *node, SatSolver *solver)
 
EncodingNode FullMerge (Coefficient upper_bound, EncodingNode *a, EncodingNode *b, SatSolver *solver)
 
EncodingNodeMergeAllNodesWithDeque (Coefficient upper_bound, const std::vector< EncodingNode * > &nodes, SatSolver *solver, std::deque< EncodingNode > *repository)
 
EncodingNodeLazyMergeAllNodeWithPQAndIncreaseLb (Coefficient weight, const std::vector< EncodingNode * > &nodes, SatSolver *solver, std::deque< EncodingNode > *repository)
 
std::vector< EncodingNode * > CreateInitialEncodingNodes (const std::vector< Literal > &literals, const std::vector< Coefficient > &coeffs, Coefficient *offset, std::deque< EncodingNode > *repository)
 
std::vector< EncodingNode * > CreateInitialEncodingNodes (const LinearObjective &objective_proto, Coefficient *offset, std::deque< EncodingNode > *repository)
 
std::vector< LiteralReduceNodesAndExtractAssumptions (Coefficient upper_bound, Coefficient stratified_lower_bound, Coefficient *lower_bound, std::vector< EncodingNode * > *nodes, SatSolver *solver)
 
Coefficient ComputeCoreMinWeight (const std::vector< EncodingNode * > &nodes, const std::vector< Literal > &core)
 
Coefficient MaxNodeWeightSmallerThan (const std::vector< EncodingNode * > &nodes, Coefficient upper_bound)
 
bool ProcessCore (const std::vector< Literal > &core, Coefficient min_weight, std::deque< EncodingNode > *repository, std::vector< EncodingNode * > *nodes, SatSolver *solver)
 
bool ProcessCoreWithAlternativeEncoding (const std::vector< Literal > &core, Coefficient min_weight, std::deque< EncodingNode > *repository, std::vector< EncodingNode * > *nodes, SatSolver *solver)
 
std::string EncodingStr (const std::vector< ValueLiteralPair > &enc)
 
bool TryToReconcileEncodings (const AffineExpression &size2_affine, const AffineExpression &affine, const std::vector< ValueLiteralPair > &affine_var_encoding, Model *model, LinearConstraintBuilder *builder)
 
bool DetectLinearEncodingOfProducts (const AffineExpression &left, const AffineExpression &right, Model *model, LinearConstraintBuilder *builder)
 
LinearExpression NotLinearizedEnergy ()
 
bool ProductIsLinearized (const LinearExpression &expr)
 
void LinearizeInnerProduct (const std::vector< AffineExpression > &left, const std::vector< AffineExpression > &right, Model *model, std::vector< LinearExpression > *energies)
 
template<typename Storage >
 InclusionDetector (const Storage &storage) -> InclusionDetector< Storage >
 
std::vector< IntegerVariable > NegationOf (const std::vector< IntegerVariable > &vars)
 
std::ostream & operator<< (std::ostream &os, const ValueLiteralPair &p)
 
std::function< void(Model *)> ExcludeCurrentSolutionWithoutIgnoredVariableAndBacktrack ()
 
 DEFINE_STRONG_INT64_TYPE (IntegerValue)
 
constexpr IntegerValue kMaxIntegerValue (std::numeric_limits< IntegerValue::ValueType >::max() - 1)
 
constexpr IntegerValue kMinIntegerValue (-kMaxIntegerValue.value())
 
double ToDouble (IntegerValue value)
 
template<class IntType >
IntType IntTypeAbs (IntType t)
 
IntegerValue CeilRatio (IntegerValue dividend, IntegerValue positive_divisor)
 
IntegerValue FloorRatio (IntegerValue dividend, IntegerValue positive_divisor)
 
IntegerValue PositiveRemainder (IntegerValue dividend, IntegerValue positive_divisor)
 
bool AddProductTo (IntegerValue a, IntegerValue b, IntegerValue *result)
 
 DEFINE_STRONG_INDEX_TYPE (IntegerVariable)
 
const IntegerVariable kNoIntegerVariable (-1)
 
IntegerVariable NegationOf (IntegerVariable i)
 
bool VariableIsPositive (IntegerVariable i)
 
IntegerVariable PositiveVariable (IntegerVariable i)
 
 DEFINE_STRONG_INDEX_TYPE (PositiveOnlyIndex)
 
PositiveOnlyIndex GetPositiveOnlyIndex (IntegerVariable var)
 
std::string IntegerTermDebugString (IntegerVariable var, IntegerValue coeff)
 
std::ostream & operator<< (std::ostream &os, IntegerLiteral i_lit)
 
std::function< BooleanVariable(Model *)> NewBooleanVariable ()
 
std::function< IntegerVariable(Model *)> ConstantIntegerVariable (int64_t value)
 
std::function< IntegerVariable(Model *)> NewIntegerVariable (int64_t lb, int64_t ub)
 
std::function< IntegerVariable(Model *)> NewIntegerVariable (const Domain &domain)
 
std::function< IntegerVariable(Model *)> NewIntegerVariableFromLiteral (Literal lit)
 
std::function< int64_t(const Model &)> LowerBound (IntegerVariable v)
 
std::function< int64_t(const Model &)> UpperBound (IntegerVariable v)
 
std::function< bool(const Model &)> IsFixed (IntegerVariable v)
 
std::function< int64_t(const Model &)> Value (IntegerVariable v)
 
std::function< void(Model *)> GreaterOrEqual (IntegerVariable v, int64_t lb)
 
std::function< void(Model *)> LowerOrEqual (IntegerVariable v, int64_t ub)
 
std::function< void(Model *)> Equality (IntegerVariable v, int64_t value)
 
std::function< void(Model *)> Implication (const std::vector< Literal > &enforcement_literals, IntegerLiteral i)
 
std::function< void(Model *)> ImpliesInInterval (Literal in_interval, IntegerVariable v, int64_t lb, int64_t ub)
 
std::function< std::vector< ValueLiteralPair >(Model *)> FullyEncodeVariable (IntegerVariable var)
 
std::function< void(Model *)> IsOneOf (IntegerVariable var, const std::vector< Literal > &selectors, const std::vector< IntegerValue > &values)
 
template<typename VectorInt >
std::function< void(Model *)> WeightedSumLowerOrEqual (const std::vector< IntegerVariable > &vars, const VectorInt &coefficients, int64_t upper_bound)
 
template<typename VectorInt >
std::function< void(Model *)> WeightedSumGreaterOrEqual (const std::vector< IntegerVariable > &vars, const VectorInt &coefficients, int64_t lower_bound)
 
template<typename VectorInt >
std::function< void(Model *)> FixedWeightedSum (const std::vector< IntegerVariable > &vars, const VectorInt &coefficients, int64_t value)
 
template<typename VectorInt >
std::function< void(Model *)> ConditionalWeightedSumLowerOrEqual (const std::vector< Literal > &enforcement_literals, const std::vector< IntegerVariable > &vars, const VectorInt &coefficients, int64_t upper_bound)
 
template<typename VectorInt >
std::function< void(Model *)> ConditionalWeightedSumGreaterOrEqual (const std::vector< Literal > &enforcement_literals, const std::vector< IntegerVariable > &vars, const VectorInt &coefficients, int64_t lower_bound)
 
template<typename VectorInt >
std::function< void(Model *)> WeightedSumLowerOrEqualReif (Literal is_le, const std::vector< IntegerVariable > &vars, const VectorInt &coefficients, int64_t upper_bound)
 
template<typename VectorInt >
std::function< void(Model *)> WeightedSumGreaterOrEqualReif (Literal is_ge, const std::vector< IntegerVariable > &vars, const VectorInt &coefficients, int64_t lower_bound)
 
void LoadLinearConstraint (const LinearConstraint &cst, Model *model)
 
void LoadConditionalLinearConstraint (const absl::Span< const Literal > enforcement_literals, const LinearConstraint &cst, Model *model)
 
template<typename VectorInt >
std::function< void(Model *)> FixedWeightedSumReif (Literal is_eq, const std::vector< IntegerVariable > &vars, const VectorInt &coefficients, int64_t value)
 
template<typename VectorInt >
std::function< void(Model *)> WeightedSumNotEqual (const std::vector< IntegerVariable > &vars, const VectorInt &coefficients, int64_t value)
 
template<typename VectorInt >
std::function< IntegerVariable(Model *)> NewWeightedSum (const VectorInt &coefficients, const std::vector< IntegerVariable > &vars)
 
std::function< void(Model *)> IsEqualToMinOf (IntegerVariable min_var, const std::vector< IntegerVariable > &vars)
 
std::function< void(Model *)> IsEqualToMinOf (const LinearExpression &min_expr, const std::vector< LinearExpression > &exprs)
 
std::function< void(Model *)> IsEqualToMaxOf (IntegerVariable max_var, const std::vector< IntegerVariable > &vars)
 
template<class T >
void RegisterAndTransferOwnership (Model *model, T *ct)
 
std::function< void(Model *)> ProductConstraint (AffineExpression a, AffineExpression b, AffineExpression p)
 
std::function< void(Model *)> DivisionConstraint (AffineExpression num, AffineExpression denom, AffineExpression div)
 
std::function< void(Model *)> FixedDivisionConstraint (AffineExpression a, IntegerValue b, AffineExpression c)
 
std::function< void(Model *)> FixedModuloConstraint (AffineExpression a, IntegerValue b, AffineExpression c)
 
IntegerLiteral AtMinValue (IntegerVariable var, IntegerTrail *integer_trail)
 
IntegerLiteral ChooseBestObjectiveValue (IntegerVariable var, Model *model)
 
IntegerLiteral GreaterOrEqualToMiddleValue (IntegerVariable var, IntegerTrail *integer_trail)
 
IntegerLiteral SplitAroundGivenValue (IntegerVariable var, IntegerValue value, Model *model)
 
IntegerLiteral SplitAroundLpValue (IntegerVariable var, Model *model)
 
IntegerLiteral SplitUsingBestSolutionValueInRepository (IntegerVariable var, const SharedSolutionRepository< int64_t > &solution_repo, Model *model)
 
std::function< BooleanOrIntegerLiteral()> FirstUnassignedVarAtItsMinHeuristic (const std::vector< IntegerVariable > &vars, Model *model)
 
std::function< BooleanOrIntegerLiteral()> UnassignedVarWithLowestMinAtItsMinHeuristic (const std::vector< IntegerVariable > &vars, Model *model)
 
std::function< BooleanOrIntegerLiteral()> SequentialSearch (std::vector< std::function< BooleanOrIntegerLiteral()> > heuristics)
 
std::function< BooleanOrIntegerLiteral()> SequentialValueSelection (std::vector< std::function< IntegerLiteral(IntegerVariable)> > value_selection_heuristics, std::function< BooleanOrIntegerLiteral()> var_selection_heuristic, Model *model)
 
bool LinearizedPartIsLarge (Model *model)
 
std::function< BooleanOrIntegerLiteral()> IntegerValueSelectionHeuristic (std::function< BooleanOrIntegerLiteral()> var_selection_heuristic, Model *model)
 
std::function< BooleanOrIntegerLiteral()> SatSolverHeuristic (Model *model)
 
std::function< BooleanOrIntegerLiteral()> PseudoCost (Model *model)
 
std::function< BooleanOrIntegerLiteral()> SchedulingSearchHeuristic (Model *model)
 
std::function< BooleanOrIntegerLiteral()> RandomizeOnRestartHeuristic (Model *model)
 
std::function< BooleanOrIntegerLiteral()> FollowHint (const std::vector< BooleanOrIntegerVariable > &vars, const std::vector< IntegerValue > &values, Model *model)
 
std::function< bool()> RestartEveryKFailures (int k, SatSolver *solver)
 
std::function< bool()> SatSolverRestartPolicy (Model *model)
 
void ConfigureSearchHeuristics (Model *model)
 
std::vector< std::function< BooleanOrIntegerLiteral()> > CompleteHeuristics (const std::vector< std::function< BooleanOrIntegerLiteral()> > &incomplete_heuristics, const std::function< BooleanOrIntegerLiteral()> &completion_heuristic)
 
SatSolver::Status SolveIntegerProblem (Model *model)
 
SatSolver::Status ResetAndSolveIntegerProblem (const std::vector< Literal > &assumptions, Model *model)
 
SatSolver::Status SolveIntegerProblemWithLazyEncoding (Model *model)
 
IntegerLiteral SplitDomainUsingBestSolutionValue (IntegerVariable var, Model *model)
 
SatSolver::Status ContinuousProbing (const std::vector< BooleanVariable > &bool_vars, const std::vector< IntegerVariable > &int_vars, Model *model)
 
 DEFINE_STRONG_INDEX_TYPE (IntervalVariable)
 
const IntervalVariable kNoIntervalVariable (-1)
 
std::function< IntegerVariable(const Model &)> StartVar (IntervalVariable v)
 
std::function< IntegerVariable(const Model &)> EndVar (IntervalVariable v)
 
std::function< IntegerVariable(const Model &)> SizeVar (IntervalVariable v)
 
std::function< int64_t(const Model &)> MinSize (IntervalVariable v)
 
std::function< int64_t(const Model &)> MaxSize (IntervalVariable v)
 
std::function< bool(const Model &)> IsOptional (IntervalVariable v)
 
std::function< Literal(const Model &)> IsPresentLiteral (IntervalVariable v)
 
std::function< IntervalVariable(Model *)> NewInterval (int64_t min_start, int64_t max_end, int64_t size)
 
std::function< IntervalVariable(Model *)> NewInterval (IntegerVariable start, IntegerVariable end, IntegerVariable size)
 
std::function< IntervalVariable(Model *)> NewIntervalWithVariableSize (int64_t min_start, int64_t max_end, int64_t min_size, int64_t max_size)
 
std::function< IntervalVariable(Model *)> NewOptionalInterval (int64_t min_start, int64_t max_end, int64_t size, Literal is_present)
 
std::function< IntervalVariable(Model *)> NewOptionalIntervalWithOptionalVariables (int64_t min_start, int64_t max_end, int64_t size, Literal is_present)
 
std::function< IntervalVariable(Model *)> NewOptionalInterval (IntegerVariable start, IntegerVariable end, IntegerVariable size, Literal is_present)
 
std::function< IntervalVariable(Model *)> NewOptionalIntervalWithVariableSize (int64_t min_start, int64_t max_end, int64_t min_size, int64_t max_size, Literal is_present)
 
std::function< void(Model *)> IntervalWithAlternatives (IntervalVariable parent, const std::vector< IntervalVariable > &members)
 
double ComputeActivity (const LinearConstraint &constraint, const absl::StrongVector< IntegerVariable, double > &values)
 
double ComputeL2Norm (const LinearConstraint &constraint)
 
IntegerValue ComputeInfinityNorm (const LinearConstraint &constraint)
 
double ScalarProduct (const LinearConstraint &constraint1, const LinearConstraint &constraint2)
 
void DivideByGCD (LinearConstraint *constraint)
 
void RemoveZeroTerms (LinearConstraint *constraint)
 
void MakeAllCoefficientsPositive (LinearConstraint *constraint)
 
void MakeAllVariablesPositive (LinearConstraint *constraint)
 
void CanonicalizeConstraint (LinearConstraint *ct)
 
bool NoDuplicateVariable (const LinearConstraint &ct)
 
LinearExpression CanonicalizeExpr (const LinearExpression &expr)
 
IntegerValue LinExprLowerBound (const LinearExpression &expr, const IntegerTrail &integer_trail)
 
IntegerValue LinExprUpperBound (const LinearExpression &expr, const IntegerTrail &integer_trail)
 
bool ValidateLinearConstraintForOverflow (const LinearConstraint &constraint, const IntegerTrail &integer_trail)
 
LinearExpression NegationOf (const LinearExpression &expr)
 
LinearExpression PositiveVarExpr (const LinearExpression &expr)
 
IntegerValue GetCoefficient (const IntegerVariable var, const LinearExpression &expr)
 
IntegerValue GetCoefficientOfPositiveVar (const IntegerVariable var, const LinearExpression &expr)
 
std::ostream & operator<< (std::ostream &os, const LinearConstraint &ct)
 
template<class ClassWithVarsAndCoeffs >
void CleanTermsAndFillConstraint (std::vector< std::pair< IntegerVariable, IntegerValue > > *terms, ClassWithVarsAndCoeffs *output)
 
void SeparateSubtourInequalities (int num_nodes, const std::vector< int > &tails, const std::vector< int > &heads, const std::vector< Literal > &literals, const absl::StrongVector< IntegerVariable, double > &lp_values, absl::Span< const int64_t > demands, int64_t capacity, LinearConstraintManager *manager, Model *model)
 
CutGenerator CreateStronglyConnectedGraphCutGenerator (int num_nodes, const std::vector< int > &tails, const std::vector< int > &heads, const std::vector< Literal > &literals, Model *model)
 
CutGenerator CreateCVRPCutGenerator (int num_nodes, const std::vector< int > &tails, const std::vector< int > &heads, const std::vector< Literal > &literals, const std::vector< int64_t > &demands, int64_t capacity, Model *model)
 
bool AppendFullEncodingRelaxation (IntegerVariable var, const Model &model, LinearRelaxation *relaxation)
 
void AppendRelaxationForEqualityEncoding (IntegerVariable var, const Model &model, LinearRelaxation *relaxation, int *num_tight, int *num_loose)
 
void AppendPartialGreaterThanEncodingRelaxation (IntegerVariable var, const Model &model, LinearRelaxation *relaxation)
 
void AppendBoolOrRelaxation (const ConstraintProto &ct, Model *model, LinearRelaxation *relaxation)
 
void AppendBoolAndRelaxation (const ConstraintProto &ct, Model *model, LinearRelaxation *relaxation)
 
void AppendAtMostOneRelaxation (const ConstraintProto &ct, Model *model, LinearRelaxation *relaxation)
 
void AppendExactlyOneRelaxation (const ConstraintProto &ct, Model *model, LinearRelaxation *relaxation)
 
std::vector< LiteralCreateAlternativeLiteralsWithView (int num_literals, Model *model, LinearRelaxation *relaxation)
 
void AppendCircuitRelaxation (const ConstraintProto &ct, Model *model, LinearRelaxation *relaxation)
 
void AppendRoutesRelaxation (const ConstraintProto &ct, Model *model, LinearRelaxation *relaxation)
 
void AddCumulativeRelaxation (const std::vector< IntervalVariable > &intervals, const std::vector< AffineExpression > &demands, const std::vector< LinearExpression > &energies, IntegerValue capacity_upper_bound, Model *model, LinearRelaxation *relaxation)
 
void AppendCumulativeRelaxation (const CpModelProto &model_proto, const ConstraintProto &ct, Model *model, LinearRelaxation *relaxation)
 
void AppendNoOverlapRelaxation (const CpModelProto &model_proto, const ConstraintProto &ct, Model *model, LinearRelaxation *relaxation)
 
void AppendNoOverlap2dRelaxation (const ConstraintProto &ct, Model *model, LinearRelaxation *relaxation)
 
void AppendLinMaxRelaxationPart1 (const ConstraintProto &ct, Model *model, LinearRelaxation *relaxation)
 
void AppendMaxAffineRelaxation (const ConstraintProto &ct, Model *model, LinearRelaxation *relaxation)
 
void AddMaxAffineCutGenerator (const ConstraintProto &ct, Model *model, LinearRelaxation *relaxation)
 
void AppendLinMaxRelaxationPart2 (IntegerVariable target, const std::vector< Literal > &alternative_literals, const std::vector< LinearExpression > &exprs, Model *model, LinearRelaxation *relaxation)
 
void AppendLinearConstraintRelaxation (const ConstraintProto &ct, bool linearize_enforced_constraints, Model *model, LinearRelaxation *relaxation)
 
void TryToLinearizeConstraint (const CpModelProto &model_proto, const ConstraintProto &ct, int linearization_level, Model *model, LinearRelaxation *relaxation)
 
void AddCircuitCutGenerator (const ConstraintProto &ct, Model *m, LinearRelaxation *relaxation)
 
void AddRoutesCutGenerator (const ConstraintProto &ct, Model *m, LinearRelaxation *relaxation)
 
void AddIntProdCutGenerator (const ConstraintProto &ct, int linearization_level, Model *m, LinearRelaxation *relaxation)
 
void AddAllDiffCutGenerator (const ConstraintProto &ct, Model *m, LinearRelaxation *relaxation)
 
bool IntervalIsVariable (const IntervalVariable interval, IntervalsRepository *intervals_repository)
 
void AddCumulativeCutGenerator (const ConstraintProto &ct, Model *m, LinearRelaxation *relaxation)
 
void AddNoOverlapCutGenerator (const ConstraintProto &ct, Model *m, LinearRelaxation *relaxation)
 
void AddNoOverlap2dCutGenerator (const ConstraintProto &ct, Model *m, LinearRelaxation *relaxation)
 
void AddLinMaxCutGenerator (const ConstraintProto &ct, Model *m, LinearRelaxation *relaxation)
 
void AppendElementEncodingRelaxation (const CpModelProto &model_proto, Model *m, LinearRelaxation *relaxation)
 
LinearRelaxation ComputeLinearRelaxation (const CpModelProto &model_proto, Model *m)
 
std::vector< double > ScaleContinuousVariables (double scaling, double max_bound, MPModelProto *mp_model)
 
int FindRationalFactor (double x, int limit, double tolerance)
 
bool MakeBoundsOfIntegerVariablesInteger (const SatParameters &params, MPModelProto *mp_model, SolverLogger *logger)
 
void RemoveNearZeroTerms (const SatParameters &params, MPModelProto *mp_model, SolverLogger *logger)
 
bool MPModelProtoValidationBeforeConversion (const SatParameters &params, const MPModelProto &mp_model, SolverLogger *logger)
 
std::vector< double > DetectImpliedIntegers (MPModelProto *mp_model, SolverLogger *logger)
 
bool ConvertMPModelProtoToCpModelProto (const SatParameters &params, const MPModelProto &mp_model, CpModelProto *cp_model, SolverLogger *logger)
 
bool ConvertCpModelProtoToMPModelProto (const CpModelProto &input, MPModelProto *output)
 
bool ScaleAndSetObjective (const SatParameters &params, const std::vector< std::pair< int, double > > &objective, double objective_offset, bool maximize, CpModelProto *cp_model, SolverLogger *logger)
 
bool ConvertBinaryMPModelProtoToBooleanProblem (const MPModelProto &mp_model, LinearBooleanProblem *problem)
 
void ConvertBooleanProblemToLinearProgram (const LinearBooleanProblem &problem, glop::LinearProgram *lp)
 
double ComputeTrueObjectiveLowerBound (const CpModelProto &model_proto_with_floating_point_objective, const CpObjectiveProto &integer_objective, const int64_t inner_integer_objective_lower_bound)
 
void MinimizeCoreWithPropagation (TimeLimit *limit, SatSolver *solver, std::vector< Literal > *core)
 
SatSolver::Status SolveWithFuMalik (LogBehavior log, const LinearBooleanProblem &problem, SatSolver *solver, std::vector< bool > *solution)
 
SatSolver::Status SolveWithWPM1 (LogBehavior log, const LinearBooleanProblem &problem, SatSolver *solver, std::vector< bool > *solution)
 
SatSolver::Status SolveWithRandomParameters (LogBehavior log, const LinearBooleanProblem &problem, int num_times, absl::BitGenRef random, SatSolver *solver, std::vector< bool > *solution)
 
SatSolver::Status SolveWithLinearScan (LogBehavior log, const LinearBooleanProblem &problem, SatSolver *solver, std::vector< bool > *solution)
 
SatSolver::Status SolveWithCardinalityEncoding (LogBehavior log, const LinearBooleanProblem &problem, SatSolver *solver, std::vector< bool > *solution)
 
SatSolver::Status SolveWithCardinalityEncodingAndCore (LogBehavior log, const LinearBooleanProblem &problem, SatSolver *solver, std::vector< bool > *solution)
 
SatSolver::Status MinimizeIntegerVariableWithLinearScanAndLazyEncoding (IntegerVariable objective_var, const std::function< void()> &feasible_solution_observer, Model *model)
 
void RestrictObjectiveDomainWithBinarySearch (IntegerVariable objective_var, const std::function< void()> &feasible_solution_observer, Model *model)
 
std::string ValidateParameters (const SatParameters &params)
 
bool ComputeBooleanLinearExpressionCanonicalForm (std::vector< LiteralWithCoeff > *cst, Coefficient *bound_shift, Coefficient *max_value)
 
bool ApplyLiteralMapping (const absl::StrongVector< LiteralIndex, LiteralIndex > &mapping, std::vector< LiteralWithCoeff > *cst, Coefficient *bound_shift, Coefficient *max_value)
 
bool BooleanLinearExpressionIsCanonical (const std::vector< LiteralWithCoeff > &cst)
 
void SimplifyCanonicalBooleanLinearConstraint (std::vector< LiteralWithCoeff > *cst, Coefficient *rhs)
 
Coefficient ComputeCanonicalRhs (Coefficient upper_bound, Coefficient bound_shift, Coefficient max_value)
 
Coefficient ComputeNegatedCanonicalRhs (Coefficient lower_bound, Coefficient bound_shift, Coefficient max_value)
 
 DEFINE_STRONG_INT64_TYPE (Coefficient)
 
const Coefficient kCoefficientMax (std::numeric_limits< Coefficient::ValueType >::max())
 
template<typename H >
AbslHashValue (H h, const LiteralWithCoeff &term)
 
std::ostream & operator<< (std::ostream &os, LiteralWithCoeff term)
 
std::function< void(Model *)> LowerOrEqual (IntegerVariable a, IntegerVariable b)
 
std::function< void(Model *)> LowerOrEqualWithOffset (IntegerVariable a, IntegerVariable b, int64_t offset)
 
std::function< void(Model *)> Sum2LowerOrEqual (IntegerVariable a, IntegerVariable b, int64_t ub)
 
std::function< void(Model *)> ConditionalSum2LowerOrEqual (IntegerVariable a, IntegerVariable b, int64_t ub, const std::vector< Literal > &enforcement_literals)
 
std::function< void(Model *)> Sum3LowerOrEqual (IntegerVariable a, IntegerVariable b, IntegerVariable c, int64_t ub)
 
std::function< void(Model *)> ConditionalSum3LowerOrEqual (IntegerVariable a, IntegerVariable b, IntegerVariable c, int64_t ub, const std::vector< Literal > &enforcement_literals)
 
std::function< void(Model *)> GreaterOrEqual (IntegerVariable a, IntegerVariable b)
 
std::function< void(Model *)> Equality (IntegerVariable a, IntegerVariable b)
 
std::function< void(Model *)> EqualityWithOffset (IntegerVariable a, IntegerVariable b, int64_t offset)
 
std::function< void(Model *)> ConditionalLowerOrEqualWithOffset (IntegerVariable a, IntegerVariable b, int64_t offset, Literal is_le)
 
std::function< void(Model *)> ConditionalLowerOrEqual (IntegerVariable a, IntegerVariable b, Literal is_le)
 
std::function< void(Model *)> ConditionalLowerOrEqual (IntegerVariable a, IntegerVariable b, absl::Span< const Literal > literals)
 
std::function< void(Model *)> ReifiedLowerOrEqualWithOffset (IntegerVariable a, IntegerVariable b, int64_t offset, Literal is_le)
 
std::function< void(Model *)> ReifiedEquality (IntegerVariable a, IntegerVariable b, Literal is_eq)
 
std::function< void(Model *)> ReifiedEqualityWithOffset (IntegerVariable a, IntegerVariable b, int64_t offset, Literal is_eq)
 
std::function< void(Model *)> NotEqual (IntegerVariable a, IntegerVariable b)
 
bool LoadModelForProbing (PresolveContext *context, Model *local_model)
 
bool SubstituteVariable (int var, int64_t var_coeff_in_definition, const ConstraintProto &definition, ConstraintProto *ct)
 
bool LookForTrivialSatSolution (double deterministic_time_limit, Model *model)
 
bool FailedLiteralProbingRound (ProbingOptions options, Model *model)
 
std::vector< PseudoCosts::VariableBoundChangeGetBoundChanges (LiteralIndex decision, Model *model)
 
int SUniv (int i)
 
void RecordLPRelaxationValues (Model *model)
 
RINSNeighborhood GetRINSNeighborhood (const SharedResponseManager *response_manager, const SharedRelaxationSolutionRepository *relaxation_solutions, const SharedLPSolutionRepository *lp_solutions, SharedIncompleteSolutionManager *incomplete_solutions, absl::BitGenRef random)
 
 DEFINE_STRONG_INDEX_TYPE (BooleanVariable)
 
const BooleanVariable kNoBooleanVariable (-1)
 
 DEFINE_STRONG_INDEX_TYPE (LiteralIndex)
 
const LiteralIndex kNoLiteralIndex (-1)
 
const LiteralIndex kTrueLiteralIndex (-2)
 
const LiteralIndex kFalseLiteralIndex (-3)
 
std::ostream & operator<< (std::ostream &os, Literal literal)
 
std::ostream & operator<< (std::ostream &os, absl::Span< const Literal > literals)
 
std::string SatStatusString (SatSolver::Status status)
 
void MinimizeCore (SatSolver *solver, std::vector< Literal > *core)
 
std::function< void(Model *)> BooleanLinearConstraint (int64_t lower_bound, int64_t upper_bound, std::vector< LiteralWithCoeff > *cst)
 
std::function< void(Model *)> CardinalityConstraint (int64_t lower_bound, int64_t upper_bound, const std::vector< Literal > &literals)
 
std::function< void(Model *)> ExactlyOneConstraint (const std::vector< Literal > &literals)
 
std::function< void(Model *)> AtMostOneConstraint (const std::vector< Literal > &literals)
 
std::function< void(Model *)> ClauseConstraint (absl::Span< const Literal > literals)
 
std::function< void(Model *)> Implication (Literal a, Literal b)
 
std::function< void(Model *)> Equality (Literal a, Literal b)
 
std::function< void(Model *)> ReifiedBoolOr (const std::vector< Literal > &literals, Literal r)
 
std::function< void(Model *)> EnforcedClause (absl::Span< const Literal > enforcement_literals, absl::Span< const Literal > clause)
 
std::function< void(Model *)> ReifiedBoolAnd (const std::vector< Literal > &literals, Literal r)
 
std::function< void(Model *)> ReifiedBoolLe (Literal a, Literal b, Literal r)
 
std::function< int64_t(const Model &)> Value (Literal l)
 
std::function< int64_t(const Model &)> Value (BooleanVariable b)
 
std::function< void(Model *)> ExcludeCurrentSolutionAndBacktrack ()
 
std::ostream & operator<< (std::ostream &os, SatSolver::Status status)
 
std::function< void(Model *)> EqualMinOfSelectedVariables (Literal enforcement_literal, AffineExpression target, const std::vector< AffineExpression > &exprs, const std::vector< Literal > &selectors)
 
std::function< void(Model *)> EqualMaxOfSelectedVariables (Literal enforcement_literal, AffineExpression target, const std::vector< AffineExpression > &exprs, const std::vector< Literal > &selectors)
 
std::function< void(Model *)> SpanOfIntervals (IntervalVariable span, const std::vector< IntervalVariable > &intervals)
 
void GenerateEnergeticCuts (const std::string &cut_name, const absl::StrongVector< IntegerVariable, double > &lp_values, std::vector< EnergyEvent > events, const AffineExpression capacity, bool events_are_2d, Model *model, LinearConstraintManager *manager)
 
void AppendVariablesToCumulativeCut (const AffineExpression &capacity, const std::vector< AffineExpression > &demands, IntegerTrail *integer_trail, CutGenerator *result)
 
double ComputeEnergyLp (const EnergyEvent &e, const absl::StrongVector< IntegerVariable, double > &lp_values, IntegerTrail *integer_trail)
 
CutGenerator CreateCumulativeEnergyCutGenerator (const std::vector< IntervalVariable > &intervals, const AffineExpression &capacity, const std::vector< AffineExpression > &demands, const std::vector< LinearExpression > &energies, Model *model)
 
CutGenerator CreateNoOverlapEnergyCutGenerator (const std::vector< IntervalVariable > &intervals, Model *model)
 
void GenerateNoOverlap2dEnergyCut (const std::vector< LinearExpression > &energies, absl::Span< int > rectangles, const std::string &cut_name, const absl::StrongVector< IntegerVariable, double > &lp_values, Model *model, IntegerTrail *integer_trail, IntegerEncoder *encoder, LinearConstraintManager *manager, SchedulingConstraintHelper *x_helper, SchedulingConstraintHelper *y_helper)
 
CutGenerator CreateNoOverlap2dEnergyCutGenerator (const std::vector< IntervalVariable > &x_intervals, const std::vector< IntervalVariable > &y_intervals, Model *model)
 
CutGenerator CreateCumulativeTimeTableCutGenerator (const std::vector< IntervalVariable > &intervals, const AffineExpression &capacity, const std::vector< AffineExpression > &demands, Model *model)
 
void GeneratePrecedenceCuts (const std::string &cut_name, const absl::StrongVector< IntegerVariable, double > &lp_values, std::vector< PrecedenceEvent > events, IntegerValue capacity_max, Model *model, LinearConstraintManager *manager)
 
CutGenerator CreateCumulativePrecedenceCutGenerator (const std::vector< IntervalVariable > &intervals, const AffineExpression &capacity, const std::vector< AffineExpression > &demands, Model *model)
 
CutGenerator CreateNoOverlapPrecedenceCutGenerator (const std::vector< IntervalVariable > &intervals, Model *model)
 
void GenerateCompletionTimeCuts (const std::string &cut_name, const absl::StrongVector< IntegerVariable, double > &lp_values, std::vector< CtEvent > events, bool use_lifting, Model *model, LinearConstraintManager *manager)
 
CutGenerator CreateNoOverlapCompletionTimeCutGenerator (const std::vector< IntervalVariable > &intervals, Model *model)
 
CutGenerator CreateCumulativeCompletionTimeCutGenerator (const std::vector< IntervalVariable > &intervals, const AffineExpression &capacity, const std::vector< AffineExpression > &demands, const std::vector< LinearExpression > &energies, Model *model)
 
CutGenerator CreateNoOverlap2dCompletionTimeCutGenerator (const std::vector< IntervalVariable > &x_intervals, const std::vector< IntervalVariable > &y_intervals, Model *model)
 
bool SimplifyClause (const std::vector< Literal > &a, std::vector< Literal > *b, LiteralIndex *opposite_literal, int64_t *num_inspected_literals)
 
LiteralIndex DifferAtGivenLiteral (const std::vector< Literal > &a, const std::vector< Literal > &b, Literal l)
 
bool ComputeResolvant (Literal x, const std::vector< Literal > &a, const std::vector< Literal > &b, std::vector< Literal > *out)
 
int ComputeResolvantSize (Literal x, const std::vector< Literal > &a, const std::vector< Literal > &b)
 
void ProbeAndFindEquivalentLiteral (SatSolver *solver, SatPostsolver *postsolver, DratProofHandler *drat_proof_handler, absl::StrongVector< LiteralIndex, LiteralIndex > *mapping)
 
SatSolver::Status SolveWithPresolve (std::unique_ptr< SatSolver > *solver, TimeLimit *time_limit, std::vector< bool > *solution, DratProofHandler *drat_proof_handler, SolverLogger *logger)
 
void SequentialLoop (const std::vector< std::unique_ptr< SubSolver > > &subsolvers)
 
void DeterministicLoop (const std::vector< std::unique_ptr< SubSolver > > &subsolvers, int num_threads, int batch_size)
 
void NonDeterministicLoop (const std::vector< std::unique_ptr< SubSolver > > &subsolvers, int num_threads)
 
std::vector< std::vector< int > > BasicOrbitopeExtraction (const std::vector< std::unique_ptr< SparsePermutation > > &generators)
 
std::vector< int > GetOrbits (int n, const std::vector< std::unique_ptr< SparsePermutation > > &generators)
 
std::vector< int > GetOrbitopeOrbits (int n, const std::vector< std::vector< int > > &orbitope)
 
void TransformToGeneratorOfStabilizer (int to_stabilize, std::vector< std::unique_ptr< SparsePermutation > > *generators)
 
std::string ExtractSubSolverName (const std::string &improvement_info)
 
std::function< void(Model *)> LiteralTableConstraint (const std::vector< std::vector< Literal > > &literal_tuples, const std::vector< Literal > &line_literals)
 
template<typename IntegerType >
constexpr IntegerType IntegerTypeMinimumValue ()
 
template<>
constexpr IntegerValue IntegerTypeMinimumValue ()
 
void AddReservoirConstraint (std::vector< AffineExpression > times, std::vector< IntegerValue > deltas, std::vector< Literal > presences, int64_t min_level, int64_t max_level, Model *model)
 
void RandomizeDecisionHeuristic (absl::BitGenRef random, SatParameters *parameters)
 
int64_t ModularInverse (int64_t x, int64_t m)
 
int64_t PositiveMod (int64_t x, int64_t m)
 
int64_t ProductWithModularInverse (int64_t coeff, int64_t mod, int64_t rhs)
 
bool SolveDiophantineEquationOfSizeTwo (int64_t &a, int64_t &b, int64_t &cte, int64_t &x0, int64_t &y0)
 
int64_t FloorSquareRoot (int64_t a)
 
int64_t CeilSquareRoot (int64_t a)
 
int64_t ClosestMultiple (int64_t value, int64_t base)
 
bool LinearInequalityCanBeReducedWithClosestMultiple (int64_t base, const std::vector< int64_t > &coeffs, const std::vector< int64_t > &lbs, const std::vector< int64_t > &ubs, int64_t rhs, int64_t *new_rhs)
 
int MoveOneUnprocessedLiteralLast (const absl::btree_set< LiteralIndex > &processed, int relevant_prefix_size, std::vector< Literal > *literals)
 
void CompressTuples (absl::Span< const int64_t > domain_sizes, int64_t any_value, std::vector< std::vector< int64_t > > *tuples)
 
void DetectDominanceRelations (const PresolveContext &context, VarDomination *var_domination, DualBoundStrengthening *dual_bound_strengthening)
 
bool ExploitDominanceRelations (const VarDomination &var_domination, PresolveContext *context)
 

Variables

constexpr int kObjectiveConstraint = -1
 
constexpr int kAffineRelationConstraint = -2
 
constexpr int kAssumptionsConstraint = -3
 
const int kUnsatTrailIndex = -1
 

Typedef Documentation

◆ InlinedIntegerLiteralVector

using InlinedIntegerLiteralVector = absl::InlinedVector<IntegerLiteral, 2>

Definition at line 226 of file integer.h.

Enumeration Type Documentation

◆ LogBehavior

Enumerator
DEFAULT_LOG 
STDOUT_LOG 

Definition at line 51 of file optimization.h.

◆ SatFormat

enum SatFormat
Enumerator
DIMACS 
DRAT 

Definition at line 330 of file drat_checker.h.

Function Documentation

◆ AbslHashValue()

H operations_research::sat::AbslHashValue ( h,
const LiteralWithCoeff term 
)

Definition at line 64 of file pb_constraint.h.

◆ AddAllDiffCutGenerator()

void AddAllDiffCutGenerator ( const ConstraintProto &  ct,
Model m,
LinearRelaxation relaxation 
)

Definition at line 1222 of file linear_relaxation.cc.

◆ AddCircuitCutGenerator()

void AddCircuitCutGenerator ( const ConstraintProto &  ct,
Model m,
LinearRelaxation relaxation 
)

Definition at line 1131 of file linear_relaxation.cc.

◆ AddCumulativeCutGenerator()

void AddCumulativeCutGenerator ( const ConstraintProto &  ct,
Model m,
LinearRelaxation relaxation 
)

Definition at line 1259 of file linear_relaxation.cc.

◆ AddCumulativeEnergyConstraint()

void AddCumulativeEnergyConstraint ( std::vector< AffineExpression energies,
AffineExpression  capacity,
SchedulingConstraintHelper helper,
Model model 
)

Definition at line 31 of file cumulative_energy.cc.

◆ AddCumulativeOverloadChecker()

void AddCumulativeOverloadChecker ( const std::vector< AffineExpression > &  demands,
AffineExpression  capacity,
SchedulingConstraintHelper helper,
Model model 
)

Definition at line 44 of file cumulative_energy.cc.

◆ AddCumulativeRelaxation()

void operations_research::sat::AddCumulativeRelaxation ( const std::vector< IntervalVariable > &  intervals,
const std::vector< AffineExpression > &  demands,
const std::vector< LinearExpression > &  energies,
IntegerValue  capacity_upper_bound,
Model model,
LinearRelaxation relaxation 
)

Definition at line 618 of file linear_relaxation.cc.

◆ AddDiffnCumulativeRelationOnX()

void AddDiffnCumulativeRelationOnX ( const std::vector< IntervalVariable > &  x_intervals,
SchedulingConstraintHelper x,
SchedulingConstraintHelper y,
Model model 
)

Definition at line 87 of file sat/diffn.cc.

◆ AddFullEncodingFromSearchBranching()

void AddFullEncodingFromSearchBranching ( const CpModelProto &  model_proto,
Model m 
)

Definition at line 842 of file cp_model_loader.cc.

◆ AddInferedAndDeletedClauses()

bool AddInferedAndDeletedClauses ( const std::string &  file_path,
DratChecker drat_checker 
)

Definition at line 564 of file drat_checker.cc.

◆ AddIntProdCutGenerator()

void AddIntProdCutGenerator ( const ConstraintProto &  ct,
int  linearization_level,
Model m,
LinearRelaxation relaxation 
)

Definition at line 1171 of file linear_relaxation.cc.

◆ AddLinearExpressionToLinearConstraint()

void AddLinearExpressionToLinearConstraint ( const LinearExpressionProto &  expr,
int64_t  coefficient,
LinearConstraintProto *  linear 
)

Definition at line 541 of file cp_model_utils.cc.

◆ AddLinMaxCutGenerator()

void AddLinMaxCutGenerator ( const ConstraintProto &  ct,
Model m,
LinearRelaxation relaxation 
)

Definition at line 1383 of file linear_relaxation.cc.

◆ AddMaxAffineCutGenerator()

void operations_research::sat::AddMaxAffineCutGenerator ( const ConstraintProto &  ct,
Model model,
LinearRelaxation relaxation 
)

Definition at line 860 of file linear_relaxation.cc.

◆ AddNoOverlap2dCutGenerator()

void AddNoOverlap2dCutGenerator ( const ConstraintProto &  ct,
Model m,
LinearRelaxation relaxation 
)

Definition at line 1338 of file linear_relaxation.cc.

◆ AddNoOverlapCutGenerator()

void AddNoOverlapCutGenerator ( const ConstraintProto &  ct,
Model m,
LinearRelaxation relaxation 
)

Definition at line 1310 of file linear_relaxation.cc.

◆ AddObjectiveConstraint()

bool AddObjectiveConstraint ( const LinearBooleanProblem &  problem,
bool  use_lower_bound,
Coefficient  lower_bound,
bool  use_upper_bound,
Coefficient  upper_bound,
SatSolver solver 
)

Definition at line 349 of file boolean_problem.cc.

◆ AddObjectiveUpperBound()

bool AddObjectiveUpperBound ( const LinearBooleanProblem &  problem,
Coefficient  upper_bound,
SatSolver solver 
)

Definition at line 341 of file boolean_problem.cc.

◆ AddOffsetAndScaleObjectiveValue()

double operations_research::sat::AddOffsetAndScaleObjectiveValue ( const LinearBooleanProblem &  problem,
Coefficient  v 
)
inline

Definition at line 39 of file boolean_problem.h.

◆ AddProblemClauses()

bool AddProblemClauses ( const std::string &  file_path,
DratChecker drat_checker 
)

Definition at line 515 of file drat_checker.cc.

◆ AddProductTo()

bool operations_research::sat::AddProductTo ( IntegerValue  a,
IntegerValue  b,
IntegerValue *  result 
)
inline

Definition at line 121 of file integer.h.

◆ AddReservoirConstraint()

void AddReservoirConstraint ( std::vector< AffineExpression times,
std::vector< IntegerValue >  deltas,
std::vector< Literal presences,
int64_t  min_level,
int64_t  max_level,
Model model 
)

Definition at line 32 of file timetable.cc.

◆ AddRoutesCutGenerator()

void AddRoutesCutGenerator ( const ConstraintProto &  ct,
Model m,
LinearRelaxation relaxation 
)

Definition at line 1145 of file linear_relaxation.cc.

◆ AllDifferentAC()

std::function< void(Model *)> AllDifferentAC ( const std::vector< IntegerVariable > &  variables)

Definition at line 98 of file all_different.cc.

◆ AllDifferentBinary()

std::function< void(Model *)> AllDifferentBinary ( const std::vector< IntegerVariable > &  vars)

Definition at line 37 of file all_different.cc.

◆ AllDifferentOnBounds() [1/2]

std::function< void(Model *)> AllDifferentOnBounds ( const std::vector< AffineExpression > &  expressions)

Definition at line 71 of file all_different.cc.

◆ AllDifferentOnBounds() [2/2]

std::function< void(Model *)> AllDifferentOnBounds ( const std::vector< IntegerVariable > &  vars)

Definition at line 82 of file all_different.cc.

◆ AllValuesInDomain()

std::vector< int64_t > operations_research::sat::AllValuesInDomain ( const ProtoWithDomain &  proto)

Definition at line 118 of file cp_model_utils.h.

◆ AnalyzeIntervals()

bool AnalyzeIntervals ( bool  transpose,
absl::Span< const int >  local_boxes,
const std::vector< Rectangle > &  rectangles,
const std::vector< IntegerValue > &  rectangle_energies,
IntegerValue *  x_threshold,
IntegerValue *  y_threshold,
Rectangle conflict 
)

Definition at line 165 of file diffn_util.cc.

◆ AppendAtMostOneRelaxation()

void AppendAtMostOneRelaxation ( const ConstraintProto &  ct,
Model model,
LinearRelaxation relaxation 
)

Definition at line 453 of file linear_relaxation.cc.

◆ AppendBoolAndRelaxation()

void AppendBoolAndRelaxation ( const ConstraintProto &  ct,
Model model,
LinearRelaxation relaxation 
)

Definition at line 421 of file linear_relaxation.cc.

◆ AppendBoolOrRelaxation()

void AppendBoolOrRelaxation ( const ConstraintProto &  ct,
Model model,
LinearRelaxation relaxation 
)

Definition at line 407 of file linear_relaxation.cc.

◆ AppendCircuitRelaxation()

void AppendCircuitRelaxation ( const ConstraintProto &  ct,
Model model,
LinearRelaxation relaxation 
)

Definition at line 524 of file linear_relaxation.cc.

◆ AppendCumulativeRelaxation()

void AppendCumulativeRelaxation ( const CpModelProto &  model_proto,
const ConstraintProto &  ct,
Model model,
LinearRelaxation relaxation 
)

Definition at line 706 of file linear_relaxation.cc.

◆ AppendElementEncodingRelaxation()

void operations_research::sat::AppendElementEncodingRelaxation ( const CpModelProto &  model_proto,
Model m,
LinearRelaxation relaxation 
)

Definition at line 1433 of file linear_relaxation.cc.

◆ AppendExactlyOneRelaxation()

void AppendExactlyOneRelaxation ( const ConstraintProto &  ct,
Model model,
LinearRelaxation relaxation 
)

Definition at line 462 of file linear_relaxation.cc.

◆ AppendFullEncodingRelaxation()

bool operations_research::sat::AppendFullEncodingRelaxation ( IntegerVariable  var,
const Model model,
LinearRelaxation relaxation 
)

Definition at line 53 of file linear_relaxation.cc.

◆ AppendLinearConstraintRelaxation()

void AppendLinearConstraintRelaxation ( const ConstraintProto &  ct,
bool  linearize_enforced_constraints,
Model model,
LinearRelaxation relaxation 
)

Definition at line 951 of file linear_relaxation.cc.

◆ AppendLinMaxRelaxationPart1()

void AppendLinMaxRelaxationPart1 ( const ConstraintProto &  ct,
Model model,
LinearRelaxation relaxation 
)

Definition at line 820 of file linear_relaxation.cc.

◆ AppendLinMaxRelaxationPart2()

void AppendLinMaxRelaxationPart2 ( IntegerVariable  target,
const std::vector< Literal > &  alternative_literals,
const std::vector< LinearExpression > &  exprs,
Model model,
LinearRelaxation relaxation 
)

Definition at line 884 of file linear_relaxation.cc.

◆ AppendMaxAffineRelaxation()

void AppendMaxAffineRelaxation ( const ConstraintProto &  ct,
Model model,
LinearRelaxation relaxation 
)

Definition at line 842 of file linear_relaxation.cc.

◆ AppendNoOverlap2dRelaxation()

void operations_research::sat::AppendNoOverlap2dRelaxation ( const ConstraintProto &  ct,
Model model,
LinearRelaxation relaxation 
)

Definition at line 750 of file linear_relaxation.cc.

◆ AppendNoOverlapRelaxation()

void AppendNoOverlapRelaxation ( const CpModelProto &  model_proto,
const ConstraintProto &  ct,
Model model,
LinearRelaxation relaxation 
)

Definition at line 735 of file linear_relaxation.cc.

◆ AppendPartialGreaterThanEncodingRelaxation()

void AppendPartialGreaterThanEncodingRelaxation ( IntegerVariable  var,
const Model model,
LinearRelaxation relaxation 
)

Definition at line 277 of file linear_relaxation.cc.

◆ AppendRelaxationForEqualityEncoding()

void AppendRelaxationForEqualityEncoding ( IntegerVariable  var,
const Model model,
LinearRelaxation relaxation,
int *  num_tight,
int *  num_loose 
)

Definition at line 171 of file linear_relaxation.cc.

◆ AppendRoutesRelaxation()

void AppendRoutesRelaxation ( const ConstraintProto &  ct,
Model model,
LinearRelaxation relaxation 
)

Definition at line 565 of file linear_relaxation.cc.

◆ AppendVariablesToCumulativeCut()

void operations_research::sat::AppendVariablesToCumulativeCut ( const AffineExpression capacity,
const std::vector< AffineExpression > &  demands,
IntegerTrail integer_trail,
CutGenerator result 
)

Definition at line 427 of file scheduling_cuts.cc.

◆ ApplyLiteralMapping()

bool ApplyLiteralMapping ( const absl::StrongVector< LiteralIndex, LiteralIndex > &  mapping,
std::vector< LiteralWithCoeff > *  cst,
Coefficient *  bound_shift,
Coefficient *  max_value 
)

Definition at line 115 of file pb_constraint.cc.

◆ ApplyLiteralMappingToBooleanProblem()

void ApplyLiteralMappingToBooleanProblem ( const absl::StrongVector< LiteralIndex, LiteralIndex > &  mapping,
LinearBooleanProblem *  problem 
)

Definition at line 757 of file boolean_problem.cc.

◆ ApplyToAllIntervalIndices()

void ApplyToAllIntervalIndices ( const std::function< void(int *)> &  f,
ConstraintProto *  ct 
)

Definition at line 322 of file cp_model_utils.cc.

◆ ApplyToAllLiteralIndices()

void ApplyToAllLiteralIndices ( const std::function< void(int *)> &  f,
ConstraintProto *  ct 
)

Definition at line 164 of file cp_model_utils.cc.

◆ ApplyToAllVariableIndices()

void ApplyToAllVariableIndices ( const std::function< void(int *)> &  f,
ConstraintProto *  ct 
)

Definition at line 227 of file cp_model_utils.cc.

◆ ApplyVariableMapping()

void ApplyVariableMapping ( const std::vector< int > &  mapping,
const PresolveContext context 
)

Definition at line 8632 of file cp_model_presolve.cc.

◆ AtMinValue()

IntegerLiteral AtMinValue ( IntegerVariable  var,
IntegerTrail integer_trail 
)

Definition at line 53 of file integer_search.cc.

◆ AtMostOneConstraint()

std::function< void(Model *)> operations_research::sat::AtMostOneConstraint ( const std::vector< Literal > &  literals)
inline

Definition at line 921 of file sat_solver.h.

◆ BasicOrbitopeExtraction()

std::vector< std::vector< int > > BasicOrbitopeExtraction ( const std::vector< std::unique_ptr< SparsePermutation > > &  generators)

Definition at line 28 of file symmetry_util.cc.

◆ BooleanLinearConstraint()

std::function< void(Model *)> operations_research::sat::BooleanLinearConstraint ( int64_t  lower_bound,
int64_t  upper_bound,
std::vector< LiteralWithCoeff > *  cst 
)
inline

Definition at line 882 of file sat_solver.h.

◆ BooleanLinearExpressionIsCanonical()

bool BooleanLinearExpressionIsCanonical ( const std::vector< LiteralWithCoeff > &  cst)

Definition at line 148 of file pb_constraint.cc.

◆ BooleanProblemToCpModelproto()

CpModelProto BooleanProblemToCpModelproto ( const LinearBooleanProblem &  problem)

Definition at line 164 of file boolean_problem.cc.

◆ BoxesAreInEnergyConflict()

bool BoxesAreInEnergyConflict ( const std::vector< Rectangle > &  rectangles,
const std::vector< IntegerValue > &  energies,
absl::Span< const int >  boxes,
Rectangle conflict 
)

Definition at line 98 of file diffn_util.cc.

◆ BuildMaxAffineUpConstraint()

LinearConstraint BuildMaxAffineUpConstraint ( const LinearExpression target,
IntegerVariable  var,
const std::vector< std::pair< IntegerValue, IntegerValue > > &  affines,
Model model 
)

Definition at line 2069 of file cuts.cc.

◆ CanBeFilteredUsingCutLowerBound()

bool CanBeFilteredUsingCutLowerBound ( const LinearConstraint preprocessed_constraint,
const absl::StrongVector< IntegerVariable, double > &  lp_values,
const IntegerTrail integer_trail 
)

Definition at line 306 of file cuts.cc.

◆ CanBeFilteredUsingKnapsackUpperBound()

bool CanBeFilteredUsingKnapsackUpperBound ( const LinearConstraint constraint,
const absl::StrongVector< IntegerVariable, double > &  lp_values,
const IntegerTrail integer_trail 
)

Definition at line 352 of file cuts.cc.

◆ CanFormValidKnapsackCover()

bool CanFormValidKnapsackCover ( const LinearConstraint preprocessed_constraint,
const absl::StrongVector< IntegerVariable, double > &  lp_values,
const IntegerTrail integer_trail 
)

Definition at line 386 of file cuts.cc.

◆ CanonicalizeConstraint()

void CanonicalizeConstraint ( LinearConstraint ct)

Definition at line 314 of file linear_constraint.cc.

◆ CanonicalizeExpr()

LinearExpression CanonicalizeExpr ( const LinearExpression expr)

Definition at line 348 of file linear_constraint.cc.

◆ CardinalityConstraint()

std::function< void(Model *)> operations_research::sat::CardinalityConstraint ( int64_t  lower_bound,
int64_t  upper_bound,
const std::vector< Literal > &  literals 
)
inline

Definition at line 892 of file sat_solver.h.

◆ CeilRatio()

IntegerValue operations_research::sat::CeilRatio ( IntegerValue  dividend,
IntegerValue  positive_divisor 
)
inline

Definition at line 89 of file integer.h.

◆ CeilSquareRoot()

int64_t CeilSquareRoot ( int64_t  a)

Definition at line 203 of file sat/util.cc.

◆ ChangeOptimizationDirection()

void ChangeOptimizationDirection ( LinearBooleanProblem *  problem)

Definition at line 221 of file boolean_problem.cc.

◆ ChooseBestObjectiveValue()

IntegerLiteral ChooseBestObjectiveValue ( IntegerVariable  var,
Model model 
)

Definition at line 61 of file integer_search.cc.

◆ CircuitCovering()

std::function< void(Model *)> CircuitCovering ( const std::vector< std::vector< Literal > > &  graph,
const std::vector< int > &  distinguished_nodes 
)

Definition at line 549 of file circuit.cc.

◆ ClauseConstraint()

std::function< void(Model *)> operations_research::sat::ClauseConstraint ( absl::Span< const Literal literals)
inline

Definition at line 935 of file sat_solver.h.

◆ CleanTermsAndFillConstraint()

void operations_research::sat::CleanTermsAndFillConstraint ( std::vector< std::pair< IntegerVariable, IntegerValue > > *  terms,
ClassWithVarsAndCoeffs *  output 
)

Definition at line 277 of file sat/linear_constraint.h.

◆ ClosestMultiple()

int64_t ClosestMultiple ( int64_t  value,
int64_t  base 
)

Definition at line 211 of file sat/util.cc.

◆ CompleteHeuristics()

std::vector< std::function< BooleanOrIntegerLiteral()> > CompleteHeuristics ( const std::vector< std::function< BooleanOrIntegerLiteral()> > &  incomplete_heuristics,
const std::function< BooleanOrIntegerLiteral()> &  completion_heuristic 
)

Definition at line 767 of file integer_search.cc.

◆ CompressTuples()

void CompressTuples ( absl::Span< const int64_t >  domain_sizes,
int64_t  any_value,
std::vector< std::vector< int64_t > > *  tuples 
)

Definition at line 370 of file sat/util.cc.

◆ ComputeActivity()

double ComputeActivity ( const LinearConstraint constraint,
const absl::StrongVector< IntegerVariable, double > &  values 
)

Definition at line 153 of file linear_constraint.cc.

◆ ComputeBooleanLinearExpressionCanonicalForm()

bool ComputeBooleanLinearExpressionCanonicalForm ( std::vector< LiteralWithCoeff > *  cst,
Coefficient *  bound_shift,
Coefficient *  max_value 
)

Definition at line 53 of file pb_constraint.cc.

◆ ComputeCanonicalRhs()

Coefficient ComputeCanonicalRhs ( Coefficient  upper_bound,
Coefficient  bound_shift,
Coefficient  max_value 
)

Definition at line 172 of file pb_constraint.cc.

◆ ComputeCoreMinWeight()

Coefficient ComputeCoreMinWeight ( const std::vector< EncodingNode * > &  nodes,
const std::vector< Literal > &  core 
)

Definition at line 501 of file encoding.cc.

◆ ComputeEnergyLp()

double operations_research::sat::ComputeEnergyLp ( const EnergyEvent e,
const absl::StrongVector< IntegerVariable, double > &  lp_values,
IntegerTrail integer_trail 
)

Definition at line 441 of file scheduling_cuts.cc.

◆ ComputeInfinityNorm()

IntegerValue ComputeInfinityNorm ( const LinearConstraint constraint)

Definition at line 173 of file linear_constraint.cc.

◆ ComputeInnerObjective()

int64_t ComputeInnerObjective ( const CpObjectiveProto &  objective,
const CpSolverResponse &  response 
)

Definition at line 512 of file cp_model_utils.cc.

◆ ComputeL2Norm()

double ComputeL2Norm ( const LinearConstraint constraint)

Definition at line 165 of file linear_constraint.cc.

◆ ComputeLinearRelaxation()

LinearRelaxation ComputeLinearRelaxation ( const CpModelProto &  model_proto,
Model m 
)

Definition at line 1481 of file linear_relaxation.cc.

◆ ComputeNegatedCanonicalRhs()

Coefficient ComputeNegatedCanonicalRhs ( Coefficient  lower_bound,
Coefficient  bound_shift,
Coefficient  max_value 
)

Definition at line 190 of file pb_constraint.cc.

◆ ComputeObjectiveValue()

Coefficient ComputeObjectiveValue ( const LinearBooleanProblem &  problem,
const std::vector< bool > &  assignment 
)

Definition at line 359 of file boolean_problem.cc.

◆ ComputeResolvant()

bool ComputeResolvant ( Literal  x,
const std::vector< Literal > &  a,
const std::vector< Literal > &  b,
std::vector< Literal > *  out 
)

Definition at line 1025 of file simplification.cc.

◆ ComputeResolvantSize()

int ComputeResolvantSize ( Literal  x,
const std::vector< Literal > &  a,
const std::vector< Literal > &  b 
)

Definition at line 1060 of file simplification.cc.

◆ ComputeTrueObjectiveLowerBound()

double ComputeTrueObjectiveLowerBound ( const CpModelProto &  model_proto_with_floating_point_objective,
const CpObjectiveProto &  integer_objective,
const int64_t  inner_integer_objective_lower_bound 
)

Definition at line 1396 of file sat/lp_utils.cc.

◆ ConditionalLowerOrEqual() [1/2]

std::function< void(Model *)> operations_research::sat::ConditionalLowerOrEqual ( IntegerVariable  a,
IntegerVariable  b,
absl::Span< const Literal literals 
)
inline

Definition at line 438 of file precedences.h.

◆ ConditionalLowerOrEqual() [2/2]

std::function< void(Model *)> operations_research::sat::ConditionalLowerOrEqual ( IntegerVariable  a,
IntegerVariable  b,
Literal  is_le 
)
inline

Definition at line 431 of file precedences.h.

◆ ConditionalLowerOrEqualWithOffset()

std::function< void(Model *)> operations_research::sat::ConditionalLowerOrEqualWithOffset ( IntegerVariable  a,
IntegerVariable  b,
int64_t  offset,
Literal  is_le 
)
inline

Definition at line 422 of file precedences.h.

◆ ConditionalSum2LowerOrEqual()

std::function< void(Model *)> operations_research::sat::ConditionalSum2LowerOrEqual ( IntegerVariable  a,
IntegerVariable  b,
int64_t  ub,
const std::vector< Literal > &  enforcement_literals 
)
inline

Definition at line 362 of file precedences.h.

◆ ConditionalSum3LowerOrEqual()

std::function< void(Model *)> operations_research::sat::ConditionalSum3LowerOrEqual ( IntegerVariable  a,
IntegerVariable  b,
IntegerVariable  c,
int64_t  ub,
const std::vector< Literal > &  enforcement_literals 
)
inline

Definition at line 384 of file precedences.h.

◆ ConditionalWeightedSumGreaterOrEqual()

std::function< void(Model *)> operations_research::sat::ConditionalWeightedSumGreaterOrEqual ( const std::vector< Literal > &  enforcement_literals,
const std::vector< IntegerVariable > &  vars,
const VectorInt &  coefficients,
int64_t  lower_bound 
)
inline

Definition at line 584 of file integer_expr.h.

◆ ConditionalWeightedSumLowerOrEqual()

std::function< void(Model *)> operations_research::sat::ConditionalWeightedSumLowerOrEqual ( const std::vector< Literal > &  enforcement_literals,
const std::vector< IntegerVariable > &  vars,
const VectorInt &  coefficients,
int64_t  upper_bound 
)
inline

Definition at line 496 of file integer_expr.h.

◆ ConfigureSearchHeuristics()

void ConfigureSearchHeuristics ( Model model)

Definition at line 655 of file integer_search.cc.

◆ ConstantIntegerVariable()

std::function< IntegerVariable(Model *)> operations_research::sat::ConstantIntegerVariable ( int64_t  value)
inline

Definition at line 1614 of file integer.h.

◆ ConstraintCaseName()

std::string ConstraintCaseName ( ConstraintProto::ConstraintCase  constraint_case)

Definition at line 383 of file cp_model_utils.cc.

◆ ConstraintIsTriviallyTrue()

bool ConstraintIsTriviallyTrue ( const LinearConstraint constraint,
const IntegerTrail integer_trail 
)

Definition at line 290 of file cuts.cc.

◆ ConstructOverlappingSets()

void ConstructOverlappingSets ( bool  already_sorted,
std::vector< IndexedInterval > *  intervals,
std::vector< std::vector< int > > *  result 
)

Definition at line 360 of file diffn_util.cc.

◆ ConstructSearchStrategy()

std::function< BooleanOrIntegerLiteral()> ConstructSearchStrategy ( const CpModelProto &  cp_model_proto,
const std::vector< IntegerVariable > &  variable_mapping,
IntegerVariable  objective_var,
Model model 
)

Definition at line 314 of file cp_model_search.cc.

◆ ConstructSearchStrategyInternal()

const std::function< BooleanOrIntegerLiteral()> operations_research::sat::ConstructSearchStrategyInternal ( const std::vector< DecisionStrategyProto > &  strategies,
Model model 
)

Definition at line 171 of file cp_model_search.cc.

◆ ContainsLiteral()

bool ContainsLiteral ( absl::Span< const Literal clause,
Literal  literal 
)

Definition at line 474 of file drat_checker.cc.

◆ ContinuousProbing()

SatSolver::Status operations_research::sat::ContinuousProbing ( const std::vector< BooleanVariable > &  bool_vars,
const std::vector< IntegerVariable > &  int_vars,
Model model 
)

◆ ConvertBinaryMPModelProtoToBooleanProblem()

bool ConvertBinaryMPModelProtoToBooleanProblem ( const MPModelProto &  mp_model,
LinearBooleanProblem *  problem 
)

Definition at line 1153 of file sat/lp_utils.cc.

◆ ConvertBooleanProblemToLinearProgram()

void ConvertBooleanProblemToLinearProgram ( const LinearBooleanProblem &  problem,
glop::LinearProgram lp 
)

Definition at line 1332 of file sat/lp_utils.cc.

◆ ConvertCpModelProtoToMPModelProto()

bool ConvertCpModelProtoToMPModelProto ( const CpModelProto &  input,
MPModelProto *  output 
)

Definition at line 981 of file sat/lp_utils.cc.

◆ ConvertMPModelProtoToCpModelProto()

bool ConvertMPModelProtoToCpModelProto ( const SatParameters &  params,
const MPModelProto &  mp_model,
CpModelProto *  cp_model,
SolverLogger logger 
)

Definition at line 788 of file sat/lp_utils.cc.

◆ ConvertToKnapsackForm()

void ConvertToKnapsackForm ( const LinearConstraint constraint,
std::vector< LinearConstraint > *  knapsack_constraints,
IntegerTrail integer_trail 
)

Definition at line 404 of file cuts.cc.

◆ CopyEverythingExceptVariablesAndConstraintsFieldsIntoContext()

void CopyEverythingExceptVariablesAndConstraintsFieldsIntoContext ( const CpModelProto &  in_model,
PresolveContext context 
)

Definition at line 8188 of file cp_model_presolve.cc.

◆ CpModelStats()

std::string CpModelStats ( const CpModelProto &  model_proto)

Returns a string with some statistics on the given CpModelProto.

Definition at line 177 of file cp_model_solver.cc.

◆ CpSolverResponseStats()

std::string 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.

Definition at line 496 of file cp_model_solver.cc.

◆ CreateAllDifferentCutGenerator()

CutGenerator CreateAllDifferentCutGenerator ( const std::vector< AffineExpression > &  exprs,
Model model 
)

Definition at line 1876 of file cuts.cc.

◆ CreateAlternativeLiteralsWithView()

std::vector< Literal > CreateAlternativeLiteralsWithView ( int  num_literals,
Model model,
LinearRelaxation relaxation 
)

Definition at line 483 of file linear_relaxation.cc.

◆ CreateCliqueCutGenerator()

CutGenerator CreateCliqueCutGenerator ( const std::vector< IntegerVariable > &  base_variables,
Model model 
)

Definition at line 2127 of file cuts.cc.

◆ CreateCumulativeCompletionTimeCutGenerator()

CutGenerator CreateCumulativeCompletionTimeCutGenerator ( const std::vector< IntervalVariable > &  intervals,
const AffineExpression capacity,
const std::vector< AffineExpression > &  demands,
const std::vector< LinearExpression > &  energies,
Model model 
)

Definition at line 1231 of file scheduling_cuts.cc.

◆ CreateCumulativeEnergyCutGenerator()

CutGenerator CreateCumulativeEnergyCutGenerator ( const std::vector< IntervalVariable > &  intervals,
const AffineExpression capacity,
const std::vector< AffineExpression > &  demands,
const std::vector< LinearExpression > &  energies,
Model model 
)

Definition at line 463 of file scheduling_cuts.cc.

◆ CreateCumulativePrecedenceCutGenerator()

CutGenerator CreateCumulativePrecedenceCutGenerator ( const std::vector< IntervalVariable > &  intervals,
const AffineExpression capacity,
const std::vector< AffineExpression > &  demands,
Model model 
)

Definition at line 915 of file scheduling_cuts.cc.

◆ CreateCumulativeTimeTableCutGenerator()

CutGenerator CreateCumulativeTimeTableCutGenerator ( const std::vector< IntervalVariable > &  intervals,
const AffineExpression capacity,
const std::vector< AffineExpression > &  demands,
Model model 
)

Definition at line 740 of file scheduling_cuts.cc.

◆ CreateCVRPCutGenerator()

CutGenerator CreateCVRPCutGenerator ( int  num_nodes,
const std::vector< int > &  tails,
const std::vector< int > &  heads,
const std::vector< Literal > &  literals,
const std::vector< int64_t > &  demands,
int64_t  capacity,
Model model 
)

Definition at line 2660 of file linear_programming_constraint.cc.

◆ CreateInitialEncodingNodes() [1/2]

std::vector< EncodingNode * > CreateInitialEncodingNodes ( const LinearObjective &  objective_proto,
Coefficient *  offset,
std::deque< EncodingNode > *  repository 
)

Definition at line 410 of file encoding.cc.

◆ CreateInitialEncodingNodes() [2/2]

std::vector< EncodingNode * > CreateInitialEncodingNodes ( const std::vector< Literal > &  literals,
const std::vector< Coefficient > &  coeffs,
Coefficient *  offset,
std::deque< EncodingNode > *  repository 
)

Definition at line 385 of file encoding.cc.

◆ CreateKnapsackCoverCutGenerator()

CutGenerator CreateKnapsackCoverCutGenerator ( const std::vector< LinearConstraint > &  base_constraints,
const std::vector< IntegerVariable > &  vars,
Model model 
)

Definition at line 454 of file cuts.cc.

◆ CreateLinMaxCutGenerator()

CutGenerator CreateLinMaxCutGenerator ( const IntegerVariable  target,
const std::vector< LinearExpression > &  exprs,
const std::vector< IntegerVariable > &  z_vars,
Model model 
)

Definition at line 1985 of file cuts.cc.

◆ CreateMaxAffineCutGenerator()

CutGenerator CreateMaxAffineCutGenerator ( LinearExpression  target,
IntegerVariable  var,
std::vector< std::pair< IntegerValue, IntegerValue > >  affines,
const std::string  cut_name,
Model model 
)

Definition at line 2105 of file cuts.cc.

◆ CreateNoOverlap2dCompletionTimeCutGenerator()

CutGenerator CreateNoOverlap2dCompletionTimeCutGenerator ( const std::vector< IntervalVariable > &  x_intervals,
const std::vector< IntervalVariable > &  y_intervals,
Model model 
)

Definition at line 1303 of file scheduling_cuts.cc.

◆ CreateNoOverlap2dEnergyCutGenerator()

CutGenerator CreateNoOverlap2dEnergyCutGenerator ( const std::vector< IntervalVariable > &  x_intervals,
const std::vector< IntervalVariable > &  y_intervals,
Model model 
)

Definition at line 649 of file scheduling_cuts.cc.

◆ CreateNoOverlapCompletionTimeCutGenerator()

CutGenerator CreateNoOverlapCompletionTimeCutGenerator ( const std::vector< IntervalVariable > &  intervals,
Model model 
)

Definition at line 1181 of file scheduling_cuts.cc.

◆ CreateNoOverlapEnergyCutGenerator()

CutGenerator CreateNoOverlapEnergyCutGenerator ( const std::vector< IntervalVariable > &  intervals,
Model model 
)

Definition at line 528 of file scheduling_cuts.cc.

◆ CreateNoOverlapPrecedenceCutGenerator()

CutGenerator CreateNoOverlapPrecedenceCutGenerator ( const std::vector< IntervalVariable > &  intervals,
Model model 
)

Definition at line 960 of file scheduling_cuts.cc.

◆ CreatePositiveMultiplicationCutGenerator()

CutGenerator CreatePositiveMultiplicationCutGenerator ( AffineExpression  z,
AffineExpression  x,
AffineExpression  y,
int  linearization_level,
Model model 
)

Definition at line 1358 of file cuts.cc.

◆ CreateSquareCutGenerator()

CutGenerator CreateSquareCutGenerator ( AffineExpression  y,
AffineExpression  x,
int  linearization_level,
Model model 
)

Definition at line 1452 of file cuts.cc.

◆ CreateStronglyConnectedGraphCutGenerator()

CutGenerator CreateStronglyConnectedGraphCutGenerator ( int  num_nodes,
const std::vector< int > &  tails,
const std::vector< int > &  heads,
const std::vector< Literal > &  literals,
Model model 
)

Definition at line 2643 of file linear_programming_constraint.cc.

◆ Cumulative()

std::function< void(Model *)> Cumulative ( const std::vector< IntervalVariable > &  vars,
const std::vector< AffineExpression > &  demands,
AffineExpression  capacity,
SchedulingConstraintHelper helper 
)

Definition at line 40 of file cumulative.cc.

◆ CumulativeTimeDecomposition()

std::function< void(Model *)> CumulativeTimeDecomposition ( const std::vector< IntervalVariable > &  vars,
const std::vector< AffineExpression > &  demands,
AffineExpression  capacity,
SchedulingConstraintHelper helper 
)

Definition at line 217 of file cumulative.cc.

◆ CumulativeUsingReservoir()

std::function< void(Model *)> CumulativeUsingReservoir ( const std::vector< IntervalVariable > &  vars,
const std::vector< AffineExpression > &  demands,
AffineExpression  capacity,
SchedulingConstraintHelper helper 
)

Definition at line 298 of file cumulative.cc.

◆ DEFINE_STRONG_INDEX_TYPE() [1/6]

operations_research::sat::DEFINE_STRONG_INDEX_TYPE ( BooleanVariable  )

◆ DEFINE_STRONG_INDEX_TYPE() [2/6]

operations_research::sat::DEFINE_STRONG_INDEX_TYPE ( ClauseIndex  )

◆ DEFINE_STRONG_INDEX_TYPE() [3/6]

operations_research::sat::DEFINE_STRONG_INDEX_TYPE ( IntegerVariable  )

◆ DEFINE_STRONG_INDEX_TYPE() [4/6]

operations_research::sat::DEFINE_STRONG_INDEX_TYPE ( IntervalVariable  )

◆ DEFINE_STRONG_INDEX_TYPE() [5/6]

operations_research::sat::DEFINE_STRONG_INDEX_TYPE ( LiteralIndex  )

◆ DEFINE_STRONG_INDEX_TYPE() [6/6]

operations_research::sat::DEFINE_STRONG_INDEX_TYPE ( PositiveOnlyIndex  )

◆ DEFINE_STRONG_INT64_TYPE() [1/2]

operations_research::sat::DEFINE_STRONG_INT64_TYPE ( Coefficient  )

◆ DEFINE_STRONG_INT64_TYPE() [2/2]

operations_research::sat::DEFINE_STRONG_INT64_TYPE ( IntegerValue  )

◆ DetectAndAddSymmetryToProto()

void DetectAndAddSymmetryToProto ( const SatParameters &  params,
CpModelProto *  proto,
SolverLogger logger 
)

Definition at line 564 of file cp_model_symmetries.cc.

◆ DetectAndExploitSymmetriesInPresolve()

bool DetectAndExploitSymmetriesInPresolve ( PresolveContext context)

Definition at line 676 of file cp_model_symmetries.cc.

◆ DetectDominanceRelations()

void DetectDominanceRelations ( const PresolveContext context,
VarDomination var_domination,
DualBoundStrengthening dual_bound_strengthening 
)

Definition at line 778 of file var_domination.cc.

◆ DetectImpliedIntegers()

std::vector< double > DetectImpliedIntegers ( MPModelProto *  mp_model,
SolverLogger logger 
)

Definition at line 344 of file sat/lp_utils.cc.

◆ DetectLinearEncodingOfProducts()

bool DetectLinearEncodingOfProducts ( const AffineExpression left,
const AffineExpression right,
Model model,
LinearConstraintBuilder builder 
)

Definition at line 337 of file implied_bounds.cc.

◆ DetectOptionalVariables()

void DetectOptionalVariables ( const CpModelProto &  model_proto,
Model m 
)

Definition at line 763 of file cp_model_loader.cc.

◆ DeterministicLoop()

void DeterministicLoop ( const std::vector< std::unique_ptr< SubSolver > > &  subsolvers,
int  num_threads,
int  batch_size 
)

Definition at line 93 of file subsolver.cc.

◆ DifferAtGivenLiteral()

LiteralIndex DifferAtGivenLiteral ( const std::vector< Literal > &  a,
const std::vector< Literal > &  b,
Literal  l 
)

Definition at line 991 of file simplification.cc.

◆ Disjunctive()

std::function< void(Model *)> Disjunctive ( const std::vector< IntervalVariable > &  vars)

Definition at line 38 of file disjunctive.cc.

◆ DisjunctiveWithBooleanPrecedences()

std::function< void(Model *)> DisjunctiveWithBooleanPrecedences ( const std::vector< IntervalVariable > &  vars)

Definition at line 161 of file disjunctive.cc.

◆ DisjunctiveWithBooleanPrecedencesOnly()

std::function< void(Model *)> DisjunctiveWithBooleanPrecedencesOnly ( const std::vector< IntervalVariable > &  vars)

Definition at line 138 of file disjunctive.cc.

◆ DivideByGCD()

void DivideByGCD ( LinearConstraint constraint)

Definition at line 220 of file linear_constraint.cc.

◆ DivisionConstraint()

std::function< void(Model *)> operations_research::sat::DivisionConstraint ( AffineExpression  num,
AffineExpression  denom,
AffineExpression  div 
)
inline

Definition at line 863 of file integer_expr.h.

◆ DomainInProtoContains()

bool operations_research::sat::DomainInProtoContains ( const ProtoWithDomain &  proto,
int64_t  value 
)

Definition at line 84 of file cp_model_utils.h.

◆ EncodeObjectiveAsSingleVariable()

void EncodeObjectiveAsSingleVariable ( CpModelProto *  cp_model)

Definition at line 28 of file cp_model_objective.cc.

◆ EncodingStr()

std::string operations_research::sat::EncodingStr ( const std::vector< ValueLiteralPair > &  enc)

Definition at line 260 of file implied_bounds.cc.

◆ EndVar()

std::function< IntegerVariable(const Model &)> operations_research::sat::EndVar ( IntervalVariable  v)
inline

Definition at line 631 of file intervals.h.

◆ EnforcedClause()

std::function< void(Model *)> operations_research::sat::EnforcedClause ( absl::Span< const Literal enforcement_literals,
absl::Span< const Literal clause 
)
inline

Definition at line 981 of file sat_solver.h.

◆ EnforcementLiteral()

int operations_research::sat::EnforcementLiteral ( const ConstraintProto &  ct)
inline

Definition at line 42 of file cp_model_utils.h.

◆ Equality() [1/3]

std::function< void(Model *)> operations_research::sat::Equality ( IntegerVariable  a,
IntegerVariable  b 
)
inline

Definition at line 403 of file precedences.h.

◆ Equality() [2/3]

std::function< void(Model *)> operations_research::sat::Equality ( IntegerVariable  v,
int64_t  value 
)
inline

Definition at line 1721 of file integer.h.

◆ Equality() [3/3]

std::function< void(Model *)> operations_research::sat::Equality ( Literal  a,
Literal  b 
)
inline

Definition at line 957 of file sat_solver.h.

◆ EqualityWithOffset()

std::function< void(Model *)> operations_research::sat::EqualityWithOffset ( IntegerVariable  a,
IntegerVariable  b,
int64_t  offset 
)
inline

Definition at line 412 of file precedences.h.

◆ EqualMaxOfSelectedVariables()

std::function< void(Model *)> EqualMaxOfSelectedVariables ( Literal  enforcement_literal,
AffineExpression  target,
const std::vector< AffineExpression > &  exprs,
const std::vector< Literal > &  selectors 
)

Definition at line 304 of file scheduling_constraints.cc.

◆ EqualMinOfSelectedVariables()

std::function< void(Model *)> EqualMinOfSelectedVariables ( Literal  enforcement_literal,
AffineExpression  target,
const std::vector< AffineExpression > &  exprs,
const std::vector< Literal > &  selectors 
)

Definition at line 280 of file scheduling_constraints.cc.

◆ ExactlyOneConstraint()

std::function< void(Model *)> operations_research::sat::ExactlyOneConstraint ( const std::vector< Literal > &  literals)
inline

Definition at line 907 of file sat_solver.h.

◆ ExactlyOnePerRowAndPerColumn()

std::function< void(Model *)> ExactlyOnePerRowAndPerColumn ( const std::vector< std::vector< Literal > > &  graph)

Definition at line 488 of file circuit.cc.

◆ ExcludeCurrentSolutionAndBacktrack()

std::function< void(Model *)> operations_research::sat::ExcludeCurrentSolutionAndBacktrack ( )
inline

Definition at line 1046 of file sat_solver.h.

◆ ExcludeCurrentSolutionWithoutIgnoredVariableAndBacktrack()

std::function< void(Model *)> ExcludeCurrentSolutionWithoutIgnoredVariableAndBacktrack ( )

Definition at line 2078 of file integer.cc.

◆ ExpandCpModel()

void ExpandCpModel ( PresolveContext context)

Definition at line 1490 of file cp_model_expand.cc.

◆ ExploitDominanceRelations()

bool ExploitDominanceRelations ( const VarDomination var_domination,
PresolveContext context 
)

Definition at line 977 of file var_domination.cc.

◆ ExpressionContainsSingleRef()

bool ExpressionContainsSingleRef ( const LinearExpressionProto &  expr)

Definition at line 525 of file cp_model_utils.cc.

◆ ExpressionIsAffine()

bool ExpressionIsAffine ( const LinearExpressionProto &  expr)

Definition at line 530 of file cp_model_utils.cc.

◆ ExtractAssignment()

void ExtractAssignment ( const LinearBooleanProblem &  problem,
const SatSolver solver,
std::vector< bool > *  assignment 
)

Definition at line 63 of file boolean_problem.cc.

◆ ExtractElementEncoding()

void ExtractElementEncoding ( const CpModelProto &  model_proto,
Model m 
)

Definition at line 622 of file cp_model_loader.cc.

◆ ExtractEncoding()

void ExtractEncoding ( const CpModelProto &  model_proto,
Model m 
)

Definition at line 353 of file cp_model_loader.cc.

◆ ExtractSubproblem()

void ExtractSubproblem ( const LinearBooleanProblem &  problem,
const std::vector< int > &  constraint_indices,
LinearBooleanProblem *  subproblem 
)

Definition at line 499 of file boolean_problem.cc.

◆ ExtractSubSolverName()

std::string operations_research::sat::ExtractSubSolverName ( const std::string &  improvement_info)

Definition at line 703 of file synchronization.cc.

◆ FailedLiteralProbingRound()

bool FailedLiteralProbingRound ( ProbingOptions  options,
Model model 
)

Definition at line 368 of file probing.cc.

◆ FillDomainInProto()

void operations_research::sat::FillDomainInProto ( const Domain domain,
ProtoWithDomain *  proto 
)

Definition at line 93 of file cp_model_utils.h.

◆ FilterBoxesAndRandomize()

absl::Span< int > FilterBoxesAndRandomize ( const std::vector< Rectangle > &  cached_rectangles,
absl::Span< int >  boxes,
IntegerValue  threshold_x,
IntegerValue  threshold_y,
absl::BitGenRef  random 
)

Definition at line 317 of file diffn_util.cc.

◆ FilterBoxesThatAreTooLarge()

absl::Span< int > FilterBoxesThatAreTooLarge ( const std::vector< Rectangle > &  cached_rectangles,
const std::vector< IntegerValue > &  energies,
absl::Span< int >  boxes 
)

Definition at line 333 of file diffn_util.cc.

◆ FindCpModelSymmetries()

void FindCpModelSymmetries ( const SatParameters &  params,
const CpModelProto &  problem,
std::vector< std::unique_ptr< SparsePermutation > > *  generators,
double  deterministic_limit,
SolverLogger logger 
)

Definition at line 475 of file cp_model_symmetries.cc.

◆ FindDuplicateConstraints()

std::vector< std::pair< int, int > > FindDuplicateConstraints ( const CpModelProto &  model_proto)

Definition at line 8770 of file cp_model_presolve.cc.

◆ FindLinearBooleanProblemSymmetries()

void FindLinearBooleanProblemSymmetries ( const LinearBooleanProblem &  problem,
std::vector< std::unique_ptr< SparsePermutation > > *  generators 
)

Definition at line 683 of file boolean_problem.cc.

◆ FindRationalFactor()

int FindRationalFactor ( double  x,
int  limit,
double  tolerance 
)

Definition at line 126 of file sat/lp_utils.cc.

◆ FirstUnassignedVarAtItsMinHeuristic()

std::function< BooleanOrIntegerLiteral()> FirstUnassignedVarAtItsMinHeuristic ( const std::vector< IntegerVariable > &  vars,
Model model 
)

Definition at line 167 of file integer_search.cc.

◆ FixedDivisionConstraint()

std::function< void(Model *)> operations_research::sat::FixedDivisionConstraint ( AffineExpression  a,
IntegerValue  b,
AffineExpression  c 
)
inline

Definition at line 882 of file integer_expr.h.

◆ FixedModuloConstraint()

std::function< void(Model *)> operations_research::sat::FixedModuloConstraint ( AffineExpression  a,
IntegerValue  b,
AffineExpression  c 
)
inline

Definition at line 896 of file integer_expr.h.

◆ FixedWeightedSum()

std::function< void(Model *)> operations_research::sat::FixedWeightedSum ( const std::vector< IntegerVariable > &  vars,
const VectorInt &  coefficients,
int64_t  value 
)
inline

Definition at line 485 of file integer_expr.h.

◆ FixedWeightedSumReif()

std::function< void(Model *)> operations_research::sat::FixedWeightedSumReif ( Literal  is_eq,
const std::vector< IntegerVariable > &  vars,
const VectorInt &  coefficients,
int64_t  value 
)
inline

Definition at line 673 of file integer_expr.h.

◆ FloorRatio()

IntegerValue operations_research::sat::FloorRatio ( IntegerValue  dividend,
IntegerValue  positive_divisor 
)
inline

Definition at line 98 of file integer.h.

◆ FloorSquareRoot()

int64_t FloorSquareRoot ( int64_t  a)

Definition at line 194 of file sat/util.cc.

◆ FollowHint()

std::function< BooleanOrIntegerLiteral()> FollowHint ( const std::vector< BooleanOrIntegerVariable > &  vars,
const std::vector< IntegerValue > &  values,
Model model 
)

Definition at line 597 of file integer_search.cc.

◆ FullMerge()

EncodingNode FullMerge ( Coefficient  upper_bound,
EncodingNode a,
EncodingNode b,
SatSolver solver 
)

Definition at line 284 of file encoding.cc.

◆ FullyEncodeVariable()

std::function< std::vector< ValueLiteralPair >(Model *)> operations_research::sat::FullyEncodeVariable ( IntegerVariable  var)
inline

Definition at line 1783 of file integer.h.

◆ GenerateCompletionTimeCuts()

void operations_research::sat::GenerateCompletionTimeCuts ( const std::string &  cut_name,
const absl::StrongVector< IntegerVariable, double > &  lp_values,
std::vector< CtEvent events,
bool  use_lifting,
Model model,
LinearConstraintManager manager 
)

Definition at line 1061 of file scheduling_cuts.cc.

◆ GenerateEnergeticCuts()

void operations_research::sat::GenerateEnergeticCuts ( const std::string &  cut_name,
const absl::StrongVector< IntegerVariable, double > &  lp_values,
std::vector< EnergyEvent events,
const AffineExpression  capacity,
bool  events_are_2d,
Model model,
LinearConstraintManager manager 
)

Definition at line 154 of file scheduling_cuts.cc.

◆ GenerateGraphForSymmetryDetection()

Graph * operations_research::sat::GenerateGraphForSymmetryDetection ( const LinearBooleanProblem &  problem,
std::vector< int > *  initial_equivalence_classes 
)

Definition at line 545 of file boolean_problem.cc.

◆ GenerateNoOverlap2dEnergyCut()

void operations_research::sat::GenerateNoOverlap2dEnergyCut ( const std::vector< LinearExpression > &  energies,
absl::Span< int >  rectangles,
const std::string &  cut_name,
const absl::StrongVector< IntegerVariable, double > &  lp_values,
Model model,
IntegerTrail integer_trail,
IntegerEncoder encoder,
LinearConstraintManager manager,
SchedulingConstraintHelper x_helper,
SchedulingConstraintHelper y_helper 
)

Definition at line 592 of file scheduling_cuts.cc.

◆ GeneratePrecedenceCuts()

void operations_research::sat::GeneratePrecedenceCuts ( const std::string &  cut_name,
const absl::StrongVector< IntegerVariable, double > &  lp_values,
std::vector< PrecedenceEvent events,
IntegerValue  capacity_max,
Model model,
LinearConstraintManager manager 
)

Definition at line 867 of file scheduling_cuts.cc.

◆ GenerateSchedulingNeighborhoodForRelaxation()

Neighborhood GenerateSchedulingNeighborhoodForRelaxation ( const absl::Span< const int >  intervals_to_relax,
const CpSolverResponse &  initial_solution,
const NeighborhoodGeneratorHelper helper 
)

Definition at line 1047 of file cp_model_lns.cc.

◆ GetBoundChanges()

std::vector< PseudoCosts::VariableBoundChange > GetBoundChanges ( LiteralIndex  decision,
Model model 
)

Definition at line 104 of file pseudo_costs.cc.

◆ GetCoefficient()

IntegerValue GetCoefficient ( const IntegerVariable  var,
const LinearExpression expr 
)

Definition at line 434 of file linear_constraint.cc.

◆ GetCoefficientOfPositiveVar()

IntegerValue GetCoefficientOfPositiveVar ( const IntegerVariable  var,
const LinearExpression expr 
)

Definition at line 446 of file linear_constraint.cc.

◆ GetDiverseSetOfParameters()

std::vector< SatParameters > GetDiverseSetOfParameters ( const SatParameters &  base_params,
const CpModelProto &  cp_model 
)

Definition at line 416 of file cp_model_search.cc.

◆ GetFactorT()

IntegerValue GetFactorT ( IntegerValue  rhs_remainder,
IntegerValue  divisor,
IntegerValue  max_t 
)

Definition at line 635 of file cuts.cc.

◆ GetIntervalArticulationPoints()

std::vector< int > GetIntervalArticulationPoints ( std::vector< IndexedInterval > *  intervals)

Definition at line 442 of file diffn_util.cc.

◆ GetKnapsackUpperBound()

double GetKnapsackUpperBound ( std::vector< KnapsackItem items,
const double  capacity 
)

Definition at line 334 of file cuts.cc.

◆ GetOrbitopeOrbits()

std::vector< int > GetOrbitopeOrbits ( int  n,
const std::vector< std::vector< int > > &  orbitope 
)

Definition at line 183 of file symmetry_util.cc.

◆ GetOrbits()

std::vector< int > GetOrbits ( int  n,
const std::vector< std::unique_ptr< SparsePermutation > > &  generators 
)

Definition at line 151 of file symmetry_util.cc.

◆ GetOverlappingIntervalComponents()

void GetOverlappingIntervalComponents ( std::vector< IndexedInterval > *  intervals,
std::vector< std::vector< int > > *  components 
)

Definition at line 409 of file diffn_util.cc.

◆ GetOverlappingRectangleComponents()

std::vector< absl::Span< int > > GetOverlappingRectangleComponents ( const std::vector< Rectangle > &  rectangles,
absl::Span< int >  active_rectangles 
)

Definition at line 40 of file diffn_util.cc.

◆ GetPositiveOnlyIndex()

PositiveOnlyIndex operations_research::sat::GetPositiveOnlyIndex ( IntegerVariable  var)
inline

Definition at line 155 of file integer.h.

◆ GetPreprocessedLinearConstraint()

LinearConstraint GetPreprocessedLinearConstraint ( const LinearConstraint constraint,
const absl::StrongVector< IntegerVariable, double > &  lp_values,
const IntegerTrail integer_trail 
)

Definition at line 266 of file cuts.cc.

◆ GetReferencesUsedByConstraint()

IndexReferences GetReferencesUsedByConstraint ( const ConstraintProto &  ct)

Definition at line 50 of file cp_model_utils.cc.

◆ GetRINSNeighborhood()

RINSNeighborhood GetRINSNeighborhood ( const SharedResponseManager response_manager,
const SharedRelaxationSolutionRepository relaxation_solutions,
const SharedLPSolutionRepository lp_solutions,
SharedIncompleteSolutionManager incomplete_solutions,
absl::BitGenRef  random 
)

Definition at line 107 of file rins.cc.

◆ GetSingleRefFromExpression()

int GetSingleRefFromExpression ( const LinearExpressionProto &  expr)

Definition at line 536 of file cp_model_utils.cc.

◆ GetSuperAdditiveRoundingFunction()

std::function< IntegerValue(IntegerValue)> GetSuperAdditiveRoundingFunction ( IntegerValue  rhs_remainder,
IntegerValue  divisor,
IntegerValue  t,
IntegerValue  max_scaling 
)

Definition at line 643 of file cuts.cc.

◆ GreaterOrEqual() [1/2]

std::function< void(Model *)> operations_research::sat::GreaterOrEqual ( IntegerVariable  a,
IntegerVariable  b 
)
inline

Definition at line 395 of file precedences.h.

◆ GreaterOrEqual() [2/2]

std::function< void(Model *)> operations_research::sat::GreaterOrEqual ( IntegerVariable  v,
int64_t  lb 
)
inline

Definition at line 1691 of file integer.h.

◆ GreaterOrEqualToMiddleValue()

IntegerLiteral GreaterOrEqualToMiddleValue ( IntegerVariable  var,
IntegerTrail integer_trail 
)

Definition at line 73 of file integer_search.cc.

◆ GreaterThanAtLeastOneOf() [1/2]

std::function< void(Model *)> operations_research::sat::GreaterThanAtLeastOneOf ( IntegerVariable  target_var,
const absl::Span< const IntegerVariable >  vars,
const absl::Span< const IntegerValue >  offsets,
const absl::Span< const Literal selectors 
)
inline

Definition at line 125 of file cp_constraints.h.

◆ GreaterThanAtLeastOneOf() [2/2]

std::function< void(Model *)> operations_research::sat::GreaterThanAtLeastOneOf ( IntegerVariable  target_var,
const absl::Span< const IntegerVariable >  vars,
const absl::Span< const IntegerValue >  offsets,
const absl::Span< const Literal selectors,
const absl::Span< const Literal enforcements 
)
inline

Definition at line 138 of file cp_constraints.h.

◆ HasEnforcementLiteral()

bool operations_research::sat::HasEnforcementLiteral ( const ConstraintProto &  ct)
inline

Definition at line 39 of file cp_model_utils.h.

◆ Implication() [1/2]

std::function< void(Model *)> operations_research::sat::Implication ( const std::vector< Literal > &  enforcement_literals,
IntegerLiteral  i 
)
inline

Definition at line 1734 of file integer.h.

◆ Implication() [2/2]

std::function< void(Model *)> operations_research::sat::Implication ( Literal  a,
Literal  b 
)
inline

Definition at line 950 of file sat_solver.h.

◆ ImpliesInInterval()

std::function< void(Model *)> operations_research::sat::ImpliesInInterval ( Literal  in_interval,
IntegerVariable  v,
int64_t  lb,
int64_t  ub 
)
inline

Definition at line 1761 of file integer.h.

◆ ImportModelWithBasicPresolveIntoContext()

bool ImportModelWithBasicPresolveIntoContext ( const CpModelProto &  in_model,
PresolveContext context 
)

Definition at line 8176 of file cp_model_presolve.cc.

◆ InclusionDetector()

operations_research::sat::InclusionDetector ( const Storage &  storage) -> InclusionDetector< Storage >

◆ IncreaseNodeSize()

void IncreaseNodeSize ( EncodingNode node,
SatSolver solver 
)

Definition at line 189 of file encoding.cc.

◆ InstrumentSearchStrategy()

std::function< BooleanOrIntegerLiteral()> InstrumentSearchStrategy ( const CpModelProto &  cp_model_proto,
const std::vector< IntegerVariable > &  variable_mapping,
const std::function< BooleanOrIntegerLiteral()> &  instrumented_strategy,
Model model 
)

Definition at line 355 of file cp_model_search.cc.

◆ IntegerTermDebugString()

std::string operations_research::sat::IntegerTermDebugString ( IntegerVariable  var,
IntegerValue  coeff 
)
inline

Definition at line 159 of file integer.h.

◆ IntegerTypeMinimumValue() [1/2]

constexpr IntegerType operations_research::sat::IntegerTypeMinimumValue ( )
constexpr

Definition at line 95 of file theta_tree.h.

◆ IntegerTypeMinimumValue() [2/2]

constexpr IntegerValue operations_research::sat::IntegerTypeMinimumValue ( )
constexpr

Definition at line 99 of file theta_tree.h.

◆ IntegerValueSelectionHeuristic()

std::function< BooleanOrIntegerLiteral()> IntegerValueSelectionHeuristic ( std::function< BooleanOrIntegerLiteral()>  var_selection_heuristic,
Model model 
)

Definition at line 273 of file integer_search.cc.

◆ IntervalIsVariable()

bool operations_research::sat::IntervalIsVariable ( const IntervalVariable  interval,
IntervalsRepository intervals_repository 
)

Definition at line 1238 of file linear_relaxation.cc.

◆ IntervalWithAlternatives()

std::function< void(Model *)> operations_research::sat::IntervalWithAlternatives ( IntervalVariable  parent,
const std::vector< IntervalVariable > &  members 
)
inline

Definition at line 749 of file intervals.h.

◆ IntTypeAbs()

IntType operations_research::sat::IntTypeAbs ( IntType  t)
inline

Definition at line 85 of file integer.h.

◆ IsAssignmentValid()

bool IsAssignmentValid ( const LinearBooleanProblem &  problem,
const std::vector< bool > &  assignment 
)

Definition at line 373 of file boolean_problem.cc.

◆ IsEqualToMaxOf()

std::function< void(Model *)> operations_research::sat::IsEqualToMaxOf ( IntegerVariable  max_var,
const std::vector< IntegerVariable > &  vars 
)
inline

Definition at line 812 of file integer_expr.h.

◆ IsEqualToMinOf() [1/2]

std::function< void(Model *)> operations_research::sat::IsEqualToMinOf ( const LinearExpression min_expr,
const std::vector< LinearExpression > &  exprs 
)
inline

Definition at line 760 of file integer_expr.h.

◆ IsEqualToMinOf() [2/2]

std::function< void(Model *)> operations_research::sat::IsEqualToMinOf ( IntegerVariable  min_var,
const std::vector< IntegerVariable > &  vars 
)
inline

Definition at line 743 of file integer_expr.h.

◆ IsFixed()

std::function< bool(const Model &)> operations_research::sat::IsFixed ( IntegerVariable  v)
inline

Definition at line 1675 of file integer.h.

◆ IsOneOf()

std::function< void(Model *)> IsOneOf ( IntegerVariable  var,
const std::vector< Literal > &  selectors,
const std::vector< IntegerValue > &  values 
)

Definition at line 1461 of file integer_expr.cc.

◆ IsOptional()

std::function< bool(const Model &)> operations_research::sat::IsOptional ( IntervalVariable  v)
inline

Definition at line 656 of file intervals.h.

◆ IsPresentLiteral()

std::function< Literal(const Model &)> operations_research::sat::IsPresentLiteral ( IntervalVariable  v)
inline

Definition at line 662 of file intervals.h.

◆ kCoefficientMax()

const Coefficient operations_research::sat::kCoefficientMax ( std::numeric_limits< Coefficient::ValueType >  ::max())

◆ kFalseLiteralIndex()

const LiteralIndex operations_research::sat::kFalseLiteralIndex ( 3)

◆ kMaxIntegerValue()

constexpr IntegerValue operations_research::sat::kMaxIntegerValue ( std::numeric_limits< IntegerValue::ValueType >::max() -  1)
constexpr

◆ kMinIntegerValue()

constexpr IntegerValue operations_research::sat::kMinIntegerValue ( -kMaxIntegerValue.  value())
constexpr

◆ kNoBooleanVariable()

const BooleanVariable operations_research::sat::kNoBooleanVariable ( 1)

◆ kNoClauseIndex()

const ClauseIndex operations_research::sat::kNoClauseIndex ( 1)

◆ kNoIntegerVariable()

const IntegerVariable operations_research::sat::kNoIntegerVariable ( 1)

◆ kNoIntervalVariable()

const IntervalVariable operations_research::sat::kNoIntervalVariable ( 1)

◆ kNoLiteralIndex()

const LiteralIndex operations_research::sat::kNoLiteralIndex ( 1)

◆ kTrueLiteralIndex()

const LiteralIndex operations_research::sat::kTrueLiteralIndex ( 2)

◆ LazyMerge()

EncodingNode LazyMerge ( EncodingNode a,
EncodingNode b,
SatSolver solver 
)

Definition at line 179 of file encoding.cc.

◆ LazyMergeAllNodeWithPQAndIncreaseLb()

EncodingNode * LazyMergeAllNodeWithPQAndIncreaseLb ( Coefficient  weight,
const std::vector< EncodingNode * > &  nodes,
SatSolver solver,
std::deque< EncodingNode > *  repository 
)

Definition at line 357 of file encoding.cc.

◆ LiftKnapsackCut()

bool LiftKnapsackCut ( const LinearConstraint constraint,
const absl::StrongVector< IntegerVariable, double > &  lp_values,
const std::vector< IntegerValue > &  cut_vars_original_coefficients,
const IntegerTrail integer_trail,
TimeLimit time_limit,
LinearConstraint cut 
)

Definition at line 187 of file cuts.cc.

◆ LinearBooleanProblemToCnfString()

std::string LinearBooleanProblemToCnfString ( const LinearBooleanProblem &  problem)

Definition at line 403 of file boolean_problem.cc.

◆ LinearExpressionProtosAreEqual()

bool LinearExpressionProtosAreEqual ( const LinearExpressionProto &  a,
const LinearExpressionProto &  b,
int64_t  b_scaling 
)

Definition at line 556 of file cp_model_utils.cc.

◆ LinearInequalityCanBeReducedWithClosestMultiple()

bool LinearInequalityCanBeReducedWithClosestMultiple ( int64_t  base,
const std::vector< int64_t > &  coeffs,
const std::vector< int64_t > &  lbs,
const std::vector< int64_t > &  ubs,
int64_t  rhs,
int64_t *  new_rhs 
)

Definition at line 218 of file sat/util.cc.

◆ LinearizedPartIsLarge()

bool LinearizedPartIsLarge ( Model model)

Definition at line 260 of file integer_search.cc.

◆ LinearizeInnerProduct()

void LinearizeInnerProduct ( const std::vector< AffineExpression > &  left,
const std::vector< AffineExpression > &  right,
Model model,
std::vector< LinearExpression > *  energies 
)

Definition at line 461 of file implied_bounds.cc.

◆ LinExprLowerBound()

IntegerValue LinExprLowerBound ( const LinearExpression expr,
const IntegerTrail integer_trail 
)

Definition at line 363 of file linear_constraint.cc.

◆ LinExprUpperBound()

IntegerValue LinExprUpperBound ( const LinearExpression expr,
const IntegerTrail integer_trail 
)

Definition at line 373 of file linear_constraint.cc.

◆ LiteralTableConstraint()

std::function< void(Model *)> LiteralTableConstraint ( const std::vector< std::vector< Literal > > &  literal_tuples,
const std::vector< Literal > &  line_literals 
)

Definition at line 30 of file sat/table.cc.

◆ LiteralXorIs()

std::function< void(Model *)> operations_research::sat::LiteralXorIs ( const std::vector< Literal > &  literals,
bool  value 
)
inline

Definition at line 113 of file cp_constraints.h.

◆ LoadAllDiffConstraint()

void LoadAllDiffConstraint ( const ConstraintProto &  ct,
Model m 
)

Definition at line 1135 of file cp_model_loader.cc.

◆ LoadAndConsumeBooleanProblem()

bool LoadAndConsumeBooleanProblem ( LinearBooleanProblem *  problem,
SatSolver solver 
)

Definition at line 272 of file boolean_problem.cc.

◆ LoadAtMostOneConstraint()

void LoadAtMostOneConstraint ( const ConstraintProto &  ct,
Model m 
)

Definition at line 889 of file cp_model_loader.cc.

◆ LoadBoolAndConstraint()

void LoadBoolAndConstraint ( const ConstraintProto &  ct,
Model m 
)

Definition at line 875 of file cp_model_loader.cc.

◆ LoadBooleanProblem()

bool LoadBooleanProblem ( const LinearBooleanProblem &  problem,
SatSolver solver 
)

Definition at line 232 of file boolean_problem.cc.

◆ LoadBooleanSymmetries()

void LoadBooleanSymmetries ( const CpModelProto &  model_proto,
Model m 
)

Definition at line 263 of file cp_model_loader.cc.

◆ LoadBoolOrConstraint()

void LoadBoolOrConstraint ( const ConstraintProto &  ct,
Model m 
)

Definition at line 866 of file cp_model_loader.cc.

◆ LoadBoolXorConstraint()

void LoadBoolXorConstraint ( const ConstraintProto &  ct,
Model m 
)

Definition at line 901 of file cp_model_loader.cc.

◆ LoadCircuitConstraint()

void LoadCircuitConstraint ( const ConstraintProto &  ct,
Model m 
)

Definition at line 1236 of file cp_model_loader.cc.

◆ LoadCircuitCoveringConstraint()

void operations_research::sat::LoadCircuitCoveringConstraint ( const ConstraintProto &  ct,
Model m 
)

◆ LoadConditionalLinearConstraint()

void operations_research::sat::LoadConditionalLinearConstraint ( const absl::Span< const Literal enforcement_literals,
const LinearConstraint cst,
Model model 
)
inline

Definition at line 643 of file integer_expr.h.

◆ LoadConstraint()

bool LoadConstraint ( const ConstraintProto &  ct,
Model m 
)

Definition at line 1261 of file cp_model_loader.cc.

◆ LoadCumulativeConstraint()

void LoadCumulativeConstraint ( const ConstraintProto &  ct,
Model m 
)

Definition at line 1226 of file cp_model_loader.cc.

◆ LoadExactlyOneConstraint()

void LoadExactlyOneConstraint ( const ConstraintProto &  ct,
Model m 
)

Definition at line 895 of file cp_model_loader.cc.

◆ LoadIntDivConstraint()

void LoadIntDivConstraint ( const ConstraintProto &  ct,
Model m 
)

Definition at line 1159 of file cp_model_loader.cc.

◆ LoadIntMaxConstraint()

void operations_research::sat::LoadIntMaxConstraint ( const ConstraintProto &  ct,
Model m 
)

◆ LoadIntMinConstraint()

void operations_research::sat::LoadIntMinConstraint ( const ConstraintProto &  ct,
Model m 
)

◆ LoadIntModConstraint()

void operations_research::sat::LoadIntModConstraint ( const ConstraintProto &  ct,
Model m 
)

Definition at line 1178 of file cp_model_loader.cc.

◆ LoadIntProdConstraint()

void LoadIntProdConstraint ( const ConstraintProto &  ct,
Model m 
)

Definition at line 1142 of file cp_model_loader.cc.

◆ LoadLinearConstraint() [1/2]

void LoadLinearConstraint ( const ConstraintProto &  ct,
Model m 
)

Definition at line 981 of file cp_model_loader.cc.

◆ LoadLinearConstraint() [2/2]

void operations_research::sat::LoadLinearConstraint ( const LinearConstraint cst,
Model model 
)
inline

Definition at line 622 of file integer_expr.h.

◆ LoadLinMaxConstraint()

void LoadLinMaxConstraint ( const ConstraintProto &  ct,
Model m 
)

Definition at line 1190 of file cp_model_loader.cc.

◆ LoadModelForProbing()

bool LoadModelForProbing ( PresolveContext context,
Model local_model 
)

Definition at line 2019 of file presolve_context.cc.

◆ LoadNoOverlap2dConstraint()

void LoadNoOverlap2dConstraint ( const ConstraintProto &  ct,
Model m 
)

Definition at line 1213 of file cp_model_loader.cc.

◆ LoadNoOverlapConstraint()

void LoadNoOverlapConstraint ( const ConstraintProto &  ct,
Model m 
)

Definition at line 1208 of file cp_model_loader.cc.

◆ LoadRoutesConstraint()

void LoadRoutesConstraint ( const ConstraintProto &  ct,
Model m 
)

Definition at line 1248 of file cp_model_loader.cc.

◆ LoadVariables()

void LoadVariables ( const CpModelProto &  model_proto,
bool  view_all_booleans_as_integers,
Model m 
)

Definition at line 121 of file cp_model_loader.cc.

◆ LookForTrivialSatSolution()

bool LookForTrivialSatSolution ( double  deterministic_time_limit,
Model model 
)

Definition at line 290 of file probing.cc.

◆ LowerBound()

std::function< int64_t(const Model &)> operations_research::sat::LowerBound ( IntegerVariable  v)
inline

Definition at line 1663 of file integer.h.

◆ LowerOrEqual() [1/2]

std::function< void(Model *)> operations_research::sat::LowerOrEqual ( IntegerVariable  a,
IntegerVariable  b 
)
inline

Definition at line 337 of file precedences.h.

◆ LowerOrEqual() [2/2]

std::function< void(Model *)> operations_research::sat::LowerOrEqual ( IntegerVariable  v,
int64_t  ub 
)
inline

Definition at line 1706 of file integer.h.

◆ LowerOrEqualWithOffset()

std::function< void(Model *)> operations_research::sat::LowerOrEqualWithOffset ( IntegerVariable  a,
IntegerVariable  b,
int64_t  offset 
)
inline

Definition at line 345 of file precedences.h.

◆ MakeAllCoefficientsPositive()

void MakeAllCoefficientsPositive ( LinearConstraint constraint)

Definition at line 247 of file linear_constraint.cc.

◆ MakeAllLiteralsPositive()

void MakeAllLiteralsPositive ( LinearBooleanProblem *  problem)

Definition at line 648 of file boolean_problem.cc.

◆ MakeAllVariablesPositive()

void MakeAllVariablesPositive ( LinearConstraint constraint)

Definition at line 258 of file linear_constraint.cc.

◆ MakeBoundsOfIntegerVariablesInteger()

bool MakeBoundsOfIntegerVariablesInteger ( const SatParameters &  params,
MPModelProto *  mp_model,
SolverLogger logger 
)

Definition at line 189 of file sat/lp_utils.cc.

◆ MaxNodeWeightSmallerThan()

Coefficient MaxNodeWeightSmallerThan ( const std::vector< EncodingNode * > &  nodes,
Coefficient  upper_bound 
)

Definition at line 516 of file encoding.cc.

◆ MaxSize()

std::function< int64_t(const Model &)> operations_research::sat::MaxSize ( IntervalVariable  v)
inline

Definition at line 650 of file intervals.h.

◆ MergeAllNodesWithDeque()

EncodingNode * MergeAllNodesWithDeque ( Coefficient  upper_bound,
const std::vector< EncodingNode * > &  nodes,
SatSolver solver,
std::deque< EncodingNode > *  repository 
)

Definition at line 335 of file encoding.cc.

◆ MinimizeCore()

void MinimizeCore ( SatSolver solver,
std::vector< Literal > *  core 
)

Definition at line 2655 of file sat_solver.cc.

◆ MinimizeCoreWithPropagation()

void MinimizeCoreWithPropagation ( TimeLimit limit,
SatSolver solver,
std::vector< Literal > *  core 
)

Definition at line 223 of file optimization.cc.

◆ MinimizeIntegerVariableWithLinearScanAndLazyEncoding()

SatSolver::Status MinimizeIntegerVariableWithLinearScanAndLazyEncoding ( IntegerVariable  objective_var,
const std::function< void()> &  feasible_solution_observer,
Model model 
)

Definition at line 1075 of file optimization.cc.

◆ MinSize()

std::function< int64_t(const Model &)> operations_research::sat::MinSize ( IntervalVariable  v)
inline

Definition at line 644 of file intervals.h.

◆ ModularInverse()

int64_t ModularInverse ( int64_t  x,
int64_t  m 
)

Definition at line 87 of file sat/util.cc.

◆ MoveOneUnprocessedLiteralLast()

int MoveOneUnprocessedLiteralLast ( const absl::btree_set< LiteralIndex > &  processed,
int  relevant_prefix_size,
std::vector< Literal > *  literals 
)

Definition at line 282 of file sat/util.cc.

◆ MPModelProtoValidationBeforeConversion()

bool MPModelProtoValidationBeforeConversion ( const SatParameters &  params,
const MPModelProto &  mp_model,
SolverLogger logger 
)

Definition at line 280 of file sat/lp_utils.cc.

◆ NegatedRef()

int operations_research::sat::NegatedRef ( int  ref)
inline

Definition at line 34 of file cp_model_utils.h.

◆ NegationOf() [1/3]

LinearExpression NegationOf ( const LinearExpression expr)

Definition at line 411 of file linear_constraint.cc.

◆ NegationOf() [2/3]

std::vector< IntegerVariable > NegationOf ( const std::vector< IntegerVariable > &  vars)

Definition at line 47 of file integer.cc.

◆ NegationOf() [3/3]

IntegerVariable operations_research::sat::NegationOf ( IntegerVariable  i)
inline

Definition at line 141 of file integer.h.

◆ NewBooleanVariable()

std::function< BooleanVariable(Model *)> operations_research::sat::NewBooleanVariable ( )
inline

Definition at line 1608 of file integer.h.

◆ NewFeasibleSolutionObserver()

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){...}));.

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.

WARNING: Except when enumerate_all_solution() is true, one shouldn't rely on this to get a set of "diverse" solutions since any future change to the solver might completely kill any diversity in the set of solutions observed.

Valid usage of this includes implementing features like:

  • Enumerating all solution via enumerate_all_solution(). If only n solutions are needed, this can also be used to abort when this number is reached.
  • Aborting early if a good enough solution is found.
  • Displaying log progress.
  • etc...

Definition at line 774 of file cp_model_solver.cc.

◆ NewIntegerVariable() [1/2]

std::function< IntegerVariable(Model *)> operations_research::sat::NewIntegerVariable ( const Domain domain)
inline

Definition at line 1631 of file integer.h.

◆ NewIntegerVariable() [2/2]

std::function< IntegerVariable(Model *)> operations_research::sat::NewIntegerVariable ( int64_t  lb,
int64_t  ub 
)
inline

Definition at line 1622 of file integer.h.

◆ NewIntegerVariableFromLiteral()

std::function< IntegerVariable(Model *)> operations_research::sat::NewIntegerVariableFromLiteral ( Literal  lit)
inline

Definition at line 1640 of file integer.h.

◆ NewInterval() [1/2]

std::function< IntervalVariable(Model *)> operations_research::sat::NewInterval ( int64_t  min_start,
int64_t  max_end,
int64_t  size 
)
inline

Definition at line 669 of file intervals.h.

◆ NewInterval() [2/2]

std::function< IntervalVariable(Model *)> operations_research::sat::NewInterval ( IntegerVariable  start,
IntegerVariable  end,
IntegerVariable  size 
)
inline

Definition at line 680 of file intervals.h.

◆ NewIntervalWithVariableSize()

std::function< IntervalVariable(Model *)> operations_research::sat::NewIntervalWithVariableSize ( int64_t  min_start,
int64_t  max_end,
int64_t  min_size,
int64_t  max_size 
)
inline

Definition at line 688 of file intervals.h.

◆ NewOptionalInterval() [1/2]

std::function< IntervalVariable(Model *)> operations_research::sat::NewOptionalInterval ( int64_t  min_start,
int64_t  max_end,
int64_t  size,
Literal  is_present 
)
inline

Definition at line 699 of file intervals.h.

◆ NewOptionalInterval() [2/2]

std::function< IntervalVariable(Model *)> operations_research::sat::NewOptionalInterval ( IntegerVariable  start,
IntegerVariable  end,
IntegerVariable  size,
Literal  is_present 
)
inline

Definition at line 726 of file intervals.h.

◆ NewOptionalIntervalWithOptionalVariables()

std::function< IntervalVariable(Model *)> operations_research::sat::NewOptionalIntervalWithOptionalVariables ( int64_t  min_start,
int64_t  max_end,
int64_t  size,
Literal  is_present 
)
inline

Definition at line 710 of file intervals.h.

◆ NewOptionalIntervalWithVariableSize()

std::function< IntervalVariable(Model *)> operations_research::sat::NewOptionalIntervalWithVariableSize ( int64_t  min_start,
int64_t  max_end,
int64_t  min_size,
int64_t  max_size,
Literal  is_present 
)
inline

Definition at line 736 of file intervals.h.

◆ NewSatParameters() [1/3]

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

Definition at line 794 of file cp_model_solver.cc.

◆ NewSatParameters() [2/3]

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

◆ NewSatParameters() [3/3]

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

before calling SolveCpModel().

Definition at line 783 of file cp_model_solver.cc.

◆ NewWeightedSum()

std::function< IntegerVariable(Model *)> operations_research::sat::NewWeightedSum ( const VectorInt &  coefficients,
const std::vector< IntegerVariable > &  vars 
)
inline

Definition at line 712 of file integer_expr.h.

◆ NoDuplicateVariable()

bool NoDuplicateVariable ( const LinearConstraint ct)

Definition at line 335 of file linear_constraint.cc.

◆ NonDeterministicLoop()

void NonDeterministicLoop ( const std::vector< std::unique_ptr< SubSolver > > &  subsolvers,
int  num_threads 
)

Definition at line 125 of file subsolver.cc.

◆ NonOverlappingRectangles()

std::function< void(Model *)> operations_research::sat::NonOverlappingRectangles ( const std::vector< IntervalVariable > &  x,
const std::vector< IntervalVariable > &  y,
bool  is_strict,
bool  add_cumulative_relaxation = true 
)
inline

Definition at line 148 of file diffn.h.

◆ Not()

BoolVar Not ( BoolVar  x)

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

Definition at line 87 of file cp_model.cc.

◆ NotEqual()

std::function< void(Model *)> operations_research::sat::NotEqual ( IntegerVariable  a,
IntegerVariable  b 
)
inline

Definition at line 499 of file precedences.h.

◆ NotLinearizedEnergy()

LinearExpression operations_research::sat::NotLinearizedEnergy ( )

Definition at line 450 of file implied_bounds.cc.

◆ operator*() [1/4]

DoubleLinearExpr operations_research::sat::operator* ( double  factor,
DoubleLinearExpr  expr 
)
inline

Definition at line 1272 of file cp_model.h.

◆ operator*() [2/4]

DoubleLinearExpr operations_research::sat::operator* ( DoubleLinearExpr  expr,
double  factor 
)
inline

Definition at line 1267 of file cp_model.h.

◆ operator*() [3/4]

LinearExpr operations_research::sat::operator* ( int64_t  factor,
LinearExpr  expr 
)
inline

Definition at line 1186 of file cp_model.h.

◆ operator*() [4/4]

LinearExpr operations_research::sat::operator* ( LinearExpr  expr,
int64_t  factor 
)
inline

Definition at line 1182 of file cp_model.h.

◆ operator+() [1/10]

DoubleLinearExpr operations_research::sat::operator+ ( const DoubleLinearExpr lhs,
const DoubleLinearExpr rhs 
)
inline

Definition at line 1198 of file cp_model.h.

◆ operator+() [2/10]

DoubleLinearExpr operations_research::sat::operator+ ( const DoubleLinearExpr lhs,
DoubleLinearExpr &&  rhs 
)
inline

Definition at line 1209 of file cp_model.h.

◆ operator+() [3/10]

LinearExpr operations_research::sat::operator+ ( const LinearExpr lhs,
const LinearExpr rhs 
)
inline

Definition at line 1140 of file cp_model.h.

◆ operator+() [4/10]

LinearExpr operations_research::sat::operator+ ( const LinearExpr lhs,
LinearExpr &&  rhs 
)
inline

Definition at line 1149 of file cp_model.h.

◆ operator+() [5/10]

DoubleLinearExpr operations_research::sat::operator+ ( double  lhs,
DoubleLinearExpr  expr 
)
inline

Definition at line 1229 of file cp_model.h.

◆ operator+() [6/10]

DoubleLinearExpr operations_research::sat::operator+ ( DoubleLinearExpr &&  lhs,
const DoubleLinearExpr rhs 
)
inline

Definition at line 1204 of file cp_model.h.

◆ operator+() [7/10]

DoubleLinearExpr operations_research::sat::operator+ ( DoubleLinearExpr &&  lhs,
DoubleLinearExpr &&  rhs 
)
inline

Definition at line 1214 of file cp_model.h.

◆ operator+() [8/10]

DoubleLinearExpr operations_research::sat::operator+ ( DoubleLinearExpr  expr,
double  rhs 
)
inline

Definition at line 1225 of file cp_model.h.

◆ operator+() [9/10]

LinearExpr operations_research::sat::operator+ ( LinearExpr &&  lhs,
const LinearExpr rhs 
)
inline

Definition at line 1145 of file cp_model.h.

◆ operator+() [10/10]

LinearExpr operations_research::sat::operator+ ( LinearExpr &&  lhs,
LinearExpr &&  rhs 
)
inline

Definition at line 1153 of file cp_model.h.

◆ operator-() [1/12]

DoubleLinearExpr operations_research::sat::operator- ( const DoubleLinearExpr lhs,
const DoubleLinearExpr rhs 
)
inline

Definition at line 1234 of file cp_model.h.

◆ operator-() [2/12]

DoubleLinearExpr operations_research::sat::operator- ( const DoubleLinearExpr lhs,
DoubleLinearExpr &&  rhs 
)
inline

Definition at line 1245 of file cp_model.h.

◆ operator-() [3/12]

LinearExpr operations_research::sat::operator- ( const LinearExpr lhs,
const LinearExpr rhs 
)
inline

Definition at line 1163 of file cp_model.h.

◆ operator-() [4/12]

LinearExpr operations_research::sat::operator- ( const LinearExpr lhs,
LinearExpr &&  rhs 
)
inline

Definition at line 1172 of file cp_model.h.

◆ operator-() [5/12]

DoubleLinearExpr operations_research::sat::operator- ( double  lhs,
DoubleLinearExpr  expr 
)
inline

Definition at line 1261 of file cp_model.h.

◆ operator-() [6/12]

DoubleLinearExpr operations_research::sat::operator- ( DoubleLinearExpr &&  lhs,
const DoubleLinearExpr rhs 
)
inline

Definition at line 1240 of file cp_model.h.

◆ operator-() [7/12]

DoubleLinearExpr operations_research::sat::operator- ( DoubleLinearExpr &&  lhs,
DoubleLinearExpr &&  rhs 
)
inline

Definition at line 1251 of file cp_model.h.

◆ operator-() [8/12]

DoubleLinearExpr operations_research::sat::operator- ( DoubleLinearExpr  epxr,
double  rhs 
)
inline

Definition at line 1257 of file cp_model.h.

◆ operator-() [9/12]

DoubleLinearExpr operations_research::sat::operator- ( DoubleLinearExpr  expr)
inline

Definition at line 1193 of file cp_model.h.

◆ operator-() [10/12]

LinearExpr operations_research::sat::operator- ( LinearExpr &&  lhs,
const LinearExpr rhs 
)
inline

Definition at line 1168 of file cp_model.h.

◆ operator-() [11/12]

LinearExpr operations_research::sat::operator- ( LinearExpr &&  lhs,
LinearExpr &&  rhs 
)
inline

Definition at line 1177 of file cp_model.h.

◆ operator-() [12/12]

LinearExpr operations_research::sat::operator- ( LinearExpr  expr)
inline

Definition at line 1138 of file cp_model.h.

◆ operator<<() [1/13]

std::ostream & operations_research::sat::operator<< ( std::ostream &  os,
absl::Span< const Literal literals 
)
inline

Definition at line 115 of file sat_base.h.

◆ operator<<() [2/13]

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

Definition at line 89 of file cp_model.cc.

◆ operator<<() [3/13]

std::ostream & operator<< ( std::ostream &  os,
const DoubleLinearExpr e 
)

Definition at line 478 of file cp_model.cc.

◆ operator<<() [4/13]

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

Definition at line 631 of file cp_model.cc.

◆ operator<<() [5/13]

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

Definition at line 173 of file cp_model.cc.

◆ operator<<() [6/13]

std::ostream & operations_research::sat::operator<< ( std::ostream &  os,
const LinearConstraint ct 
)
inline

Definition at line 89 of file sat/linear_constraint.h.

◆ operator<<() [7/13]

std::ostream & operator<< ( std::ostream &  os,
const LinearExpr e 
)

Definition at line 320 of file cp_model.cc.

◆ operator<<() [8/13]

std::ostream & operator<< ( std::ostream &  os,
const ValueLiteralPair p 
)

Definition at line 61 of file integer.cc.

◆ operator<<() [9/13]

std::ostream & operations_research::sat::operator<< ( std::ostream &  os,
IntegerLiteral  i_lit 
)
inline

Definition at line 221 of file integer.h.

◆ operator<<() [10/13]

std::ostream & operations_research::sat::operator<< ( std::ostream &  os,
Literal  literal 
)
inline

Definition at line 110 of file sat_base.h.

◆ operator<<() [11/13]

std::ostream & operations_research::sat::operator<< ( std::ostream &  os,
LiteralWithCoeff  term 
)
inline

Definition at line 69 of file pb_constraint.h.

◆ operator<<() [12/13]

std::ostream & operations_research::sat::operator<< ( std::ostream &  os,
SatSolver::Status  status 
)
inline

Definition at line 1066 of file sat_solver.h.

◆ operator<<() [13/13]

std::ostream & operator<< ( std::ostream &  out,
const IndexedInterval interval 
)

Definition at line 355 of file diffn_util.cc.

◆ PartialIsOneOfVar()

std::function< void(Model *)> operations_research::sat::PartialIsOneOfVar ( IntegerVariable  target_var,
const std::vector< IntegerVariable > &  vars,
const std::vector< Literal > &  selectors 
)
inline

Definition at line 161 of file cp_constraints.h.

◆ PositiveMod()

int64_t PositiveMod ( int64_t  x,
int64_t  m 
)

Definition at line 120 of file sat/util.cc.

◆ PositiveRef()

int operations_research::sat::PositiveRef ( int  ref)
inline

Definition at line 35 of file cp_model_utils.h.

◆ PositiveRemainder()

IntegerValue operations_research::sat::PositiveRemainder ( IntegerValue  dividend,
IntegerValue  positive_divisor 
)
inline

Definition at line 113 of file integer.h.

◆ PositiveVarExpr()

LinearExpression PositiveVarExpr ( const LinearExpression expr)

Definition at line 419 of file linear_constraint.cc.

◆ PositiveVariable()

IntegerVariable operations_research::sat::PositiveVariable ( IntegerVariable  i)
inline

Definition at line 149 of file integer.h.

◆ PostsolveClause()

void operations_research::sat::PostsolveClause ( const ConstraintProto &  ct,
std::vector< Domain > *  domains 
)

Definition at line 35 of file cp_model_postsolve.cc.

◆ PostsolveElement()

void operations_research::sat::PostsolveElement ( const ConstraintProto &  ct,
std::vector< Domain > *  domains 
)

Definition at line 226 of file cp_model_postsolve.cc.

◆ PostsolveExactlyOne()

void operations_research::sat::PostsolveExactlyOne ( const ConstraintProto &  ct,
std::vector< Domain > *  domains 
)

Definition at line 58 of file cp_model_postsolve.cc.

◆ PostsolveLinear()

void operations_research::sat::PostsolveLinear ( const ConstraintProto &  ct,
std::vector< Domain > *  domains 
)

Definition at line 112 of file cp_model_postsolve.cc.

◆ PostsolveLinMax()

void operations_research::sat::PostsolveLinMax ( const ConstraintProto &  ct,
std::vector< Domain > *  domains 
)

Definition at line 213 of file cp_model_postsolve.cc.

◆ PostsolveResponse()

void PostsolveResponse ( const int64_t  num_variables_in_original_model,
const CpModelProto &  mapping_proto,
const std::vector< int > &  postsolve_mapping,
std::vector< int64_t > *  solution 
)

Definition at line 309 of file cp_model_postsolve.cc.

◆ PresolveCpModel()

CpSolverStatus PresolveCpModel ( PresolveContext context,
std::vector< int > *  postsolve_mapping 
)

Definition at line 8219 of file cp_model_presolve.cc.

◆ PrintClauses()

bool PrintClauses ( const std::string &  file_path,
SatFormat  format,
const std::vector< std::vector< Literal > > &  clauses,
int  num_variables 
)

Definition at line 606 of file drat_checker.cc.

◆ ProbeAndFindEquivalentLiteral()

void ProbeAndFindEquivalentLiteral ( SatSolver solver,
SatPostsolver postsolver,
DratProofHandler drat_proof_handler,
absl::StrongVector< LiteralIndex, LiteralIndex > *  mapping 
)

Definition at line 1141 of file simplification.cc.

◆ ProbeAndSimplifyProblem()

void ProbeAndSimplifyProblem ( SatPostsolver postsolver,
LinearBooleanProblem *  problem 
)

Definition at line 839 of file boolean_problem.cc.

◆ ProcessCore()

bool ProcessCore ( const std::vector< Literal > &  core,
Coefficient  min_weight,
std::deque< EncodingNode > *  repository,
std::vector< EncodingNode * > *  nodes,
SatSolver solver 
)

Definition at line 528 of file encoding.cc.

◆ ProcessCoreWithAlternativeEncoding()

bool ProcessCoreWithAlternativeEncoding ( const std::vector< Literal > &  core,
Coefficient  min_weight,
std::deque< EncodingNode > *  repository,
std::vector< EncodingNode * > *  nodes,
SatSolver solver 
)

Definition at line 576 of file encoding.cc.

◆ ProductConstraint()

std::function< void(Model *)> operations_research::sat::ProductConstraint ( AffineExpression  a,
AffineExpression  b,
AffineExpression  p 
)
inline

Definition at line 840 of file integer_expr.h.

◆ ProductIsLinearized()

bool ProductIsLinearized ( const LinearExpression expr)

Definition at line 456 of file implied_bounds.cc.

◆ ProductWithModularInverse()

int64_t ProductWithModularInverse ( int64_t  coeff,
int64_t  mod,
int64_t  rhs 
)

Definition at line 125 of file sat/util.cc.

◆ PropagateEncodingFromEquivalenceRelations()

void PropagateEncodingFromEquivalenceRelations ( const CpModelProto &  model_proto,
Model m 
)

Definition at line 679 of file cp_model_loader.cc.

◆ PseudoCost()

std::function< BooleanOrIntegerLiteral()> PseudoCost ( Model model)

Definition at line 343 of file integer_search.cc.

◆ RandomizeDecisionHeuristic()

void RandomizeDecisionHeuristic ( absl::BitGenRef  random,
SatParameters *  parameters 
)

Definition at line 59 of file sat/util.cc.

◆ RandomizeOnRestartHeuristic()

std::function< BooleanOrIntegerLiteral()> operations_research::sat::RandomizeOnRestartHeuristic ( Model model)

Definition at line 478 of file integer_search.cc.

◆ ReadDomainFromProto()

Domain operations_research::sat::ReadDomainFromProto ( const ProtoWithDomain &  proto)

Definition at line 104 of file cp_model_utils.h.

◆ RecordLPRelaxationValues()

void RecordLPRelaxationValues ( Model model)

Definition at line 33 of file rins.cc.

◆ ReduceNodesAndExtractAssumptions()

std::vector< Literal > ReduceNodesAndExtractAssumptions ( Coefficient  upper_bound,
Coefficient  stratified_lower_bound,
Coefficient *  lower_bound,
std::vector< EncodingNode * > *  nodes,
SatSolver solver 
)

Definition at line 447 of file encoding.cc.

◆ RefIsPositive()

bool operations_research::sat::RefIsPositive ( int  ref)
inline

Definition at line 36 of file cp_model_utils.h.

◆ RegisterAndTransferOwnership()

void operations_research::sat::RegisterAndTransferOwnership ( Model model,
T *  ct 
)

Definition at line 835 of file integer_expr.h.

◆ ReifiedBoolAnd()

std::function< void(Model *)> operations_research::sat::ReifiedBoolAnd ( const std::vector< Literal > &  literals,
Literal  r 
)
inline

Definition at line 999 of file sat_solver.h.

◆ ReifiedBoolLe()

std::function< void(Model *)> operations_research::sat::ReifiedBoolLe ( Literal  a,
Literal  b,
Literal  r 
)
inline

Definition at line 1015 of file sat_solver.h.

◆ ReifiedBoolOr()

std::function< void(Model *)> operations_research::sat::ReifiedBoolOr ( const std::vector< Literal > &  literals,
Literal  r 
)
inline

Definition at line 965 of file sat_solver.h.

◆ ReifiedEquality()

std::function< void(Model *)> operations_research::sat::ReifiedEquality ( IntegerVariable  a,
IntegerVariable  b,
Literal  is_eq 
)
inline

Definition at line 462 of file precedences.h.

◆ ReifiedEqualityWithOffset()

std::function< void(Model *)> operations_research::sat::ReifiedEqualityWithOffset ( IntegerVariable  a,
IntegerVariable  b,
int64_t  offset,
Literal  is_eq 
)
inline

Definition at line 480 of file precedences.h.

◆ ReifiedLowerOrEqualWithOffset()

std::function< void(Model *)> operations_research::sat::ReifiedLowerOrEqualWithOffset ( IntegerVariable  a,
IntegerVariable  b,
int64_t  offset,
Literal  is_le 
)
inline

Definition at line 448 of file precedences.h.

◆ ReindexArcs()

int operations_research::sat::ReindexArcs ( IntContainer *  tails,
IntContainer *  heads 
)

Definition at line 170 of file circuit.h.

◆ RemoveNearZeroTerms()

void RemoveNearZeroTerms ( const SatParameters &  params,
MPModelProto *  mp_model,
SolverLogger logger 
)

Definition at line 227 of file sat/lp_utils.cc.

◆ RemoveZeroTerms()

void RemoveZeroTerms ( LinearConstraint constraint)

Definition at line 234 of file linear_constraint.cc.

◆ ReportEnergyConflict()

bool ReportEnergyConflict ( Rectangle  bounding_box,
absl::Span< const int >  boxes,
SchedulingConstraintHelper x,
SchedulingConstraintHelper y 
)

Definition at line 66 of file diffn_util.cc.

◆ ResetAndSolveIntegerProblem()

SatSolver::Status ResetAndSolveIntegerProblem ( const std::vector< Literal > &  assumptions,
Model model 
)

Definition at line 1062 of file integer_search.cc.

◆ Resolve()

bool Resolve ( absl::Span< const Literal clause,
absl::Span< const Literal other_clause,
Literal  complementary_literal,
VariablesAssignment assignment,
std::vector< Literal > *  resolvent 
)

Definition at line 478 of file drat_checker.cc.

◆ RestartEveryKFailures()

std::function< bool()> RestartEveryKFailures ( int  k,
SatSolver solver 
)

Definition at line 627 of file integer_search.cc.

◆ RestrictObjectiveDomainWithBinarySearch()

void RestrictObjectiveDomainWithBinarySearch ( IntegerVariable  objective_var,
const std::function< void()> &  feasible_solution_observer,
Model model 
)

Definition at line 1109 of file optimization.cc.

◆ SatSolverHeuristic()

std::function< BooleanOrIntegerLiteral()> SatSolverHeuristic ( Model model)

Definition at line 330 of file integer_search.cc.

◆ SatSolverRestartPolicy()

std::function< bool()> SatSolverRestartPolicy ( Model model)

Definition at line 641 of file integer_search.cc.

◆ SatStatusString()

std::string SatStatusString ( SatSolver::Status  status)

Definition at line 2638 of file sat_solver.cc.

◆ ScalarProduct()

double ScalarProduct ( const LinearConstraint constraint1,
const LinearConstraint constraint2 
)

Definition at line 181 of file linear_constraint.cc.

◆ ScaleAndSetObjective()

bool ScaleAndSetObjective ( const SatParameters &  params,
const std::vector< std::pair< int, double > > &  objective,
double  objective_offset,
bool  maximize,
CpModelProto *  cp_model,
SolverLogger logger 
)

Definition at line 1059 of file sat/lp_utils.cc.

◆ ScaleContinuousVariables()

std::vector< double > ScaleContinuousVariables ( double  scaling,
double  max_bound,
MPModelProto *  mp_model 
)

Definition at line 107 of file sat/lp_utils.cc.

◆ ScaleInnerObjectiveValue()

int64_t operations_research::sat::ScaleInnerObjectiveValue ( const CpObjectiveProto &  proto,
int64_t  value 
)
inline

Definition at line 143 of file cp_model_utils.h.

◆ ScaleObjectiveValue()

double operations_research::sat::ScaleObjectiveValue ( const CpObjectiveProto &  proto,
int64_t  value 
)
inline

Definition at line 130 of file cp_model_utils.h.

◆ SchedulingSearchHeuristic()

std::function< BooleanOrIntegerLiteral()> SchedulingSearchHeuristic ( Model model)

Definition at line 365 of file integer_search.cc.

◆ SeparateSubtourInequalities()

void operations_research::sat::SeparateSubtourInequalities ( int  num_nodes,
const std::vector< int > &  tails,
const std::vector< int > &  heads,
const std::vector< Literal > &  literals,
const absl::StrongVector< IntegerVariable, double > &  lp_values,
absl::Span< const int64_t >  demands,
int64_t  capacity,
LinearConstraintManager manager,
Model model 
)

Definition at line 2402 of file linear_programming_constraint.cc.

◆ SequentialLoop()

void SequentialLoop ( const std::vector< std::unique_ptr< SubSolver > > &  subsolvers)

Definition at line 63 of file subsolver.cc.

◆ SequentialSearch()

std::function< BooleanOrIntegerLiteral()> SequentialSearch ( std::vector< std::function< BooleanOrIntegerLiteral()> >  heuristics)

Definition at line 202 of file integer_search.cc.

◆ SequentialValueSelection()

std::function< BooleanOrIntegerLiteral()> SequentialValueSelection ( std::vector< std::function< IntegerLiteral(IntegerVariable)> >  value_selection_heuristics,
std::function< BooleanOrIntegerLiteral()>  var_selection_heuristic,
Model model 
)

Definition at line 213 of file integer_search.cc.

◆ SetEnforcementLiteralToFalse()

void operations_research::sat::SetEnforcementLiteralToFalse ( const ConstraintProto &  ct,
std::vector< Domain > *  domains 
)

Definition at line 89 of file cp_model_postsolve.cc.

◆ SetToNegatedLinearExpression()

void SetToNegatedLinearExpression ( const LinearExpressionProto &  input_expr,
LinearExpressionProto *  output_negated_expr 
)

Definition at line 40 of file cp_model_utils.cc.

◆ SimplifyCanonicalBooleanLinearConstraint()

void SimplifyCanonicalBooleanLinearConstraint ( std::vector< LiteralWithCoeff > *  cst,
Coefficient *  rhs 
)

Definition at line 160 of file pb_constraint.cc.

◆ SimplifyClause()

bool SimplifyClause ( const std::vector< Literal > &  a,
std::vector< Literal > *  b,
LiteralIndex *  opposite_literal,
int64_t *  num_inspected_literals 
)

Definition at line 943 of file simplification.cc.

◆ SizeVar()

std::function< IntegerVariable(const Model &)> operations_research::sat::SizeVar ( IntervalVariable  v)
inline

Definition at line 637 of file intervals.h.

◆ SolutionBooleanValue()

bool SolutionBooleanValue ( const CpSolverResponse &  r,
BoolVar  x 
)

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

Definition at line 1340 of file cp_model.cc.

◆ SolutionIntegerValue()

int64_t SolutionIntegerValue ( const CpSolverResponse &  r,
const LinearExpr expr 
)

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

Definition at line 1329 of file cp_model.cc.

◆ SolutionIsFeasible()

bool SolutionIsFeasible ( const CpModelProto &  model,
const std::vector< int64_t > &  variable_values,
const CpModelProto *  mapping_proto,
const std::vector< int > *  postsolve_mapping 
)

Definition at line 1477 of file cp_model_checker.cc.

◆ Solve()

CpSolverResponse Solve ( const CpModelProto &  model_proto)

Solves the given CpModelProto and returns an instance of CpSolverResponse.

Definition at line 3640 of file cp_model_solver.cc.

◆ SolveCpModel()

CpSolverResponse 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));

Definition at line 3055 of file cp_model_solver.cc.

◆ SolveDiophantineEquationOfSizeTwo()

bool SolveDiophantineEquationOfSizeTwo ( int64_t &  a,
int64_t &  b,
int64_t &  cte,
int64_t &  x0,
int64_t &  y0 
)

Definition at line 147 of file sat/util.cc.

◆ SolveFzWithCpModelProto()

void SolveFzWithCpModelProto ( const fz::Model fz_model,
const fz::FlatzincSatParameters p,
const std::string &  sat_params,
SolverLogger logger,
SolverLogger solution_logger 
)

Definition at line 1115 of file cp_model_fz_solver.cc.

◆ SolveIntegerProblem()

SatSolver::Status SolveIntegerProblem ( Model model)

Definition at line 918 of file integer_search.cc.

◆ SolveIntegerProblemWithLazyEncoding()

SatSolver::Status SolveIntegerProblemWithLazyEncoding ( Model model)

Definition at line 1083 of file integer_search.cc.

◆ SolveWithCardinalityEncoding()

SatSolver::Status SolveWithCardinalityEncoding ( LogBehavior  log,
const LinearBooleanProblem &  problem,
SatSolver solver,
std::vector< bool > *  solution 
)

Definition at line 902 of file optimization.cc.

◆ SolveWithCardinalityEncodingAndCore()

SatSolver::Status SolveWithCardinalityEncodingAndCore ( LogBehavior  log,
const LinearBooleanProblem &  problem,
SatSolver solver,
std::vector< bool > *  solution 
)

Definition at line 970 of file optimization.cc.

◆ SolveWithFuMalik()

SatSolver::Status SolveWithFuMalik ( LogBehavior  log,
const LinearBooleanProblem &  problem,
SatSolver solver,
std::vector< bool > *  solution 
)

Definition at line 284 of file optimization.cc.

◆ SolveWithLinearScan()

SatSolver::Status SolveWithLinearScan ( LogBehavior  log,
const LinearBooleanProblem &  problem,
SatSolver solver,
std::vector< bool > *  solution 
)

Definition at line 856 of file optimization.cc.

◆ SolveWithParameters() [1/2]

CpSolverResponse SolveWithParameters ( const CpModelProto &  model_proto,
const SatParameters &  params 
)

Solves the given CpModelProto with the given parameters.

Definition at line 3645 of file cp_model_solver.cc.

◆ SolveWithParameters() [2/2]

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.

Definition at line 3653 of file cp_model_solver.cc.

◆ SolveWithPresolve()

SatSolver::Status SolveWithPresolve ( std::unique_ptr< SatSolver > *  solver,
TimeLimit time_limit,
std::vector< bool > *  solution,
DratProofHandler drat_proof_handler,
SolverLogger logger 
)

Definition at line 1259 of file simplification.cc.

◆ SolveWithRandomParameters()

SatSolver::Status SolveWithRandomParameters ( LogBehavior  log,
const LinearBooleanProblem &  problem,
int  num_times,
absl::BitGenRef  random,
SatSolver solver,
std::vector< bool > *  solution 
)

Definition at line 778 of file optimization.cc.

◆ SolveWithWPM1()

SatSolver::Status SolveWithWPM1 ( LogBehavior  log,
const LinearBooleanProblem &  problem,
SatSolver solver,
std::vector< bool > *  solution 
)

Definition at line 481 of file optimization.cc.

◆ SpanOfIntervals()

std::function< void(Model *)> SpanOfIntervals ( IntervalVariable  span,
const std::vector< IntervalVariable > &  intervals 
)

Definition at line 319 of file scheduling_constraints.cc.

◆ SplitAroundGivenValue()

IntegerLiteral SplitAroundGivenValue ( IntegerVariable  var,
IntegerValue  value,
Model model 
)

Definition at line 84 of file integer_search.cc.

◆ SplitAroundLpValue()

IntegerLiteral SplitAroundLpValue ( IntegerVariable  var,
Model model 
)

Definition at line 112 of file integer_search.cc.

◆ SplitDomainUsingBestSolutionValue()

IntegerLiteral operations_research::sat::SplitDomainUsingBestSolutionValue ( IntegerVariable  var,
Model model 
)

◆ SplitUsingBestSolutionValueInRepository()

IntegerLiteral operations_research::sat::SplitUsingBestSolutionValueInRepository ( IntegerVariable  var,
const SharedSolutionRepository< int64_t > &  solution_repo,
Model model 
)

Definition at line 142 of file integer_search.cc.

◆ StartVar()

std::function< IntegerVariable(const Model &)> operations_research::sat::StartVar ( IntervalVariable  v)
inline

Definition at line 624 of file intervals.h.

◆ StoreAssignment()

void StoreAssignment ( const VariablesAssignment assignment,
BooleanAssignment *  output 
)

Definition at line 488 of file boolean_problem.cc.

◆ SubcircuitConstraint()

std::function< void(Model *)> SubcircuitConstraint ( int  num_nodes,
const std::vector< int > &  tails,
const std::vector< int > &  heads,
const std::vector< Literal > &  literals,
bool  multiple_subcircuit_through_zero 
)

Definition at line 507 of file circuit.cc.

◆ SubstituteVariable()

bool SubstituteVariable ( int  var,
int64_t  var_coeff_in_definition,
const ConstraintProto &  definition,
ConstraintProto *  ct 
)

Definition at line 194 of file presolve_util.cc.

◆ Sum2LowerOrEqual()

std::function< void(Model *)> operations_research::sat::Sum2LowerOrEqual ( IntegerVariable  a,
IntegerVariable  b,
int64_t  ub 
)
inline

Definition at line 355 of file precedences.h.

◆ Sum3LowerOrEqual()

std::function< void(Model *)> operations_research::sat::Sum3LowerOrEqual ( IntegerVariable  a,
IntegerVariable  b,
IntegerVariable  c,
int64_t  ub 
)
inline

Definition at line 373 of file precedences.h.

◆ SUniv()

int operations_research::sat::SUniv ( int  i)
inline

Definition at line 87 of file restart.h.

◆ ToDouble()

double operations_research::sat::ToDouble ( IntegerValue  value)
inline

Definition at line 77 of file integer.h.

◆ ToIntegerValueVector()

std::vector< IntegerValue > operations_research::sat::ToIntegerValueVector ( const std::vector< int64_t > &  input)
inline

Definition at line 103 of file cp_constraints.h.

◆ TransformToGeneratorOfStabilizer()

void operations_research::sat::TransformToGeneratorOfStabilizer ( int  to_stabilize,
std::vector< std::unique_ptr< SparsePermutation > > *  generators 
)
inline

Definition at line 78 of file symmetry_util.h.

◆ TryToLinearizeConstraint()

void TryToLinearizeConstraint ( const CpModelProto &  model_proto,
const ConstraintProto &  ct,
int  linearization_level,
Model model,
LinearRelaxation relaxation 
)

Definition at line 1025 of file linear_relaxation.cc.

◆ TryToReconcileEncodings()

bool operations_research::sat::TryToReconcileEncodings ( const AffineExpression size2_affine,
const AffineExpression affine,
const std::vector< ValueLiteralPair > &  affine_var_encoding,
Model model,
LinearConstraintBuilder builder 
)

Definition at line 284 of file implied_bounds.cc.

◆ UnassignedVarWithLowestMinAtItsMinHeuristic()

std::function< BooleanOrIntegerLiteral()> UnassignedVarWithLowestMinAtItsMinHeuristic ( const std::vector< IntegerVariable > &  vars,
Model model 
)

Definition at line 182 of file integer_search.cc.

◆ UnscaleObjectiveValue()

double operations_research::sat::UnscaleObjectiveValue ( const CpObjectiveProto &  proto,
double  value 
)
inline

Definition at line 152 of file cp_model_utils.h.

◆ UpperBound()

std::function< int64_t(const Model &)> operations_research::sat::UpperBound ( IntegerVariable  v)
inline

Definition at line 1669 of file integer.h.

◆ UsedIntervals()

std::vector< int > UsedIntervals ( const ConstraintProto &  ct)

Definition at line 452 of file cp_model_utils.cc.

◆ UsedVariables()

std::vector< int > UsedVariables ( const ConstraintProto &  ct)

Definition at line 437 of file cp_model_utils.cc.

◆ UseObjectiveForSatAssignmentPreference()

void UseObjectiveForSatAssignmentPreference ( const LinearBooleanProblem &  problem,
SatSolver solver 
)

Definition at line 320 of file boolean_problem.cc.

◆ ValidateBooleanProblem()

absl::Status ValidateBooleanProblem ( const LinearBooleanProblem &  problem)

Definition at line 144 of file boolean_problem.cc.

◆ ValidateCpModel()

std::string ValidateCpModel ( const CpModelProto &  model,
bool  after_presolve 
)

Definition at line 862 of file cp_model_checker.cc.

◆ ValidateInputCpModel()

std::string ValidateInputCpModel ( const SatParameters &  params,
const CpModelProto &  model 
)

Definition at line 1008 of file cp_model_checker.cc.

◆ ValidateLinearConstraintForOverflow()

bool ValidateLinearConstraintForOverflow ( const LinearConstraint constraint,
const IntegerTrail integer_trail 
)

Definition at line 385 of file linear_constraint.cc.

◆ ValidateParameters()

std::string ValidateParameters ( const SatParameters &  params)

Definition at line 23 of file parameters_validation.cc.

◆ Value() [1/3]

std::function< int64_t(const Model &)> operations_research::sat::Value ( BooleanVariable  b)
inline

Definition at line 1034 of file sat_solver.h.

◆ Value() [2/3]

std::function< int64_t(const Model &)> operations_research::sat::Value ( IntegerVariable  v)
inline

Definition at line 1683 of file integer.h.

◆ Value() [3/3]

std::function< int64_t(const Model &)> operations_research::sat::Value ( Literal  l)
inline

Definition at line 1025 of file sat_solver.h.

◆ VarDebugString()

std::string VarDebugString ( const CpModelProto &  proto,
int  index 
)

Definition at line 145 of file cp_model.cc.

◆ VariableIsPositive()

bool operations_research::sat::VariableIsPositive ( IntegerVariable  i)
inline

Definition at line 145 of file integer.h.

◆ WeightedSumGreaterOrEqual()

std::function< void(Model *)> operations_research::sat::WeightedSumGreaterOrEqual ( const std::vector< IntegerVariable > &  vars,
const VectorInt &  coefficients,
int64_t  lower_bound 
)
inline

Definition at line 474 of file integer_expr.h.

◆ WeightedSumGreaterOrEqualReif()

std::function< void(Model *)> operations_research::sat::WeightedSumGreaterOrEqualReif ( Literal  is_ge,
const std::vector< IntegerVariable > &  vars,
const VectorInt &  coefficients,
int64_t  lower_bound 
)
inline

Definition at line 610 of file integer_expr.h.

◆ WeightedSumLowerOrEqual()

std::function< void(Model *)> operations_research::sat::WeightedSumLowerOrEqual ( const std::vector< IntegerVariable > &  vars,
const VectorInt &  coefficients,
int64_t  upper_bound 
)
inline

Definition at line 367 of file integer_expr.h.

◆ WeightedSumLowerOrEqualReif()

std::function< void(Model *)> operations_research::sat::WeightedSumLowerOrEqualReif ( Literal  is_le,
const std::vector< IntegerVariable > &  vars,
const VectorInt &  coefficients,
int64_t  upper_bound 
)
inline

Definition at line 597 of file integer_expr.h.

◆ WeightedSumNotEqual()

std::function< void(Model *)> operations_research::sat::WeightedSumNotEqual ( const std::vector< IntegerVariable > &  vars,
const VectorInt &  coefficients,
int64_t  value 
)
inline

Definition at line 690 of file integer_expr.h.

Variable Documentation

◆ kAffineRelationConstraint

constexpr int kAffineRelationConstraint = -2
constexpr

Definition at line 47 of file presolve_context.h.

◆ kAssumptionsConstraint

constexpr int kAssumptionsConstraint = -3
constexpr

Definition at line 48 of file presolve_context.h.

◆ kObjectiveConstraint

constexpr int kObjectiveConstraint = -1
constexpr

Definition at line 46 of file presolve_context.h.

◆ kUnsatTrailIndex

const int kUnsatTrailIndex = -1

Definition at line 56 of file sat_solver.h.