21 #ifndef __SOLVER_VARIABLE_ECONOMY_DomesticUnsuppliedEnergy_H__
22 #define __SOLVER_VARIABLE_ECONOMY_DomesticUnsuppliedEnergy_H__
24 #include "antares/solver/variable/variable.h"
26 namespace Antares::Solver::Variable::Economy
45 return "Domestic Unsupplied Energy (demand that cannot be satisfied without "
46 "interconnections/links)";
64 & (Category::FileLevel::id
65 | Category::FileLevel::va);
76 static constexpr uint8_t spatialAggregateMode = Category::spatialAggregateEachYear;
77 static constexpr uint8_t spatialAggregatePostProcessing = 0;
84 typedef std::vector<IntermediateValues> IntermediateValuesType;
86 using IntermediateValuesTypeForSpatialAg = std::unique_ptr<IntermediateValuesBaseType[]>;
94 template<
class NextT = Container::EndOfList>
97 VCardDomesticUnsuppliedEnergy>
118 template<
int CDataLevel,
int CFile>
134 pNbYearsParallel = study.maxNbYearsInParallel;
139 pValuesForTheCurrentYear.resize(pNbYearsParallel);
140 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
142 pValuesForTheCurrentYear[numSpace].initializeFromStudy(study);
146 NextType::initializeFromStudy(study);
152 VariableAccessorType::InitializeAndReset(
results, study);
158 NextType::initializeFromArea(study, area);
164 NextType::initializeFromAreaLink(study, link);
167 void simulationBegin()
169 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
171 pValuesForTheCurrentYear[numSpace].reset();
174 NextType::simulationBegin();
179 NextType::simulationEnd();
182 void yearBegin(
unsigned int year,
unsigned int numSpace)
185 pValuesForTheCurrentYear[numSpace].reset();
188 NextType::yearBegin(year, numSpace);
191 void yearEndBuild(
State& state,
unsigned int year,
unsigned int numSpace)
194 NextType::yearEndBuild(state, year, numSpace);
197 void yearEnd(
unsigned int year,
unsigned int numSpace)
200 pValuesForTheCurrentYear[numSpace].computeStatisticsForTheCurrentYear();
203 NextType::yearEnd(year, numSpace);
206 void computeSummary(
unsigned int year,
unsigned int numSpace)
212 NextType::computeSummary(year, numSpace);
215 void hourBegin(
unsigned int hourInTheYear)
218 NextType::hourBegin(hourInTheYear);
221 void hourForEachArea(
State& state,
unsigned int numSpace)
224 pValuesForTheCurrentYear[numSpace][state.hourInTheYear] = state.hourlyResults
225 ->ValeursHorairesDENS
226 [state.hourInTheWeek];
229 NextType::hourForEachArea(state, numSpace);
232 Antares::Memory::Stored<double>::ConstReturnType retrieveRawHourlyValuesForCurrentYear(
234 unsigned int numSpace)
const
236 return pValuesForTheCurrentYear[numSpace].hour;
239 void localBuildAnnualSurveyReport(SurveyResults&
results,
242 unsigned int numSpace)
const
245 results.isCurrentVarNA = AncestorType::isNonApplicable;
247 if (AncestorType::isPrinted[0])
252 pValuesForTheCurrentYear[numSpace]
253 .template buildAnnualSurveyReport<VCardType>(
results, fileLevel, precision);
259 typename VCardType::IntermediateValuesType pValuesForTheCurrentYear;
260 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 DomesticUnsuppliedEnergy emissions expected from all the thermal di...
Definition: domesticUnsuppliedEnergy.h:98
VCardType::ResultsType ResultsType
List of expected results.
Definition: domesticUnsuppliedEnergy.h:108
Variable::IVariable< DomesticUnsuppliedEnergy< NextT >, NextT, VCardType > AncestorType
Ancestor.
Definition: domesticUnsuppliedEnergy.h:105
@ count
How many items have we got.
Definition: domesticUnsuppliedEnergy.h:115
VCardDomesticUnsuppliedEnergy VCardType
VCard.
Definition: domesticUnsuppliedEnergy.h:103
NextT NextType
Type of the next static variable.
Definition: domesticUnsuppliedEnergy.h:101
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: domesticUnsuppliedEnergy.h:120
Definition: domesticUnsuppliedEnergy.h:29
VCardDomesticUnsuppliedEnergy VCardForSpatialAggregate
The VCard to look for for calculating spatial aggregates.
Definition: domesticUnsuppliedEnergy.h:58
static constexpr uint8_t precision
Precision (views)
Definition: domesticUnsuppliedEnergy.h:67
static constexpr uint8_t decimal
Decimal precision.
Definition: domesticUnsuppliedEnergy.h:71
static std::string Caption()
Caption.
Definition: domesticUnsuppliedEnergy.h:31
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition: domesticUnsuppliedEnergy.h:63
static constexpr uint8_t isPossiblyNonApplicable
Can this variable be non applicable (0 : no, 1 : yes)
Definition: domesticUnsuppliedEnergy.h:81
Results< R::AllYears::Average< R::AllYears::StdDeviation< R::AllYears::Min< R::AllYears::Max< > > > > > ResultsType
The expecte results.
Definition: domesticUnsuppliedEnergy.h:55
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition: domesticUnsuppliedEnergy.h:79
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition: domesticUnsuppliedEnergy.h:73
static std::string Unit()
Unit.
Definition: domesticUnsuppliedEnergy.h:37
static constexpr uint8_t categoryDataLevel
Data Level.
Definition: domesticUnsuppliedEnergy.h:61
static std::string Description()
The short description of the variable.
Definition: domesticUnsuppliedEnergy.h:43
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition: domesticUnsuppliedEnergy.h:69
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition: domesticUnsuppliedEnergy.h:75
Definition: stdDeviation.h:33