21 #ifndef __SOLVER_VARIABLE_ECONOMY_CongestionFee_H__
22 #define __SOLVER_VARIABLE_ECONOMY_CongestionFee_H__
24 #include "../../variable.h"
26 namespace Antares::Solver::Variable::Economy
33 return "CONG. FEE (ALG.)";
45 return "Congestion fee collected throughout all MC years (Alg.)";
60 & (Category::FileLevel::id
61 | Category::FileLevel::va);
72 static constexpr uint8_t spatialAggregateMode = Category::spatialAggregateEachYear;
73 static constexpr uint8_t spatialAggregatePostProcessing = 0;
80 typedef std::vector<IntermediateValues> IntermediateValuesType;
87 template<
class NextT = Container::EndOfList>
109 template<
int CDataLevel,
int CFile>
125 pNbYearsParallel = study.maxNbYearsInParallel;
132 pValuesForTheCurrentYear.resize(pNbYearsParallel);
133 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
135 pValuesForTheCurrentYear[numSpace].initializeFromStudy(study);
139 NextType::initializeFromStudy(study);
145 NextType::initializeFromArea(study, area);
151 NextType::initializeFromAreaLink(study, link);
154 void simulationBegin()
157 NextType::simulationBegin();
162 NextType::simulationEnd();
165 void yearBegin(uint year,
unsigned int numSpace)
167 pValuesForTheCurrentYear[numSpace].reset();
169 NextType::yearBegin(year, numSpace);
172 void yearEndBuild(
State& state,
unsigned int year,
unsigned int numSpace)
175 NextType::yearEndBuild(state, year, numSpace);
178 void yearEnd(uint year,
unsigned int numSpace)
181 pValuesForTheCurrentYear[numSpace].computeStatisticsForTheCurrentYear();
184 NextType::yearEnd(year, numSpace);
187 void computeSummary(
unsigned int year,
unsigned int numSpace)
193 NextType::computeSummary(year, numSpace);
196 void hourBegin(uint hourInTheYear)
199 NextType::hourBegin(hourInTheYear);
202 void hourForEachArea(
State& state,
unsigned int numSpace)
205 NextType::hourForEachArea(state, numSpace);
208 void hourForEachLink(
State& state,
unsigned int numSpace)
210 #define UPSTREAM_PRICE \
211 state.problemeHebdo->ResultatsHoraires[state.link->from->index] \
212 .CoutsMarginauxHoraires[state.hourInTheWeek]
213 #define DOWNSTREAM_PRICE \
214 state.problemeHebdo->ResultatsHoraires[state.link->with->index] \
215 .CoutsMarginauxHoraires[state.hourInTheWeek]
218 pValuesForTheCurrentYear[numSpace].hour[state.hourInTheYear] = state.ntc.ValeurDuFlux
223 NextType::hourForEachLink(state, numSpace);
225 #undef UPSTREAM_PRICE
226 #undef DOWNSTREAM_PRICE
229 void buildDigest(SurveyResults&
results,
int digestLevel,
int dataLevel)
const
232 NextType::buildDigest(
results, digestLevel, dataLevel);
235 Antares::Memory::Stored<double>::ConstReturnType retrieveRawHourlyValuesForCurrentYear(
239 return pValuesForTheCurrentYear[numSpace].hour;
242 void localBuildAnnualSurveyReport(SurveyResults&
results,
248 results.isCurrentVarNA = AncestorType::isNonApplicable;
250 if (AncestorType::isPrinted[0])
255 pValuesForTheCurrentYear[numSpace]
256 .template buildAnnualSurveyReport<VCardType>(
results, fileLevel, precision);
262 typename VCardType::IntermediateValuesType pValuesForTheCurrentYear;
263 unsigned int pNbYearsParallel;
Definition of a link between two areas (Interconnection)
Definition: links.h:58
Definition for a single area.
Definition: area.h:51
Marginal CongestionFee.
Definition: congestionFee.h:89
VCardCongestionFee VCardType
VCard.
Definition: congestionFee.h:94
@ count
How many items have we got.
Definition: congestionFee.h:106
Variable::IVariable< CongestionFee< NextT >, NextT, VCardType > AncestorType
Ancestor.
Definition: congestionFee.h:96
VCardType::ResultsType ResultsType
List of expected results.
Definition: congestionFee.h:99
NextT NextType
Type of the next static variable.
Definition: congestionFee.h:92
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: congestionFee.h:111
Definition: congestionFee.h:29
static std::string Unit()
Unit.
Definition: congestionFee.h:37
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition: congestionFee.h:65
static constexpr uint8_t precision
Precision (views)
Definition: congestionFee.h:63
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition: congestionFee.h:75
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition: congestionFee.h:69
static constexpr uint8_t isPossiblyNonApplicable
Can this variable be non applicable (0 : no, 1 : yes)
Definition: congestionFee.h:77
static constexpr uint8_t categoryDataLevel
Data Level.
Definition: congestionFee.h:57
static std::string Description()
The short description of the variable.
Definition: congestionFee.h:43
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition: congestionFee.h:71
Results< R::AllYears::Average< R::AllYears::StdDeviation< R::AllYears::Min< R::AllYears::Max< > > > > > ResultsType
The expecte results.
Definition: congestionFee.h:54
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition: congestionFee.h:59
static constexpr uint8_t decimal
Decimal precision.
Definition: congestionFee.h:67
static std::string Caption()
Caption.
Definition: congestionFee.h:31
Definition: stdDeviation.h:33