|
FLOPC++
|
Symantic representation of a variable.This is one of the main public interface classes. It should be directly declared by clients of the FlopC++. The parametersof construction are MP_set s which specify the indexes over which the variable is defined. More...
#include <MP_variable.hpp>


Public Member Functions | |
| 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()) | |
| void | display (const std::string &s="") |
| ~MP_variable () | |
| 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. More... | |
| 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. More... | |
| void | binary () |
| Call this method to turn the variable into a binary variable. More... | |
| void | integer () |
| Call this method to turn the MP_variable into an integer variable. More... | |
Public Member Functions inherited from flopc::RowMajor | |
| int | size () const |
Public Member Functions inherited from flopc::Named | |
| std::string | getName () const |
| void | setName (const std::string &n) |
Public Attributes | |
| MP_data | upperLimit |
| Upper bound on the variable value. More... | |
| MP_data | lowerLimit |
| Lower bound on the variable value. More... | |
Private Member Functions | |
| void | operator() () const |
Private Attributes | |
| const MP_set_base * | S1 |
| const MP_set_base * | S2 |
| const MP_set_base * | S3 |
| const MP_set_base * | S4 |
| const MP_set_base * | S5 |
| MP_index | i1 |
| MP_index | i2 |
| MP_index | i3 |
| MP_index | i4 |
| MP_index | i5 |
| MP_model * | M |
| variableType | type |
| int | offset |
Friends | |
| class | MP_model |
| class | DisplayVariable |
| class | VariableRef |
Additional Inherited Members | |
Protected Member Functions inherited from flopc::RowMajor | |
| RowMajor (int s1, int s2, int s3, int s4, int s5) | |
| int | f (int i1=0, int i2=0, int i3=0, int i4=0, int i5=0) const |
Protected Member Functions inherited from flopc::Functor | |
| Functor () | |
| virtual | ~Functor () |
Protected Attributes inherited from flopc::RowMajor | |
| int | size1 |
| int | size2 |
| int | size3 |
| int | size4 |
| int | size5 |
| int | size_ |
Symantic representation of a variable.
This is one of the main public interface classes. It should be directly declared by clients of the FlopC++. The parametersof construction are MP_set s which specify the indexes over which the variable is defined.
Definition at line 75 of file MP_variable.hpp.
| MP_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() |
||
| ) |
Definition at line 64 of file MP_variable.cpp.
References flopc::continuous, flopc::MP_model::getDefaultModel(), flopc::MP_data::initialize(), lowerLimit, type, and upperLimit.
|
inline |
Definition at line 88 of file MP_variable.hpp.
|
inline |
Call this method to turn the variable into a binary variable.
Definition at line 108 of file MP_variable.hpp.
References flopc::discrete, flopc::MP_data::initialize(), type, and upperLimit.
Referenced by flopc::MP_binary_variable::MP_binary_variable().
| void MP_variable::display | ( | const std::string & | s = "" | ) |
|
inline |
Call this method to turn the MP_variable into an integer variable.
Definition at line 114 of file MP_variable.hpp.
References flopc::discrete, and type.
| double MP_variable::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.
Definition at line 80 of file MP_variable.cpp.
References flopc::RowMajor::f(), M, offset, and flopc::MP_model::solution.
|
inline |
|
privatevirtual |
Implements flopc::Functor.
Definition at line 84 of file MP_variable.cpp.
References flopc::MP_index::evaluate(), flopc::RowMajor::f(), flopc::MP_set::getEmpty(), i1, i2, i3, i4, i5, M, offset, S1, S2, S3, S4, S5, and flopc::MP_model::solution.
|
friend |
Definition at line 77 of file MP_variable.hpp.
|
friend |
Definition at line 76 of file MP_variable.hpp.
|
friend |
Definition at line 78 of file MP_variable.hpp.
Referenced by operator()().
|
private |
Definition at line 125 of file MP_variable.hpp.
Referenced by display(), and operator()().
|
private |
Definition at line 125 of file MP_variable.hpp.
Referenced by display(), and operator()().
|
private |
Definition at line 125 of file MP_variable.hpp.
Referenced by display(), and operator()().
|
private |
Definition at line 125 of file MP_variable.hpp.
Referenced by display(), and operator()().
|
private |
Definition at line 125 of file MP_variable.hpp.
Referenced by display(), and operator()().
| MP_data flopc::MP_variable::lowerLimit |
Lower bound on the variable value.
Definition at line 121 of file MP_variable.hpp.
Referenced by MP_variable().
|
private |
Definition at line 127 of file MP_variable.hpp.
Referenced by flopc::MP_model::add(), flopc::VariableRef::level(), level(), and operator()().
|
private |
Definition at line 129 of file MP_variable.hpp.
Referenced by flopc::MP_model::add(), display(), flopc::VariableRef::getColumn(), flopc::VariableRef::level(), level(), operator()(), and flopc::VariableRef::VariableRef().
|
private |
Definition at line 124 of file MP_variable.hpp.
Referenced by flopc::VariableRef::getColumn(), flopc::VariableRef::level(), and operator()().
|
private |
Definition at line 124 of file MP_variable.hpp.
Referenced by display(), flopc::VariableRef::getColumn(), flopc::VariableRef::level(), and operator()().
|
private |
Definition at line 124 of file MP_variable.hpp.
Referenced by display(), flopc::VariableRef::getColumn(), flopc::VariableRef::level(), and operator()().
|
private |
Definition at line 124 of file MP_variable.hpp.
Referenced by display(), flopc::VariableRef::getColumn(), flopc::VariableRef::level(), and operator()().
|
private |
Definition at line 124 of file MP_variable.hpp.
Referenced by display(), flopc::VariableRef::getColumn(), flopc::VariableRef::level(), and operator()().
|
private |
Definition at line 128 of file MP_variable.hpp.
Referenced by binary(), integer(), and MP_variable().
| MP_data flopc::MP_variable::upperLimit |
Upper bound on the variable value.
Definition at line 119 of file MP_variable.hpp.
Referenced by binary(), and MP_variable().
1.8.5