Go to the documentation of this file.
9 #ifndef _MP_variable_hpp_
10 #define _MP_variable_hpp_
49 void insertVariables(std::set<MP_variable*>& v)
const {
52 double getValue()
const {
55 int getStage()
const {
58 void generate(
const MP_domain& domain,
59 std::vector<Constant> multiplicators,
64 const MP_index_exp I1,I2,I3,I4,I5;
86 void display(
const std::string &s =
"");
92 double level(
int i1=0,
int i2=0,
int i3=0,
int i4=0,
int i5=0);
Internal representation of a "set".
Utility class to flatten multidimensional information into single dimentional offset information.
void integer()
Call this method to turn the MP_variable into an integer variable.
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.
Symantic representation of a variable.
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())
friend class DisplayVariable
variableType
Enumeration for indicating variable type.
void display(const std::string &s="")
static MP_set & getEmpty()
gets the distinct 'empty' MP_set.
Specialized subclass of MP_variable where the variable is pre-specified to be binary.
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())
MP_data lowerLimit
Lower bound on the variable value.
All flopc++ code is contained within the flopc namespace.
static const MP_index_exp & getEmpty()
Return the unique empty expression.
Semantic representation of a variable in a Math Program.
MP_data upperLimit
Upper bound on the variable value.
Utility interface class for adding a string name onto a structure.
void initialize(double d)
similar to value() but copies the same value to all entries.
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.
Representation of an expression involving an index.
Representation of an index.
This is the anchor point for all constructs in a FlopC++ model.
The base class for all expressions.
void binary()
Call this method to turn the variable into a binary variable.