21 #ifndef __SOLVER_VARIABLE_ECONOMY_Join_H__
22 #define __SOLVER_VARIABLE_ECONOMY_Join_H__
24 #include "antares/solver/variable/variable.h"
26 namespace Antares::Solver::Variable
60 & (Category::FileLevel::id
61 | Category::FileLevel::va);
72 static constexpr uint8_t spatialAggregateMode = Category::spatialAggregateEachYear;
73 static constexpr uint8_t spatialAggregatePostProcessing = 0;
82 template<
class LeftT,
class RightT>
88 typedef LeftT LeftType;
89 typedef RightT RightType;
107 template<
int CDataLevel,
int CFile>
112 count = (int)LeftType::template
Statistics < CDataLevel,
113 CFile > ::count + (
int)RightType::template
Statistics < CDataLevel,
124 template<
class PredicateT>
127 LeftType::RetrieveVariableList(predicate);
128 RightType::RetrieveVariableList(predicate);
134 LeftType::initializeFromStudy(study);
135 RightType::initializeFromStudy(study);
140 LeftType::initializeFromArea(study, area);
141 RightType::initializeFromArea(study, area);
146 LeftType::initializeFromAreaLink(study, link);
147 RightType::initializeFromAreaLink(study, link);
150 void initializeFromThermalCluster(
Data::Study* study,
154 LeftType::initializeFromThermalCluster(study, area, cluster);
155 RightType::initializeFromThermalCluster(study, area, cluster);
158 void simulationBegin()
160 LeftType::simulationBegin();
161 RightType::simulationBegin();
166 LeftType::simulationEnd();
167 RightType::simulationEnd();
170 void yearBegin(
unsigned int year,
unsigned int numSpace)
172 LeftType::yearBegin(year, numSpace);
173 RightType::yearBegin(year, numSpace);
176 void yearEndBuildPrepareDataForEachThermalCluster(
State& state, uint year)
179 LeftType::yearEndBuildPrepareDataForEachThermalCluster(state, year);
180 RightType::yearEndBuildPrepareDataForEachThermalCluster(state, year);
183 void yearEndBuildForEachThermalCluster(
State& state, uint year)
186 LeftType::yearEndBuildForEachThermalCluster(state, year);
187 RightType::yearEndBuildForEachThermalCluster(state, year);
190 void yearEndBuild(
State& state,
unsigned int year,
unsigned int numSpace)
192 LeftType::yearEndBuild(state, year, numSpace);
193 RightType::yearEndBuild(state, year, numSpace);
196 void yearEnd(
unsigned int year,
unsigned int numSpace)
198 LeftType::yearEnd(year, numSpace);
199 RightType::yearEnd(year, numSpace);
202 void computeSummary(
unsigned int year,
unsigned int numSpace)
205 LeftType::computeSummary(year, numSpace);
206 RightType::computeSummary(year, numSpace);
209 void weekBegin(
State& state)
211 LeftType::weekBegin(state);
212 RightType::weekBegin(state);
215 void weekForEachArea(
State& state,
unsigned int numSpace)
217 LeftType::weekForEachArea(state, numSpace);
218 RightType::weekForEachArea(state, numSpace);
221 void weekEnd(
State& state)
223 LeftType::weekEnd(state);
224 RightType::weekEnd(state);
227 void hourBegin(
unsigned int hourInTheYear)
229 LeftType::hourBegin(hourInTheYear);
230 RightType::hourBegin(hourInTheYear);
233 void hourForEachArea(
State& state,
unsigned int numSpace)
235 LeftType::hourForEachArea(state, numSpace);
236 RightType::hourForEachArea(state, numSpace);
239 void hourForEachLink(
State& state)
241 LeftType::hourForEachLink(state);
242 RightType::hourForEachLink(state);
245 void hourEnd(
State& state,
unsigned int hourInTheYear)
247 LeftType::hourEnd(state, hourInTheYear);
248 RightType::hourEnd(state, hourInTheYear);
251 void buildSurveyReport(SurveyResults&
results,
256 LeftType::buildSurveyReport(
results, dataLevel, fileLevel, precision);
257 RightType::buildSurveyReport(
results, dataLevel, fileLevel, precision);
260 void buildAnnualSurveyReport(SurveyResults&
results,
266 LeftType::buildAnnualSurveyReport(
results, dataLevel, fileLevel, precision, numSpace);
267 RightType::buildAnnualSurveyReport(
results, dataLevel, fileLevel, precision, numSpace);
270 void buildDigest(SurveyResults&
results,
int digestLevel,
int dataLevel)
const
273 LeftType ::buildDigest(
results, digestLevel, dataLevel);
274 RightType::buildDigest(
results, digestLevel, dataLevel);
277 void beforeYearByYearExport(uint year, uint numSpace)
280 LeftType ::beforeYearByYearExport(year, numSpace);
281 RightType::beforeYearByYearExport(year, numSpace);
284 template<
class SearchVCardT,
class O>
285 void computeSpatialAggregateWith(O& out)
287 LeftType ::template computeSpatialAggregateWith<SearchVCardT, O>(out);
288 RightType::template computeSpatialAggregateWith<SearchVCardT, O>(out);
291 template<
class SearchVCardT,
class O>
292 void computeSpatialAggregateWith(O& out,
const Data::Area* area, uint numSpace)
294 LeftType ::template computeSpatialAggregateWith<SearchVCardT, O>(out, area, numSpace);
295 RightType::template computeSpatialAggregateWith<SearchVCardT, O>(out, area, numSpace);
299 void yearEndSpatialAggregates(V& allVars,
unsigned int year,
unsigned int numSpace)
301 LeftType::yearEndSpatialAggregates(allVars, year, numSpace);
302 RightType::yearEndSpatialAggregates(allVars, year, numSpace);
306 void computeSpatialAggregatesSummary(V& allVars,
unsigned int year,
unsigned int numSpace)
308 LeftType::computeSpatialAggregatesSummary(allVars, year, numSpace);
309 RightType::computeSpatialAggregatesSummary(allVars, year, numSpace);
313 void simulationEndSpatialAggregates(V& allVars)
315 LeftType::simulationEndSpatialAggregates(allVars);
316 RightType::simulationEndSpatialAggregates(allVars);
320 static void provideInformations(I& infos)
322 LeftType ::provideInformations(infos);
323 RightType::provideInformations(infos);
326 template<
class VCardToFindT>
327 const double* retrieveHourlyResultsForCurrentYear()
const
330 auto* result = LeftType::template retrieveHourlyResultsForCurrentYear<VCardToFindT>();
331 return (!result) ? RightType::template retrieveHourlyResultsForCurrentYear<VCardToFindT>()
335 template<
class VCardToFindT>
339 LeftType::template retrieveResultsForArea<VCardToFindT>(result, area);
340 RightType::template retrieveResultsForArea<VCardToFindT>(result, area);
343 template<
class VCardToFindT>
344 void retrieveResultsForThermalCluster(
348 LeftType::template retrieveResultsForThermalCluster<VCardToFindT>(result, cluster);
349 RightType::template retrieveResultsForThermalCluster<VCardToFindT>(result, cluster);
352 template<
class VCardToFindT>
356 LeftType::template retrieveResultsForLink<VCardToFindT>(result, link);
357 RightType::template retrieveResultsForLink<VCardToFindT>(result, link);
360 void localBuildAnnualSurveyReport(SurveyResults&
results,
int fileLevel,
int precision)
const
362 LeftType::localBuildAnnualSurveyReport(
results, fileLevel, precision);
363 RightType::localBuildAnnualSurveyReport(
results, fileLevel, precision);
Definition of a link between two areas (Interconnection)
Definition: links.h:58
Definition for a single area.
Definition: area.h:51
A single thermal cluster.
Definition: cluster.h:76
Interface for any variable.
Definition: variable.h:47
const StoredResultType & results() const
The results.
Definition: variable.hxx:544
Join.
Definition: join.h:86
VCardJoin VCardType
VCard.
Definition: join.h:92
static void RetrieveVariableList(PredicateT &predicate)
Retrieve the list of all individual variables.
Definition: join.h:125
@ count
How many items have we got.
Definition: join.h:104
VCardType::ResultsType ResultsType
List of expected results.
Definition: join.h:97
Variable::IVariable< Join< LeftT, RightT >, Yuni::Default, VCardType > AncestorType
Ancestor.
Definition: join.h:94
Definition: cbuilder.h:120
Definition: stdDeviation.h:33
VariableAccessor< typename VCardT::ResultsType, VCardT::columnCount >::Type ResultsType
The true type used for the results.
Definition: info.h:760
static std::string Description()
The short description of the variable.
Definition: join.h:43
static constexpr uint8_t precision
Precision (views)
Definition: join.h:63
static constexpr uint8_t categoryDataLevel
Data Level.
Definition: join.h:57
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition: join.h:59
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition: join.h:75
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition: join.h:65
Results< R::AllYears::Average< R::AllYears::StdDeviation< R::AllYears::Min< R::AllYears::Max< > > > > > ResultsType
The expecte results.
Definition: join.h:54
static std::string Unit()
Unit.
Definition: join.h:37
static std::string Caption()
Caption.
Definition: join.h:31
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition: join.h:69
static constexpr uint8_t decimal
Decimal precision.
Definition: join.h:67
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition: join.h:71