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

Static integer variable. More...

#include <DecisionVariable.hpp>

Inheritance diagram for VariableInt:
Collaboration diagram for VariableInt:

Public Member Functions

 VariableInt (string name, double lb=-INFINITY, double ub=INFINITY)
 Constructor of the VariableInt class. More...
 
 ~VariableInt ()
 Destructor of the VariableInt class. More...
 
bool isIntegerVar () const
 Always returns true for VariableInt. More...
 
bool isBooleanVar () const
 Return true if and only if the decision variable is of boolean type. More...
 
bool isRealVar () const
 Return true if and only if the decision variable is of real-valued type. More...
 
ROCPPVarIF_Ptr Clone ()
 Return a copy of the decision variable. More...
 
- Public Member Functions inherited from VariableIF
 VariableIF (string name, decVariableType type, double lb, double ub)
 Constructor of the VariableIF class. More...
 
virtual ~VariableIF ()
 Destructor of the VariableIF 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...
 
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...
 

Detailed Description

Static integer variable.

Constructor & Destructor Documentation

◆ VariableInt()

VariableInt::VariableInt ( string  name,
double  lb = -INFINITY,
double  ub = INFINITY 
)

Constructor of the VariableInt class.

◆ ~VariableInt()

VariableInt::~VariableInt ( )
inline

Destructor of the VariableInt class.

Member Function Documentation

◆ Clone()

ROCPPVarIF_Ptr VariableInt::Clone ( )
virtual

Return a copy of the decision variable.

Implements DecisionVariableIF.

◆ isBooleanVar()

bool VariableInt::isBooleanVar ( ) const
inlinevirtual

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

Implements DecisionVariableIF.

◆ isIntegerVar()

bool VariableInt::isIntegerVar ( ) const
inlinevirtual

Always returns true for VariableInt.

Implements DecisionVariableIF.

◆ isRealVar()

bool VariableInt::isRealVar ( ) const
inlinevirtual

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

Implements DecisionVariableIF.