21#ifndef __SOLVER_VARIABLE_ECONOMY_NbOfDispatchedUnits_H__
22#define __SOLVER_VARIABLE_ECONOMY_NbOfDispatchedUnits_H__
24#include "antares/solver/variable/variable.h"
51 return "Number Of Dispatched Units throughout all MC years, of all the thermal "
52 "dispatchable clusters";
73 & (Category::FileLevel::id
74 | Category::FileLevel::va);
85 static constexpr uint8_t spatialAggregateMode = Category::spatialAggregateEachYear;
86 static constexpr uint8_t spatialAggregatePostProcessing = 0;
93 typedef std::vector<IntermediateValues> IntermediateValuesType;
103template<
class NextT = Container::EndOfList>
126 template<
int CDataLevel,
int CFile>
142 pNbYearsParallel = study.maxNbYearsInParallel;
146 pValuesForTheCurrentYear.resize(pNbYearsParallel);
147 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
149 pValuesForTheCurrentYear[numSpace].initializeFromStudy(study);
153 NextType::initializeFromStudy(study);
159 VariableAccessorType::InitializeAndReset(
results, study);
165 NextType::initializeFromArea(study, area);
171 NextType::initializeFromAreaLink(study, link);
174 void simulationBegin()
177 NextType::simulationBegin();
182 NextType::simulationEnd();
185 void yearBegin(
unsigned int year,
unsigned int numSpace)
188 pValuesForTheCurrentYear[numSpace].reset();
190 NextType::yearBegin(year, numSpace);
193 void yearEndBuildForEachThermalCluster(
State& state, uint year,
unsigned int numSpace)
196 for (
unsigned int i = state.study.runtime.rangeLimits.hour[Data::rangeBegin];
197 i <= state.study.runtime.rangeLimits.hour[Data::rangeEnd];
200 pValuesForTheCurrentYear[numSpace][i] += state.thermalClusterDispatchedUnitsCountForYear
205 NextType::yearEndBuildForEachThermalCluster(state, year, numSpace);
208 void yearEndBuild(
State& state,
unsigned int year,
unsigned int numSpace)
211 NextType::yearEndBuild(state, year, numSpace);
214 void yearEnd(
unsigned int year,
unsigned int numSpace)
217 pValuesForTheCurrentYear[numSpace].computeStatisticsForTheCurrentYear();
220 NextType::yearEnd(year, numSpace);
223 void computeSummary(std::map<unsigned int, unsigned int>& numSpaceToYear,
224 unsigned int nbYearsForCurrentSummary)
226 for (
unsigned int numSpace = 0; numSpace < nbYearsForCurrentSummary; ++numSpace)
230 pValuesForTheCurrentYear[numSpace]);
234 NextType::computeSummary(numSpaceToYear, nbYearsForCurrentSummary);
237 void hourBegin(
unsigned int hourInTheYear)
240 NextType::hourBegin(hourInTheYear);
243 void hourForEachArea(
State& state,
unsigned int numSpace)
246 NextType::hourForEachArea(state, numSpace);
249 Antares::Memory::Stored<double>::ConstReturnType retrieveRawHourlyValuesForCurrentYear(
251 unsigned int numSpace)
const
253 return pValuesForTheCurrentYear[numSpace].hour;
256 void localBuildAnnualSurveyReport(SurveyResults&
results,
259 unsigned int numSpace)
const
262 results.isCurrentVarNA = AncestorType::isNonApplicable;
264 if (AncestorType::isPrinted[0])
269 pValuesForTheCurrentYear[numSpace]
270 .template buildAnnualSurveyReport<VCardType>(
results, fileLevel, precision);
276 typename VCardType::IntermediateValuesType pValuesForTheCurrentYear;
277 unsigned int pNbYearsParallel;
Definition of a link between two areas (Interconnection)
Definition links.h:50
Definition for a single area.
Definition area.h:52
C02 Average value of the overrall OperatingCost emissions expected from all the thermal dispatchable ...
Definition nbOfDispatchedUnits.h:106
VCardType::ResultsType ResultsType
List of expected results.
Definition nbOfDispatchedUnits.h:116
@ count
How many items have we got.
Definition nbOfDispatchedUnits.h:123
VCardNbOfDispatchedUnits VCardType
VCard.
Definition nbOfDispatchedUnits.h:111
NextT NextType
Type of the next static variable.
Definition nbOfDispatchedUnits.h:109
Variable::IVariable< NbOfDispatchedUnits< NextT >, NextT, VCardType > AncestorType
Ancestor.
Definition nbOfDispatchedUnits.h:113
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 nbOfDispatchedUnits.h:128
Definition nbOfDispatchedUnits.h:35
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition nbOfDispatchedUnits.h:84
static std::string Caption()
Caption.
Definition nbOfDispatchedUnits.h:37
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition nbOfDispatchedUnits.h:82
static std::string Unit()
Unit.
Definition nbOfDispatchedUnits.h:43
static constexpr uint8_t isPossiblyNonApplicable
Can this variable be non applicable (0 : no, 1 : yes)
Definition nbOfDispatchedUnits.h:90
VCardNbOfDispatchedUnits VCardForSpatialAggregate
The VCard to look for for calculating spatial aggregates.
Definition nbOfDispatchedUnits.h:67
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition nbOfDispatchedUnits.h:78
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition nbOfDispatchedUnits.h:88
static std::string Description()
The short description of the variable.
Definition nbOfDispatchedUnits.h:49
static constexpr uint8_t precision
Precision (views)
Definition nbOfDispatchedUnits.h:76
Results< R::AllYears::Average< R::AllYears::StdDeviation< R::AllYears::Min< R::AllYears::Max< > > > >, R::AllYears::Average > ResultsType
The expecte results.
Definition nbOfDispatchedUnits.h:64
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition nbOfDispatchedUnits.h:72
static constexpr uint8_t categoryDataLevel
Data Level.
Definition nbOfDispatchedUnits.h:70
static constexpr uint8_t decimal
Decimal precision.
Definition nbOfDispatchedUnits.h:80
Definition stdDeviation.h:40