Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
Antares::Solver::Variable::IVariable< ChildT, NextT, VCardT > Class Template Reference

Interface for any variable. More...

#include <variable.h>

Inheritance diagram for Antares::Solver::Variable::IVariable< ChildT, NextT, VCardT >:

Classes

struct  Statistics
 

Public Types

typedef ChildT ChildType
 Child.
 
typedef NextT NextType
 Type of the next static variable.
 
typedef IVariable< ChildT, NextT, VCardT > VariableType
 Variable.
 
typedef VCardT VCardType
 VCard.
 
typedef VCardType::ResultsType ResultsType
 List of expected results.
 
typedef VariableAccessor< ResultsType, VCardType::columnCount > VariableAccessorType
 Proxy for accessing to the intermediate results.
 
typedef Storage< VCardT >::ResultsType StoredResultType
 Results.
 

Public Member Functions

void getPrintStatusFromStudy (Data::Study &study)
 
void supplyMaxNumberOfColumns (Data::Study &study)
 
Constructor
 IVariable ()
 Default constructor.
 
Initialize the variable
void initializeFromStudy (Data::Study &study)
 Initialize the variable.
 
size_t getMaxNumberColumns () const
 
void initializeFromArea (Data::Study *study, Data::Area *area)
 Initialize the variable with a specific area.
 
void initializeFromLink (Data::Study *study, Data::AreaLink *link)
 Initialize the variable with a specific link between two areas.
 
void initializeFromThermalCluster (Data::Study *study, Data::Area *area, Data::ThermalCluster *cluster)
 Initialize the variable with a specific thermal cluster.
 
void broadcastNonApplicability (bool applyNonApplicable)
 
Simulation
void simulationBegin ()
 Notify to all variables that the simulation is about to begin.
 
void simulationEnd ()
 Notify to all variables that the simulation has finished.
 
Year
void yearBegin (uint year)
 Notify to all variables that a new year is about to start.
 
void yearEndBuild (State &state, uint year)
 Notify to all variables that the year is close to end.
 
void yearEndBuildPrepareDataForEachThermalCluster (State &state, uint year, uint numSpace)
 Notify to all variables to prepare data for the close to year end calculations for each thermal cluster.
 
void yearEndBuildForEachThermalCluster (State &state, uint year, uint numSpace)
 Notify to all variables that the year is close to end.
 
void yearEnd (uint year)
 Notify to all variables that the year is now over.
 
template<class V >
void yearEndSpatialAggregates (V &allVars, uint year, unsigned int numSpace)
 
template<class V , class SetT >
void yearEndSpatialAggregates (V &allVars, uint year, const SetT &set)
 
template<class V >
void simulationEndSpatialAggregates (V &allVars)
 
template<class V , class SetT >
void simulationEndSpatialAggregates (V &allVars, const SetT &set)
 
Simulation Hours in the year
void hourBegin (uint hourInTheYear)
 Event: A new hour in the year has just began.
 
void hourForEachArea (State &state)
 Event: For a given hour in the year, walking through all areas.
 
void hourForEachArea (State &state, unsigned int numSpace)
 
void hourForEachLink (State &state, uint numSpace)
 Event: For a given hour in the year, walking through all links.
 
void hourEnd (State &state, uint hourInTheYear)
 Event: A new hour in the year has just ended.
 
Week
void weekBegin (State &state)
 
void weekForEachArea (State &state, uint numSpace)
 
void weekEnd (State &state)
 

Static Public Member Functions

template<class R >
static void InitializeResultsFromStudy (R &results, Data::Study &study)
 Initialize the results of the variable.
 
template<class PredicateT >
static void RetrieveVariableList (PredicateT &predicate)
 Retrieve the list of all individual variables.
 

Static Public Attributes

static constexpr uint8_t categoryDataLevel = VCardType::categoryDataLevel
 
static constexpr uint8_t categoryFileLevel = VCardType::categoryFileLevel
 

User Reports

StoredResultType pResults
 All the results about this variable.
 
bool * isNonApplicable
 
bool * isPrinted
 
uint pColumnCount
 
template<class I >
static void provideInformations (I &infos)
 "Print" informations about the variable tree
 
void buildSurveyReport (SurveyResults &results, int dataLevel, int fileLevel, int precision) const
 
void buildAnnualSurveyReport (SurveyResults &results, int dataLevel, int fileLevel, int precision, uint numSpace) const
 
void buildDigest (SurveyResults &results, int digestLevel, int dataLevel) const
 
void beforeYearByYearExport (uint year, uint numSpace)
 Event triggered before exporting a year-by-year survey report.
 
template<class VCardSearchT , class O >
void computeSpatialAggregateWith (O &out, uint numSpace)
 Compute the spatial cluster with the results of a single variable.
 
template<class VCardSearchT , class O >
void computeSpatialAggregateWith (O &out, const Data::Area *area)
 Compute the spatial cluster with the results of a single variable and a given area.
 
template<class VCardToFindT >
const double * retrieveHourlyResultsForCurrentYear (uint numSpace) const
 
template<class VCardToFindT >
void retrieveResultsForArea (typename Storage< VCardToFindT >::ResultsType **result, const Data::Area *area)
 
template<class VCardToFindT >
void retrieveResultsForThermalCluster (typename Storage< VCardToFindT >::ResultsType **result, const Data::ThermalCluster *cluster)
 
