21#ifndef __SOLVER_VARIABLE_ECONOMY_HydroCost_H__
22#define __SOLVER_VARIABLE_ECONOMY_HydroCost_H__
24#include "antares/solver/variable/variable.h"
51 return "Hydro Cost throughout all MC years, of all the thermal dispatchable clusters";
71 & (Category::FileLevel::id
72 | Category::FileLevel::va);
83 static constexpr uint8_t spatialAggregateMode = Category::spatialAggregateEachYear;
84 static constexpr uint8_t spatialAggregatePostProcessing = 0;
91 typedef std::vector<IntermediateValues> IntermediateValuesType;
100template<
class NextT = Container::EndOfList>
122 template<
int CDataLevel,
int CFile>
138 pNbYearsParallel = study.maxNbYearsInParallel;
142 pValuesForTheCurrentYear.resize(pNbYearsParallel);
143 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
145 pValuesForTheCurrentYear[numSpace].initializeFromStudy(study);
149 NextType::initializeFromStudy(study);
155 VariableAccessorType::InitializeAndReset(
results, study);
161 pPumpRatio = area->hydro.pumpingEfficiency;
164 NextType::initializeFromArea(study, area);
170 NextType::initializeFromAreaLink(study, link);
173 void simulationBegin()
176 NextType::simulationBegin();
181 NextType::simulationEnd();
184 void yearBegin(
unsigned int year,
unsigned int numSpace)
187 pValuesForTheCurrentYear[numSpace].reset();
189 NextType::yearBegin(year, numSpace);
192 void yearEndBuild(
State& state,
unsigned int year,
unsigned int numSpace)
195 NextType::yearEndBuild(state, year, numSpace);
198 void yearEnd(
unsigned int year,
unsigned int numSpace)
201 pValuesForTheCurrentYear[numSpace].computeStatisticsForTheCurrentYear();
204 NextType::yearEnd(year, numSpace);
207 void computeSummary(std::map<unsigned int, unsigned int>& numSpaceToYear,
208 unsigned int nbYearsForCurrentSummary)
210 for (
unsigned int numSpace = 0; numSpace < nbYearsForCurrentSummary; ++numSpace)
214 pValuesForTheCurrentYear[numSpace]);
218 NextType::computeSummary(numSpaceToYear, nbYearsForCurrentSummary);
221 void hourBegin(
unsigned int hourInTheYear)
224 NextType::hourBegin(hourInTheYear);
227 void hourForEachArea(
State& state,
unsigned int numSpace)
230 pValuesForTheCurrentYear[numSpace].hour[state.hourInTheYear]
231 += state.hourlyResults->valeurH2oHoraire[state.hourInTheWeek]
232 * (state.hourlyResults->TurbinageHoraire[state.hourInTheWeek]
233 - pPumpRatio * state.hourlyResults->PompageHoraire[state.hourInTheWeek]);
236 NextType::hourForEachArea(state, numSpace);
239 Antares::Memory::Stored<double>::ConstReturnType retrieveRawHourlyValuesForCurrentYear(
241 unsigned int numSpace)
const
243 return pValuesForTheCurrentYear[numSpace].hour;
246 void localBuildAnnualSurveyReport(SurveyResults&
results,
249 unsigned int numSpace)
const
252 results.isCurrentVarNA = AncestorType::isNonApplicable;
254 if (AncestorType::isPrinted[0])
259 pValuesForTheCurrentYear[numSpace]
260 .template buildAnnualSurveyReport<VCardType>(
results, fileLevel, precision);
266 typename VCardType::IntermediateValuesType pValuesForTheCurrentYear;
267 unsigned int pNbYearsParallel;
Definition of a link between two areas (Interconnection)
Definition links.h:50
Definition for a single area.
Definition area.h:52
Hydro costs.
Definition hydroCost.h:102
NextT NextType
Type of the next static variable.
Definition hydroCost.h:105
Variable::IVariable< HydroCost< NextT >, NextT, VCardType > AncestorType
Ancestor.
Definition hydroCost.h:109
VCardType::ResultsType ResultsType
List of expected results.
Definition hydroCost.h:112
@ count
How many items have we got.
Definition hydroCost.h:119
VCardHydroCost VCardType
VCard.
Definition hydroCost.h:107
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 hydroCost.h:124
Definition hydroCost.h:35
VCardHydroCost VCardForSpatialAggregate
The VCard to look for for calculating spatial aggregates.
Definition hydroCost.h:65
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition hydroCost.h:70
static constexpr uint8_t categoryDataLevel
Data Level.
Definition hydroCost.h:68
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition hydroCost.h:80
Results< R::AllYears::Average< R::AllYears::StdDeviation< R::AllYears::Min< R::AllYears::Max< > > > >, R::AllYears::Average > ResultsType
The expecte results.
Definition hydroCost.h:62
static std::string Caption()
Caption.
Definition hydroCost.h:37
static std::string Description()
The short description of the variable.
Definition hydroCost.h:49
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition hydroCost.h:76
static constexpr uint8_t precision
Precision (views)
Definition hydroCost.h:74
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition hydroCost.h:82
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition hydroCost.h:86
static constexpr uint8_t decimal
Decimal precision.
Definition hydroCost.h:78
static constexpr uint8_t isPossiblyNonApplicable
Can this variable be non applicable (0 : no, 1 : yes)
Definition hydroCost.h:88
static std::string Unit()
Unit.
Definition hydroCost.h:43
Definition stdDeviation.h:40