Objective function interface class. More...
#include <ObjectiveFunction.hpp>

Public Types | |
| typedef dvMapType::const_iterator | varsIterator |
| Constant iterator to decision variable map. More... | |
| typedef uncMapType::const_iterator | uncsIterator |
| Constant iterator to uncertain parameter map. More... | |
| typedef vector< ROCPPExpr_Ptr >::const_iterator | obj_fun_iterator |
| Constant iterator to a collection of LHSExpressions defining the objective function. More... | |
Public Member Functions | |
| ObjectiveFunctionIF (objType type) | |
| Constructor of the objective function interface class. More... | |
| virtual | ~ObjectiveFunctionIF () |
| Destructor of the objective function interface class. More... | |
| virtual varsIterator | varsBegin () const =0 |
| Return a constant iterator pointing to the beginning of the decision variable map. More... | |
| virtual varsIterator | varsEnd () const =0 |
| Return a constant iterator pointing to the end of the decision variable map. More... | |
| virtual uncsIterator | uncBegin () const =0 |
| Return a constant iterator pointing to the beginning of the uncertain parameter map. More... | |
| virtual uncsIterator | uncEnd () const =0 |
| Return a constant iterator pointing to the end of the uncertain parameter map. More... | |
| void | checkCompatibility (ROCPPExpr_Ptr pExpression) const |
| Check compatibility for the given expression to be given as (one of the) objective functions. More... | |
| virtual void | add_to_obj (ROCPPVarIF_Ptr pVar, double cost)=0 |
| Add the product of the inputs as a new term to all parts of the objective function. More... | |
| virtual ROCPPObjectiveIF_Ptr | mapObjVars (const map< string, ROCPPVarIF_Ptr > &mapFromOldToNewVars) const =0 |
| Map the decision variables in this objective function to new variables. More... | |
| virtual ROCPPObjectiveIF_Ptr | mapObjUnc (const map< string, ROCPPUnc_Ptr > &mapFromOldToNewUnc) const =0 |
| Map the uncertain parameters in this objective function to new uncertain parameters. More... | |
| virtual ROCPPObjectiveIF_Ptr | mapVars (const map< string, ROCPPExpr_Ptr > &mapFromVarToExpression) const =0 |
| Map the decision variables in this objective function to an expression. More... | |
| virtual ROCPPObjectiveIF_Ptr | mapUncs (const map< string, ROCPPExpr_Ptr > &mapFromUncToExpression) const =0 |
| Map the uncertain parameters in this objective function to an expression. More... | |
| virtual void | convertToEpigraph (ROCPPVarIF_Ptr epigraphVar, vector< ROCPPConstraintIF_Ptr > &epigraphConstraints) const =0 |
| Convert the objective function to constraints using an epigraph reformulation. More... | |
| virtual void | add_vars_involved_in_prod (dvContainer &dvs) const =0 |
| Add the decisions variables involved in a product in this objective to the given container dvs. More... | |
| virtual void | add_int_vars (dvContainer &dvs) const =0 |
| Add the integer variables in this objective to the given container. More... | |
| objType | getObjType () const |
| Get the objective function type (linear or piecewise linear and convex) More... | |
| virtual size_t | getNumTermsMaxObjective () const =0 |
| Get the number of terms in the objective function. More... | |
| virtual vector< ROCPPExpr_Ptr > | getObj () const =0 |
| Get the vector of all objective functions. More... | |
| virtual ROCPPExpr_Ptr | getObj (uint i) const =0 |
| Get the i th objective function expression. More... | |
| virtual uint | getNumTimesTermAppears (const multimap< string, ROCPPVarIF_Ptr > &term) const =0 |
| Get the number of times the term given in the multimap appears in this objective function. More... | |
| virtual ROCPPObjectiveIF_Ptr | replaceTermWithVar (const multimap< string, ROCPPVarIF_Ptr > &term, ROCPPVarIF_Ptr var) const =0 |
| Replace in this objective function the term given with the decision variable provided. More... | |
| virtual bool | isSimpleObjective () const |
| Return true if this objective function is linear. More... | |
| virtual bool | isMaxObjective () const |
| Return true if this objective function is given as the maximum of finitely many linear functions. More... | |
| virtual bool | hasNonlinearities () const =0 |
| Return true if there is a product between two decision variables in this objective function. More... | |
| virtual bool | hasProdsUncertainties () const =0 |
| Return true if there is a product between two uncertain parameters in this objective function. More... | |
| virtual bool | hasProdsContVars () const =0 |
| Return true if there is a product between two continuous variables in this objective function. More... | |
| virtual bool | isDeterministic () const =0 |
| Return true if this objective function does not involve any uncertain parameters. More... | |
| virtual uint | getNumAdaptiveVars () const =0 |
| Get the number of adaptive decision variables in this objective function. More... | |
| virtual uint | getTimeStage () const =0 |
| Get the maximum time-stage of any decision variable in the constraint. More... | |
| virtual bool | varIsInvolved (string varName, uint i=1) const =0 |
| Check whether the given variable is involved in the specific objective. More... | |
| virtual ROCPPObjectiveIF_Ptr | Clone () const =0 |
| virtual void | WriteToStream (ofstream &ofs)=0 |
| Write the objective function to a stream. More... | |
Private Attributes | |
| const objType | m_type |
| Type of this objective function. More... | |
Objective function interface class.
| typedef vector<ROCPPExpr_Ptr>::const_iterator ObjectiveFunctionIF::obj_fun_iterator |
Constant iterator to a collection of LHSExpressions defining the objective function.
| typedef uncMapType::const_iterator ObjectiveFunctionIF::uncsIterator |
Constant iterator to uncertain parameter map.
| typedef dvMapType::const_iterator ObjectiveFunctionIF::varsIterator |
Constant iterator to decision variable map.
|
inline |
Constructor of the objective function interface class.
| type | type of the objective function (linear or piecewise linear and convex) |
|
inlinevirtual |
Destructor of the objective function interface class.
|
pure virtual |
Add the integer variables in this objective to the given container.
Implemented in MaxObjective, and SimpleObjective.
|
pure virtual |
Add the product of the inputs as a new term to all parts of the objective function.
| pVar | decision variable in the ProductTerm to add to all parts of the objective function |
| cost | cost in the ProductTerm to add to all parts of the objective function |
Implemented in MaxObjective, and SimpleObjective.
|
pure virtual |
Add the decisions variables involved in a product in this objective to the given container dvs.
Implemented in MaxObjective, and SimpleObjective.
| void ObjectiveFunctionIF::checkCompatibility | ( | ROCPPExpr_Ptr | pExpression | ) | const |
Check compatibility for the given expression to be given as (one of the) objective functions.
| pExpression | expression of the objective function |
|
pure virtual |
Implemented in MaxObjective, and SimpleObjective.
|
pure virtual |
Convert the objective function to constraints using an epigraph reformulation.
| epigraphVar | epigraph variable used to write the problem in epigraph form |
| epigraphConstraints | will contain all the constraints used to write the objective function in epigraph form |
Implemented in MaxObjective, and SimpleObjective.
|
pure virtual |
Get the number of adaptive decision variables in this objective function.
Implemented in MaxObjective, and SimpleObjective.
|
pure virtual |
Get the number of terms in the objective function.
Implemented in MaxObjective, and SimpleObjective.
|
pure virtual |
Get the number of times the term given in the multimap appears in this objective function.
| term | multimap from the name of the decision variable to the desicion variable used to define this term |
Implemented in MaxObjective, and SimpleObjective.
|
pure virtual |
Get the vector of all objective functions.
Implemented in MaxObjective, and SimpleObjective.
|
pure virtual |
Get the i th objective function expression.
| i | Number of the objective function |
Implemented in MaxObjective, and SimpleObjective.
|
inline |
Get the objective function type (linear or piecewise linear and convex)
|
pure virtual |
Get the maximum time-stage of any decision variable in the constraint.
Implemented in MaxObjective, and SimpleObjective.
|
pure virtual |
Return true if there is a product between two decision variables in this objective function.
Implemented in MaxObjective, and SimpleObjective.
|
pure virtual |
Return true if there is a product between two continuous variables in this objective function.
Implemented in MaxObjective, and SimpleObjective.
|
pure virtual |
Return true if there is a product between two uncertain parameters in this objective function.
Implemented in MaxObjective, and SimpleObjective.
|
pure virtual |
Return true if this objective function does not involve any uncertain parameters.
Implemented in MaxObjective, and SimpleObjective.
|
inlinevirtual |
Return true if this objective function is given as the maximum of finitely many linear functions.
Reimplemented in MaxObjective.
|
inlinevirtual |
Return true if this objective function is linear.
Reimplemented in SimpleObjective.
|
pure virtual |
Map the uncertain parameters in this objective function to new uncertain parameters.
Implemented in MaxObjective, and SimpleObjective.
|
pure virtual |
Map the decision variables in this objective function to new variables.
Implemented in MaxObjective, and SimpleObjective.
|
pure virtual |
Map the uncertain parameters in this objective function to an expression.
Implemented in MaxObjective, and SimpleObjective.
|
pure virtual |
Map the decision variables in this objective function to an expression.
Implemented in MaxObjective, and SimpleObjective.
|
pure virtual |
Replace in this objective function the term given with the decision variable provided.
| term | map including the decision variables in the term to be replaced |
| var | variable used to replace the term |
Implemented in MaxObjective, and SimpleObjective.
|
pure virtual |
Return a constant iterator pointing to the beginning of the uncertain parameter map.
Implemented in MaxObjective, and SimpleObjective.
|
pure virtual |
Return a constant iterator pointing to the end of the uncertain parameter map.
Implemented in MaxObjective, and SimpleObjective.
|
pure virtual |
Check whether the given variable is involved in the specific objective.
Implemented in MaxObjective, and SimpleObjective.
|
pure virtual |
Return a constant iterator pointing to the beginning of the decision variable map.
Implemented in MaxObjective, and SimpleObjective.
|
pure virtual |
Return a constant iterator pointing to the end of the decision variable map.
Implemented in MaxObjective, and SimpleObjective.
|
pure virtual |
Write the objective function to a stream.
| ofs | output file stream |
Implemented in MaxObjective, and SimpleObjective.
|
private |
Type of this objective function.