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;
92 double level(
int i1=0,
int i2=0,
int i3=0,
int i4=0,
int i5=0);
Specialized subclass of MP_variable where the variable is pre-specified to be binary.
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())
void initialize(double d)
similar to value() but copies the same value to all entries.
Representation of an expression involving an index.
static const MP_index_exp & getEmpty()
Return the unique empty expression.
Representation of an index.
This is the anchor point for all constructs in a FlopC++ model.
Internal representation of a "set".
static MP_set & getEmpty()
gets the distinct 'empty' MP_set.
Symantic representation of a variable.
void binary()
Call this method to turn the variable into a binary variable.
MP_data upperLimit
Upper bound on the variable value.
MP_data lowerLimit
Lower bound on the variable value.
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.
void display(const std::string &s="")
friend class DisplayVariable
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 integer()
Call this method to turn the MP_variable into an integer variable.
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())
Utility interface class for adding a string name onto a structure.
Utility class to flatten multidimensional information into single dimentional offset information.
The base class for all expressions.
Semantic representation of a variable in a Math Program.
variableType
Enumeration for indicating variable type.
All flopc++ code is contained within the flopc namespace.