21 #ifndef __SOLVER_VARIABLE_ECONOMY_LoopFlow_H__
22 #define __SOLVER_VARIABLE_ECONOMY_LoopFlow_H__
24 #include "../../variable.h"
26 namespace Antares::Solver::Variable::Economy
57 & (Category::FileLevel::id
58 | Category::FileLevel::va);
69 static constexpr uint8_t spatialAggregateMode = Category::spatialAggregateEachYear;
70 static constexpr uint8_t spatialAggregatePostProcessing = 0;
83 template<
class NextT = Container::EndOfList>
105 template<
int CDataLevel,
int CFile>
129 pValuesForTheCurrentYear.initializeFromStudy(study);
132 NextType::initializeFromStudy(study);
138 VariableAccessorType::InitializeAndReset(
results, study);
144 NextType::initializeFromArea(study, area);
150 NextType::initializeFromAreaLink(study, link);
155 if (link->useLoopFlow)
158 unsigned int height = link->parameters.height;
159 (void)::memcpy(pValuesForTheCurrentYear.
hour,
160 link->parameters[Data::fhlLoopFlow],
161 sizeof(
double) * height);
165 NextType::initializeFromAreaLink(study, link);
168 void simulationBegin()
171 NextType::simulationBegin();
182 NextType::simulationEnd();
185 void yearBegin(uint year,
unsigned int numSpace)
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(uint year,
unsigned int numSpace)
200 NextType::yearEnd(year, numSpace);
203 void computeSummary(
unsigned int year,
unsigned int numSpace)
206 NextType::computeSummary(year, numSpace);
209 void hourBegin(uint hourInTheYear)
212 NextType::hourBegin(hourInTheYear);
215 void hourForEachArea(
State& state,
unsigned int numSpace)
218 NextType::hourForEachArea(state, numSpace);
221 void hourForEachLink(
State& state,
unsigned int numSpace)
224 NextType::hourForEachLink(state, numSpace);
227 void buildDigest(SurveyResults&
results,
int digestLevel,
int dataLevel)
const
230 NextType::buildDigest(
results, digestLevel, dataLevel);
233 Antares::Memory::Stored<double>::ConstReturnType retrieveRawHourlyValuesForCurrentYear(
237 return pValuesForTheCurrentYear.
hour;
240 void localBuildAnnualSurveyReport(SurveyResults&
results,
246 results.isCurrentVarNA = AncestorType::isNonApplicable;
248 if (AncestorType::isPrinted[0])
253 pValuesForTheCurrentYear.template buildAnnualSurveyReport<VCardType>(
results,
261 typename VCardType::IntermediateValuesType pValuesForTheCurrentYear;
Definition of a link between two areas (Interconnection)
Definition: links.h:58
Definition for a single area.
Definition: area.h:51
LoopFlow.
Definition: loopFlow.h:85
Variable::IVariable< LoopFlow< NextT >, NextT, VCardType > AncestorType
Ancestor.
Definition: loopFlow.h:92
NextT NextType
Type of the next static variable.
Definition: loopFlow.h:88
@ count
How many items have we got.
Definition: loopFlow.h:102
VCardType::ResultsType ResultsType
List of expected results.
Definition: loopFlow.h:95
VCardLoopFlow VCardType
VCard.
Definition: loopFlow.h:90
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: loopFlow.h:107
Definition: loopFlow.h:29
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition: loopFlow.h:62
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition: loopFlow.h:72
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition: loopFlow.h:56
static std::string Unit()
Unit.
Definition: loopFlow.h:37
static std::string Caption()
Caption.
Definition: loopFlow.h:31
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition: loopFlow.h:68
static constexpr uint8_t isPossiblyNonApplicable
Can this variable be non applicable (0 : no, 1 : yes)
Definition: loopFlow.h:74
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition: loopFlow.h:66
static std::string Description()
The short description of the variable.
Definition: loopFlow.h:43
static constexpr uint8_t categoryDataLevel
Data Level.
Definition: loopFlow.h:54
static constexpr uint8_t precision
Precision (views)
Definition: loopFlow.h:60
Results< R::AllYears::Raw< > > ResultsType
The expecte results.
Definition: loopFlow.h:51
static constexpr uint8_t decimal
Decimal precision.
Definition: loopFlow.h:64