21#ifndef __SOLVER_VARIABLE_ECONOMY_FlowLinearAbs_H__
22#define __SOLVER_VARIABLE_ECONOMY_FlowLinearAbs_H__
26#include "../../variable.h"
53 return "Used capacity assessed, over all MC years, through linear optimization";
68 & (Category::FileLevel::id
69 | Category::FileLevel::va);
80 static constexpr uint8_t spatialAggregateMode = Category::spatialAggregateEachYear;
81 static constexpr uint8_t spatialAggregatePostProcessing = 0;
88 typedef std::vector<IntermediateValues> IntermediateValuesType;
95template<
class NextT = Container::EndOfList>
117 template<
int CDataLevel,
int CFile>
133 pNbYearsParallel = study.maxNbYearsInParallel;
140 pValuesForTheCurrentYear.resize(pNbYearsParallel);
141 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
143 pValuesForTheCurrentYear[numSpace].initializeFromStudy(study);
147 NextType::initializeFromStudy(study);
153 NextType::initializeFromArea(study, area);
159 NextType::initializeFromAreaLink(study, link);
162 void simulationBegin()
164 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
166 pValuesForTheCurrentYear[numSpace].reset();
169 NextType::simulationBegin();
174 NextType::simulationEnd();
177 void yearBegin(uint year,
unsigned int numSpace)
180 pValuesForTheCurrentYear[numSpace].reset();
182 NextType::yearBegin(year, numSpace);
185 void yearEndBuild(
State& state,
unsigned int year,
unsigned int numSpace)
188 NextType::yearEndBuild(state, year, numSpace);
191 void yearEnd(
unsigned int year,
unsigned int numSpace)
194 pValuesForTheCurrentYear[numSpace].computeStatisticsForTheCurrentYear();
197 NextType::yearEnd(year, numSpace);
200 void computeSummary(std::map<unsigned int, unsigned int>& numSpaceToYear,
201 unsigned int nbYearsForCurrentSummary)
203 for (
unsigned int numSpace = 0; numSpace < nbYearsForCurrentSummary; ++numSpace)
207 pValuesForTheCurrentYear[numSpace]);
211 NextType::computeSummary(numSpaceToYear, nbYearsForCurrentSummary);
214 void hourBegin(uint hourInTheYear)
217 NextType::hourBegin(hourInTheYear);
220 void hourForEachArea(
State& state,
unsigned int numSpace)
223 NextType::hourForEachArea(state, numSpace);
226 void hourForEachLink(
State& state,
unsigned int numSpace)
229 pValuesForTheCurrentYear[numSpace].hour[state.hourInTheYear] += std::abs(
230 state.ntc.ValeurDuFlux[state.link->index]);
232 NextType::hourForEachLink(state, numSpace);
235 void buildDigest(SurveyResults&
results,
int digestLevel,
int dataLevel)
const
238 NextType::buildDigest(
results, digestLevel, dataLevel);
241 Antares::Memory::Stored<double>::ConstReturnType retrieveRawHourlyValuesForCurrentYear(
245 return pValuesForTheCurrentYear[numSpace].hour;
248 void localBuildAnnualSurveyReport(SurveyResults&
results,
254 results.isCurrentVarNA = AncestorType::isNonApplicable;
256 if (AncestorType::isPrinted[0])
261 pValuesForTheCurrentYear[numSpace]
262 .template buildAnnualSurveyReport<VCardType>(
results, fileLevel, precision);
268 typename VCardType::IntermediateValuesType pValuesForTheCurrentYear;
269 unsigned int pNbYearsParallel;
Definition of a link between two areas (Interconnection)
Definition links.h:50
Definition for a single area.
Definition area.h:52
Marginal FlowLinearAbs.
Definition flowLinearAbs.h:97
NextT NextType
Type of the next static variable.
Definition flowLinearAbs.h:100
VCardType::ResultsType ResultsType
List of expected results.
Definition flowLinearAbs.h:107
VCardFlowLinearAbs VCardType
VCard.
Definition flowLinearAbs.h:102
@ count
How many items have we got.
Definition flowLinearAbs.h:114
Variable::IVariable< FlowLinearAbs< NextT >, NextT, VCardType > AncestorType
Ancestor.
Definition flowLinearAbs.h:104
Interface for any variable.
Definition variable.h:51
const StoredResultType & results() const
Definition variable.hxx:544
StoredResultType pResults
All the results about this variable.
Definition variable.h:327
@ count
The count if item in the list.
Definition results.h:56
Definition cbuilder.h:120
Definition flowLinearAbs.h:119
Definition flowLinearAbs.h:37
static constexpr uint8_t categoryDataLevel
Data Level.
Definition flowLinearAbs.h:65
static std::string Description()
The short description of the variable.
Definition flowLinearAbs.h:51
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition flowLinearAbs.h:77
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition flowLinearAbs.h:67
static constexpr uint8_t isPossiblyNonApplicable
Can this variable be non applicable (0 : no, 1 : yes)
Definition flowLinearAbs.h:85
static std::string Unit()
Unit.
Definition flowLinearAbs.h:45
static constexpr uint8_t precision
Precision (views)
Definition flowLinearAbs.h:71
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition flowLinearAbs.h:73
static std::string Caption()
Caption.
Definition flowLinearAbs.h:39
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition flowLinearAbs.h:79
static constexpr uint8_t decimal
Decimal precision.
Definition flowLinearAbs.h:75
Results< R::AllYears::Average< R::AllYears::StdDeviation< R::AllYears::Min< R::AllYears::Max< > > > > > ResultsType
The expecte results.
Definition flowLinearAbs.h:62
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition flowLinearAbs.h:83
Definition stdDeviation.h:40