21 #ifndef __SOLVER_VARIABLE_ECONOMY_UnsupliedEnergy_H__
22 #define __SOLVER_VARIABLE_ECONOMY_UnsupliedEnergy_H__
24 #include "antares/solver/variable/variable.h"
26 namespace Antares::Solver::Variable::Economy
45 return "Unsuplied Energy (demand that cannot be satisfied)";
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[]>;
93 template<
class NextT = Container::EndOfList>
116 template<
int CDataLevel,
int CFile>
132 pNbYearsParallel = study.maxNbYearsInParallel;
137 pValuesForTheCurrentYear.resize(pNbYearsParallel);
138 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
140 pValuesForTheCurrentYear[numSpace].initializeFromStudy(study);
144 NextType::initializeFromStudy(study);
150 VariableAccessorType::InitializeAndReset(
results, study);
156 NextType::initializeFromArea(study, area);
162 NextType::initializeFromAreaLink(study, link);
165 void simulationBegin()
167 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
169 pValuesForTheCurrentYear[numSpace].reset();
172 NextType::simulationBegin();
177 NextType::simulationEnd();
180 void yearBegin(
unsigned int year,
unsigned int numSpace)
183 pValuesForTheCurrentYear[numSpace].reset();
186 NextType::yearBegin(year, numSpace);
189 void yearEndBuild(
State& state,
unsigned int year,
unsigned int numSpace)
192 NextType::yearEndBuild(state, year, numSpace);
195 void yearEnd(
unsigned int year,
unsigned int numSpace)
198 pValuesForTheCurrentYear[numSpace].computeStatisticsForTheCurrentYear();
201 NextType::yearEnd(year, numSpace);
204 void computeSummary(
unsigned int year,
unsigned int numSpace)
210 NextType::computeSummary(year, numSpace);
213 void hourBegin(
unsigned int hourInTheYear)
216 NextType::hourBegin(hourInTheYear);
219 void hourForEachArea(
State& state,
unsigned int numSpace)
222 pValuesForTheCurrentYear[numSpace][state.hourInTheYear] =
224 state.hourlyResults->ValeursHorairesDeDefaillancePositive[state.hourInTheWeek];
227 NextType::hourForEachArea(state, numSpace);
230 Antares::Memory::Stored<double>::ConstReturnType retrieveRawHourlyValuesForCurrentYear(
232 unsigned int numSpace)
const
234 return pValuesForTheCurrentYear[numSpace].hour;
237 void localBuildAnnualSurveyReport(SurveyResults&
results,
240 unsigned int numSpace)
const
243 results.isCurrentVarNA = AncestorType::isNonApplicable;
245 if (AncestorType::isPrinted[0])
250 pValuesForTheCurrentYear[numSpace]
251 .template buildAnnualSurveyReport<VCardType>(
results, fileLevel, precision);
257 typename VCardType::IntermediateValuesType pValuesForTheCurrentYear;
258 unsigned int pNbYearsParallel;
Definition of a link between two areas (Interconnection)
Definition: links.h:58
Definition for a single area.
Definition: area.h:51
C02 Average value of the overrall UnsupliedEnergy emissions expected from all the thermal dispatchabl...
Definition: unsupliedEnergy.h:96
VCardType::ResultsType ResultsType
List of expected results.
Definition: unsupliedEnergy.h:106
NextT NextType
Type of the next static variable.
Definition: unsupliedEnergy.h:99
VCardUnsupliedEnergy VCardType
VCard.
Definition: unsupliedEnergy.h:101
@ count
How many items have we got.
Definition: unsupliedEnergy.h:113
Variable::IVariable< UnsupliedEnergy< NextT >, NextT, VCardType > AncestorType
Ancestor.
Definition: unsupliedEnergy.h:103
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: unsupliedEnergy.h:118
Definition: unsupliedEnergy.h:29
static std::string Description()
The short description of the variable.
Definition: unsupliedEnergy.h:43
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition: unsupliedEnergy.h:62
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition: unsupliedEnergy.h:74
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition: unsupliedEnergy.h:68
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition: unsupliedEnergy.h:78
static constexpr uint8_t categoryDataLevel
Data Level.
Definition: unsupliedEnergy.h:60
static constexpr uint8_t precision
Precision (views)
Definition: unsupliedEnergy.h:66
static std::string Unit()
Unit.
Definition: unsupliedEnergy.h:37
VCardUnsupliedEnergy VCardForSpatialAggregate
The VCard to look for for calculating spatial aggregates.
Definition: unsupliedEnergy.h:57
static constexpr uint8_t decimal
Decimal precision.
Definition: unsupliedEnergy.h:70
static std::string Caption()
Caption.
Definition: unsupliedEnergy.h:31
static constexpr uint8_t isPossiblyNonApplicable
Can this variable be non applicable (0 : no, 1 : yes)
Definition: unsupliedEnergy.h:80
Results< R::AllYears::Average< R::AllYears::StdDeviation< R::AllYears::Min< R::AllYears::Max< > > > > > ResultsType
The expecte results.
Definition: unsupliedEnergy.h:54
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition: unsupliedEnergy.h:72
Definition: stdDeviation.h:33