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

--— Piecewise Linear --— More...

Inheritance diagram for operations_research::PiecewiseLinearExpr:
operations_research::BaseIntExpr operations_research::IntExpr operations_research::PropagationBaseObject operations_research::BaseObject

Public Member Functions

 PiecewiseLinearExpr (Solver *solver, IntExpr *expr, const PiecewiseLinearFunction &f)
 
 ~PiecewiseLinearExpr () override
 
int64_t Min () const override
 
void SetMin (int64_t m) override
 
int64_t Max () const override
 
void SetMax (int64_t m) override
 
void SetRange (int64_t l, int64_t u) override
 This method sets both the min and the max of the expression.
 
std::string name () const override
 Object naming.
 
std::string DebugString () const override
 
void WhenRange (Demon *d) override
 Attach a demon that will watch the min or the max of the expression.
 
void Accept (ModelVisitor *const visitor) const override
 Accepts the given visitor.
 
- Public Member Functions inherited from operations_research::BaseIntExpr
 BaseIntExpr (Solver *const s)
 
 ~BaseIntExpr () override
 
IntVarVar () override
 Creates a variable from the expression.
 
virtual IntVarCastToVar ()
 
- Public Member Functions inherited from operations_research::IntExpr
 IntExpr (Solver *const s)
 
 IntExpr (const IntExpr &)=delete
 This type is neither copyable nor movable.
 
IntExproperator= (const IntExpr &)=delete
 
 ~IntExpr () override
 
virtual void Range (int64_t *l, int64_t *u)
 
virtual void SetValue (int64_t v)
 This method sets the value of the expression.
 
virtual bool Bound () const
 Returns true if the min and the max of the expression are equal.
 
virtual bool IsVar () const
 Returns true if the expression is indeed a variable.
 
IntVarVarWithName (const std::string &name)
 -------— IntExpr -------—
 
void WhenRange (Solver::Closure closure)
 Attach a demon that will watch the min or the max of the expression.
 
void WhenRange (Solver::Action action)
 Attach a demon that will watch the min or the max of the expression.
 
- Public Member Functions inherited from operations_research::PropagationBaseObject
 PropagationBaseObject (Solver *const s)
 
 PropagationBaseObject (const PropagationBaseObject &)=delete
 This type is neither copyable nor movable.
 
PropagationBaseObjectoperator= (const PropagationBaseObject &)=delete
 
 ~PropagationBaseObject () override
 
std::string DebugString () const override
 
Solversolver () const
 
void FreezeQueue ()
 
void UnfreezeQueue ()
 
void EnqueueDelayedDemon (Demon *const d)
 
void EnqueueVar (Demon *const d)
 
void ExecuteAll (const SimpleRevFIFO< Demon * > &demons)
 
void EnqueueAll (const SimpleRevFIFO< Demon * > &demons)
 
void set_action_on_fail (Solver::Action a)
 
void reset_action_on_fail ()
 This method clears the failure callback.
 
void set_variable_to_clean_on_fail (IntVar *v)
 Shortcut for variable cleaner.
 
void set_name (absl::string_view name)
 
bool HasName () const
 Returns whether the object has been named or not.
 
virtual std::string BaseName () const
 Returns a base name for automatic naming.
 
- Public Member Functions inherited from operations_research::BaseObject
 BaseObject ()
 
 BaseObject (const BaseObject &)=delete
 This type is neither copyable nor movable.
 
BaseObjectoperator= (const BaseObject &)=delete
 
virtual ~BaseObject ()
 

Detailed Description

--— Piecewise Linear --—

Definition at line 7223 of file expressions.cc.

Constructor & Destructor Documentation

◆ PiecewiseLinearExpr()

operations_research::PiecewiseLinearExpr::PiecewiseLinearExpr ( Solver * solver,
IntExpr * expr,
const PiecewiseLinearFunction & f )
inline

Definition at line 7225 of file expressions.cc.

◆ ~PiecewiseLinearExpr()

operations_research::PiecewiseLinearExpr::~PiecewiseLinearExpr ( )
inlineoverride

Definition at line 7228 of file expressions.cc.

Member Function Documentation

◆ Accept()

void operations_research::PiecewiseLinearExpr::Accept ( ModelVisitor *const visitor) const
inlineoverridevirtual

Accepts the given visitor.

--— Class IntExpr --—

Todo
(user): Implement visitor.

Reimplemented from operations_research::IntExpr.

Definition at line 7265 of file expressions.cc.

◆ DebugString()

std::string operations_research::PiecewiseLinearExpr::DebugString ( ) const
inlineoverridevirtual

Reimplemented from operations_research::BaseObject.

Definition at line 7258 of file expressions.cc.

◆ Max()

int64_t operations_research::PiecewiseLinearExpr::Max ( ) const
inlineoverridevirtual

Implements operations_research::IntExpr.

Definition at line 7238 of file expressions.cc.

◆ Min()

int64_t operations_research::PiecewiseLinearExpr::Min ( ) const
inlineoverridevirtual

Implements operations_research::IntExpr.

Definition at line 7229 of file expressions.cc.

◆ name()

std::string operations_research::PiecewiseLinearExpr::name ( ) const
inlineoverridevirtual

Object naming.

-------— PropagationBaseObject ------—

Reimplemented from operations_research::PropagationBaseObject.

Definition at line 7253 of file expressions.cc.

◆ SetMax()

void operations_research::PiecewiseLinearExpr::SetMax ( int64_t m)
inlineoverridevirtual

Implements operations_research::IntExpr.

Definition at line 7242 of file expressions.cc.

◆ SetMin()

void operations_research::PiecewiseLinearExpr::SetMin ( int64_t m)
inlineoverridevirtual

Implements operations_research::IntExpr.

Definition at line 7232 of file expressions.cc.

◆ SetRange()

void operations_research::PiecewiseLinearExpr::SetRange ( int64_t l,
int64_t u )
inlineoverridevirtual

This method sets both the min and the max of the expression.

Reimplemented from operations_research::IntExpr.

Definition at line 7248 of file expressions.cc.

◆ WhenRange()

void operations_research::PiecewiseLinearExpr::WhenRange ( Demon * d)
inlineoverridevirtual

Attach a demon that will watch the min or the max of the expression.

Implements operations_research::IntExpr.

Definition at line 7263 of file expressions.cc.


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