21 #ifndef __SOLVER_VARIABLE_ECONOMY_CongestionFeeAbs_H__
22 #define __SOLVER_VARIABLE_ECONOMY_CongestionFeeAbs_H__
26 #include "../../variable.h"
28 namespace Antares::Solver::Variable::Economy
35 return "CONG. FEE (ABS.)";
47 return "Congestion fee collected throughout all MC years (Absolute value)";
62 & (Category::FileLevel::id
63 | Category::FileLevel::va);
74 static constexpr uint8_t spatialAggregateMode = Category::spatialAggregateEachYear;
75 static constexpr uint8_t spatialAggregatePostProcessing = 0;
82 typedef std::vector<IntermediateValues> IntermediateValuesType;
89 template<
class NextT = Container::EndOfList>
112 template<
int CDataLevel,
int CFile>
128 pNbYearsParallel = study.maxNbYearsInParallel;
135 pValuesForTheCurrentYear.resize(pNbYearsParallel);
136 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
138 pValuesForTheCurrentYear[numSpace].initializeFromStudy(study);
142 NextType::initializeFromStudy(study);
148 NextType::initializeFromArea(study, area);
154 NextType::initializeFromAreaLink(study, link);
157 void simulationBegin()
160 NextType::simulationBegin();
165 NextType::simulationEnd();
168 void yearBegin(uint year,
unsigned int numSpace)
171 pValuesForTheCurrentYear[numSpace].reset();
173 NextType::yearBegin(year, numSpace);
176 void yearEndBuild(
State& state,
unsigned int year,
unsigned int numSpace)
179 NextType::yearEndBuild(state, year, numSpace);
182 void yearEnd(
unsigned int year,
unsigned int numSpace)
185 pValuesForTheCurrentYear[numSpace].computeStatisticsForTheCurrentYear();
188 NextType::yearEnd(year, numSpace);
191 void computeSummary(
unsigned int year,
unsigned int numSpace)
197 NextType::computeSummary(year, numSpace);
200 void hourBegin(uint hourInTheYear)
203 NextType::hourBegin(hourInTheYear);
206 void hourForEachArea(
State& state,
unsigned int numSpace)
209 NextType::hourForEachArea(state, numSpace);
212 void hourForEachLink(
State& state,
unsigned int numSpace)
214 #define UPSTREAM_PRICE \
215 state.problemeHebdo->ResultatsHoraires[state.link->from->index] \
216 .CoutsMarginauxHoraires[state.hourInTheWeek]
217 #define DOWNSTREAM_PRICE \
218 state.problemeHebdo->ResultatsHoraires[state.link->with->index] \
219 .CoutsMarginauxHoraires[state.hourInTheWeek]
222 pValuesForTheCurrentYear[numSpace].hour[state.hourInTheYear] = std::abs(
223 state.ntc.ValeurDuFlux[state.link->index] * (UPSTREAM_PRICE - DOWNSTREAM_PRICE));
225 NextType::hourForEachLink(state, numSpace);
227 #undef UPSTREAM_PRICE
228 #undef DOWNSTREAM_PRICE
231 void buildDigest(SurveyResults&
results,
int digestLevel,
int dataLevel)
const
234 NextType::buildDigest(
results, digestLevel, dataLevel);
237 Antares::Memory::Stored<double>::ConstReturnType retrieveRawHourlyValuesForCurrentYear(
241 return pValuesForTheCurrentYear[numSpace].hour;
244 void localBuildAnnualSurveyReport(SurveyResults&
results,
250 results.isCurrentVarNA = AncestorType::isNonApplicable;
252 if (AncestorType::isPrinted[0])
257 pValuesForTheCurrentYear[numSpace]
258 .template buildAnnualSurveyReport<VCardType>(
results, fileLevel, precision);
264 typename VCardType::IntermediateValuesType pValuesForTheCurrentYear;
265 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 CongestionFeeAbs.
Definition: congestionFeeAbs.h:92
VCardType::ResultsType ResultsType
List of expected results.
Definition: congestionFeeAbs.h:102
VCardCongestionFeeAbs VCardType
VCard.
Definition: congestionFeeAbs.h:97
NextT NextType
Type of the next static variable.
Definition: congestionFeeAbs.h:95
@ count
How many items have we got.
Definition: congestionFeeAbs.h:109
Variable::IVariable< CongestionFeeAbs< NextT >, NextT, VCardType > AncestorType
Ancestor.
Definition: congestionFeeAbs.h:99
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: congestionFeeAbs.h:114
Definition: congestionFeeAbs.h:31
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition: congestionFeeAbs.h:67
static constexpr uint8_t isPossiblyNonApplicable
Can this variable be non applicable (0 : no, 1 : yes)
Definition: congestionFeeAbs.h:79
Results< R::AllYears::Average< R::AllYears::StdDeviation< R::AllYears::Min< R::AllYears::Max< > > > > > ResultsType
The expecte results.
Definition: congestionFeeAbs.h:56
static constexpr uint8_t decimal
Decimal precision.
Definition: congestionFeeAbs.h:69
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition: congestionFeeAbs.h:71
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition: congestionFeeAbs.h:73
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition: congestionFeeAbs.h:77
static constexpr uint8_t precision
Precision (views)
Definition: congestionFeeAbs.h:65
static std::string Description()
The short description of the variable.
Definition: congestionFeeAbs.h:45
static std::string Unit()
Unit.
Definition: congestionFeeAbs.h:39
static constexpr uint8_t categoryDataLevel
Data Level.
Definition: congestionFeeAbs.h:59
static std::string Caption()
Caption.
Definition: congestionFeeAbs.h:33
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition: congestionFeeAbs.h:61
Definition: stdDeviation.h:33