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 LinearExprlinear_expr () const
double upper_bound () const
operations_research::LinearRange::LinearRange ( )
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()

const LinearExpr & operations_research::LinearRange::linear_expr ( ) const
inline

◆ lower_bound()

double operations_research::LinearRange::lower_bound ( ) const
inline

◆ upper_bound()

double operations_research::LinearRange::upper_bound ( ) const
inline

The documentation for this class was generated from the following files: