21 #ifndef __SOLVER_VARIABLE_ECONOMY_FlowLinearAbs_H__
22 #define __SOLVER_VARIABLE_ECONOMY_FlowLinearAbs_H__
26 #include "../../variable.h"
28 namespace Antares::Solver::Variable::Economy
47 return "Used capacity assessed, over all MC years, through linear optimization";
62 & (Category::FileLevel::id
63 | Category::FileLevel::va);
74 static constexpr uint8_t spatialAggregateMode = Category::spatialAggregateEachYear;
75 static constexpr uint8_t spatialAggregatePostProcessing = 0;
82 typedef std::vector<IntermediateValues> IntermediateValuesType;
89 template<
class NextT = Container::EndOfList>
111 template<
int CDataLevel,
int CFile>
127 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 NextType::initializeFromArea(study, area);
153 NextType::initializeFromAreaLink(study, link);
156 void simulationBegin()
158 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
160 pValuesForTheCurrentYear[numSpace].reset();
163 NextType::simulationBegin();
168 NextType::simulationEnd();
171 void yearBegin(uint year,
unsigned int numSpace)
174 pValuesForTheCurrentYear[numSpace].reset();
176 NextType::yearBegin(year, numSpace);
179 void yearEndBuild(
State& state,
unsigned int year,
unsigned int numSpace)
182 NextType::yearEndBuild(state, year, numSpace);
185 void yearEnd(
unsigned int year,
unsigned int numSpace)
188 pValuesForTheCurrentYear[numSpace].computeStatisticsForTheCurrentYear();
191 NextType::yearEnd(year, numSpace);
194 void computeSummary(
unsigned int year,
unsigned int numSpace)
200 NextType::computeSummary(year, numSpace);
203 void hourBegin(uint hourInTheYear)
206 NextType::hourBegin(hourInTheYear);
209 void hourForEachArea(
State& state,
unsigned int numSpace)
212 NextType::hourForEachArea(state, numSpace);
215 void hourForEachLink(
State& state,
unsigned int numSpace)
218 pValuesForTheCurrentYear[numSpace].hour[state.hourInTheYear] += std::abs(
219 state.ntc.ValeurDuFlux[state.link->index]);
221 NextType::hourForEachLink(state, numSpace);
224 void buildDigest(SurveyResults&
results,
int digestLevel,
int dataLevel)
const
227 NextType::buildDigest(
results, digestLevel, dataLevel);
230 Antares::Memory::Stored<double>::ConstReturnType retrieveRawHourlyValuesForCurrentYear(
234 return pValuesForTheCurrentYear[numSpace].hour;
237 void localBuildAnnualSurveyReport(SurveyResults&
results,
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
Marginal FlowLinearAbs.
Definition: flowLinearAbs.h:91
NextT NextType
Type of the next static variable.
Definition: flowLinearAbs.h:94
@ count
How many items have we got.
Definition: flowLinearAbs.h:108
VCardFlowLinearAbs VCardType
VCard.
Definition: flowLinearAbs.h:96
Variable::IVariable< FlowLinearAbs< NextT >, NextT, VCardType > AncestorType
Ancestor.
Definition: flowLinearAbs.h:98
VCardType::ResultsType ResultsType
List of expected results.
Definition: flowLinearAbs.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: flowLinearAbs.h:113
Definition: flowLinearAbs.h:31
static constexpr uint8_t categoryDataLevel
Data Level.
Definition: flowLinearAbs.h:59
static std::string Description()
The short description of the variable.
Definition: flowLinearAbs.h:45
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition: flowLinearAbs.h:71
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition: flowLinearAbs.h:61
static constexpr uint8_t isPossiblyNonApplicable
Can this variable be non applicable (0 : no, 1 : yes)
Definition: flowLinearAbs.h:79
static std::string Unit()
Unit.
Definition: flowLinearAbs.h:39
static constexpr uint8_t precision
Precision (views)
Definition: flowLinearAbs.h:65
Results< R::AllYears::Average< R::AllYears::StdDeviation< R::AllYears::Min< R::AllYears::Max< > > > > > ResultsType
The expecte results.
Definition: flowLinearAbs.h:56
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition: flowLinearAbs.h:67
static std::string Caption()
Caption.
Definition: flowLinearAbs.h:33
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition: flowLinearAbs.h:73
static constexpr uint8_t decimal
Decimal precision.
Definition: flowLinearAbs.h:69
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition: flowLinearAbs.h:77
Definition: stdDeviation.h:33