Loading [MathJax]/extensions/tex2jax.js
Antares Simulator
Power System Simulator
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Modules Pages Concepts
Antares::Data::ClusterList< ClusterT > Class Template Referenceabstract

Generic list of clustersThis class implements the base functions for a list of cluster It's used for thermal and renewable clusters. More...

#include <cluster_list.h>

Public Types

using SharedPtr = typename std::shared_ptr<ClusterT>
 

Public Member Functions

void clearAll ()
 
bool empty () const
 
ClusterT * findInAll (std::string_view id) const
 Try to find a cluster from its id (const) in the complete cluster list.
 
bool exists (const Data::ClusterName &id) const
 Get if a cluster exists.
 
auto each_enabled () const
 
std::vector< std::shared_ptr< ClusterT > > all () const
 
bool rename (Data::ClusterName idToFind, Data::ClusterName newName)
 Rename a cluster.
 
virtual bool remove (const Data::ClusterName &id)
 Remove properly a cluster.
 
SharedPtr operator[] (std::size_t idx)
 
SharedPtr operator[] (std::size_t idx) const
 
SharedPtr enabledClusterAt (unsigned int index) const
 
void resizeAllTimeseriesNumbers (uint n) const
 Resize all matrices dedicated to the sampled timeseries numbers.
 
void storeTimeseriesNumbers (Solver::IResultWriter &writer) const
 
bool forceReload (bool reload=false) const
 Invalidate all clusters.
 
void markAsModified () const
 Mark the clusters as modified.
 
void retrieveTotalCapacityAndUnitCount (double &total, uint &unitCount) const
 Retrieve the total capacity and the total unit count.
 
unsigned int enabledCount () const
 
unsigned int allClustersCount () const
 
void addToCompleteList (std::shared_ptr< ClusterT > cluster)
 
void sortCompleteList ()
 
IO functions
bool loadDataSeriesFromFolder (Study &study, const std::filesystem::path &folder)
 
bool saveDataSeriesToFolder (const AnyString &folder) const
 
virtual bool saveToFolder (const AnyString &folder) const =0
 

Protected Member Functions

virtual std::string typeID () const =0
 
void rebuildIndexes ()
 

Protected Attributes

std::vector< std::shared_ptr< ClusterT > > allClusters_
 

Detailed Description

template<class ClusterT>
class Antares::Data::ClusterList< ClusterT >

Generic list of clusters

This class implements the base functions for a list of cluster It's used for thermal and renewable clusters.

Member Function Documentation

◆ exists()

template<class ClusterT >
bool Antares::Data::ClusterList< ClusterT >::exists ( const Data::ClusterName & id) const

Get if a cluster exists.

Parameters
idID of the cluster to find
Returns
True if the cluster exists

◆ findInAll()

template<class ClusterT >
ClusterT * Antares::Data::ClusterList< ClusterT >::findInAll ( std::string_view id) const

Try to find a cluster from its id (const) in the complete cluster list.

Parameters
idID of the cluster to find
Returns
A pointer to a cluster. nullptr if not found

◆ rename()

template<class ClusterT >
bool Antares::Data::ClusterList< ClusterT >::rename ( Data::ClusterName idToFind,
Data::ClusterName newName )

Rename a cluster.

Parameters
idToFindID of the cluster to rename
newNameThe new name for the cluster
Returns
True if the operation succeeded (the cluster has been renamed) false otherwise (not found or if another cluster has the same name)

The indexes for clusters will be rebuilt.

◆ resizeAllTimeseriesNumbers()

template<class ClusterT >
void Antares::Data::ClusterList< ClusterT >::resizeAllTimeseriesNumbers ( uint n) const

Resize all matrices dedicated to the sampled timeseries numbers.

Parameters
nA number of years

◆ retrieveTotalCapacityAndUnitCount()

template<class ClusterT >
void Antares::Data::ClusterList< ClusterT >::retrieveTotalCapacityAndUnitCount ( double & total,
uint & unitCount ) const

Retrieve the total capacity and the total unit count.

Pseudo code:

each thermal clusters do
total += clusters{unit count} * clusters{nominal capacity}
unit += clusters{unit count}

The documentation for this class was generated from the following files: