Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
Antares::Data::HydroAllocation Class Referencefinal

Public Types

using Coefficients = std::map<AreaName, double>
 Coefficients.
 

Public Member Functions

 HydroAllocation ()
 \id Constructor & Destructor
 
 ~HydroAllocation ()
 Destructor.
 
void clear ()
 Clear all coefficients.
 
void remove (const AreaName &areaid)
 Remove coefficients related to a given area index.
 
void rename (const AreaName &oldid, const AreaName &newid)
 
double fromArea (const Area &area) const
 Get the coefficient for a specific area.
 
double fromArea (const Area *area) const
 Get the coefficient for a specific area.
 
double fromArea (const AreaName &areaid) const
 Get the coefficient for a specific area index.
 
void fromArea (const Area &area, double value)
 Set the coefficient for a specific area (reference)
 
void fromArea (const Area *area, double value)
 Set the coefficient for a specific area (weak pointer)
 
void fromArea (const AreaName &areaid, double value)
 Set the coefficient for a specific area index.
 
Load / Save
bool loadFromFile (const AreaName &referencearea, const std::filesystem::path &filename)
 Load allocation coefficients from a file.
 
bool saveToFile (const AnyString &filename) const
 Load allocation coefficients from a file.
 
void copyFrom (const HydroAllocation &source, const Study &studySource, const AreaNameMapping &mapping, const Study &study)
 Copy correlation coefficients from another correlation grid.
 
Solver
template<class CallbackT >
void eachNonNull (const CallbackT &callback) const
 Iterate through all non-null coeff.
 
void prepareForSolver (const AreaList &list)
 Prepare coefficients ordered by the area ids.
 

Operators

double operator[] (const AreaName &areaid) const
 
double operator[] (const Area &area) const
 
const Coefficientscoefficients () const
 Get all coefficients.
 

Constructor & Destructor Documentation

◆ HydroAllocation()

Antares::Data::HydroAllocation::HydroAllocation ( )

\id Constructor & Destructor

Default constructor

Member Function Documentation

◆ copyFrom()

void Antares::Data::HydroAllocation::copyFrom ( const HydroAllocation & source,
const Study & studySource,
const AreaNameMapping & mapping,
const Study & study )

Copy correlation coefficients from another correlation grid.

Parameters
sourceThe correlation matrix source
studySourceThe associated study for the given correlation grid
areaSourceName of the area to import
mappingArea's name Mapping from the source to the target
studyStudy for the local correlation grid

◆ eachNonNull()

template<class CallbackT >
void Antares::Data::HydroAllocation::eachNonNull ( const CallbackT & callback) const
inline

Iterate through all non-null coeff.

area.hydroAllocation.eachNonNull([&] (uint areaindex, double value)
{
std::cout << "area: " << areaindex << " = " << value << std::endl;
});
Warning
The internal map pValuesFromAreaID must be initialized prepareForSolver must be called.

◆ operator[]() [1/2]

double Antares::Data::HydroAllocation::operator[] ( const Area & area) const
See also
fromArea()

◆ operator[]() [2/2]

double Antares::Data::HydroAllocation::operator[] ( const AreaName & areaid) const
See also
fromArea()

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