21 #ifndef __SOLVER_VARIABLE_ECONOMY_NonProportionalCost_H__
22 #define __SOLVER_VARIABLE_ECONOMY_NonProportionalCost_H__
24 #include "antares/solver/variable/variable.h"
26 namespace Antares::Solver::Variable::Economy
45 return "Non Proportional Cost throughout all MC years, of all the thermal dispatchable "
67 & (Category::FileLevel::id
68 | Category::FileLevel::va);
79 static constexpr uint8_t spatialAggregateMode = Category::spatialAggregateEachYear;
80 static constexpr uint8_t spatialAggregatePostProcessing = 0;
87 typedef std::vector<IntermediateValues> IntermediateValuesType;
89 using IntermediateValuesTypeForSpatialAg = std::unique_ptr<IntermediateValuesBaseType[]>;
97 template<
class NextT = Container::EndOfList>
120 template<
int CDataLevel,
int CFile>
136 pNbYearsParallel = study.maxNbYearsInParallel;
140 pValuesForTheCurrentYear.resize(pNbYearsParallel);
141 for (
unsigned int numSpace = 0; numSpace < pNbYearsParallel; numSpace++)
143 pValuesForTheCurrentYear[numSpace].initializeFromStudy(study);
147 NextType::initializeFromStudy(study);
153 VariableAccessorType::InitializeAndReset(
results, study);
159 NextType::initializeFromArea(study, area);
165 NextType::initializeFromAreaLink(study, link);
168 void simulationBegin()
171 NextType::simulationBegin();
176 NextType::simulationEnd();
179 void yearBegin(
unsigned int year,
unsigned int numSpace)
182 pValuesForTheCurrentYear[numSpace].reset();
184 NextType::yearBegin(year, numSpace);
187 void yearEndBuildForEachThermalCluster(
State& state, uint year,
unsigned int numSpace)
190 for (
unsigned int i = state.study.runtime.rangeLimits.hour[Data::rangeBegin];
191 i <= state.study.runtime.rangeLimits.hour[Data::rangeEnd];
194 pValuesForTheCurrentYear[numSpace][i] += state
195 .thermalClusterNonProportionalCostForYear[i];
199 NextType::yearEndBuildForEachThermalCluster(state, year, numSpace);
202 void yearEndBuild(
State& state,
unsigned int year,
unsigned int numSpace)
205 NextType::yearEndBuild(state, year, numSpace);
208 void yearEnd(
unsigned int year,
unsigned int numSpace)
211 pValuesForTheCurrentYear[numSpace].computeStatisticsForTheCurrentYear();
214 NextType::yearEnd(year, numSpace);
217 void computeSummary(
unsigned int year,
unsigned int numSpace)
223 NextType::computeSummary(year, numSpace);
226 void hourBegin(
unsigned int hourInTheYear)
229 NextType::hourBegin(hourInTheYear);
232 void hourForEachArea(
State& state,
unsigned int numSpace)
235 NextType::hourForEachArea(state, numSpace);
238 Antares::Memory::Stored<double>::ConstReturnType retrieveRawHourlyValuesForCurrentYear(
240 unsigned int numSpace)
const
242 return pValuesForTheCurrentYear[numSpace].hour;
245 void localBuildAnnualSurveyReport(SurveyResults&
results,
248 unsigned int numSpace)
const
251 results.isCurrentVarNA = AncestorType::isNonApplicable;
253 if (AncestorType::isPrinted[0])
258 pValuesForTheCurrentYear[numSpace]
259 .template buildAnnualSurveyReport<VCardType>(
results, fileLevel, precision);
265 typename VCardType::IntermediateValuesType pValuesForTheCurrentYear;
266 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: nonProportionalCost.h:100
VCardType::ResultsType ResultsType
List of expected results.
Definition: nonProportionalCost.h:110
@ count
How many items have we got.
Definition: nonProportionalCost.h:117
Variable::IVariable< NonProportionalCost< NextT >, NextT, VCardType > AncestorType
Ancestor.
Definition: nonProportionalCost.h:107
NextT NextType
Type of the next static variable.
Definition: nonProportionalCost.h:103
VCardNonProportionalCost VCardType
VCard.
Definition: nonProportionalCost.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: nonProportionalCost.h:122
Definition: nonProportionalCost.h:29
static constexpr uint8_t precision
Precision (views)
Definition: nonProportionalCost.h:70
VCardNonProportionalCost VCardForSpatialAggregate
The VCard to look for for calculating spatial aggregates.
Definition: nonProportionalCost.h:61
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition: nonProportionalCost.h:78
static constexpr uint8_t isPossiblyNonApplicable
Can this variable be non applicable (0 : no, 1 : yes)
Definition: nonProportionalCost.h:84
static std::string Description()
The short description of the variable.
Definition: nonProportionalCost.h:43
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition: nonProportionalCost.h:82
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition: nonProportionalCost.h:72
static std::string Unit()
Unit.
Definition: nonProportionalCost.h:37
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition: nonProportionalCost.h:76
static constexpr uint8_t categoryDataLevel
Data Level.
Definition: nonProportionalCost.h:64
static constexpr uint8_t decimal
Decimal precision.
Definition: nonProportionalCost.h:74
Results< R::AllYears::Average< R::AllYears::StdDeviation< R::AllYears::Min< R::AllYears::Max< > > > >, R::AllYears::Average > ResultsType
The expecte results.
Definition: nonProportionalCost.h:58
static std::string Caption()
Caption.
Definition: nonProportionalCost.h:31
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition: nonProportionalCost.h:66
Definition: stdDeviation.h:33