C++ Reference: class RoutingLinearSolverWrapper

Note: This documentation is automatically generated.

Method
AddLinearConstraint

Return type: int

Arguments: int64_t lower_bound, int64_t 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

AddObjectiveConstraint

Return type: virtual void

AddProductConstraint

Return type: virtual void

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

AddReifiedLinearConstraint

Return type: int

Arguments: int64_t lower_bound, int64_t 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_t lower_bound, int64_t 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_t lower_bound, int64_t upper_bound

CreateNewPositiveVariable

Return type: virtual int

GetObjectiveCoefficient

Return type: virtual double

Arguments: int index

GetObjectiveValue

Return type: virtual int64_t

GetValue

Return type: virtual double

Arguments: int index

GetVariableLowerBound

Return type: virtual int64_t

Arguments: int index

GetVariableUpperBound

Return type: virtual int64_t

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

SetParameters

Return type: virtual void

Arguments: const std::string& parameters

This function is meant to override the parameters of the solver.

SetVariableBounds

Return type: virtual bool

Arguments: int index, int64_t lower_bound, int64_t upper_bound

SetVariableDisjointBounds

Return type: virtual void

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

SetVariableName

Return type: virtual void

Arguments: int index, absl::string_view name

SolutionIsInteger

Return type: virtual bool

Solve

Return type: virtual DimensionSchedulingStatus

Arguments: absl::Duration duration_limit