C++ Reference
C++ Reference: Linear solver
LinearRange
Detailed Description
An expression of the form:
lower_bound <= sum_{i in S} a_i*x_i <= upper_bound.
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.
Public Member Functions | |
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: More... | |
double | lower_bound () const |
const LinearExpr & | linear_expr () const |
double | upper_bound () const |
Constructor & Destructor Documentation
◆ LinearRange() [1/2]
|
inline |
Definition at line 194 of file linear_expr.h.
◆ LinearRange() [2/2]
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:
Member Function Documentation
◆ linear_expr()
|
inline |
Definition at line 206 of file linear_expr.h.
◆ lower_bound()
|
inline |
Definition at line 205 of file linear_expr.h.
◆ upper_bound()
|
inline |
Definition at line 207 of file linear_expr.h.
The documentation for this class was generated from the following file:
double lower_bound() const
Definition: linear_expr.h:205
double upper_bound() const
Definition: linear_expr.h:207
const LinearExpr & linear_expr() const
Definition: linear_expr.h:206