21 #ifndef __SOLVER_VARIABLE_ECONOMY_OperatingCost_H__
22 #define __SOLVER_VARIABLE_ECONOMY_OperatingCost_H__
24 #include "antares/solver/variable/variable.h"
26 namespace Antares::Solver::Variable::Economy
45 return "Operating Cost throughout all MC years, of all the thermal dispatchable clusters";
66 & (Category::FileLevel::id
67 | Category::FileLevel::va);
78 static constexpr uint8_t spatialAggregateMode = Category::spatialAggregateEachYear;
79 static constexpr uint8_t spatialAggregatePostProcessing = 0;
86 typedef std::vector<IntermediateValues> IntermediateValuesType;
88 using IntermediateValuesTypeForSpatialAg = std::unique_ptr<IntermediateValuesBaseType[]>;
96 template<
class NextT = Container::EndOfList>
118 template<
int CDataLevel,
int CFile>
134 pNbYearsParallel = study.maxNbYearsInParallel;
138 pValuesForTheCurrentYear.resize(pNbYearsParallel);
139 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
141 pValuesForTheCurrentYear[numSpace].initializeFromStudy(study);
145 NextType::initializeFromStudy(study);
151 VariableAccessorType::InitializeAndReset(
results, study);
157 NextType::initializeFromArea(study, area);
163 NextType::initializeFromAreaLink(study, link);
166 void simulationBegin()
169 NextType::simulationBegin();
174 NextType::simulationEnd();
177 void yearBegin(
unsigned int year,
unsigned int numSpace)
180 pValuesForTheCurrentYear[numSpace].reset();
182 NextType::yearBegin(year, numSpace);
185 void yearEndBuildForEachThermalCluster(
State& state, uint year,
unsigned int numSpace)
188 for (
unsigned int i = state.study.runtime.rangeLimits.hour[Data::rangeBegin];
189 i <= state.study.runtime.rangeLimits.hour[Data::rangeEnd];
192 pValuesForTheCurrentYear[numSpace][i] += state.thermalClusterOperatingCostForYear[i];
196 NextType::yearEndBuildForEachThermalCluster(state, year, numSpace);
199 void yearEndBuild(
State& state,
unsigned int year,
unsigned int numSpace)
202 NextType::yearEndBuild(state, year, numSpace);
205 void yearEnd(
unsigned int year,
unsigned int numSpace)
208 pValuesForTheCurrentYear[numSpace].computeStatisticsForTheCurrentYear();
211 NextType::yearEnd(year, numSpace);
214 void computeSummary(
unsigned int year,
unsigned int numSpace)
220 NextType::computeSummary(year, numSpace);
223 void hourBegin(
unsigned int hourInTheYear)
226 NextType::hourBegin(hourInTheYear);
229 void hourForEachArea(
State& state,
unsigned int numSpace)
232 NextType::hourForEachArea(state, numSpace);
235 Antares::Memory::Stored<double>::ConstReturnType retrieveRawHourlyValuesForCurrentYear(
237 unsigned int numSpace)
const
239 return pValuesForTheCurrentYear[numSpace].hour;
242 void localBuildAnnualSurveyReport(SurveyResults&
results,
245 unsigned int numSpace)
const
248 results.isCurrentVarNA = AncestorType::isNonApplicable;
250 if (AncestorType::isPrinted[0])
255 pValuesForTheCurrentYear[numSpace]
256 .template buildAnnualSurveyReport<VCardType>(
results, fileLevel, precision);
262 typename VCardType::IntermediateValuesType pValuesForTheCurrentYear;
263 unsigned int pNbYearsParallel;
Definition of a link between two areas (Interconnection)
Definition: links.h:58
Definition for a single area.
Definition: area.h:51
C02 Average value of the overrall OperatingCost emissions expected from all the thermal dispatchable ...
Definition: operatingCost.h:98
VCardType::ResultsType ResultsType
List of expected results.
Definition: operatingCost.h:108
NextT NextType
Type of the next static variable.
Definition: operatingCost.h:101
VCardOperatingCost VCardType
VCard.
Definition: operatingCost.h:103
@ count
How many items have we got.
Definition: operatingCost.h:115
Variable::IVariable< OperatingCost< NextT >, NextT, VCardType > AncestorType
Ancestor.
Definition: operatingCost.h:105
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: operatingCost.h:120
Definition: operatingCost.h:29
static std::string Unit()
Unit.
Definition: operatingCost.h:37
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition: operatingCost.h:71
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition: operatingCost.h:81
static constexpr uint8_t categoryDataLevel
Data Level.
Definition: operatingCost.h:63
Results< R::AllYears::Average< R::AllYears::StdDeviation< R::AllYears::Min< R::AllYears::Max< > > > >, R::AllYears::Average > ResultsType
The expecte results.
Definition: operatingCost.h:57
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition: operatingCost.h:75
static std::string Caption()
Caption.
Definition: operatingCost.h:31
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition: operatingCost.h:65
static std::string Description()
The short description of the variable.
Definition: operatingCost.h:43
VCardOperatingCost VCardForSpatialAggregate
The VCard to look for for calculating spatial aggregates.
Definition: operatingCost.h:60
static constexpr uint8_t precision
Precision (views)
Definition: operatingCost.h:69
static constexpr uint8_t isPossiblyNonApplicable
Can this variable be non applicable (0 : no, 1 : yes)
Definition: operatingCost.h:83
static constexpr uint8_t decimal
Decimal precision.
Definition: operatingCost.h:73
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition: operatingCost.h:77
Definition: stdDeviation.h:33