|
Antares Simulator
Power System Simulator
|
A list of areas. More...
#include <area.h>
Public Types | |
| using | iterator = Area::Map::iterator |
| An iterator. | |
| using | const_iterator = Area::Map::const_iterator |
| A const iterator. | |
| using | reverse_iterator = Area::Map::reverse_iterator |
| An iterator. | |
| using | const_reverse_iterator = Area::Map::const_reverse_iterator |
| A const iterator. | |
| using | value_type = Area::Map::value_type |
| Key-value type. | |
Public Member Functions | |
Constructor & Destructor | |
| AreaList (Study &study) | |
| Default constructor. | |
| ~AreaList () | |
| Destructor. | |
Iterating through all areas | |
| template<class PredicateT > | |
| void | each (const PredicateT &predicate) |
| Iterate through all areas. | |
| template<class PredicateT > | |
| void | each (const PredicateT &predicate) const |
| Iterate through all areas (const) | |
| iterator | begin () |
| const_iterator | begin () const |
| const_iterator | cbegin () const |
| iterator | end () |
| const_iterator | end () const |
| const_iterator | cend () const |
| reverse_iterator | rbegin () |
| const_reverse_iterator | rbegin () const |
| reverse_iterator | rend () |
| const_reverse_iterator | rend () const |
Internal Data TS-Generators / Series | |
| void | ensureDataIsInitialized (Parameters ¶ms, bool loadOnlyNeeded) |
| Ensure data for time series/prepro are initalized if they should be. More... | |
Import / Export | |
| bool | loadFromFolder (const StudyLoadOptions &options) |
| Load all informations about areas from a folder (-> input/generalData) More... | |
| bool | loadListFromFile (const std::filesystem::path &filename) |
| Fill the list of areas from an input file. More... | |
| void | saveLinkListToBuffer (Yuni::Clob &buffer) const |
| Write the list of all links into a file. More... | |
| bool | preloadAndMarkAsModifiedAllInvalidatedAreas (uint *invalidateCount=nullptr) const |
| Preload all areas which have been invalidated. More... | |
Areas | |
| Area * | add (Area *a) |
| Add an area in the container. | |
| Area * | find (const AreaName &id) |
| Find an area from its unique string id. | |
| const Area * | find (const AreaName &id) const |
| Find an area from its unique string id (const) | |
| Area * | findFromName (const AreaName &name) |
| Find an area from its name. | |
| Area * | findFromPosition (const int x, const int y) const |
| const Area * | findFromName (const AreaName &name) const |
| Find an area from its name (const) | |
| void | resizeAllTimeseriesNumbers (uint n) |
| Resize all matrices dedicated to the sampled timeseries numbers. More... | |
| void | clear () |
| Remove all elements in the container. | |
| bool | empty () const |
| Get if the container is empty. | |
| bool | forceReload (bool reload=false) const |
| Invalidate all areas. More... | |
| void | markAsModified () const |
| Mark all data as modified. | |
| void | rebuildIndexes () |
| Rebuild the indexes for accessing areas. More... | |
| bool | remove (const AnyString &id) |
| Remove an area from its ID. More... | |
| bool | renameArea (const AreaName &oldid, const AreaName &newName) |
| Rename an area. More... | |
| bool | renameArea (const AreaName &oldid, const AreaName &newid, const AreaName &newName) |
| Rename an area. More... | |
| uint | size () const |
| Get the total number of areas. | |
Links | |
| AreaLink * | findLink (const AreaName &area, const AreaName &with) |
| Find an interconnection between two areas. More... | |
| const AreaLink * | findLink (const AreaName &area, const AreaName &with) const |
| AreaLink * | findLinkFromINIKey (const AnyString &key) |
| Try to find the link from a given INI key (<area1>%<area2>) | |
| ThermalCluster * | findClusterFromINIKey (const AnyString &key) |
| Try to find the cluster from a given INI key (<area>.<cluster>) | |
| uint | areaLinkCount () const |
| Get the total number of interconnections between all areas. | |
Tools | |
| void | fixOrientationForAllInterconnections (BindingConstraintsRepository &bindingconstraints) |
| Fix all invalid orientations. | |
| void | removeLoadTimeseries () |
| Remove all load timeseries. | |
| void | removeHydroTimeseries () |
| Remove all hydro timeseries. | |
| void | removeSolarTimeseries () |
| Remove all solar timeseries. | |
| void | removeWindTimeseries () |
| Remove all wind timeseries. | |
| void | removeThermalTimeseries () |
| Remove all thermal timeseries. | |
| Area::ScratchMap | buildScratchMap (uint numspace) |
| create a map with the corresponding scratchpad for each area link to this numspace | |
| void | updateNameIDSet () const |
| Update the name id set. | |
Operators | |
| std::vector< Area * > | byIndex |
| All areas by their index. | |
| Area::Map | areas |
| All areas in the list. | |
| Area::NameSet | nameidSet |
| Name set (must be updated by updateNameSet) | |
| Area * | operator[] (uint i) |
| Get an area from its index. | |
| const Area * | operator[] (uint i) const |
A list of areas.
Here is one way to iterate through the list :
It is possible to directly access to an area via its index :
| void Antares::Data::AreaList::ensureDataIsInitialized | ( | Parameters & | params, |
| bool | loadOnlyNeeded | ||
| ) |
Ensure data for time series/prepro are initalized if they should be.
It initializes data for each area so it would be better to call this routine when areas are already loaded.
| AreaLink * Antares::Data::AreaList::findLink | ( | const AreaName & | area, |
| const AreaName & | with | ||
| ) |
Find an interconnection between two areas.
| area | The name of the first area (in lowercase) |
| with | The name of the second area (in lowercase) |
| bool Antares::Data::AreaList::forceReload | ( | bool | reload = false | ) | const |
Invalidate all areas.
| reload | True to reload data in the same time |
| bool Antares::Data::AreaList::loadFromFolder | ( | const StudyLoadOptions & | options | ) |
Load all informations about areas from a folder (-> input/generalData)
| l | The list of areas |
| folder | The target folder |
| bool Antares::Data::AreaList::loadListFromFile | ( | const std::filesystem::path & | filename | ) |
Fill the list of areas from an input file.
The file structure is merely composed by all names of areas, one line one area
| l | The structure |
| filename | The file to read |
| bool Antares::Data::AreaList::preloadAndMarkAsModifiedAllInvalidatedAreas | ( | uint * | invalidateCount = nullptr | ) | const |
Preload all areas which have been invalidated.
| [out] | The | number of areas which have been invalidated |
| void Antares::Data::AreaList::rebuildIndexes | ( | ) |
Rebuild the indexes for accessing areas.
It is sometimes quite usefull to use a mere index to access to a given area. This is mandatory when used from the solver.
| bool Antares::Data::AreaList::remove | ( | const AnyString & | id | ) |
Remove an area from its ID.
| bool Antares::Data::AreaList::renameArea | ( | const AreaName & | oldid, |
| const AreaName & | newid, | ||
| const AreaName & | newName | ||
| ) |
Rename an area.
| oldid | ID of the area to rename |
| newID | The new area ID |
| newName | The new name for the area |
| bool Antares::Data::AreaList::renameArea | ( | const AreaName & | oldid, |
| const AreaName & | newName | ||
| ) |
Rename an area.
| oldid | ID of the area to rename |
| newName | The new name for the area |
| void Antares::Data::AreaList::resizeAllTimeseriesNumbers | ( | uint | n | ) |
Resize all matrices dedicated to the sampled timeseries numbers.
| n | A number of years |
| void Antares::Data::AreaList::saveLinkListToBuffer | ( | Yuni::Clob & | buffer | ) | const |
Write the list of all links into a file.
| filename | The file to read |