21#ifndef __SOLVER_VARIABLE_ECONOMY_RenewableGeneration_H__
22#define __SOLVER_VARIABLE_ECONOMY_RenewableGeneration_H__
24#include "antares/solver/variable/variable.h"
39 return "Renewable Gen.";
51 return "Value of all the renewable generation throughout all MC years";
69 & (Category::FileLevel::id
70 | Category::FileLevel::va);
81 static constexpr uint8_t spatialAggregateMode = Category::spatialAggregateEachYear;
82 static constexpr uint8_t spatialAggregatePostProcessing = 0;
89 typedef IntermediateValuesBaseType* IntermediateValuesType;
91 typedef IntermediateValuesBaseType* IntermediateValuesTypeForSpatialAg;
95 static std::string
Caption(
const unsigned int indx)
100 return "WIND OFFSHORE";
102 return "WIND ONSHORE";
104 return "SOLAR CONCRT.";
108 return "SOLAR ROOFT";
122 static std::string
Unit([[maybe_unused]]
const unsigned int indx)
132template<
class NextT = Container::EndOfList>
155 template<
int CDataLevel,
int CFile>
171 delete[] pValuesForTheCurrentYear;
176 pNbYearsParallel = study.maxNbYearsInParallel;
180 pValuesForTheCurrentYear =
new VCardType::IntermediateValuesBaseType[pNbYearsParallel];
181 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; ++numSpace)
185 pValuesForTheCurrentYear[numSpace][i].initializeFromStudy(study);
190 NextType::initializeFromStudy(study);
198 results[i].initializeFromStudy(study);
206 NextType::initializeFromArea(study, area);
212 NextType::initializeFromAreaLink(study, link);
215 void simulationBegin()
218 NextType::simulationBegin();
223 NextType::simulationEnd();
226 void yearBegin(
unsigned int year,
unsigned int numSpace)
231 pValuesForTheCurrentYear[numSpace][i].reset();
234 NextType::yearBegin(year, numSpace);
237 void yearEndBuild(
State& state,
unsigned int year,
unsigned int numSpace)
240 NextType::yearEndBuild(state, year, numSpace);
243 void yearEnd(
unsigned int year,
unsigned int numSpace)
245 VariableAccessorType::template ComputeStatistics<VCardType>(
246 pValuesForTheCurrentYear[numSpace]);
249 NextType::yearEnd(year, numSpace);
252 void computeSummary(std::map<unsigned int, unsigned int>& numSpaceToYear,
253 unsigned int nbYearsForCurrentSummary)
255 for (
unsigned int numSpace = 0; numSpace < nbYearsForCurrentSummary; ++numSpace)
257 VariableAccessorType::ComputeSummary(pValuesForTheCurrentYear[numSpace],
259 numSpaceToYear[numSpace]);
262 NextType::computeSummary(numSpaceToYear, nbYearsForCurrentSummary);
265 void hourBegin(
unsigned int hourInTheYear)
268 NextType::hourBegin(hourInTheYear);
271 void hourForEachArea(
State& state,
unsigned int numSpace)
273 for (
const auto& renewableCluster: state.area->renewable.list.each_enabled())
275 double renewableClusterProduction = renewableCluster->valueAtTimeStep(
277 state.hourInTheYear);
279 pValuesForTheCurrentYear[numSpace][renewableCluster->groupID][state.hourInTheYear]
280 += renewableClusterProduction;
284 NextType::hourForEachArea(state, numSpace);
287 Antares::Memory::Stored<double>::ConstReturnType retrieveRawHourlyValuesForCurrentYear(
289 unsigned int numSpace)
const
291 return pValuesForTheCurrentYear[numSpace][column].hour;
294 void localBuildAnnualSurveyReport(SurveyResults&
results,
297 unsigned int numSpace)
const
300 results.isCurrentVarNA = AncestorType::isNonApplicable;
304 if (AncestorType::isPrinted[i])
309 pValuesForTheCurrentYear[numSpace][i]
310 .template buildAnnualSurveyReport<VCardType>(
results, fileLevel, precision);
318 typename VCardType::IntermediateValuesType pValuesForTheCurrentYear;
319 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 RenewableGeneration.
Definition renewableGeneration.h:135
@ count
How many items have we got.
Definition renewableGeneration.h:152
VCardType::ResultsType ResultsType
List of expected results.
Definition renewableGeneration.h:145
VCardRenewableGeneration VCardType
VCard.
Definition renewableGeneration.h:140
Variable::IVariable< RenewableGeneration< NextT >, NextT, VCardType > AncestorType
Ancestor.
Definition renewableGeneration.h:142
NextT NextType
Type of the next static variable.
Definition renewableGeneration.h:138
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 renewableGeneration.h:157
Definition renewableGeneration.h:94
Definition renewableGeneration.h:35
static constexpr uint8_t decimal
Decimal precision.
Definition renewableGeneration.h:76
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition renewableGeneration.h:84
static std::string Caption()
Caption.
Definition renewableGeneration.h:37
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition renewableGeneration.h:68
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition renewableGeneration.h:78
static std::string Unit()
Unit.
Definition renewableGeneration.h:43
VCardRenewableGeneration VCardForSpatialAggregate
The VCard to look for for calculating spatial aggregates.
Definition renewableGeneration.h:63
static constexpr uint8_t isPossiblyNonApplicable
Can this variable be non applicable (0 : no, 1 : yes)
Definition renewableGeneration.h:86
Results< R::AllYears::Average< R::AllYears::StdDeviation< R::AllYears::Min< R::AllYears::Max< > > > > > ResultsType
The expecte results.
Definition renewableGeneration.h:60
static std::string Description()
The short description of the variable.
Definition renewableGeneration.h:49
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition renewableGeneration.h:74
static constexpr uint8_t categoryDataLevel
Data Level.
Definition renewableGeneration.h:66
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition renewableGeneration.h:80
static constexpr uint8_t precision
Precision (views)
Definition renewableGeneration.h:72
Definition stdDeviation.h:40