29 #include "yuni/yuni.h"
31 #include "../variable.h"
33 namespace Antares::Solver::Variable::Economy
40 return "MRG. PRICE CSR";
52 return "Marginal Price CSR, throughout all MC years";
70 & (Category::FileLevel::id
71 | Category::FileLevel::va);
82 static constexpr uint8_t spatialAggregateMode = Category::spatialAggregateEachYear;
83 static constexpr uint8_t spatialAggregatePostProcessing = Category::
84 spatialAggregatePostProcessingPrice;
91 typedef std::vector<IntermediateValues> IntermediateValuesType;
93 using IntermediateValuesTypeForSpatialAg = std::unique_ptr<IntermediateValuesBaseType[]>;
100 template<
class NextT = Container::EndOfList>
122 template<
int CDataLevel,
int CFile>
138 pNbYearsParallel = study.maxNbYearsInParallel;
144 pValuesForTheCurrentYear.resize(pNbYearsParallel);
145 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
147 pValuesForTheCurrentYear[numSpace].initializeFromStudy(study);
151 NextType::initializeFromStudy(study);
157 VariableAccessorType::InitializeAndReset(
results, study);
163 NextType::initializeFromArea(study, area);
169 NextType::initializeFromAreaLink(study, link);
172 void simulationBegin()
175 NextType::simulationBegin();
180 NextType::simulationEnd();
183 void yearBegin(uint year,
unsigned int numSpace)
186 pValuesForTheCurrentYear[numSpace].reset();
188 NextType::yearBegin(year, numSpace);
191 void yearEndBuild(
State& state,
unsigned int year)
194 NextType::yearEndBuild(state, year);
197 void yearEnd(uint year,
unsigned int numSpace)
200 pValuesForTheCurrentYear[numSpace].computeAveragesForCurrentYearFromHourlyResults();
203 NextType::yearEnd(year, numSpace);
206 void computeSummary(
unsigned int year,
unsigned int numSpace)
212 NextType::computeSummary(year, numSpace);
215 void hourBegin(uint hourInTheYear)
218 NextType::hourBegin(hourInTheYear);
221 void hourForEachArea(
State& state,
unsigned int numSpace)
223 pValuesForTheCurrentYear[numSpace][state.hourInTheYear] = -state.hourlyResults
224 ->CoutsMarginauxHorairesCSR
225 [state.hourInTheWeek];
227 NextType::hourForEachArea(state, numSpace);
230 Antares::Memory::Stored<double>::ConstReturnType retrieveRawHourlyValuesForCurrentYear(
232 unsigned int numSpace)
const
234 return pValuesForTheCurrentYear[numSpace].hour;
237 void localBuildAnnualSurveyReport(SurveyResults&
results,
240 unsigned int numSpace)
const
243 results.isCurrentVarNA = AncestorType::isNonApplicable;
245 if (AncestorType::isPrinted[0])
250 pValuesForTheCurrentYear[numSpace]
251 .template buildAnnualSurveyReport<VCardType>(
results, fileLevel, precision);
257 typename VCardType::IntermediateValuesType pValuesForTheCurrentYear;
258 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 Price.
Definition: priceCSR.h:102
Variable::IVariable< PriceCSR< NextT >, NextT, VCardType > AncestorType
Ancestor.
Definition: priceCSR.h:109
@ count
How many items have we got.
Definition: priceCSR.h:119
NextT NextType
Type of the next static variable.
Definition: priceCSR.h:105
VCardPriceCSR VCardType
VCard.
Definition: priceCSR.h:107
VCardType::ResultsType ResultsType
List of expected results.
Definition: priceCSR.h:112
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: priceCSR.h:124
Definition: priceCSR.h:36
static constexpr uint8_t categoryDataLevel
Data Level.
Definition: priceCSR.h:67
static constexpr uint8_t decimal
Decimal precision.
Definition: priceCSR.h:77
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition: priceCSR.h:69
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition: priceCSR.h:75
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition: priceCSR.h:79
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition: priceCSR.h:86
VCardPrice VCardForSpatialAggregate
The VCard to look for for calculating spatial aggregates.
Definition: priceCSR.h:64
static constexpr uint8_t precision
Precision (views)
Definition: priceCSR.h:73
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition: priceCSR.h:81
static std::string Unit()
Unit.
Definition: priceCSR.h:44
Results< R::AllYears::Average< R::AllYears::StdDeviation< R::AllYears::Min< R::AllYears::Max< > > > > > ResultsType
The expecte results.
Definition: priceCSR.h:61
static std::string Description()
The short description of the variable.
Definition: priceCSR.h:50
static std::string Caption()
Caption.
Definition: priceCSR.h:38
static constexpr uint8_t isPossiblyNonApplicable
Can this variable be non applicable (0 : no, 1 : yes)
Definition: priceCSR.h:88
Definition: stdDeviation.h:33