29 #include "../variable.h"
31 namespace Antares::Solver::Variable::Economy
38 return "OV. COST CSR";
50 return "Overall Cost throughout all MC years";
63 static constexpr uint8_t categoryDataLevel = Category::DataLevel::area;
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>
123 count = ((VCardType::categoryDataLevel & CDataLevel
134 pNbYearsParallel = study.maxNbYearsInParallel;
140 pValuesForTheCurrentYear.resize(pNbYearsParallel);
141 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
143 pValuesForTheCurrentYear[numSpace].initializeFromStudy(study);
146 NextType::initializeFromStudy(study);
152 VariableAccessorType::InitializeAndReset(
results, study);
155 void yearBegin(
unsigned int year,
unsigned int numSpace)
158 pValuesForTheCurrentYear[numSpace].reset();
160 NextType::yearBegin(year, numSpace);
163 void yearEndBuildForEachThermalCluster(
State& state, uint year,
unsigned int numSpace)
165 for (
unsigned int i = state.study.runtime.rangeLimits.hour[Data::rangeBegin];
166 i <= state.study.runtime.rangeLimits.hour[Data::rangeEnd];
169 pValuesForTheCurrentYear[numSpace][i] += state.thermalClusterOperatingCostForYear[i];
172 NextType::yearEndBuildForEachThermalCluster(state, year, numSpace);
175 void yearEnd(
unsigned int year,
unsigned int numSpace)
178 pValuesForTheCurrentYear[numSpace].computeStatisticsForTheCurrentYear();
180 NextType::yearEnd(year, numSpace);
183 void computeSummary(
unsigned int year,
unsigned int numSpace)
189 NextType::computeSummary(year, numSpace);
192 void hourForEachArea(
State& state,
unsigned int numSpace)
194 const double costForSpilledOrUnsuppliedEnergyCSR =
196 (state.hourlyResults->ValeursHorairesDeDefaillancePositiveCSR[state.hourInTheWeek]
197 * state.area->thermal.unsuppliedEnergyCost)
198 + (state.hourlyResults->ValeursHorairesDeDefaillanceNegative[state.hourInTheWeek]
199 * state.area->thermal.spilledEnergyCost);
201 pValuesForTheCurrentYear[numSpace][state.hourInTheYear]
202 += costForSpilledOrUnsuppliedEnergyCSR;
204 NextType::hourForEachArea(state, numSpace);
207 Antares::Memory::Stored<double>::ConstReturnType retrieveRawHourlyValuesForCurrentYear(
209 unsigned int numSpace)
const
211 return pValuesForTheCurrentYear[numSpace].hour;
214 void localBuildAnnualSurveyReport(SurveyResults&
results,
217 unsigned int numSpace)
const
220 results.isCurrentVarNA = AncestorType::isNonApplicable;
222 if (AncestorType::isPrinted[0])
227 pValuesForTheCurrentYear[numSpace]
228 .template buildAnnualSurveyReport<VCardType>(
results, fileLevel, precision);
234 typename VCardType::IntermediateValuesType pValuesForTheCurrentYear;
235 unsigned int pNbYearsParallel;
C02 Average value of the overall OverallCostCsr emissions expected from all the thermal dispatchable ...
Definition: overallCostCsr.h:98
VCardOverallCostCsr VCardType
VCard.
Definition: overallCostCsr.h:103
VCardType::ResultsType ResultsType
List of expected results.
Definition: overallCostCsr.h:108
NextT NextType
Type of the next static variable.
Definition: overallCostCsr.h:101
@ count
How many items have we got.
Definition: overallCostCsr.h:115
Variable::IVariable< OverallCostCsr< NextT >, NextT, VCardType > AncestorType
Ancestor.
Definition: overallCostCsr.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: overallCostCsr.h:120
Definition: overallCostCsr.h:34
VCardOverallCostCsr VCardForSpatialAggregate
The VCard to look for for calculating spatial aggregates.
Definition: overallCostCsr.h:61
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition: overallCostCsr.h:77
Results< R::AllYears::Average< >, R::AllYears::Average > ResultsType
The expecte results.
Definition: overallCostCsr.h:58
static constexpr uint8_t isPossiblyNonApplicable
Can this variable be non applicable (0 : no, 1 : yes)
Definition: overallCostCsr.h:83
static std::string Caption()
Caption.
Definition: overallCostCsr.h:36
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition: overallCostCsr.h:65
static constexpr uint8_t precision
Precision (views)
Definition: overallCostCsr.h:69
static std::string Description()
The short description of the variable.
Definition: overallCostCsr.h:48
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition: overallCostCsr.h:81
static std::string Unit()
Unit.
Definition: overallCostCsr.h:42
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition: overallCostCsr.h:71
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition: overallCostCsr.h:75
static constexpr uint8_t decimal
Decimal precision.
Definition: overallCostCsr.h:73