Google OR-Tools v9.11
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...

#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
 

Detailed Description

A LinearExpression with upper and lower bounds.

Definition at line 521 of file variable_and_expressions.h.

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 1770 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 1777 of file variable_and_expressions.h.

◆ BoundedLinearExpression() [3/4]

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

Definition at line 1783 of file variable_and_expressions.h.

◆ BoundedLinearExpression() [4/4]

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

Definition at line 1789 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 1795 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 1799 of file variable_and_expressions.h.

Member Data Documentation

◆ expression

LinearExpression operations_research::math_opt::BoundedLinearExpression::expression

Definition at line 544 of file variable_and_expressions.h.

◆ lower_bound

double operations_research::math_opt::BoundedLinearExpression::lower_bound

Definition at line 545 of file variable_and_expressions.h.

◆ upper_bound

double operations_research::math_opt::BoundedLinearExpression::upper_bound

Definition at line 546 of file variable_and_expressions.h.


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