21 #ifndef __SOLVER_VARIABLE_ECONOMY_Overflow_H__
22 #define __SOLVER_VARIABLE_ECONOMY_Overflow_H__
24 #include "antares/solver/variable/variable.h"
26 namespace Antares::Solver::Variable::Economy
45 return "Hydro overflow";
63 & (Category::FileLevel::id
64 | Category::FileLevel::va);
75 static constexpr uint8_t spatialAggregateMode = Category::spatialAggregateEachYear;
76 static constexpr uint8_t spatialAggregatePostProcessing = 0;
83 typedef std::vector<IntermediateValues> IntermediateValuesType;
85 using IntermediateValuesTypeForSpatialAg = std::unique_ptr<IntermediateValuesBaseType[]>;
92 template<
class NextT = Container::EndOfList>
114 template<
int CDataLevel,
int CFile>
130 pNbYearsParallel = study.maxNbYearsInParallel;
134 pValuesForTheCurrentYear.resize(pNbYearsParallel);
135 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
137 pValuesForTheCurrentYear[numSpace].initializeFromStudy(study);
141 NextType::initializeFromStudy(study);
147 VariableAccessorType::InitializeAndReset(
results, study);
153 NextType::initializeFromArea(study, area);
159 NextType::initializeFromAreaLink(study, link);
162 void simulationBegin()
164 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
166 pValuesForTheCurrentYear[numSpace].reset();
169 NextType::simulationBegin();
174 NextType::simulationEnd();
177 void yearBegin(
unsigned int year,
unsigned int numSpace)
180 pValuesForTheCurrentYear[numSpace].reset();
183 NextType::yearBegin(year, numSpace);
186 void yearEndBuild(
State& state,
unsigned int year,
unsigned int numSpace)
189 NextType::yearEndBuild(state, year, numSpace);
192 void yearEnd(
unsigned int year,
unsigned int numSpace)
195 pValuesForTheCurrentYear[numSpace].computeStatisticsForTheCurrentYear();
198 NextType::yearEnd(year, numSpace);
201 void computeSummary(
unsigned int year,
unsigned int numSpace)
207 NextType::computeSummary(year, numSpace);
210 void hourBegin(
unsigned int hourInTheYear)
213 NextType::hourBegin(hourInTheYear);
216 void hourForEachArea(
State& state,
unsigned int numSpace)
219 pValuesForTheCurrentYear[numSpace].hour[state.hourInTheYear] = state.hourlyResults
220 ->debordementsHoraires
221 [state.hourInTheWeek];
224 NextType::hourForEachArea(state, numSpace);
227 Antares::Memory::Stored<double>::ConstReturnType retrieveRawHourlyValuesForCurrentYear(
229 unsigned int numSpace)
const
231 return pValuesForTheCurrentYear[numSpace].hour;
234 void localBuildAnnualSurveyReport(SurveyResults&
results,
237 unsigned int numSpace)
const
240 results.isCurrentVarNA = AncestorType::isNonApplicable;
242 if (AncestorType::isPrinted[0])
247 pValuesForTheCurrentYear[numSpace]
248 .template buildAnnualSurveyReport<VCardType>(
results, fileLevel, precision);
254 typename VCardType::IntermediateValuesType pValuesForTheCurrentYear;
255 unsigned int pNbYearsParallel;
Definition of a link between two areas (Interconnection)
Definition: links.h:58
Definition for a single area.
Definition: area.h:51
Reservoir level.
Definition: overflow.h:94
Variable::IVariable< Overflows< NextT >, NextT, VCardType > AncestorType
Ancestor.
Definition: overflow.h:101
VCardType::ResultsType ResultsType
List of expected results.
Definition: overflow.h:104
@ count
How many items have we got.
Definition: overflow.h:111
VCardOverflow VCardType
VCard.
Definition: overflow.h:99
NextT NextType
Type of the next static variable.
Definition: overflow.h:97
Interface for any variable.
Definition: variable.h:47
const StoredResultType & results() const
The results.
Definition: variable.hxx:544
StoredResultType pResults
All the results about this variable.
Definition: variable.h:323
@ count
The count if item in the list.
Definition: results.h:52
Definition: cbuilder.h:120
Definition: overflow.h:116
Definition: overflow.h:29
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition: overflow.h:78
static constexpr uint8_t decimal
Decimal precision.
Definition: overflow.h:70
VCardOverflow VCardForSpatialAggregate
The VCard to look for for calculating spatial aggregates.
Definition: overflow.h:57
static constexpr uint8_t precision
Precision (views)
Definition: overflow.h:66
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition: overflow.h:68
static std::string Description()
The short description of the variable.
Definition: overflow.h:43
static constexpr uint8_t isPossiblyNonApplicable
Can this variable be non applicable (0 : no, 1 : yes)
Definition: overflow.h:80
static std::string Unit()
Unit.
Definition: overflow.h:37
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition: overflow.h:72
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition: overflow.h:62
Results< R::AllYears::Average< R::AllYears::StdDeviation< R::AllYears::Min< R::AllYears::Max< > > > > > ResultsType
The expecte results.
Definition: overflow.h:54
static constexpr uint8_t categoryDataLevel
Data Level.
Definition: overflow.h:60
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition: overflow.h:74
static std::string Caption()
Caption.
Definition: overflow.h:31
Definition: stdDeviation.h:33