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 |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[null,null,["Last updated 2024-08-06 UTC."],[[["`RoutingLinearSolverWrapper` is a C++ class providing an interface to interact with linear solvers for routing problems."],["It allows adding variables and constraints (linear, maximum, product, reified linear) to the solver."],["Users can set objective functions, solve the problem with time limits, and retrieve solution values."],["Methods like `SetParameters` enable customization of the underlying solver's behavior."],["The class facilitates integration with the OR-Tools library for solving complex routing and scheduling scenarios."]]],[]]