21#ifndef __SOLVER_VARIABLE_ECONOMY_CongestionFeeAbs_H__
22#define __SOLVER_VARIABLE_ECONOMY_CongestionFeeAbs_H__
26#include "../../variable.h"
41 return "CONG. FEE (ABS.)";
53 return "Congestion fee collected throughout all MC years (Absolute value)";
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>
118 template<
int CDataLevel,
int CFile>
134 pNbYearsParallel = study.maxNbYearsInParallel;
141 pValuesForTheCurrentYear.resize(pNbYearsParallel);
142 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
144 pValuesForTheCurrentYear[numSpace].initializeFromStudy(study);
148 NextType::initializeFromStudy(study);
154 NextType::initializeFromArea(study, area);
160 NextType::initializeFromAreaLink(study, link);
163 void simulationBegin()
166 NextType::simulationBegin();
171 NextType::simulationEnd();
174 void yearBegin(uint year,
unsigned int numSpace)
177 pValuesForTheCurrentYear[numSpace].reset();
179 NextType::yearBegin(year, numSpace);
182 void yearEndBuild(
State& state,
unsigned int year,
unsigned int numSpace)
185 NextType::yearEndBuild(state, year, numSpace);
188 void yearEnd(
unsigned int year,
unsigned int numSpace)
191 pValuesForTheCurrentYear[numSpace].computeStatisticsForTheCurrentYear();
194 NextType::yearEnd(year, numSpace);
197 void computeSummary(std::map<unsigned int, unsigned int>& numSpaceToYear,
198 unsigned int nbYearsForCurrentSummary)
200 for (
unsigned int numSpace = 0; numSpace < nbYearsForCurrentSummary; ++numSpace)
204 pValuesForTheCurrentYear[numSpace]);
208 NextType::computeSummary(numSpaceToYear, nbYearsForCurrentSummary);
211 void hourBegin(uint hourInTheYear)
214 NextType::hourBegin(hourInTheYear);
217 void hourForEachArea(
State& state,
unsigned int numSpace)
220 NextType::hourForEachArea(state, numSpace);
223 void hourForEachLink(
State& state,
unsigned int numSpace)
225#define UPSTREAM_PRICE \
226 state.problemeHebdo->ResultatsHoraires[state.link->from->index] \
227 .CoutsMarginauxHoraires[state.hourInTheWeek]
228#define DOWNSTREAM_PRICE \
229 state.problemeHebdo->ResultatsHoraires[state.link->with->index] \
230 .CoutsMarginauxHoraires[state.hourInTheWeek]
233 pValuesForTheCurrentYear[numSpace].hour[state.hourInTheYear] = std::abs(
234 state.ntc.ValeurDuFlux[state.link->index] * (UPSTREAM_PRICE - DOWNSTREAM_PRICE));
236 NextType::hourForEachLink(state, numSpace);
239#undef DOWNSTREAM_PRICE
242 void buildDigest(SurveyResults&
results,
int digestLevel,
int dataLevel)
const
245 NextType::buildDigest(
results, digestLevel, dataLevel);
248 Antares::Memory::Stored<double>::ConstReturnType retrieveRawHourlyValuesForCurrentYear(
252 return pValuesForTheCurrentYear[numSpace].hour;
255 void localBuildAnnualSurveyReport(SurveyResults&
results,
261 results.isCurrentVarNA = AncestorType::isNonApplicable;
263 if (AncestorType::isPrinted[0])
268 pValuesForTheCurrentYear[numSpace]
269 .template buildAnnualSurveyReport<VCardType>(
results, fileLevel, precision);
275 typename VCardType::IntermediateValuesType pValuesForTheCurrentYear;
276 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 CongestionFeeAbs.
Definition congestionFeeAbs.h:98
NextT NextType
Type of the next static variable.
Definition congestionFeeAbs.h:101
VCardType::ResultsType ResultsType
List of expected results.
Definition congestionFeeAbs.h:108
VCardCongestionFeeAbs VCardType
VCard.
Definition congestionFeeAbs.h:103
Variable::IVariable< CongestionFeeAbs< NextT >, NextT, VCardType > AncestorType
Ancestor.
Definition congestionFeeAbs.h:105
@ count
How many items have we got.
Definition congestionFeeAbs.h:115
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 congestionFeeAbs.h:120
Definition congestionFeeAbs.h:37
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition congestionFeeAbs.h:73
static constexpr uint8_t isPossiblyNonApplicable
Can this variable be non applicable (0 : no, 1 : yes)
Definition congestionFeeAbs.h:85
static constexpr uint8_t decimal
Decimal precision.
Definition congestionFeeAbs.h:75
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition congestionFeeAbs.h:77
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition congestionFeeAbs.h:79
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition congestionFeeAbs.h:83
static constexpr uint8_t precision
Precision (views)
Definition congestionFeeAbs.h:71
static std::string Description()
The short description of the variable.
Definition congestionFeeAbs.h:51
static std::string Unit()
Unit.
Definition congestionFeeAbs.h:45
Results< R::AllYears::Average< R::AllYears::StdDeviation< R::AllYears::Min< R::AllYears::Max< > > > > > ResultsType
The expecte results.
Definition congestionFeeAbs.h:62
static constexpr uint8_t categoryDataLevel
Data Level.
Definition congestionFeeAbs.h:65
static std::string Caption()
Caption.
Definition congestionFeeAbs.h:39
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition congestionFeeAbs.h:67
Definition stdDeviation.h:40