Antares Simulator
Power System Simulator
Antares::Solver::Variable::Economy::TimeSeriesValuesGenerationImpl< TraitsType, NextT > Class Template Reference

Common implementation for renewable generation time series. More...

#include <generation.h>

Inheritance diagram for Antares::Solver::Variable::Economy::TimeSeriesValuesGenerationImpl< TraitsType, NextT >:
Antares::Solver::Variable::Economy::TimeSeriesValuesBase< TimeSeriesValuesGenerationImpl< TraitsType, Container::EndOfList >, Container::EndOfList, VCardTimeSeriesBase< TraitsType > > Antares::Solver::Variable::IVariable< TimeSeriesValuesGenerationImpl< TraitsType, Container::EndOfList >, Container::EndOfList, VCardTimeSeriesBase< TraitsType > > Antares::Solver::Variable::Container::EndOfList

Public Types

Type Definitions
using BaseType = TimeSeriesValuesBase< TimeSeriesValuesGenerationImpl< TraitsType, NextT >, NextT, VCardTimeSeriesBase< TraitsType > >
 
using VCardType = VCardTimeSeriesBase< TraitsType >
 
- Public Types inherited from Antares::Solver::Variable::Economy::TimeSeriesValuesBase< TimeSeriesValuesGenerationImpl< TraitsType, Container::EndOfList >, Container::EndOfList, VCardTimeSeriesBase< TraitsType > >
using NextType = Container::EndOfList
 
using AncestorType = Variable::IVariable< TimeSeriesValuesGenerationImpl< TraitsType, Container::EndOfList >, Container::EndOfList, VCardTimeSeriesBase< TraitsType > >
 
using ResultsType = typename VCardType::ResultsType
 
using VariableAccessorType = VariableAccessor< ResultsType, VCardType::columnCount >
 
- Public Types inherited from Antares::Solver::Variable::IVariable< TimeSeriesValuesGenerationImpl< TraitsType, Container::EndOfList >, Container::EndOfList, VCardTimeSeriesBase< TraitsType > >
typedef TimeSeriesValuesGenerationImpl< TraitsType, Container::EndOfListChildType
 Child.
 
typedef Container::EndOfList NextType
 Type of the next static variable.
 
typedef IVariable< TimeSeriesValuesGenerationImpl< TraitsType, Container::EndOfList >, Container::EndOfList, VCardTimeSeriesBase< TraitsType > > VariableType
 Variable.
 
typedef VCardTimeSeriesBase< TraitsType > 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< VCardTimeSeriesBase< TraitsType > >::ResultsType StoredResultType
 Results.
 

Public Member Functions

void initializeDerivedFromStudy (Data::Study &study)
 Initialize generation-specific settings from study. More...
 
void yearBeginImpl (unsigned int year, unsigned int space)
 Setup generation data at the beginning of each year. More...
 
void hourForEachAreaImpl (State &, unsigned int)
 Hourly processing for generation variables. More...
 
- Public Member Functions inherited from Antares::Solver::Variable::Economy::TimeSeriesValuesBase< TimeSeriesValuesGenerationImpl< TraitsType, Container::EndOfList >, Container::EndOfList, VCardTimeSeriesBase< TraitsType > >
void initializeFromStudy (Data::Study &study)
 Initialize the variable from study configuration. More...
 
void initializeFromArea (Data::Study *study, Data::Area *area) noexcept
 Associate this variable with a specific area. More...
 
void initializeFromLink (Data::Study *study, Data::AreaLink *link)
 Initialize from link (for link-based variables) More...
 
void simulationBegin ()
 Reset state at the beginning of simulation. More...
 
void simulationEnd ()
 Cleanup at the end of simulation.
 
void yearBegin (unsigned int year, unsigned int space)
 Setup at the beginning of each year. More...
 
void yearEndBuild (State &state, unsigned int year, unsigned int space)
 Post-processing after year end build. More...
 
void yearEnd (unsigned int year, unsigned int space)
 Finalize year and compute statistics. More...
 
void computeSummary (unsigned int year, unsigned int space)
 Merge year results into global summary. More...
 
void hourBegin (unsigned int hourInTheYear)
 Setup at the beginning of each hour. More...
 
void hourForEachArea (State &state, unsigned int space)
 Process data for each area during an hour. More...
 
