21#ifndef __SOLVER_VARIABLE_ECONOMY_HydroStorage_H__
22#define __SOLVER_VARIABLE_ECONOMY_HydroStorage_H__
24#include "antares/solver/variable/variable.h"
51 return "Hydro Storage Generation";
69 & (Category::FileLevel::id
70 | Category::FileLevel::va);
81 static constexpr uint8_t spatialAggregateMode = Category::spatialAggregateEachYear;
82 static constexpr uint8_t spatialAggregatePostProcessing = 0;
89 typedef std::vector<IntermediateValues> IntermediateValuesType;
99template<
class NextT = Container::EndOfList>
121 template<
int CDataLevel,
int CFile>
137 pNbYearsParallel = study.maxNbYearsInParallel;
141 pValuesForTheCurrentYear.resize(pNbYearsParallel);
142 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
144 pValuesForTheCurrentYear[numSpace].initializeFromStudy(study);
148 NextType::initializeFromStudy(study);
154 VariableAccessorType::InitializeAndReset(
results, study);
160 NextType::initializeFromArea(study, area);
166 NextType::initializeFromAreaLink(study, link);
169 void simulationBegin()
171 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
173 pValuesForTheCurrentYear[numSpace].reset();
176 NextType::simulationBegin();
181 NextType::simulationEnd();
184 void yearBegin(
unsigned int year,
unsigned int numSpace)
187 pValuesForTheCurrentYear[numSpace].reset();
190 NextType::yearBegin(year, numSpace);
193 void yearEndBuild(
State& state,
unsigned int year,
unsigned int numSpace)
196 NextType::yearEndBuild(state, year, numSpace);
199 void yearEnd(
unsigned int year,
unsigned int numSpace)
202 pValuesForTheCurrentYear[numSpace].computeStatisticsForTheCurrentYear();
205 NextType::yearEnd(year, numSpace);
208 void computeSummary(std::map<unsigned int, unsigned int>& numSpaceToYear,
209 unsigned int nbYearsForCurrentSummary)
211 for (
unsigned int numSpace = 0; numSpace < nbYearsForCurrentSummary; ++numSpace)
215 pValuesForTheCurrentYear[numSpace]);
219 NextType::computeSummary(numSpaceToYear, nbYearsForCurrentSummary);
222 void hourBegin(
unsigned int hourInTheYear)
225 NextType::hourBegin(hourInTheYear);
228 void hourForEachArea(
State& state,
unsigned int numSpace)
231 pValuesForTheCurrentYear[numSpace].hour[state.hourInTheYear] =
233 state.hourlyResults->TurbinageHoraire[state.hourInTheWeek];
236 NextType::hourForEachArea(state, numSpace);
239 Antares::Memory::Stored<double>::ConstReturnType retrieveRawHourlyValuesForCurrentYear(
241 unsigned int numSpace)
const
243 return pValuesForTheCurrentYear[numSpace].hour;
246 void localBuildAnnualSurveyReport(SurveyResults&
results,
249 unsigned int numSpace)
const
252 results.isCurrentVarNA = AncestorType::isNonApplicable;
254 if (AncestorType::isPrinted[0])
259 pValuesForTheCurrentYear[numSpace]
260 .template buildAnnualSurveyReport<VCardType>(
results, fileLevel, precision);
266 typename VCardType::IntermediateValuesType pValuesForTheCurrentYear;
267 unsigned int pNbYearsParallel;
Definition of a link between two areas (Interconnection)
Definition links.h:50
Definition for a single area.
Definition area.h:52
C02 Average value of the overrall HydroStorage emissions expected from all the thermal dispatchable c...
Definition hydrostorage.h:101
Variable::IVariable< HydroStorage< NextT >, NextT, VCardType > AncestorType
Ancestor.
Definition hydrostorage.h:108
VCardType::ResultsType ResultsType
List of expected results.
Definition hydrostorage.h:111
@ count
How many items have we got.
Definition hydrostorage.h:118
NextT NextType
Type of the next static variable.
Definition hydrostorage.h:104
VCardHydroStorage VCardType
VCard.
Definition hydrostorage.h:106
Interface for any variable.
Definition variable.h:51
const StoredResultType & results() const
Definition variable.hxx:544
StoredResultType pResults
All the results about this variable.
Definition variable.h:327
@ count
The count if item in the list.
Definition results.h:56
Definition cbuilder.h:120
Definition hydrostorage.h:123
Definition hydrostorage.h:35
Results< R::AllYears::Average< R::AllYears::StdDeviation< R::AllYears::Min< R::AllYears::Max< > > > > > ResultsType
The expecte results.
Definition hydrostorage.h:60
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition hydrostorage.h:80
static std::string Unit()
Unit.
Definition hydrostorage.h:43
VCardHydroStorage VCardForSpatialAggregate
The VCard to look for for calculating spatial aggregates.
Definition hydrostorage.h:63
static std::string Description()
The short description of the variable.
Definition hydrostorage.h:49
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition hydrostorage.h:84
static constexpr uint8_t isPossiblyNonApplicable
Can this variable be non applicable (0 : no, 1 : yes)
Definition hydrostorage.h:86
static std::string Caption()
Caption.
Definition hydrostorage.h:37
static constexpr uint8_t precision
Precision (views)
Definition hydrostorage.h:72
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition hydrostorage.h:74
static constexpr uint8_t categoryDataLevel
Data Level.
Definition hydrostorage.h:66
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition hydrostorage.h:68
static constexpr uint8_t decimal
Decimal precision.
Definition hydrostorage.h:76
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition hydrostorage.h:78
Definition stdDeviation.h:40