Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::sat::LinearExpression Struct Reference

#include <linear_constraint.h>

Public Member Functions

double LpValue (const util_intops::StrongVector< IntegerVariable, double > &lp_values) const
 Return[s] the evaluation of the linear expression.
 
IntegerValue LevelZeroMin (IntegerTrail *integer_trail) const
 
IntegerValue Min (const IntegerTrail &integer_trail) const
 
IntegerValue Max (const IntegerTrail &integer_trail) const
 
std::string DebugString () const
 

Public Attributes

std::vector< IntegerVariable > vars
 
std::vector< IntegerValue > coeffs
 
IntegerValue offset = IntegerValue(0)
 

Detailed Description

Helper struct to model linear expression for lin_min/lin_max constraints. The canonical expression should only contain positive coefficients.

Definition at line 131 of file linear_constraint.h.

Member Function Documentation

◆ DebugString()

std::string operations_research::sat::LinearExpression::DebugString ( ) const

Definition at line 354 of file linear_constraint.cc.

◆ LevelZeroMin()

IntegerValue operations_research::sat::LinearExpression::LevelZeroMin ( IntegerTrail * integer_trail) const

Definition at line 321 of file linear_constraint.cc.

◆ LpValue()

double operations_research::sat::LinearExpression::LpValue ( const util_intops::StrongVector< IntegerVariable, double > & lp_values) const

Return[s] the evaluation of the linear expression.

Definition at line 312 of file linear_constraint.cc.

◆ Max()

IntegerValue operations_research::sat::LinearExpression::Max ( const IntegerTrail & integer_trail) const

Returns upper bound of linear expression using variable bounds of the variables in expression.

Definition at line 342 of file linear_constraint.cc.

◆ Min()

IntegerValue operations_research::sat::LinearExpression::Min ( const IntegerTrail & integer_trail) const

Returns lower bound of linear expression using variable bounds of the variables in expression.

Definition at line 330 of file linear_constraint.cc.

Member Data Documentation

◆ coeffs

std::vector<IntegerValue> operations_research::sat::LinearExpression::coeffs

Definition at line 133 of file linear_constraint.h.

◆ offset

IntegerValue operations_research::sat::LinearExpression::offset = IntegerValue(0)

Definition at line 134 of file linear_constraint.h.

◆ vars

std::vector<IntegerVariable> operations_research::sat::LinearExpression::vars

Definition at line 132 of file linear_constraint.h.


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