ROC++  v1.2
Automatic Robust Optimization in C++
StaticPartitionConstructor Class Reference

Static partition constructor. More...

#include <PWDecisionRule.hpp>

Inheritance diagram for StaticPartitionConstructor:
Collaboration diagram for StaticPartitionConstructor:

Public Member Functions

 StaticPartitionConstructor (const map< string, uint > &numPartitionsMap)
 
 ~StaticPartitionConstructor ()
 
void constructUncToBreakpointMap (const map< string, pair< double, double > > &margSupp)
 Use constant as breakpoint of the partition. More...
 
- Public Member Functions inherited from PartitionConstructorIF
 PartitionConstructorIF (const map< string, uint > &numPartitionsMap)
 
 ~PartitionConstructorIF ()
 
const_iterator begin () const
 Return a constant iterator pointing to the beginning of m_partitionsMap. More...
 
const_iterator end () const
 Return a constant iterator pointing to the end of m_partitionsMap. More...
 
usconstraints_iterator USCbegin (string partition) const
 Return a constant iterator pointing to the beginning of constraints defining the uncertainty set on the given partition. More...
 
usconstraints_iterator USCend (string partition) const
 Return a constant iterator pointing to the end of constraints defining the uncertainty set on the given partition. More...
 
ROCPPUnc_Ptr getUncOnPartition (string partition, string origUncName) const
 Get the uncertain parameter on the the given subset of the partition for the given original uncertain parameter. More...
 
addconstraints_iterator ACbegin () const
 Return a constant iterator pointing to the beginning of m_additionalConstraints. More...
 
addconstraints_iterator ACend () const
 Return a constant iterator pointing to the end of m_additionalConstraints. More...
 
void getReady (ROCPPOptModelIF_Ptr pIn, ROCPPParConverter_Ptr pPartConverter, ROCPPMItoMB_Ptr pMIMBConverter, map< string, pair< double, double > > &margSupp, const map< string, pair< double, double > > &OAmargSupp, string solver="gurobi")
 Calculate the upper and lower bounds for each uncertainty. More...
 
void Reset ()
 Reset all maps in this container. More...
 
ROCPPconstdvContainer_Ptr getBPDVContainer () const
 
size_t getNumSubsets () const
 Get the total number of subsets. More...
 
uint getNumSubsets (string uncNme) const
 Get the number of subsets for the given uncertainty. More...
 
uint getPos (string partition, string uncNme) const
 
bool hasPartition (string uncNme) const
 
ROCPPExpr_Ptr getBp (pair< string, uint > uncOnPartition) const
 
map< string, uintgetNumPartitionsMap () const
 

Additional Inherited Members

- Public Types inherited from PartitionConstructorIF
typedef map< string, map< string, uint > >::const_iterator const_iterator
 Constant iterator of the partition map. More...
 
typedef vector< ROCPPConstraintIF_Ptr >::const_iterator usconstraints_iterator
 Constant iterator of the vector of uncertainty set constraints. More...
 
typedef vector< ROCPPConstraintIF_Ptr >::const_iterator addconstraints_iterator
 Constant iterator of the vector of additional constraints. More...
 
- Protected Member Functions inherited from PartitionConstructorIF
void constructPartitionsMap (ROCPPOptModelIF_Ptr pIn, ROCPPParConverter_Ptr pPartConverter)
 
- Protected Attributes inherited from PartitionConstructorIF
map< string, uintm_numPartitionsMap
 Map from uncertainty to number of breakpoints in this direction. More...
 
map< string, map< string, uint > > m_partitionsMap
 Map from partition_name to map from unc name to element of parition associated with this uncertainty. More...
 
map< string, vector< ROCPPConstraintIF_Ptr > > m_partitionUSconstraints
 Map from partition name to the vector of constraints specific to this partition. More...
 
map< pair< string, uint >, ROCPPExpr_Ptrm_uncToBreakpointMap
 Map from pair<unc name,breakpoint number> to dv modeling the breakpoint. More...
 
vector< ROCPPConstraintIF_Ptrm_additionalConstraints
 Vector of additional constraints. More...
 
ROCPPdvContainer_Ptr m_bpdvs
 Container of breakpoint variables. More...
 

Detailed Description

Static partition constructor.

Constructor & Destructor Documentation

◆ StaticPartitionConstructor()

StaticPartitionConstructor::StaticPartitionConstructor ( const map< string, uint > &  numPartitionsMap)
inline

◆ ~StaticPartitionConstructor()

StaticPartitionConstructor::~StaticPartitionConstructor ( )
inline

Member Function Documentation

◆ constructUncToBreakpointMap()

void StaticPartitionConstructor::constructUncToBreakpointMap ( const map< string, pair< double, double > > &  margSupp)
virtual

Use constant as breakpoint of the partition.

Implements PartitionConstructorIF.