void hourEnd (State &state, unsigned int hourInTheYear)
 Cleanup at the end of each hour. More...
 
Antares::Memory::Stored< double >::ConstReturnType retrieveRawHourlyValuesForCurrentYear (unsigned int, unsigned int space) const noexcept
 Retrieve raw hourly values for the current year. More...
 
void localBuildAnnualSurveyReport (SurveyResults &results, int fileLevel, int precision, unsigned int space) const
 Build annual survey report for output. More...
 
- Public Member Functions inherited from Antares::Solver::Variable::IVariable< TimeSeriesValuesGenerationImpl< TraitsType, Container::EndOfList >, Container::EndOfList, VCardTimeSeriesBase< TraitsType > >
void getPrintStatusFromStudy (Data::Study &study)
 
void supplyMaxNumberOfColumns (Data::Study &study)
 
 IVariable ()
 Default constructor.
 
 ~IVariable ()
 
void initializeFromStudy (Data::Study &study)
 Initialize the variable. More...
 
size_t getMaxNumberColumns () const
 
void initializeFromArea (Data::Study *study, Data::Area *area)
 Initialize the variable with a specific area. More...
 
void initializeFromLink (Data::Study *study, Data::AreaLink *link)
 Initialize the variable with a specific link between two areas. More...
 
void initializeFromThermalCluster (Data::Study *study, Data::Area *area, Data::ThermalCluster *cluster)
 Initialize the variable with a specific thermal cluster. More...
 
void broadcastNonApplicability (bool applyNonApplicable)
 
void simulationBegin ()
 Notify to all variables that the simulation is about to begin.
 
void simulationEnd ()
 Notify to all variables that the simulation has finished.
 
void yearBegin (uint year)
 Notify to all variables that a new year is about to start. More...
 
void yearEndBuild (State &state, uint year)
 Notify to all variables that the year is close to end. More...
 
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. More...
 
void yearEndBuildForEachThermalCluster (State &state, uint year, uint numSpace)
 Notify to all variables that the year is close to end. More...
 
void yearEnd (uint year)
 Notify to all variables that the year is now over. More...
 
void yearEndSpatialAggregates (V &allVars, uint year, unsigned int numSpace)
 
void yearEndSpatialAggregates (V &allVars, uint year, const SetT &set)
 
void simulationEndSpatialAggregates (V &allVars)
 
void simulationEndSpatialAggregates (V &allVars, const SetT &set)
 
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.
 
void weekBegin (State &state)
 
void weekForEachArea (State &state, uint numSpace)
 
void weekEnd (State &state)
 
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.
 
void computeSpatialAggregateWith (O &out, uint numSpace)
 Compute the spatial cluster with the results of a single variable. More...
 
void computeSpatialAggregateWith (O &out, const Data::Area *area)
 Compute the spatial cluster with the results of a single variable and a given area. More...
 
const double * retrieveHourlyResultsForCurrentYear (uint numSpace) const
 
void retrieveResultsForArea (typename Storage< VCardToFindT >::ResultsType **result, const Data::Area *area)
 
void retrieveResultsForThermalCluster (typename Storage< VCardToFindT >::ResultsType **result, const Data::ThermalCluster *cluster)
 
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.
 

Additional Inherited Members

- Static Public Member Functions inherited from Antares::Solver::Variable::Economy::TimeSeriesValuesBase< TimeSeriesValuesGenerationImpl< TraitsType, Container::EndOfList >, Container::EndOfList, VCardTimeSeriesBase< TraitsType > >
static void InitializeResultsFromStudy (R &results, Data::Study &study)
 Static helper to initialize results from study. More...
 
- Static Public Member Functions inherited from Antares::Solver::Variable::IVariable< TimeSeriesValuesGenerationImpl< TraitsType, Container::EndOfList >, Container::EndOfList, VCardTimeSeriesBase< TraitsType > >
static void InitializeResultsFromStudy (R &results, Data::Study &study)
 Initialize the results of the variable. More...
 
static void RetrieveVariableList (PredicateT &predicate)
 Retrieve the list of all individual variables. More...
 
static void provideInformations (I &infos)
 "Print" informations about the variable tree
 
