Constraint interface class. More...
#include <Constraint.hpp>

Public Types | |
| typedef dvMapType::const_iterator | varsIterator |
| Constant iterator in decision variable map. More... | |
Public Member Functions | |
| ConstraintIF (bool definesUncertaintySet, bool isNAC=false) | |
| Constructor of the constraint interface class. More... | |
| virtual | ~ConstraintIF () |
| Destructor of the constraint 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 ROCPPConstraintIF_Ptr | mapVars (const map< string, ROCPPExpr_Ptr > &mapFromVarToExpression) const =0 |
| Map the decision variables in this constraint to new variables. More... | |
| virtual ROCPPConstraintIF_Ptr | mapUncs (const map< string, ROCPPExpr_Ptr > &mapFromUncToExpression) const =0 |
| Map the uncertain parameters in this constraint to new uncertain parameters. More... | |
| virtual ROCPPConstraintIF_Ptr | replaceTermWithVar (const multimap< string, ROCPPVarIF_Ptr > &term, ROCPPVarIF_Ptr var) const =0 |
| Replace the given term in this expression with the given decision variable. More... | |
| virtual ROCPPConstraintIF_Ptr | replaceBilinearTerm (map< pair< string, string >, ROCPPVarIF_Ptr > &allTerm, uint &count) const =0 |
| Replace the bilinear term in this objecet with the given decision variable. More... | |
| virtual ROCPPConstraintIF_Ptr | mapVars (const map< string, ROCPPVarIF_Ptr > &mapFromOldToNewVars) const =0 |
| Map the decision variables in this constraint to some expressions. More... | |
| virtual ROCPPConstraintIF_Ptr | mapUnc (const map< string, ROCPPUnc_Ptr > &mapFromOldToNewUnc) const =0 |
| Map the uncertain parameters in this constraint to some expressions. 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... | |
| virtual void | add_int_vars (dvContainer &dvs) const =0 |
| Add the integer variables in this term to the given container. 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 constraint. More... | |
| virtual void | getAllProductsOf2Variables (map< pair< string, string >, uint > &freqMap, map< pair< string, string >, multimap< string, ROCPPVarIF_Ptr > > &termMap) const =0 |
| Get the all products of two variables in this constraint. More... | |
| virtual ROCPPconstdvContainer_Ptr | getDVContainer () const =0 |
| Get the decision variable container of this constraint. More... | |
| virtual ROCPPconstuncContainer_Ptr | getUncContainer () const =0 |
| Get the uncertain parameter container of this constraint. More... | |
| virtual uint | getNumContVars () const =0 |
| Get the number of real-valued decision variables in this constraint. More... | |
| virtual uint | getNumIntVars () const =0 |
| Get the number of integer decision variables in this constraint. More... | |
| virtual uint | getNumBoolVars () const =0 |
| Get the number of boolean variables in this constraint. More... | |
| virtual uint | getNumAdaptiveContVars () const =0 |
| Get the number of adaptive real-valued decision variables in this constraint. More... | |
| virtual uint | getNumAdaptiveVars () const =0 |
| Get the number of adaptive decision variables in this constraint. More... | |
| virtual uint | getTimeStage () const =0 |
| Get the maximum time-stage of any decision variable in the constraint. More... | |
| virtual size_t | getNumUncertainties () const =0 |
| Get the number of uncertaint parameters in the constraint. More... | |
| virtual bool | hasNonlinearities () const =0 |
| Return true if and only if there is a product between two decision variables in this constraint. More... | |
| virtual bool | hasProdsUncertainties () const =0 |
| Return true if and only if the constraint involves a product of uncertain parameters. More... | |
| virtual bool | hasProdsContVars () const =0 |
| Return true if and only if there is a product between two real-valued decision variables in this constraint. More... | |
| virtual bool | isWellDefined () const =0 |
| Return true if and only if this object is not empty. More... | |
| bool | definesUncertaintySet () const |
| Return true if and only if this constraint defines the uncertainty set. More... | |
| bool | isDeterministic () const |
| Return true if and only if this constraint does not involve any uncertain parameters. More... | |
| virtual bool | isUseful (double epsilon=1.e-10) const |
| Return false if and only if the left hand side is constant and the left and right hand side constants are equal, within epsilon (this constraint can be deleted) More... | |
| bool | isNAC () const |
| Return true if and only if the constraint is a non-anticipativity constraint (useful for problems with decision-dependent information discovery) More... | |
| virtual bool | hasNoDVs () const =0 |
| Return true if and only if the constraint has no decision variables. More... | |
| virtual bool | isClassicConstraint () const |
| Return true if and only if the constraint is a classic (equality or inequality) constraint. More... | |
| virtual bool | isSOSConstraint () const |
| Return true if and only if the constraint is SOS. More... | |
| virtual bool | isIfThenConstraint () const |
| Return true if and only if the constraint is a logical if then constraint (useful in CPLEX solver) More... | |
| virtual bool | AnyVarIsInvolved (dvContainer &dvs) const =0 |
| Find if any decision variable in the container dvs exists in this object. More... | |
| virtual bool | hasNormTerm () const =0 |
| Return true if and only if the constraint has a norm term. More... | |
| void | setParams (bool defUncertaintyset, bool isNAC) |
| Set the paramaters of this constraint. More... | |
| virtual ROCPPConstraintIF_Ptr | Clone () const =0 |
| Set the right hand side of this constraint. More... | |
| virtual void | WriteToStream (ofstream &ofs, uint cnt) const =0 |
| Write the constraint to a stream. More... | |
Protected Attributes | |
| bool | m_definesUncertaintySet |
| Indicate whether this constraint defines uncertainty set or not. More... | |
| bool | m_isNAC |
| Indicate whether this constraint is a non-anticipativity constraint or not. More... | |
Constraint interface class.
| typedef dvMapType::const_iterator ConstraintIF::varsIterator |
Constant iterator in decision variable map.
| ConstraintIF::ConstraintIF | ( | bool | definesUncertaintySet, |
| bool | isNAC = false |
||
| ) |
Constructor of the constraint interface class.
| definesUncertaintySet | boolean variable, indicates if this constraint defines the uncertainty set or not |
| isNAC | boolean variable, indicates if this constraint is a non-anticipativity constraint or not |
|
inlinevirtual |
Destructor of the constraint interface class.
|
pure virtual |
Add the integer variables in this term to the given container.
Implemented in ClassicConstraintIF.
|
pure virtual |
Add the decisions variables involved in a product in this term to the given container dvs.
Implemented in ClassicConstraintIF.
|
pure virtual |
Find if any decision variable in the container dvs exists in this object.
Implemented in ClassicConstraintIF.
|
pure virtual |
Set the right hand side of this constraint.
Implemented in ClassicConstraintIF.
|
inline |
Return true if and only if this constraint defines the uncertainty set.
|
pure virtual |
Get the all products of two variables in this constraint.
Implemented in ClassicConstraintIF.
|
pure virtual |
Get the decision variable container of this constraint.
Implemented in ClassicConstraintIF.
|
pure virtual |
Get the number of adaptive real-valued decision variables in this constraint.
Implemented in ClassicConstraintIF.
|
pure virtual |
Get the number of adaptive decision variables in this constraint.
Implemented in ClassicConstraintIF.
|
pure virtual |
Get the number of boolean variables in this constraint.
Implemented in ClassicConstraintIF.
|
pure virtual |
Get the number of real-valued decision variables in this constraint.
Implemented in ClassicConstraintIF.
|
pure virtual |
Get the number of integer decision variables in this constraint.
Implemented in ClassicConstraintIF.
|
pure virtual |
Get the number of times the term given in the multimap appears in this constraint.
| term | multimap from the name of the decision variable to the desicion variable used to define this term |
Implemented in ClassicConstraintIF.
|
pure virtual |
Get the number of uncertaint parameters in the constraint.
Implemented in ClassicConstraintIF.
|
pure virtual |
Get the maximum time-stage of any decision variable in the constraint.
Implemented in ClassicConstraintIF.
|
pure virtual |
Get the uncertain parameter container of this constraint.
Implemented in ClassicConstraintIF.
|
pure virtual |
Return true if and only if the constraint has no decision variables.
Implemented in ClassicConstraintIF.
|
pure virtual |
Return true if and only if there is a product between two decision variables in this constraint.
Implemented in ClassicConstraintIF.
|
pure virtual |
Return true if and only if the constraint has a norm term.
Implemented in ClassicConstraintIF.
|
pure virtual |
Return true if and only if there is a product between two real-valued decision variables in this constraint.
Implemented in ClassicConstraintIF.
|
pure virtual |
Return true if and only if the constraint involves a product of uncertain parameters.
Implemented in ClassicConstraintIF.
|
inlinevirtual |
Return true if and only if the constraint is a classic (equality or inequality) constraint.
Reimplemented in ClassicConstraintIF.
|
inline |
Return true if and only if this constraint does not involve any uncertain parameters.
|
inlinevirtual |
Return true if and only if the constraint is a logical if then constraint (useful in CPLEX solver)
|
inline |
Return true if and only if the constraint is a non-anticipativity constraint (useful for problems with decision-dependent information discovery)
|
inlinevirtual |
Return true if and only if the constraint is SOS.
|
inlinevirtual |
Return false if and only if the left hand side is constant and the left and right hand side constants are equal, within epsilon (this constraint can be deleted)
Reimplemented in EqConstraint.
|
pure virtual |
Return true if and only if this object is not empty.
Implemented in ClassicConstraintIF.
|
pure virtual |
Map the uncertain parameters in this constraint to some expressions.
Implemented in ClassicConstraintIF.
|
pure virtual |
Map the uncertain parameters in this constraint to new uncertain parameters.
Implemented in ClassicConstraintIF.
|
pure virtual |
Map the decision variables in this constraint to new variables.
Implemented in ClassicConstraintIF.
|
pure virtual |
Map the decision variables in this constraint to some expressions.
Implemented in ClassicConstraintIF.
|
pure virtual |
Replace the bilinear term in this objecet with the given decision variable.
Implemented in ClassicConstraintIF.
|
pure virtual |
Replace the given term in this expression with the given decision variable.
Implemented in ClassicConstraintIF.
|
inline |
Set the paramaters of this constraint.
| defUncertaintyset | parameter to indicate if this constraint defines the uncertainty set or not |
| isNAC | parameter to indicate if this constraint is a non-anticipativity constraint or not |
|
pure virtual |
Return a constant iterator pointing to the beginning of the decision variable map.
Implemented in ClassicConstraintIF.
|
pure virtual |
Return a constant iterator pointing to the end of the decision variable map.
Implemented in ClassicConstraintIF.
|
pure virtual |
Write the constraint to a stream.
| ofs | output file stream |
| cnt | number (counter) of the constraint |
Implemented in ClassicConstraintIF.
|
protected |
Indicate whether this constraint defines uncertainty set or not.
|
protected |
Indicate whether this constraint is a non-anticipativity constraint or not.