ROC++  v1.2
Automatic Robust Optimization in C++
AdaptVarBool Class Reference

Adaptive boolean variable. More...

#include <DecisionVariable.hpp>

Inheritance diagram for AdaptVarBool:
Collaboration diagram for AdaptVarBool:

Public Member Functions

 AdaptVarBool (string name, uint timeStage, double lb=0., double ub=1.0)
 Constructor of the AdaptVarBool class. More...
 
 ~AdaptVarBool ()
 Destructor of the AdaptVarBool class. More...
 
bool isBooleanVar () const
 Always returns true for AdaptVarBool. More...
 
bool isIntegerVar () const
 Return true if and only if the decision variable is of integer type. More...
 
bool isRealVar () const
 Return true if and only if the decision variable is of real-valued type. More...
 
void setLB (double lb)
 
void setUB (double ub)
 
ROCPPVarIF_Ptr Clone ()
 Return a copy of this variable. More...
 
- Public Member Functions inherited from AdaptiveVariableIF
 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...
 
- 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...
 
double getLB () const
 Return the lower bound of the decision variable. More...
 
double getUB () const
 Return the upper bound of the decision 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...
 

Detailed Description

Adaptive boolean variable.

Constructor & Destructor Documentation

◆ AdaptVarBool()

AdaptVarBool::AdaptVarBool ( string  name,
uint  timeStage,
double  lb = 0.,
double  ub = 1.0 
)

Constructor of the AdaptVarBool class.

◆ ~AdaptVarBool()

AdaptVarBool::~AdaptVarBool ( )
inline

Destructor of the AdaptVarBool class.

Member Function Documentation

◆ Clone()

ROCPPVarIF_Ptr AdaptVarBool::Clone ( )
virtual

Return a copy of this variable.

Implements AdaptiveVariableIF.

◆ isBooleanVar()

bool AdaptVarBool::isBooleanVar ( ) const
inlinevirtual

Always returns true for AdaptVarBool.

Implements DecisionVariableIF.

◆ isIntegerVar()

bool AdaptVarBool::isIntegerVar ( ) const
inlinevirtual

Return true if and only if the decision variable is of integer type.

Implements DecisionVariableIF.

◆ isRealVar()

bool AdaptVarBool::isRealVar ( ) const
inlinevirtual

Return true if and only if the decision variable is of real-valued type.

Implements DecisionVariableIF.

◆ setLB()

void AdaptVarBool::setLB ( double  lb)
virtual
See also
VariableBool::setLB()

Reimplemented from DecisionVariableIF.

◆ setUB()

void AdaptVarBool::setUB ( double  ub)
virtual
See also
VariableBool::setUB()

Reimplemented from DecisionVariableIF.