template<class VCardToFindT >
void retrieveResultsForLink (typename Storage< VCardToFindT >::ResultsType **result, const Data::AreaLink *link)
 
Antares::Memory::Stored< double >::ConstReturnType retrieveRawHourlyValuesForCurrentYear (uint column, uint) const
 
const StoredResultTyperesults () const
 The results.
 

Detailed Description

template<class ChildT, class NextT, class VCardT>
class Antares::Solver::Variable::IVariable< ChildT, NextT, VCardT >

Interface for any variable.

Member Function Documentation

◆ computeSpatialAggregateWith() [1/2]

template<class ChildT , class NextT , class VCardT >
template<class SearchVCardT , class O >
void Antares::Solver::Variable::IVariable< ChildT, NextT, VCardT >::computeSpatialAggregateWith ( O & out,
const Data::Area * area )
inline

Compute the spatial cluster with the results of a single variable and a given area.

variables.computeSpatialAggregateWith<CO2<>::VCardType>(out);

◆ computeSpatialAggregateWith() [2/2]

template<class ChildT , class NextT , class VCardT >
template<class SearchVCardT , class O >
void Antares::Solver::Variable::IVariable< ChildT, NextT, VCardT >::computeSpatialAggregateWith ( O & out,
uint numSpace )
inline

Compute the spatial cluster with the results of a single variable.

variables.computeSpatialAggregateWith<CO2<>::VCardType>(out);

◆ initializeFromArea()

template<class ChildT , class NextT , class VCardT >
void Antares::Solver::Variable::IVariable< ChildT, NextT, VCardT >::initializeFromArea ( Data::Study * study,
Data::Area * area )
inline

Initialize the variable with a specific area.

Parameters
studyThe attached study
areaThe area for this variable

◆ initializeFromLink()

template<class ChildT , class NextT , class VCardT >
void Antares::Solver::Variable::IVariable< ChildT, NextT, VCardT >::initializeFromLink ( Data::Study * study,
Data::AreaLink * link )
inline

Initialize the variable with a specific link between two areas.

Parameters
studyThe attached study
linkThe link

◆ initializeFromStudy()

template<class ChildT , class NextT , class VCardT >
void Antares::Solver::Variable::IVariable< ChildT, NextT, VCardT >::initializeFromStudy ( Data::Study & study)
inline

Initialize the variable.

Parameters
studyThe attached study

◆ initializeFromThermalCluster()

template<class ChildT , class NextT , class VCardT >
void Antares::Solver::Variable::IVariable< ChildT, NextT, VCardT >::initializeFromThermalCluster ( Data::Study * study,
Data::Area * area,
Data::ThermalCluster * cluster )
inline

Initialize the variable with a specific thermal cluster.

Parameters
studyThe attached study
areaThe area
clusterThe thermal cluster

◆ InitializeResultsFromStudy()

template<class ChildT , class NextT , class VCardT >
template<class R >
void Antares::Solver::Variable::IVariable< ChildT, NextT, VCardT >::InitializeResultsFromStudy ( R & results,
Data::Study & study )
inlinestatic

Initialize the results of the variable.

Parameters
resultsThe results
studyThe attached study

◆ RetrieveVariableList()

template<class ChildT , class NextT , class VCardT >
template<class PredicateT >
void Antares::Solver::Variable::IVariable< ChildT, NextT, VCardT >::RetrieveVariableList ( PredicateT & predicate)
static

Retrieve the list of all individual variables.

The predicate must implement the method add(name, unit, comment).

◆ yearBegin()

template<class ChildT , class NextT , class VCardT >
void Antares::Solver::Variable::IVariable< ChildT, NextT, VCardT >::yearBegin ( uint year)
inline

Notify to all variables that a new year is about to start.

Parameters
yearThe current year

◆ yearEnd()

template<class ChildT , class NextT , class VCardT >
void Antares::Solver::Variable::IVariable< ChildT, NextT, VCardT >::yearEnd ( uint year)
inline

Notify to all variables that the year is now over.

That mainly means that all variables should perform the monthly aggragations.

Parameters
yearThe current year

◆ yearEndBuild()

template<class ChildT , class NextT , class VCardT >
void Antares::Solver::Variable::IVariable< ChildT, NextT, VCardT >::yearEndBuild ( State & state,
uint year )

Notify to all variables that the year is close to end.

All variables that have specific updates after a whole year calculation can now get their results

Parameters
stateThe current thermal cluster
yearThe current year

◆ yearEndBuildForEachThermalCluster()

template<class ChildT , class NextT , class VCardT >
void Antares::Solver::Variable::IVariable< ChildT, NextT, VCardT >::yearEndBuildForEachThermalCluster ( State & state,
uint year,
uint numSpace )
inline

Notify to all variables that the year is close to end.

All variables that have specific updates after a whole year calculation can now get their results

Parameters
stateThe current thermal cluster
yearThe current year

◆ yearEndBuildPrepareDataForEachThermalCluster()

template<class ChildT , class NextT , class VCardT >
void Antares::Solver::Variable::IVariable< ChildT, NextT, VCardT >::yearEndBuildPrepareDataForEachThermalCluster ( State & state,
uint year,
uint numSpace )
inline

Notify to all variables to prepare data for the close to year end calculations for each thermal cluster.

That mainly means that all variables that have build for the whole year to do should do it now

Parameters
stateThe current thermal cluster
yearThe current year

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