Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
integer_expr.h File Reference
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <functional>
#include <memory>
#include <utility>
#include <vector>
#include "absl/log/check.h"
#include "absl/types/span.h"
#include "ortools/sat/integer.h"
#include "ortools/sat/linear_constraint.h"
#include "ortools/sat/linear_propagation.h"
#include "ortools/sat/model.h"
#include "ortools/sat/precedences.h"
#include "ortools/sat/sat_base.h"
#include "ortools/sat/sat_parameters.pb.h"
#include "ortools/sat/sat_solver.h"
#include "ortools/util/strong_integers.h"
#include "ortools/util/time_limit.h"

Go to the source code of this file.

Classes

class  operations_research::sat::LinearConstraintPropagator< use_int128 >
 
class  operations_research::sat::LevelZeroEquality
 
class  operations_research::sat::MinPropagator
 
class  operations_research::sat::LinMinPropagator
 
class  operations_research::sat::ProductPropagator
 
class  operations_research::sat::DivisionPropagator
 
class  operations_research::sat::FixedDivisionPropagator
 
class  operations_research::sat::FixedModuloPropagator
 
class  operations_research::sat::SquarePropagator
 

Namespaces

namespace  operations_research
 In SWIG mode, we don't want anything besides these top-level includes.
 
namespace  operations_research::sat
 

Typedefs

using operations_research::sat::IntegerSumLE = LinearConstraintPropagator<false>
 
using operations_research::sat::IntegerSumLE128 = LinearConstraintPropagator<true>
 

Functions

template<typename VectorInt >
std::function< void(Model *)> operations_research::sat::WeightedSumLowerOrEqual (const std::vector< IntegerVariable > &vars, const VectorInt &coefficients, int64_t upper_bound)
 Weighted sum <= constant.
 
template<typename VectorInt >
std::function< void(Model *)> operations_research::sat::WeightedSumGreaterOrEqual (const std::vector< IntegerVariable > &vars, const VectorInt &coefficients, int64_t lower_bound)
 Weighted sum >= constant.
 
template<typename VectorInt >
std::function< void(Model *)> operations_research::sat::FixedWeightedSum (const std::vector< IntegerVariable > &vars, const VectorInt &coefficients, int64_t value)
 Weighted sum == constant.
 
void operations_research::sat::AddWeightedSumLowerOrEqual (absl::Span< const Literal > enforcement_literals, absl::Span< const IntegerVariable > vars, absl::Span< const int64_t > coefficients, int64_t upper_bound, Model *model)
 enforcement_literals => sum <= upper_bound
 
void operations_research::sat::AddWeightedSumGreaterOrEqual (absl::Span< const Literal > enforcement_literals, absl::Span< const IntegerVariable > vars, absl::Span< const int64_t > coefficients, int64_t lower_bound, Model *model)
 enforcement_literals => sum >= lower_bound
 
std::function< void(Model *)> operations_research::sat::ConditionalWeightedSumLowerOrEqual (const std::vector< Literal > &enforcement_literals, const std::vector< IntegerVariable > &vars, const std::vector< int64_t > &coefficients, int64_t upper_bound)
 
std::function< void(Model *)> operations_research::sat::ConditionalWeightedSumGreaterOrEqual (const std::vector< Literal > &enforcement_literals, const std::vector< IntegerVariable > &vars, const std::vector< int64_t > &coefficients, int64_t upper_bound)
 
void operations_research::sat::LoadConditionalLinearConstraint (const absl::Span< const Literal > enforcement_literals, const LinearConstraint &cst, Model *model)
 LinearConstraint version.
 
void operations_research::sat::LoadLinearConstraint (const LinearConstraint &cst, Model *model)
 
void operations_research::sat::AddConditionalAffinePrecedence (const absl::Span< const Literal > enforcement_literals, AffineExpression left, AffineExpression right, Model *model)
 
template<typename VectorInt >
std::function< IntegerVariable(Model *)> operations_research::sat::NewWeightedSum (const VectorInt &coefficients, const std::vector< IntegerVariable > &vars)
 
std::function< void(Model *)> operations_research::sat::IsEqualToMinOf (IntegerVariable min_var, const std::vector< IntegerVariable > &vars)
 
std::function< void(Model *)> operations_research::sat::IsEqualToMinOf (const LinearExpression &min_expr, const std::vector< LinearExpression > &exprs)
 
std::function< void(Model *)> operations_research::sat::IsEqualToMaxOf (IntegerVariable max_var, const std::vector< IntegerVariable > &vars)
 
std::function< void(Model *)> operations_research::sat::IsOneOf (IntegerVariable var, const std::vector< Literal > &selectors, const std::vector< IntegerValue > &values)
 
template<class T >
void operations_research::sat::RegisterAndTransferOwnership (Model *model, T *ct)
 
std::function< void(Model *)> operations_research::sat::ProductConstraint (AffineExpression a, AffineExpression b, AffineExpression p)
 Adds the constraint: a * b = p.
 
std::function< void(Model *)> operations_research::sat::DivisionConstraint (AffineExpression num, AffineExpression denom, AffineExpression div)
 Adds the constraint: num / denom = div. (denom > 0).
 
std::function< void(Model *)> operations_research::sat::FixedDivisionConstraint (AffineExpression a, IntegerValue b, AffineExpression c)
 Adds the constraint: a / b = c where b is a constant.
 
std::function< void(Model *)> operations_research::sat::FixedModuloConstraint (AffineExpression a, IntegerValue b, AffineExpression c)
 Adds the constraint: a % b = c where b is a constant.