- Static Public Attributes inherited from Antares::Solver::Variable::Economy::TimeSeriesValuesBase< TimeSeriesValuesGenerationImpl< TraitsType, Container::EndOfList >, Container::EndOfList, VCardTimeSeriesBase< TraitsType > >
static constexpr int count
 Total count of variables in the chain.
 
- Static Public Attributes inherited from Antares::Solver::Variable::IVariable< TimeSeriesValuesGenerationImpl< TraitsType, Container::EndOfList >, Container::EndOfList, VCardTimeSeriesBase< TraitsType > >
static constexpr uint8_t categoryDataLevel
 
static constexpr uint8_t categoryFileLevel
 
- Protected Types inherited from Antares::Solver::Variable::Container::EndOfList
enum  { count = 0 }
 
typedef void NextType
 Type of the next static variable.
 
- Protected Member Functions inherited from Antares::Solver::Variable::Container::EndOfList
 EndOfList ()
 
 ~EndOfList ()
 
void broadcastNonApplicability (bool)
 
void getPrintStatusFromStudy ([[maybe_unused]] Data::Study &study)
 
void supplyMaxNumberOfColumns ([[maybe_unused]] Data::Study &study)
 
template<class V >
void yearEndSpatialAggregates (V &, unsigned int, uint)
 
template<class V , class SetT >
void yearEndSpatialAggregates (V &, unsigned int, const SetT &, uint numSpace)
 
template<class V , class SetT >
void simulationEndSpatialAggregates (V &, const SetT &)
 
template<class VCardToFindT >
const double * retrieveHourlyResultsForCurrentYear (uint) const
 
void localBuildAnnualSurveyReport (SurveyResults &, int, int, unsigned int) const
 
- Static Protected Member Functions inherited from Antares::Solver::Variable::Container::EndOfList
template<class PredicateT >
static void RetrieveVariableList (PredicateT &)
 Retrieve the list of all individual variables. More...
 
static void initializeFromStudy ([[maybe_unused]] Data::Study &study)
 
static void initializeFromArea (Data::Study *, Data::Area *)
 
static void initializeFromThermalCluster (Data::Study *, Data::Area *, Data::ThermalCluster *)
 
static void initializeFromAreaLink (Data::Study *, Data::AreaLink *)
 
static void simulationBegin ()
 
static void simulationEnd ()
 
static void yearBegin (unsigned int, unsigned int)
 
static void yearEndBuildPrepareDataForEachThermalCluster (State &state, uint year, uint numSpace)
 
static void yearEndBuildForEachThermalCluster (State &state, uint year, uint numSpace)
 
static void yearEndBuild (State &, unsigned int, unsigned int)
 
static void yearEnd (unsigned int, unsigned int)
 
static void computeSummary (unsigned int year, unsigned int numSpace)
 
template<class V >
static void computeSpatialAggregatesSummary (V &, unsigned int, unsigned int)
 
template<class V >
static void simulationEndSpatialAggregates (V &)
 
static void weekBegin (State &)
 
static void weekForEachArea (State &, uint numSpace)
 
static void weekEnd (State &)
 
static void hourBegin (unsigned int)
 
static void hourForEachArea (State &, uint numSpace)
 
static void hourForEachLink (State &, uint numSpace)
 
static void hourEnd (State &, unsigned int)
 
static void buildSurveyReport (SurveyResults &, int, int, int)
 
static void buildAnnualSurveyReport (SurveyResults &, int, int, int, uint)
 
static void buildDigest (SurveyResults &, int, int)
 
static void beforeYearByYearExport (uint, uint)
 
template<class I >
static void provideInformations (I &)
 
template<class SearchVCardT , class O >
static void computeSpatialAggregateWith (O &)
 
template<class SearchVCardT , class O >
static void computeSpatialAggregateWith (O &, const Data::Area *)
 
template<class SearchVCardT , class O >
static void computeSpatialAggregateWith (O &, const Data::Area *, uint numSpace)
 
template<class VCardToFindT , class O >
static void retrieveResultsForArea (O **, const Data::Area *)
 
template<class VCardToFindT , class O >
static void retrieveResultsForThermalCluster (O **, const Data::ThermalCluster *)
 
template<class VCardToFindT , class O >
static void retrieveResultsForLink (O **, const Data::AreaLink *)
 
