Piecewise linear convex objective function. More...
#include <ObjectiveFunction.hpp>


Public Types | |
| typedef vector< ROCPPExpr_Ptr >::const_iterator | obj_iterator |
| Constant iterator on the parts of the objective function. More... | |
Public Types inherited from ObjectiveFunctionIF | |
| 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 | |
| MaxObjective () | |
| Constructor of the MaxObjective class. More... | |
| MaxObjective (vector< ROCPPExpr_Ptr > objFuns) | |
| Constructor of the MaxObjective class. More... | |
| ~MaxObjective () | |
| Destructor of the MaxObjective class. More... | |
| varsIterator | varsBegin () const |
| varsIterator | varsEnd () const |
| uncsIterator | uncBegin () const |
| uncsIterator | uncEnd () const |
| obj_iterator | objectiveBegin () const |
| Return a constant iterator pointing to the beginning of the vector of objective functions. More... | |
| obj_iterator | objectiveEnd () const |
| Return a constant iterator pointing to the end of the vector of objective functions. More... | |
| void | add_to_obj (ROCPPVarIF_Ptr pVar, double cost) |
| Add the product of the inputs as a new term to all parts of the objective function. More... | |
| virtual void | add_vars_involved_in_prod (dvContainer &dvs) const |
| virtual void | add_int_vars (dvContainer &dvs) const |
| ROCPPObjectiveIF_Ptr | mapObjVars (const map< string, ROCPPVarIF_Ptr > &mapFromOldToNewVars) const |
| ROCPPObjectiveIF_Ptr | mapObjUnc (const map< string, ROCPPUnc_Ptr > &mapFromOldToNewUnc) const |
| ROCPPObjectiveIF_Ptr | mapVars (const map< string, ROCPPExpr_Ptr > &mapFromVarToExpression) const |
| ROCPPObjectiveIF_Ptr | mapUncs (const map< string, ROCPPExpr_Ptr > &mapFromUncToExpression) const |
| ROCPPObjectiveIF_Ptr | replaceTermWithVar (const multimap< string, ROCPPVarIF_Ptr > &term, ROCPPVarIF_Ptr var) const |
| Replace in this objective function the term given with the decision variable provided. More... | |
| void | convertToEpigraph (ROCPPVarIF_Ptr epigraphVar, vector< ROCPPConstraintIF_Ptr > &epigraphConstraints) const |
| Convert the objective function to constraints using an epigraph reformulation. More... | |
| size_t | getNumTermsMaxObjective () const |
| Get the number of terms in the objective function. More... | |
| uint | getNumTimesTermAppears (const multimap< string, ROCPPVarIF_Ptr > &term) const |
| Get the number of times the term given in the multimap appears in this objective function. More... | |
| vector< ROCPPExpr_Ptr > | getObj () const |
| Get the vector of all objective functions. More... | |
| ROCPPExpr_Ptr | getObj (uint i) const |
| Get the i th objective function expression. More... | |
| bool | isMaxObjective () const |
| Return true if this objective function is given as the maximum of finitely many linear functions. More... | |
| bool | hasNonlinearities () const |
| Return true if there is a product between two decision variables in this objective function. More... | |
| bool | hasProdsUncertainties () const |
| Return true if there is a product between two uncertain parameters in this objective function. More... | |
| bool | hasProdsContVars () const |
| Return true if there is a product between two continuous variables in this objective function. More... | |
| bool | isDeterministic () const |
| Return true if this objective function does not involve any uncertain parameters. More... | |
| uint | getNumAdaptiveVars () const |
| Get the number of adaptive decision variables in this objective function. More... | |
| uint | getTimeStage () const |
| Get the maximum time-stage of any decision variable in the constraint. More... | |
| bool | varIsInvolved (string varName, uint i=1) const |
| Check whether the given variable is involved in the specific objective. More... | |
| ROCPPObjectiveIF_Ptr | Clone () const |
| void | WriteToStream (ofstream &ofs) |
| Write the objective function to a stream. More... | |
Public Member Functions inherited from ObjectiveFunctionIF | |
| ObjectiveFunctionIF (objType type) | |
| Constructor of the objective function interface class. More... | |
| virtual | ~ObjectiveFunctionIF () |
| Destructor of the objective function interface class. More... | |
| void | checkCompatibility (ROCPPExpr_Ptr pExpression) const |
| Check compatibility for the given expression to be given as (one of the) objective functions. More... | |
| objType | getObjType () const |
| Get the objective function type (linear or piecewise linear and convex) More... | |
| virtual bool | isSimpleObjective () const |
| Return true if this objective function is linear. More... | |
Private Attributes | |
| vector< ROCPPExpr_Ptr > | m_pObjFuns |
| Vector of the objective expressions. More... | |
| ROCPPdvContainer_Ptr | m_dvContainer |
| Decision variable container. More... | |
| ROCPPuncContainer_Ptr | m_uncContainer |
| Uncertain parameter container. More... | |
Piecewise linear convex objective function.
| typedef vector<ROCPPExpr_Ptr>::const_iterator MaxObjective::obj_iterator |
Constant iterator on the parts of the objective function.
| MaxObjective::MaxObjective | ( | ) |
Constructor of the MaxObjective class.
| MaxObjective::MaxObjective | ( | vector< ROCPPExpr_Ptr > | objFuns | ) |
Constructor of the MaxObjective class.
|
inline |
Destructor of the MaxObjective class.
|
virtual |
Implements ObjectiveFunctionIF.
|
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 |
Implements ObjectiveFunctionIF.
|
virtual |
Implements ObjectiveFunctionIF.
|
virtual |
Implements ObjectiveFunctionIF.
|
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 |
Implements ObjectiveFunctionIF.
|
virtual |
Get the number of adaptive decision variables in this objective function.
Implements ObjectiveFunctionIF.
|
inlinevirtual |
Get the number of terms in the objective function.
Implements ObjectiveFunctionIF.
|
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 |
Implements ObjectiveFunctionIF.
|
virtual |
Get the vector of all objective functions.
Implements ObjectiveFunctionIF.
|
virtual |
Get the i th objective function expression.
| i | Number of the objective function |
Implements ObjectiveFunctionIF.
|
virtual |
Get the maximum time-stage of any decision variable in the constraint.
Implements ObjectiveFunctionIF.
|
virtual |
Return true if there is a product between two decision variables in this objective function.
Implements ObjectiveFunctionIF.
|
virtual |
Return true if there is a product between two continuous variables in this objective function.
Implements ObjectiveFunctionIF.
|
virtual |
Return true if there is a product between two uncertain parameters in this objective function.
Implements ObjectiveFunctionIF.
|
virtual |
Return true if this objective function does not involve any uncertain parameters.
Implements ObjectiveFunctionIF.
|
inlinevirtual |
Return true if this objective function is given as the maximum of finitely many linear functions.
Reimplemented from ObjectiveFunctionIF.
|
virtual |
Implements ObjectiveFunctionIF.
|
virtual |
Implements ObjectiveFunctionIF.
|
virtual |
Implements ObjectiveFunctionIF.
|
virtual |
Implements ObjectiveFunctionIF.
|
inline |
Return a constant iterator pointing to the beginning of the vector of objective functions.
|
inline |
Return a constant iterator pointing to the end of the vector of objective functions.
|
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 |
Implements ObjectiveFunctionIF.
|
virtual |
Implements ObjectiveFunctionIF.
|
virtual |
Implements ObjectiveFunctionIF.
|
virtual |
Check whether the given variable is involved in the specific objective.
Implements ObjectiveFunctionIF.
|
virtual |
Implements ObjectiveFunctionIF.
|
virtual |
Implements ObjectiveFunctionIF.
|
virtual |
Write the objective function to a stream.
| ofs | output file stream |
Implements ObjectiveFunctionIF.
|
private |
Decision variable container.
|
private |
Vector of the objective expressions.
|
private |
Uncertain parameter container.