Google OR-Tools: operations_research::LinearRange Class Reference
An expression of the form:
lower_bound <= sum_{i in S} a_i*x_i <= upper_bound.
double upper_bound() const
double lower_bound() const
The sum is represented as a LinearExpr with offset 0.
Must be added to model with
MPSolver::AddRowConstraint(const LinearRange& range,
const std::string& name);
Definition at line 192 of file linear_expr.h.
#include <linear_expr.h>
Public Member Functions | |
| LinearRange () | |
| LinearRange (double lower_bound, const LinearExpr &linear_expr, double upper_bound) | |
| double | lower_bound () const |
| const LinearExpr & | linear_expr () const |
| double | upper_bound () const |
|
inline |
◆ LinearRange() [2/2]
| operations_research::LinearRange::LinearRange | ( | double | lower_bound, |
| const LinearExpr & | linear_expr, | ||
| double | upper_bound ) |
The bounds of the linear range are updated so that they include the offset from "linear_expr", i.e., we form the range:
lower_bound - offset <= linear_expr - offset <= upper_bound - offset.
const LinearExpr & linear_expr() const
Definition at line 173 of file linear_expr.cc.
◆ linear_expr()
|
inline |
◆ lower_bound()
|
inline |
◆ upper_bound()
|
inline |
The documentation for this class was generated from the following files:
- ortools/linear_solver/linear_expr.h
- ortools/linear_solver/linear_expr.cc