Constraint term interface. More...
#include <ConstraintTerm.hpp>

Public Types | |
| typedef dvMapType::const_iterator | dvIterator |
| Constant iterator for product term decision variable map. More... | |
| typedef uncMapType::const_iterator | uncIterator |
| Constant iterator for product term uncertain parameter map. More... | |
Public Member Functions | |
| ConstraintTermIF () | |
| Constructor of the ConstraintTermIF class. More... | |
| virtual | ~ConstraintTermIF () |
| Destructor of the ConstraintTermIF class. More... | |
| virtual bool | operator== (const ProductTerm &other) const |
| Check it two terms are equal. More... | |
| virtual void | operator*= (ROCPPconstCstrTermIF_Ptr term) |
| Multiply this object with the given term. More... | |
| virtual void | operator*= (ROCPPVarIF_Ptr var) |
| Multiply this object with the given decision variable. More... | |
| virtual void | operator*= (ROCPPUnc_Ptr unc) |
| Multiply this object with the given uncertainty. More... | |
| virtual void | operator*= (double a) |
| Multiply this object with the given coefficient␐␐␐. More... | |
| dvIterator | varsBegin () const |
| Return a constant iterator pointing to the beginning of the decision variable map (m_pDVContainer) More... | |
| dvIterator | varsEnd () const |
| Return a constant iterator pointing to the end of the decision variable map (m_pDVContainer) More... | |
| uncIterator | uncBegin () const |
| Return a constant iterator pointing to the beginning of the uncertain parameter map (m_pUncContainer) More... | |
| uncIterator | uncEnd () const |
| Return a constant iterator pointing to the end of the uncertain parameter map (m_pUncContainer) More... | |
| virtual ROCPPCstrTermIF_Ptr | mapTermVars (const map< string, ROCPPVarIF_Ptr > &mapFromOldToNewVars) const =0 |
| Map the old decision variables in this term to new variables. More... | |
| virtual ROCPPCstrTermIF_Ptr | mapTermUnc (const map< string, ROCPPUnc_Ptr > &mapFromOldToNewUnc) const =0 |
| Map the old uncertain parameters in this term to new uncertainties. More... | |
| virtual ROCPPExpr_Ptr | mapVars (const map< string, ROCPPExpr_Ptr > &mapFromVarToExpression) const =0 |
| Map the old variables in this term to expressions. More... | |
| virtual ROCPPExpr_Ptr | mapUncs (const map< string, ROCPPExpr_Ptr > &mapFromUncToExpression) const =0 |
| Map the old uncertainties in this term to expressions. More... | |
| virtual ROCPPCstrTermIF_Ptr | replaceTermWithVar (const multimap< string, ROCPPVarIF_Ptr > &term, ROCPPVarIF_Ptr var) const =0 |
| Replace the given term in this term with the given decision variable. More... | |
| virtual pair< bool, ROCPPCstrTermIF_Ptr > | factorOut (ROCPPUnc_Ptr unc) const |
| Calculate the coeffiecient of the given uncertainty. More... | |
| virtual void | add (ROCPPconstCstrTermIF_Ptr other) |
| Add a given constraint term to this term. More... | |
| virtual void | add_vars_involved_in_prod (dvContainer &dvs) const =0 |
| Add the decisions variables involved in a product in this term to the given container dvs. More... | |
| void | add_int_vars (dvContainer &dvs) const |
| Add the integer variables in this term to the given container. More... | |
| virtual double | evaluate (const map< string, double > &valuesMap) const =0 |
| Calculate the value of this term. More... | |
| virtual void | getAllProductsOf2Variables (map< pair< string, string >, uint > &freqMap, map< pair< string, string >, multimap< string, ROCPPVarIF_Ptr > > &termMap) const =0 |
| Get the products of any two variables in this term. More... | |
| virtual bool | isProductTerm () const |
| Return true if and only if the term is of type prodTerm. More... | |
| virtual bool | isNonlinearProdTerm () const |
| Return true if and only if the term is a product term and is nonlinear, i.e., if it involves products of decision variables. More... | |
| virtual bool | isNormTerm () const |
| Return true if and only if the term is of type normTerm. More... | |
| virtual constraintTermType | getType () const =0 |
| Return the type of the term. More... | |
| virtual bool | hasNonlinearities () const =0 |
| Return true if and only if there is a product between two decision variables in this term. More... | |
| virtual bool | hasProdsUncertainties () const =0 |
| Return true if and only if there is a product between two uncertainties in this term. More... | |
| virtual bool | hasProdsContVars () const =0 |
| Return true if and only if there is a product between two continuous variables in this term. More... | |
| virtual bool | isConstant () const |
| Return true if and only if the term is just a constant. More... | |
| virtual bool | isDeterministic () const |
| Return true if and only if the term is deterministic. More... | |
| virtual bool | isLinear () const |
| Return true if and only if the term is linear. More... | |
| virtual bool | isQuadratic () const |
| Return true if and only if the term is quadratic. More... | |
| virtual bool | is_same (ROCPPconstCstrTermIF_Ptr other) const =0 |
| Return true if and only if the given constraint term is the same as this object. More... | |
| virtual bool | isWellDefined () const =0 |
| Return true if and only if this object is not empty. More... | |
| ROCPPconstdvContainer_Ptr | getDVContainer () const |
| Return the decision variable container (m_dvContainer) of this object. More... | |
| ROCPPconstuncContainer_Ptr | getUncContainer () const |
| Return the uncertainty container (m_uncContainer) in this object. More... | |
| virtual double | getCoeff () const |
| Return the coefficient (a double type) of this object. More... | |
| uint | getNumContVars () const |
| Return the number of real-valued decision variables in this term. More... | |
| uint | getNumIntVars () const |
| Return the number of integer decision variables in this term. More... | |
| uint | getNumBoolVars () const |
| Return the number of boolen decision variables in this term. More... | |
| uint | getNumAdaptiveContVars () const |
| Return the number of adaptive real-valued decision variables in this term. More... | |
| uint | getNumAdaptiveVars () const |
| Return the number of adaptive decision variables in this term. More... | |
| size_t | getNumUncertainties () const |
| Return the number of uncertain parameters in this term. More... | |
| size_t | getNumVars () const |
| Return the number of decision variables in this term. More... | |
| bool | allIntVarsBounded () const |
| Return true if and only if all integer decision variables in this term are bounded. More... | |
| virtual uint | getNumTimesTermAppears (const multimap< string, ROCPPVarIF_Ptr > &term) const =0 |
| Get the number of times the given term appears in this object. More... | |
| virtual ROCPPCstrTermIF_Ptr | Clone () const =0 |
| Clone this term and return a pointer to the clone. More... | |
| virtual void | WriteToStream (ofstream &ofs) const =0 |
| Print this term to the stream ofs. More... | |
Protected Attributes | |
| ROCPPdvContainer_Ptr | m_pDVContainer |
| Decision variable container. More... | |
| ROCPPuncContainer_Ptr | m_pUncContainer |
| Uncertain parameter container. More... | |
Constraint term interface.
Used to define a term in a constraint or in the objective function
| typedef dvMapType::const_iterator ConstraintTermIF::dvIterator |
Constant iterator for product term decision variable map.
| typedef uncMapType::const_iterator ConstraintTermIF::uncIterator |
Constant iterator for product term uncertain parameter map.
| ConstraintTermIF::ConstraintTermIF | ( | ) |
Constructor of the ConstraintTermIF class.
|
inlinevirtual |
Destructor of the ConstraintTermIF class.
|
virtual |
Add a given constraint term to this term.
Reimplemented in ProductTerm.
| void ConstraintTermIF::add_int_vars | ( | dvContainer & | dvs | ) | const |
Add the integer variables in this term to the given container.
|
pure virtual |
Add the decisions variables involved in a product in this term to the given container dvs.
Implemented in NormTerm, and ProductTerm.
| bool ConstraintTermIF::allIntVarsBounded | ( | ) | const |
Return true if and only if all integer decision variables in this term are bounded.
|
pure virtual |
Clone this term and return a pointer to the clone.
Implemented in NormTerm, and ProductTerm.
|
pure virtual |
Calculate the value of this term.
| valuesMap | a map from name of the variable to its value |
Implemented in NormTerm, and ProductTerm.
|
virtual |
Calculate the coeffiecient of the given uncertainty.
Reimplemented in ProductTerm.
|
pure virtual |
Get the products of any two variables in this term.
| freqMap | map from the pair of the variable names in each product to the frequency of this product |
| termMap | map from the pair of the variable names in each product to the map of the name to the variable involved in the product |
Implemented in NormTerm, and ProductTerm.
|
virtual |
Return the coefficient (a double type) of this object.
Reimplemented in ProductTerm.
|
inline |
Return the decision variable container (m_dvContainer) of this object.
| uint ConstraintTermIF::getNumAdaptiveContVars | ( | ) | const |
Return the number of adaptive real-valued decision variables in this term.
| uint ConstraintTermIF::getNumAdaptiveVars | ( | ) | const |
Return the number of adaptive decision variables in this term.
| uint ConstraintTermIF::getNumBoolVars | ( | ) | const |
Return the number of boolen decision variables in this term.
| uint ConstraintTermIF::getNumContVars | ( | ) | const |
Return the number of real-valued decision variables in this term.
| uint ConstraintTermIF::getNumIntVars | ( | ) | const |
Return the number of integer decision variables in this term.
|
pure virtual |
Get the number of times the given term appears in this object.
| term | map from name of the variable to the pointer of the variable involved in the term |
Implemented in NormTerm, and ProductTerm.
| size_t ConstraintTermIF::getNumUncertainties | ( | ) | const |
Return the number of uncertain parameters in this term.
| size_t ConstraintTermIF::getNumVars | ( | ) | const |
Return the number of decision variables in this term.
|
pure virtual |
Return the type of the term.
Implemented in NormTerm, and ProductTerm.
|
inline |
Return the uncertainty container (m_uncContainer) in this object.
|
pure virtual |
Return true if and only if there is a product between two decision variables in this term.
Implemented in NormTerm, and ProductTerm.
|
pure virtual |
Return true if and only if there is a product between two continuous variables in this term.
Implemented in NormTerm, and ProductTerm.
|
pure virtual |
Return true if and only if there is a product between two uncertainties in this term.
Implemented in NormTerm, and ProductTerm.
|
pure virtual |
Return true if and only if the given constraint term is the same as this object.
Implemented in NormTerm, and ProductTerm.
|
virtual |
Return true if and only if the term is just a constant.
Reimplemented in ProductTerm.
|
virtual |
Return true if and only if the term is deterministic.
Reimplemented in ProductTerm.
|
virtual |
Return true if and only if the term is linear.
Reimplemented in ProductTerm.
|
virtual |
Return true if and only if the term is a product term and is nonlinear, i.e., if it involves products of decision variables.
|
inlinevirtual |
Return true if and only if the term is of type normTerm.
Reimplemented in NormTerm.
|
inlinevirtual |
Return true if and only if the term is of type prodTerm.
Reimplemented in ProductTerm.
|
virtual |
Return true if and only if the term is quadratic.
Reimplemented in ProductTerm.
|
pure virtual |
Return true if and only if this object is not empty.
Implemented in NormTerm, and ProductTerm.
|
pure virtual |
Map the old uncertain parameters in this term to new uncertainties.
| mapFromOldToNewUnc | map from old uncertainty name to new uncertainty pointer |
Implemented in NormTerm, and ProductTerm.
|
pure virtual |
Map the old decision variables in this term to new variables.
| mapFromOldToNewVars | map from old variable name to new variable pointer |
Implemented in NormTerm, and ProductTerm.
|
pure virtual |
Map the old uncertainties in this term to expressions.
| mapFromUncToExpression | map from uncertain parameter names to pointers to expressions |
Implemented in NormTerm, and ProductTerm.
|
pure virtual |
Map the old variables in this term to expressions.
| mapFromVarToExpression | map from old variables names to pointers to expressions |
Implemented in NormTerm, and ProductTerm.
|
virtual |
Multiply this object with the given coefficient␐␐␐.
Reimplemented in ProductTerm.
|
virtual |
Multiply this object with the given term.
Reimplemented in ProductTerm.
|
virtual |
Multiply this object with the given uncertainty.
Reimplemented in ProductTerm.
|
virtual |
Multiply this object with the given decision variable.
Reimplemented in ProductTerm.
|
virtual |
|
pure virtual |
Replace the given term in this term with the given decision variable.
| term | map including the decision variables in the term to be replaced |
| var | variable used to replace the term |
Implemented in NormTerm, and ProductTerm.
|
inline |
Return a constant iterator pointing to the beginning of the uncertain parameter map (m_pUncContainer)
|
inline |
Return a constant iterator pointing to the end of the uncertain parameter map (m_pUncContainer)
|
inline |
Return a constant iterator pointing to the beginning of the decision variable map (m_pDVContainer)
|
inline |
Return a constant iterator pointing to the end of the decision variable map (m_pDVContainer)
|
pure virtual |
Print this term to the stream ofs.
| ofs | output file stream |
Implemented in NormTerm, and ProductTerm.
|
protected |
Decision variable container.
|
protected |
Uncertain parameter container.