21#ifndef __SOLVER_VARIABLE_ECONOMY_CongestionFee_H__
22#define __SOLVER_VARIABLE_ECONOMY_CongestionFee_H__
24#include "../../variable.h"
39 return "CONG. FEE (ALG.)";
51 return "Congestion fee collected throughout all MC years (Alg.)";
66 & (Category::FileLevel::id
67 | Category::FileLevel::va);
78 static constexpr uint8_t spatialAggregateMode = Category::spatialAggregateEachYear;
79 static constexpr uint8_t spatialAggregatePostProcessing = 0;
86 typedef std::vector<IntermediateValues> IntermediateValuesType;
93template<
class NextT = Container::EndOfList>
115 template<
int CDataLevel,
int CFile>
131 pNbYearsParallel = study.maxNbYearsInParallel;
138 pValuesForTheCurrentYear.resize(pNbYearsParallel);
139 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
141 pValuesForTheCurrentYear[numSpace].initializeFromStudy(study);
145 NextType::initializeFromStudy(study);
151 NextType::initializeFromArea(study, area);
157 NextType::initializeFromAreaLink(study, link);
160 void simulationBegin()
163 NextType::simulationBegin();
168 NextType::simulationEnd();
171 void yearBegin(uint year,
unsigned int numSpace)
173 pValuesForTheCurrentYear[numSpace].reset();
175 NextType::yearBegin(year, numSpace);
178 void yearEndBuild(
State& state,
unsigned int year,
unsigned int numSpace)
181 NextType::yearEndBuild(state, year, numSpace);
184 void yearEnd(uint year,
unsigned int numSpace)
187 pValuesForTheCurrentYear[numSpace].computeStatisticsForTheCurrentYear();
190 NextType::yearEnd(year, numSpace);
193 void computeSummary(std::map<unsigned int, unsigned int>& numSpaceToYear,
194 unsigned int nbYearsForCurrentSummary)
196 for (
unsigned int numSpace = 0; numSpace < nbYearsForCurrentSummary; ++numSpace)
200 pValuesForTheCurrentYear[numSpace]);
204 NextType::computeSummary(numSpaceToYear, nbYearsForCurrentSummary);
207 void hourBegin(uint hourInTheYear)
210 NextType::hourBegin(hourInTheYear);
213 void hourForEachArea(
State& state,
unsigned int numSpace)
216 NextType::hourForEachArea(state, numSpace);
219 void hourForEachLink(
State& state,
unsigned int numSpace)
221#define UPSTREAM_PRICE \
222 state.problemeHebdo->ResultatsHoraires[state.link->from->index] \
223 .CoutsMarginauxHoraires[state.hourInTheWeek]
224#define DOWNSTREAM_PRICE \
225 state.problemeHebdo->ResultatsHoraires[state.link->with->index] \
226 .CoutsMarginauxHoraires[state.hourInTheWeek]
229 pValuesForTheCurrentYear[numSpace].hour[state.hourInTheYear] = state.ntc.ValeurDuFlux
234 NextType::hourForEachLink(state, numSpace);
237#undef DOWNSTREAM_PRICE
240 void buildDigest(SurveyResults&
results,
int digestLevel,
int dataLevel)
const
243 NextType::buildDigest(
results, digestLevel, dataLevel);
246 Antares::Memory::Stored<double>::ConstReturnType retrieveRawHourlyValuesForCurrentYear(
250 return pValuesForTheCurrentYear[numSpace].hour;
253 void localBuildAnnualSurveyReport(SurveyResults&
results,
259 results.isCurrentVarNA = AncestorType::isNonApplicable;
261 if (AncestorType::isPrinted[0])
266 pValuesForTheCurrentYear[numSpace]
267 .template buildAnnualSurveyReport<VCardType>(
results, fileLevel, precision);
273 typename VCardType::IntermediateValuesType pValuesForTheCurrentYear;
274 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 CongestionFee.
Definition congestionFee.h:95
VCardType::ResultsType ResultsType
List of expected results.
Definition congestionFee.h:105
Variable::IVariable< CongestionFee< NextT >, NextT, VCardType > AncestorType
Ancestor.
Definition congestionFee.h:102
@ count
How many items have we got.
Definition congestionFee.h:112
VCardCongestionFee VCardType
VCard.
Definition congestionFee.h:100
NextT NextType
Type of the next static variable.
Definition congestionFee.h:98
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 congestionFee.h:117
Definition congestionFee.h:35
static std::string Unit()
Unit.
Definition congestionFee.h:43
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition congestionFee.h:71
static constexpr uint8_t precision
Precision (views)
Definition congestionFee.h:69
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition congestionFee.h:81
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition congestionFee.h:75
static constexpr uint8_t isPossiblyNonApplicable
Can this variable be non applicable (0 : no, 1 : yes)
Definition congestionFee.h:83
static constexpr uint8_t categoryDataLevel
Data Level.
Definition congestionFee.h:63
static std::string Description()
The short description of the variable.
Definition congestionFee.h:49
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition congestionFee.h:77
Results< R::AllYears::Average< R::AllYears::StdDeviation< R::AllYears::Min< R::AllYears::Max< > > > > > ResultsType
The expecte results.
Definition congestionFee.h:60
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition congestionFee.h:65
static constexpr uint8_t decimal
Decimal precision.
Definition congestionFee.h:73
static std::string Caption()
Caption.
Definition congestionFee.h:37
Definition stdDeviation.h:40