Variable converter interface class Use to map variables to other variables or to expressions. More...
#include <VariableConverter.hpp>

Public Types | |
| typedef map< string, ROCPPVarIF_Ptr >::const_iterator | const_iterator_inv |
| Constant iterator into inverse map. More... | |
Public Member Functions | |
| VariableConverterIF () | |
| Constructor of VariableConverterIF class. More... | |
| ~VariableConverterIF () | |
| Destructor of VariableConverterIF class. More... | |
| const_iterator_inv | findInv (string varName) const |
| Return a constant iterator pointing to the pair of the given variable and the old variable associated with it. More... | |
| const_iterator_inv | beginInv () const |
| Return a constant iterator pointing to the beginning of the inverse map (m_inverseMap) More... | |
| const_iterator_inv | endInv () const |
| Return a constant iterator pointing to the end of the inverse map (m_inverseMap) More... | |
| virtual ROCPPOptModelIF_Ptr | convertVar (ROCPPOptModelIF_Ptr pIn, bool resetAndSave=false) |
| Get the objective and constraints in the input model and then convert the variables. More... | |
| virtual void | convertVar (vector< ROCPPConstraintIF_Ptr >::const_iterator first, vector< ROCPPConstraintIF_Ptr >::const_iterator last, ROCPPObjectiveIF_Ptr obj, const dvContainer &origDVContainer, vector< ROCPPConstraintIF_Ptr > &toAdd, ROCPPObjectiveIF_Ptr &toSet, bool resetAndSave=false)=0 |
| Approximate each variable in the given objective and contraints. More... | |
| virtual void | findVarsToTranslate (vector< ROCPPConstraintIF_Ptr >::const_iterator first, vector< ROCPPConstraintIF_Ptr >::const_iterator last, ROCPPObjectiveIF_Ptr obj, dvContainer &container)=0 |
| Find the variable in the given ocnstraints and objective to be mapped and store them in the container. More... | |
| virtual void | createInverseMap (const dvContainer &origDVContainer)=0 |
| Create the map m_inverseMap. More... | |
| virtual double | evaluateVariableValue (string nme, const map< string, double > &binValuesMap) const =0 |
| Evaluate and return the value of the given variable after converting it. More... | |
| virtual void | printOut (const ROCPPOptModelIF_Ptr pIn, const map< string, double > &variableValue, ROCPPVarIF_Ptr dv) |
| Print the solution of the given decision variable. More... | |
Protected Attributes | |
| map< string, ROCPPVarIF_Ptr > | m_inverseMap |
| Map from the new variable name to old variable. More... | |
Variable converter interface class Use to map variables to other variables or to expressions.
| typedef map<string, ROCPPVarIF_Ptr>::const_iterator VariableConverterIF::const_iterator_inv |
Constant iterator into inverse map.
|
inline |
Constructor of VariableConverterIF class.
|
inline |
Destructor of VariableConverterIF class.
|
inline |
Return a constant iterator pointing to the beginning of the inverse map (m_inverseMap)
|
virtual |
Get the objective and constraints in the input model and then convert the variables.
| pIn | Model to be approximated |
| resetAndSave | Whether to set the translation map in class OneToExprVariableConverterIF |
Reimplemented in LinearDecisionRule.
|
pure virtual |
Approximate each variable in the given objective and contraints.
| first | Constant iterator pointing to the beginning of the vector of constraints to be mapped |
| last | Constant iterator pointing to the end of the vector of constraints to be mapped |
| obj | Objective to be mapped |
| origDVContainer | Container of decision variables to be approximated |
| toAdd | Constraints after mapping |
| toSet | Objective after mapping |
|
pure virtual |
Create the map m_inverseMap.
Implemented in OneToExprVariableConverterIF, and OneToOneVariableConverterIF.
|
inline |
Return a constant iterator pointing to the end of the inverse map (m_inverseMap)
|
pure virtual |
Evaluate and return the value of the given variable after converting it.
Implemented in OneToExprVariableConverterIF, and OneToOneVariableConverterIF.
|
inline |
Return a constant iterator pointing to the pair of the given variable and the old variable associated with it.
|
pure virtual |
Find the variable in the given ocnstraints and objective to be mapped and store them in the container.
|
inlinevirtual |
Print the solution of the given decision variable.
Reimplemented in ConstantDecisionRule, and LinearDecisionRule.
|
protected |
Map from the new variable name to old variable.