21#ifndef __SOLVER_VARIABLE_ECONOMY_OperatingCost_H__
22#define __SOLVER_VARIABLE_ECONOMY_OperatingCost_H__
24#include "antares/solver/variable/variable.h"
51 return "Operating Cost throughout all MC years, of all the thermal dispatchable clusters";
72 & (Category::FileLevel::id
73 | Category::FileLevel::va);
84 static constexpr uint8_t spatialAggregateMode = Category::spatialAggregateEachYear;
85 static constexpr uint8_t spatialAggregatePostProcessing = 0;
92 typedef std::vector<IntermediateValues> IntermediateValuesType;
102template<
class NextT = Container::EndOfList>
124 template<
int CDataLevel,
int CFile>
140 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(
unsigned int year,
unsigned int numSpace)
186 pValuesForTheCurrentYear[numSpace].reset();
188 NextType::yearBegin(year, numSpace);
191 void yearEndBuildForEachThermalCluster(
State& state, uint year,
unsigned int numSpace)
194 for (
unsigned int i = state.study.runtime.rangeLimits.hour[Data::rangeBegin];
195 i <= state.study.runtime.rangeLimits.hour[Data::rangeEnd];
198 pValuesForTheCurrentYear[numSpace][i] += state.thermalClusterOperatingCostForYear[i];
202 NextType::yearEndBuildForEachThermalCluster(state, year, numSpace);
205 void yearEndBuild(
State& state,
unsigned int year,
unsigned int numSpace)
208 NextType::yearEndBuild(state, year, numSpace);
211 void yearEnd(
unsigned int year,
unsigned int numSpace)
214 pValuesForTheCurrentYear[numSpace].computeStatisticsForTheCurrentYear();
217 NextType::yearEnd(year, numSpace);
220 void computeSummary(std::map<unsigned int, unsigned int>& numSpaceToYear,
221 unsigned int nbYearsForCurrentSummary)
223 for (
unsigned int numSpace = 0; numSpace < nbYearsForCurrentSummary; ++numSpace)
227 pValuesForTheCurrentYear[numSpace]);
231 NextType::computeSummary(numSpaceToYear, nbYearsForCurrentSummary);
234 void hourBegin(
unsigned int hourInTheYear)
237 NextType::hourBegin(hourInTheYear);
240 void hourForEachArea(
State& state,
unsigned int numSpace)
243 NextType::hourForEachArea(state, numSpace);
246 Antares::Memory::Stored<double>::ConstReturnType retrieveRawHourlyValuesForCurrentYear(
248 unsigned int numSpace)
const
250 return pValuesForTheCurrentYear[numSpace].hour;
253 void localBuildAnnualSurveyReport(SurveyResults&
results,
256 unsigned int numSpace)
const
259 results.isCurrentVarNA = AncestorType::isNonApplicable;
261 if (AncestorType::isPrinted[0])
266 pValuesForTheCurrentYear[numSpace]
267 .template buildAnnualSurveyReport<VCardType>(
results, fileLevel, precision);
273 typename VCardType::IntermediateValuesType pValuesForTheCurrentYear;
274 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 operatingCost.h:104
@ count
How many items have we got.
Definition operatingCost.h:121
VCardType::ResultsType ResultsType
List of expected results.
Definition operatingCost.h:114
NextT NextType
Type of the next static variable.
Definition operatingCost.h:107
VCardOperatingCost VCardType
VCard.
Definition operatingCost.h:109
Variable::IVariable< OperatingCost< NextT >, NextT, VCardType > AncestorType
Ancestor.
Definition operatingCost.h:111
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 operatingCost.h:126
Definition operatingCost.h:35
static std::string Unit()
Unit.
Definition operatingCost.h:43
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition operatingCost.h:77
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition operatingCost.h:87
static constexpr uint8_t categoryDataLevel
Data Level.
Definition operatingCost.h:69
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition operatingCost.h:81
static std::string Caption()
Caption.
Definition operatingCost.h:37
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition operatingCost.h:71
static std::string Description()
The short description of the variable.
Definition operatingCost.h:49
static constexpr uint8_t precision
Precision (views)
Definition operatingCost.h:75
VCardOperatingCost VCardForSpatialAggregate
The VCard to look for for calculating spatial aggregates.
Definition operatingCost.h:66
static constexpr uint8_t isPossiblyNonApplicable
Can this variable be non applicable (0 : no, 1 : yes)
Definition operatingCost.h:89
Results< R::AllYears::Average< R::AllYears::StdDeviation< R::AllYears::Min< R::AllYears::Max< > > > >, R::AllYears::Average > ResultsType
The expecte results.
Definition operatingCost.h:63
static constexpr uint8_t decimal
Decimal precision.
Definition operatingCost.h:79
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition operatingCost.h:83
Definition stdDeviation.h:40