Linear objective function. More...
#include <ObjectiveFunction.hpp>


Public Member Functions | |
| SimpleObjective () | |
| Constructor of the SimpleObjective class. More... | |
| SimpleObjective (ROCPPExpr_Ptr objFun) | |
| Constructor of the SimpleObjective class. More... | |
| ~SimpleObjective () | |
| Destructor of the SimpleObjective class. More... | |
| varsIterator | varsBegin () const |
| varsIterator | varsEnd () const |
| uncsIterator | uncBegin () const |
| uncsIterator | uncEnd () const |
| 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... | |
| void | add_vars_involved_in_prod (dvContainer &dvs) const |
| void | add_int_vars (dvContainer &dvs) 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... | |
| 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 |
| void | convertToEpigraph (ROCPPVarIF_Ptr epigraphVar, vector< ROCPPConstraintIF_Ptr > &epigraphConstraints) const |
| Convert the objective function to constraints using an epigraph reformulation. More... | |
| vector< ROCPPExpr_Ptr > | getObj () const |
| Get the vector of all objective functions. More... | |
| ROCPPExpr_Ptr | getSimpleObj () const |
| ROCPPExpr_Ptr | getObj (uint i) const |
| size_t | getNumTermsMaxObjective () const |
| 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... | |
| bool | isSimpleObjective () const |
| bool | hasNonlinearities () const |
| bool | hasProdsUncertainties () const |
| bool | hasProdsContVars () const |
| 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 |
| 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 | isMaxObjective () const |
| Return true if this objective function is given as the maximum of finitely many linear functions. More... | |
Private Attributes | |
| ROCPPExpr_Ptr | m_pObjFun |
| Expression used to define the objective function. More... | |
Additional Inherited Members | |
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... | |
Linear objective function.
| SimpleObjective::SimpleObjective | ( | ) |
Constructor of the SimpleObjective class.
| SimpleObjective::SimpleObjective | ( | ROCPPExpr_Ptr | objFun | ) |
Constructor of the SimpleObjective class.
| objFun | expression used to define the objective function |
|
inline |
Destructor of the SimpleObjective 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 |
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 |
Implements ObjectiveFunctionIF.
|
inline |
|
virtual |
Get the maximum time-stage of any decision variable in the constraint.
Implements ObjectiveFunctionIF.
|
virtual |
Implements ObjectiveFunctionIF.
|
virtual |
Implements ObjectiveFunctionIF.
|
virtual |
Implements ObjectiveFunctionIF.
|
virtual |
Return true if this objective function does not involve any uncertain parameters.
Implements ObjectiveFunctionIF.
|
inlinevirtual |
Reimplemented from ObjectiveFunctionIF.
|
virtual |
Implements ObjectiveFunctionIF.
|
virtual |
Implements ObjectiveFunctionIF.
|
virtual |
Implements ObjectiveFunctionIF.
|
virtual |
Implements ObjectiveFunctionIF.
|
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.
|
inlinevirtual |
Implements ObjectiveFunctionIF.
|
inlinevirtual |
Implements ObjectiveFunctionIF.
|
virtual |
Implements ObjectiveFunctionIF.
|
inlinevirtual |
Implements ObjectiveFunctionIF.
|
inlinevirtual |
Implements ObjectiveFunctionIF.
|
virtual |
Write the objective function to a stream.
| ofs | output file stream |
Implements ObjectiveFunctionIF.
|
private |
Expression used to define the objective function.