K-adapatability partition encorder class. More...
#include <Kadaptability.hpp>
Public Types | |
| typedef map< string, map< uint, uint > >::const_iterator | Kmap_iterator |
| Constant iterator for m_mapPartitionNme_to_mapTime_to_k. More... | |
| typedef map< uint, map< string, map< uint, uint > > >::const_iterator | Klargemap_iterator |
| Constant iterator for m_mapt_mapPartitionNme_to_mapTime_to_k. More... | |
| typedef map< uint, uint >::const_iterator | numPartitionMap_iterator |
| Constant iterator for m_numPartitionsMap. More... | |
Public Member Functions | |
| KadaptabilityPartitionEncoderMS (ROCPPOptModelIF_Ptr pIn, string numPartitionsStr) | |
| Construct encoder with different values of K_t in each time stage. More... | |
| KadaptabilityPartitionEncoderMS (const map< uint, uint > &numPartitionsMap) | |
| Construct encoder with different values of K_t in each time stage. More... | |
| KadaptabilityPartitionEncoderMS (uint T, uint K) | |
| Construct encoder with same K across all time stages. More... | |
| ~KadaptabilityPartitionEncoderMS () | |
| Destructor of K-Adaptability partition encoder. More... | |
| Kmap_iterator | Kmap_iteratorBegin () const |
| Return the constant iterator pointing to the beginning of the m_mapPartitionNme_to_mapTime_to_k. More... | |
| Kmap_iterator | Kmap_iteratorEnd () const |
| Return the constant iterator pointing to the end of the m_mapPartitionNme_to_mapTime_to_k. More... | |
| Klargemap_iterator | Klargemap_iteratorBegin () const |
| Return the constant iterator pointing to the beginning of m_mapt_mapPartitionNme_to_mapTime_to_k. More... | |
| Klargemap_iterator | Klargemap_iteratorEnd () const |
| Return the constant iterator pointing to the end of m_mapt_mapPartitionNme_to_mapTime_to_k. More... | |
| numPartitionMap_iterator | numPartitionMap_iteratorBegin () const |
| Return the constant iterator pointing to the beginning of the m_numPartitionsMap. More... | |
| numPartitionMap_iterator | numPartitionMap_iteratorEnd () const |
| Return the constant iterator pointing to the end of the m_numPartitionsMap. More... | |
| void | getReady () |
| Construct the encoder, build the maps. More... | |
| string | convertPartitionToString (const vector< uint > &partition) const |
| Convert the contingency plan in the input vector to a string. More... | |
| string | convertPartitionToString (const map< uint, uint > &partitionMap) const |
| Convert the contingency plan in the input map to a string. More... | |
| uint | getKt (uint t) const |
| Return the total number of contingency plans for the given time stage. More... | |
| uint | getkt (string partition, uint t) const |
| Return the contingency plan for this time stage for the given contigency plan for the entire planning horizon. More... | |
| uint | getT () const |
| Return the length of the planning horizon. More... | |
| size_t | getKmapSize () const |
| Return the total number of contingency plans. More... | |
| string | getPartitionSubset (const map< uint, uint > &partitionMap, uint t) const |
| Get the subset of the given partition map up to the given time stage. More... | |
| string | getBasicPartition () const |
| Get the first subset in this encoder. More... | |
| string | getMaxPartitionString () const |
Private Attributes | |
| map< uint, uint > | m_numPartitionsMap |
| Map from time period to value of K for that time-period. More... | |
| map< string, map< uint, uint > > | m_mapPartitionNme_to_mapTime_to_k |
| Map from partition name to map from time period to value of k for that period. More... | |
| map< uint, map< string, map< uint, uint > > > | m_mapt_mapPartitionNme_to_mapTime_to_k |
| Map from time t sub-partition name to map from time period to value of k for that period. More... | |
K-adapatability partition encorder class.
Class for encoding the contingency plans in k-adaptability
| typedef map< uint , map< string, map<uint, uint> > >::const_iterator KadaptabilityPartitionEncoderMS::Klargemap_iterator |
Constant iterator for m_mapt_mapPartitionNme_to_mapTime_to_k.
| typedef map<string, map<uint, uint> >::const_iterator KadaptabilityPartitionEncoderMS::Kmap_iterator |
Constant iterator for m_mapPartitionNme_to_mapTime_to_k.
| typedef map<uint,uint>::const_iterator KadaptabilityPartitionEncoderMS::numPartitionMap_iterator |
Constant iterator for m_numPartitionsMap.
| KadaptabilityPartitionEncoderMS::KadaptabilityPartitionEncoderMS | ( | ROCPPOptModelIF_Ptr | pIn, |
| string | numPartitionsStr | ||
| ) |
Construct encoder with different values of K_t in each time stage.
| numPartitionsStr | String encoding the number of contingency plans for each time period from 1 to T |
| KadaptabilityPartitionEncoderMS::KadaptabilityPartitionEncoderMS | ( | const map< uint, uint > & | numPartitionsMap | ) |
Construct encoder with different values of K_t in each time stage.
| numPartitionsMap | Map from each time period to a value of K for that period |
Construct encoder with same K across all time stages.
| T | Total number of time stages |
| K | Value of K |
|
inline |
Destructor of K-Adaptability partition encoder.
| string KadaptabilityPartitionEncoderMS::convertPartitionToString | ( | const map< uint, uint > & | partitionMap | ) | const |
Convert the contingency plan in the input map to a string.
| partitionMap | Map of time stage to number of case on that partition |
| string KadaptabilityPartitionEncoderMS::convertPartitionToString | ( | const vector< uint > & | partition | ) | const |
Convert the contingency plan in the input vector to a string.
| partition | Vector of number of case for each time stage |
|
inline |
Get the first subset in this encoder.
|
inline |
Return the total number of contingency plans.
Return the contingency plan for this time stage for the given contigency plan for the entire planning horizon.
Return the total number of contingency plans for the given time stage.
|
inline |
| string KadaptabilityPartitionEncoderMS::getPartitionSubset | ( | const map< uint, uint > & | partitionMap, |
| uint | t | ||
| ) | const |
Get the subset of the given partition map up to the given time stage.
| void KadaptabilityPartitionEncoderMS::getReady | ( | ) |
Construct the encoder, build the maps.
|
inline |
Return the length of the planning horizon.
|
inline |
Return the constant iterator pointing to the beginning of m_mapt_mapPartitionNme_to_mapTime_to_k.
|
inline |
Return the constant iterator pointing to the end of m_mapt_mapPartitionNme_to_mapTime_to_k.
|
inline |
Return the constant iterator pointing to the beginning of the m_mapPartitionNme_to_mapTime_to_k.
|
inline |
Return the constant iterator pointing to the end of the m_mapPartitionNme_to_mapTime_to_k.
|
inline |
Return the constant iterator pointing to the beginning of the m_numPartitionsMap.
|
inline |
Return the constant iterator pointing to the end of the m_numPartitionsMap.
|
private |
Map from partition name to map from time period to value of k for that period.
|
private |
Map from time t sub-partition name to map from time period to value of k for that period.