9 #ifndef _MP_variable_hpp_
10 #define _MP_variable_hpp_
59 std::vector<Constant> multiplicators,
86 void display(
const std::string &s =
"");
Representation of an index.
This is the anchor point for all constructs in a FlopC++ model.
Utility interface class for adding a string name onto a structure.
variableType
Enumeration for indicating variable type.
MP_binary_variable(const MP_set_base &s1=MP_set::getEmpty(), const MP_set_base &s2=MP_set::getEmpty(), const MP_set_base &s3=MP_set::getEmpty(), const MP_set_base &s4=MP_set::getEmpty(), const MP_set_base &s5=MP_set::getEmpty())
double level(int i1=0, int i2=0, int i3=0, int i4=0, int i5=0)
Returns the value of the variable given the specific index values.
static MP_set & getEmpty()
gets the distinct 'empty' MP_set.
static const MP_index_exp & getEmpty()
Return the unique empty expression.
Specialized subclass of MP_variable where the variable is pre-specified to be binary.
const VariableRef & operator()(const MP_index_exp &d1=MP_index_exp::getEmpty(), const MP_index_exp &d2=MP_index_exp::getEmpty(), const MP_index_exp &d3=MP_index_exp::getEmpty(), const MP_index_exp &d4=MP_index_exp::getEmpty(), const MP_index_exp &d5=MP_index_exp::getEmpty())
Interal use only.
void display(const std::string &s="")
MP_data lowerLimit
Lower bound on the variable value.
Utility class to flatten multidimensional information into single dimentional offset information...
void binary()
Call this method to turn the variable into a binary variable.
Functor to facilitate generation of coefficients.
Representation of an expression involving an index.
Symantic representation of a variable.
Semantic representation of a variable in a Math Program.
MP_data upperLimit
Upper bound on the variable value.
MP_variable(const MP_set_base &s1=MP_set::getEmpty(), const MP_set_base &s2=MP_set::getEmpty(), const MP_set_base &s3=MP_set::getEmpty(), const MP_set_base &s4=MP_set::getEmpty(), const MP_set_base &s5=MP_set::getEmpty())
friend class DisplayVariable
Range over which some other constuct is defined.
VariableRef(MP_variable *v, const MP_index_exp &i1, const MP_index_exp &i2, const MP_index_exp &i3, const MP_index_exp &i4, const MP_index_exp &i5)
void initialize(double d)
similar to value() but copies the same value to all entries.
void integer()
Call this method to turn the MP_variable into an integer variable.
void generate(const MP_domain &domain, std::vector< Constant > multiplicators, GenerateFunctor &f, double m) const
The base class for all expressions.
Internal representation of a "set".
void insertVariables(std::set< MP_variable * > &v) const