C++ Reference: class RoutingLinearSolverWrapper

This documentation is automatically generated.

Method
AddLinearConstraint

Return type: int

Arguments: int64 lower_bound, int64 upper_bound, const std::vector<std::pair<int, double>>& variable_coeffs

Adds a linear constraint, enforcing lower_bound <= sum variable * coeff <= upper_bound, and returns the identifier of that constraint.

AddMaximumConstraint

Return type: virtual void

Arguments: int max_var, std::vector<int> vars

AddProductConstraint

Return type: virtual void

Arguments: int product_var, std::vector<int> vars

AddReifiedLinearConstraint

Return type: int

Arguments: int64 lower_bound, int64 upper_bound, const std::vector<std::pair<int, double>>& weighted_variables

Adds a linear constraint and a 0/1 variable that is true iff lower_bound <= sum variable * coeff <= upper_bound, and returns the identifier of that variable.

AddVariable

Return type: int

Arguments: int64 lower_bound, int64 upper_bound

Adds a variable with bounds [lower_bound, upper_bound].

Clear

Return type: virtual void

ClearObjective

Return type: virtual void

CreateNewConstraint

Return type: virtual int

Arguments: int64 lower_bound, int64 upper_bound

CreateNewPositiveVariable

Return type: virtual int

GetObjectiveCoefficient

Return type: virtual double

Arguments: int index

GetObjectiveValue

Return type: virtual int64

GetValue

Return type: virtual double

Arguments: int index

GetVariableLowerBound

Return type: virtual int64

Arguments: int index

IsCPSATSolver

Return type: virtual bool

NumVariables

Return type: virtual int

~RoutingLinearSolverWrapper

Return type: virtual

SetCoefficient

Return type: virtual void

Arguments: int ct, int index, double coefficient

SetEnforcementLiteral

Return type: virtual void

Arguments: int ct, int condition

SetObjectiveCoefficient

Return type: virtual void

Arguments: int index, double coefficient

SetVariableBounds

Return type: virtual bool

Arguments: int index, int64 lower_bound, int64 upper_bound

SetVariableDisjointBounds

Return type: virtual void

Arguments: int index, const std::vector<int64>& starts, const std::vector<int64>& ends

SolutionIsInteger

Return type: virtual bool

Solve

Return type: virtual DimensionSchedulingStatus

Arguments: absl::Duration duration_limit