- Protected Attributes inherited from Antares::Solver::Variable::Economy::TimeSeriesValuesBase< TimeSeriesValuesGenerationImpl< TraitsType, Container::EndOfList >, Container::EndOfList, VCardTimeSeriesBase< TraitsType > >
Data::AreaareaPtr
 
VCardType::IntermediateValuesType yearlyValues
 Intermediate values for each parallel space.
 
unsigned int nbYearsParallel
 Number of parallel years (cached for performance)
 
- Protected Attributes inherited from Antares::Solver::Variable::IVariable< TimeSeriesValuesGenerationImpl< TraitsType, Container::EndOfList >, Container::EndOfList, VCardTimeSeriesBase< TraitsType > >
StoredResultType pResults
 All the results about this variable.
 
bool * isNonApplicable
 
bool * isPrinted
 
uint pColumnCount
 

Detailed Description

template<class TraitsType, class NextT = Container::EndOfList>
class Antares::Solver::Variable::Economy::TimeSeriesValuesGenerationImpl< TraitsType, NextT >

Common implementation for renewable generation time series.

  • This class provides the shared implementation for both solar and wind generation variables. It handles the specific behavior of renewable generation data processing.
  • Template Parameters
    TraitsTypeThe traits defining the specific generation type
    NextTThe next variable in the processing chain
  • ## Key Behaviors:
  • ### Year Begin Processing:
  • Checks if renewable generation aggregation is enabled
  • If enabled, copies the entire year's data at once for performance
  • Uses the areaMember from traits for type-safe data access
  • ### Hourly Processing:
  • No specific hourly processing (data already copied in yearBegin)
  • Placeholder implementation for interface compliance
  • ## Performance Considerations:
  • The design optimizes for renewable generation patterns:
  • Bulk copy at year start reduces memory operations
  • Aggregation flag controls whether processing is needed
  • Type-safe member access prevents runtime errors
  • ## Thread Safety:
  • Each parallel space maintains its own data structures:
  • yearlyValues[space] provides isolation between parallel executions
  • No shared state between spaces during processing

Member Function Documentation

◆ hourForEachAreaImpl()

template<class TraitsType , class NextT = Container::EndOfList>
void Antares::Solver::Variable::Economy::TimeSeriesValuesGenerationImpl< TraitsType, NextT >::hourForEachAreaImpl ( State ,
unsigned int   
)
inline

Hourly processing for generation variables.

  • For renewable generation, no specific hourly processing is required since the data has already been bulk-copied during yearBeginImpl. This method exists to satisfy the interface requirements.
  • Parameters
    stateCurrent simulation state (unused for generation)
    spaceThe parallel space index (unused for generation)
  • ## Design Rationale:
  • Renewable generation data is typically:

Pre-aggregated at the study level

  • Copied in bulk for performance
  • Not requiring per-hour transformations
    • This differs from other time series like hydro where hourly processing may involve complex calculations or data transformations.

◆ initializeDerivedFromStudy()

template<class TraitsType , class NextT = Container::EndOfList>
void Antares::Solver::Variable::Economy::TimeSeriesValuesGenerationImpl< TraitsType, NextT >::initializeDerivedFromStudy ( Data::Study study)
inline

Initialize generation-specific settings from study.

  • Caches the renewable generation aggregation setting from the study configuration. This setting determines whether renewable generation data should be processed as aggregated time series.
  • Parameters
    studyThe study configuration containing renewable generation settings

◆ yearBeginImpl()

template<class TraitsType , class NextT = Container::EndOfList>
void Antares::Solver::Variable::Economy::TimeSeriesValuesGenerationImpl< TraitsType, NextT >::yearBeginImpl ( unsigned int  year,
unsigned int  space 
)
inline

Setup generation data at the beginning of each year.

  • For renewable generation, this method handles the bulk copying of time series data if aggregation is enabled. This approach optimizes performance by avoiding hourly data access.
  • Parameters
    yearThe simulation year index (0-based)
    spaceThe parallel space index for thread safety
  • ## Processing Logic:
  • 1. Aggregation Check: Only processes if aggregation is enabled

Data Access: Uses TraitsType::areaMember for type-safe access

  1. Bulk Copy: Copies entire year's time series in one operation
  2. Performance: Avoids per-hour processing overhead
    • ## Data Flow:
      Study Year → Area Member → Time Series → Yearly Values[space]

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