ROC++  v1.2
Automatic Robust Optimization in C++
AdaptiveVariableIF Class Referenceabstract

Adaptive variable interface class. More...

#include <DecisionVariable.hpp>

Inheritance diagram for AdaptiveVariableIF:
Collaboration diagram for AdaptiveVariableIF:

Public Member Functions

 AdaptiveVariableIF (string name, decVariableType type, uint timeStage, double lb, double ub)
 Constructor of the AdaptiveVariableIF class. More...
 
virtual ~AdaptiveVariableIF ()
 Destructor of the AdaptiveVariableIF class. More...
 
bool isAdaptive () const
 Return indicator of adaptability, return value equals true if and only if the decision variable can adapt to the history of observations. More...
 
uint getTimeStage () const
 Return the time-stage when the decision is made. More...
 
virtual ROCPPVarIF_Ptr Clone ()=0
 Return a copy of this variable. More...
 
- Public Member Functions inherited from DecisionVariableIF
 DecisionVariableIF (string name, decVariableType type, double lb, double ub)
 Constructor of the DecisionVariableIF class. More...
 
virtual ~DecisionVariableIF ()
 Destructor of the DecisionVariableIF class. More...
 
decVariableType getType () const
 Get the variable type. More...
 
string getName () const
 Return the name of the decision variable. More...
 
virtual bool isBooleanVar () const =0
 Return true if and only if the decision variable is of boolean type. More...
 
virtual bool isIntegerVar () const =0
 Return true if and only if the decision variable is of integer type. More...
 
virtual bool isRealVar () const =0
 Return true if and only if the decision variable is of real-valued type. More...
 
double getLB () const
 Return the lower bound of the decision variable. More...
 
double getUB () const
 Return the upper bound of the decision variable. More...
 
virtual void setLB (double lb)
 Set lower bound of the variable. More...
 
virtual void setUB (double ub)
 Set upper bound of the variable. More...
 
string writeLB () const
 Return the lower bound of the decision variable as a string. More...
 
string writeUB () const
 Return the upper bound of the decision variable as a string. More...
 

Private Attributes

uint m_timeStage
 

Detailed Description

Adaptive variable interface class.

Constructor & Destructor Documentation

◆ AdaptiveVariableIF()

AdaptiveVariableIF::AdaptiveVariableIF ( string  name,
decVariableType  type,
uint  timeStage,
double  lb,
double  ub 
)

Constructor of the AdaptiveVariableIF class.

Parameters
timeStagetime-stage when the decision is made

◆ ~AdaptiveVariableIF()

virtual AdaptiveVariableIF::~AdaptiveVariableIF ( )
inlinevirtual

Destructor of the AdaptiveVariableIF class.

Member Function Documentation

◆ Clone()

virtual ROCPPVarIF_Ptr AdaptiveVariableIF::Clone ( )
pure virtual

Return a copy of this variable.

Implements DecisionVariableIF.

Implemented in AdaptVarDouble, AdaptVarInt, and AdaptVarBool.

◆ getTimeStage()

uint AdaptiveVariableIF::getTimeStage ( ) const
inlinevirtual

Return the time-stage when the decision is made.

Returns
time-stage, uint type

An adaptive decision taken at time-stage t can depend on all uncertain parameters revealed up to and including time t

Implements DecisionVariableIF.

◆ isAdaptive()

bool AdaptiveVariableIF::isAdaptive ( ) const
inlinevirtual

Return indicator of adaptability, return value equals true if and only if the decision variable can adapt to the history of observations.

Returns
adaptability indicator, boolean type

Implements DecisionVariableIF.

Member Data Documentation

◆ m_timeStage

uint AdaptiveVariableIF::m_timeStage
private