Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::math_opt::BoundedLinearExpression Struct Reference

A LinearExpression with upper and lower bounds. More...

Detailed Description

A LinearExpression with upper and lower bounds.

Definition at line 490 of file variable_and_expressions.h.

#include <variable_and_expressions.h>

Public Member Functions

 BoundedLinearExpression (LinearExpression expression, double lower_bound, double upper_bound)
 BoundedLinearExpression (const internal::VariablesEquality &eq)
 BoundedLinearExpression (LowerBoundedLinearExpression lb_expression)
 BoundedLinearExpression (UpperBoundedLinearExpression ub_expression)
double lower_bound_minus_offset () const
double upper_bound_minus_offset () const

Public Attributes

LinearExpression expression
double lower_bound
double upper_bound

Constructor & Destructor Documentation

◆ BoundedLinearExpression() [1/4]

operations_research::math_opt::BoundedLinearExpression::BoundedLinearExpression ( LinearExpression expression,
double lower_bound,
double upper_bound )
inline

Users are not expected to use this constructor. Instead they should build this object using overloads of the >=, <=, and == operators. For example, 3 <= x + y <= 3.

Definition at line 1694 of file variable_and_expressions.h.

◆ BoundedLinearExpression() [2/4]

operations_research::math_opt::BoundedLinearExpression::BoundedLinearExpression ( const internal::VariablesEquality & eq)
inline

Users are not expected to use this constructor. This implicit conversion will be used where a BoundedLinearExpression is expected and the user uses == comparison of two variables. For example AddLinearConstraint(x == y);.

Definition at line 1701 of file variable_and_expressions.h.

◆ BoundedLinearExpression() [3/4]

operations_research::math_opt::BoundedLinearExpression::BoundedLinearExpression ( LowerBoundedLinearExpression lb_expression)
inline

Definition at line 1707 of file variable_and_expressions.h.

◆ BoundedLinearExpression() [4/4]

operations_research::math_opt::BoundedLinearExpression::BoundedLinearExpression ( UpperBoundedLinearExpression ub_expression)
inline

Definition at line 1713 of file variable_and_expressions.h.

Member Function Documentation

◆ lower_bound_minus_offset()

double operations_research::math_opt::BoundedLinearExpression::lower_bound_minus_offset ( ) const
inline

Returns the actual lower_bound after taking into account the linear expression offset.

Definition at line 1719 of file variable_and_expressions.h.

◆ upper_bound_minus_offset()

double operations_research::math_opt::BoundedLinearExpression::upper_bound_minus_offset ( ) const
inline

Returns the actual upper_bound after taking into account the linear expression offset.

Definition at line 1723 of file variable_and_expressions.h.

Member Data Documentation

◆ expression

LinearExpression operations_research::math_opt::BoundedLinearExpression::expression

Definition at line 513 of file variable_and_expressions.h.

◆ lower_bound

double operations_research::math_opt::BoundedLinearExpression::lower_bound

Definition at line 514 of file variable_and_expressions.h.

◆ upper_bound

double operations_research::math_opt::BoundedLinearExpression::upper_bound

Definition at line 515 of file variable_and_expressions.h.


The documentation for this struct was generated from the following file: