23 #include "antares/solver/variable/endoflist.h"
24 #include "antares/solver/variable/variable.h"
26 namespace Antares::Solver::Variable
33 return "Dummy Variable";
45 return "Value of all the dispatchable generation throughout all MC years";
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[]>;
114 template<
int CDataLevel,
int CFile>
130 pNbYearsParallel = study.maxNbYearsInParallel;
135 pValuesForTheCurrentYear.resize(pNbYearsParallel);
136 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
138 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()
165 NextType::simulationBegin();
170 NextType::simulationEnd();
173 virtual double hourlyValue(
unsigned int year,
unsigned int hour) = 0;
175 void yearBegin(
unsigned int year,
unsigned int numSpace)
178 pValuesForTheCurrentYear[numSpace].reset();
179 for (
unsigned int h = 0; h < HOURS_PER_YEAR; ++h)
181 pValuesForTheCurrentYear[numSpace][h] = hourlyValue(year, h);
184 NextType::yearBegin(year, numSpace);
187 void yearEndBuild(
State& state,
unsigned int year,
unsigned int numSpace)
190 NextType::yearEndBuild(state, year, numSpace);
193 void yearEnd(
unsigned int year,
unsigned int numSpace)
195 VariableAccessorType::template ComputeStatistics<VCardType>(
196 pValuesForTheCurrentYear[numSpace]);
199 NextType::yearEnd(year, numSpace);
202 void computeSummary(
unsigned int year,
unsigned int nbYearsForCurrentSummary)
204 VariableAccessorType::ComputeSummary(pValuesForTheCurrentYear[year],
208 NextType::computeSummary(year, nbYearsForCurrentSummary);
211 void hourBegin(
unsigned int hourInTheYear)
214 NextType::hourBegin(hourInTheYear);
217 void hourForEachArea(
State& state,
unsigned int numSpace)
220 NextType::hourForEachArea(state, numSpace);
223 void localBuildAnnualSurveyReport(SurveyResults&
results,
226 unsigned int numSpace)
const
229 results.isCurrentVarNA = AncestorType::isNonApplicable;
231 if (AncestorType::isPrinted[0])
236 pValuesForTheCurrentYear[numSpace]
237 .template buildAnnualSurveyReport<VCardType>(
results, fileLevel, precision);
243 typename VCardType::IntermediateValuesType pValuesForTheCurrentYear;
244 unsigned int pNbYearsParallel;
Definition of a link between two areas (Interconnection)
Definition: links.h:58
Definition for a single area.
Definition: area.h:51
Definition: endoflist.h:37
@ count
How many items have we got.
Definition: endoflist.h:45
Marginal DummyVariable.
Definition: dummyVariable.h:93
NextT NextType
Type of the next static variable.
Definition: dummyVariable.h:97
VCardDummyVariable VCardType
VCard.
Definition: dummyVariable.h:99
@ count
How many items have we got.
Definition: dummyVariable.h:111
Variable::IVariable< DummyVariable, NextT, VCardType > AncestorType
Ancestor.
Definition: dummyVariable.h:101
VCardType::ResultsType ResultsType
List of expected results.
Definition: dummyVariable.h:104
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: dummyVariable.h:116
Definition: stdDeviation.h:33
Definition: dummyVariable.h:29
static constexpr uint8_t decimal
Decimal precision.
Definition: dummyVariable.h:70
VCardDummyVariable VCardForSpatialAggregate
The VCard to look for for calculating spatial aggregates.
Definition: dummyVariable.h:57
static constexpr uint8_t categoryDataLevel
Data Level.
Definition: dummyVariable.h:60
static std::string Description()
The short description of the variable.
Definition: dummyVariable.h:43
static constexpr uint8_t precision
Precision (views)
Definition: dummyVariable.h:66
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition: dummyVariable.h:78
static constexpr uint8_t isPossiblyNonApplicable
Can this variable be non applicable (0 : no, 1 : yes)
Definition: dummyVariable.h:80
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition: dummyVariable.h:72
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition: dummyVariable.h:68
Results< R::AllYears::Average< R::AllYears::StdDeviation< R::AllYears::Min< R::AllYears::Max< > > > > > ResultsType
The expecte results.
Definition: dummyVariable.h:54
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition: dummyVariable.h:62
static std::string Caption()
Caption.
Definition: dummyVariable.h:31
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition: dummyVariable.h:74
static std::string Unit()
Unit.
Definition: dummyVariable.h:37