21 #ifndef __SOLVER_VARIABLE_ECONOMY_RowBalance_H__
22 #define __SOLVER_VARIABLE_ECONOMY_RowBalance_H__
24 #include <antares/study/area/constants.h>
25 #include "antares/solver/variable/variable.h"
27 namespace Antares::Solver::Variable::Economy
61 & (Category::FileLevel::id
62 | Category::FileLevel::va);
73 static constexpr uint8_t spatialAggregateMode = Category::spatialAggregateOnce;
74 static constexpr uint8_t spatialAggregatePostProcessing = 0;
83 using IntermediateValuesTypeForSpatialAg = std::unique_ptr<IntermediateValuesBaseType[]>;
90 template<
class NextT = Container::EndOfList>
112 template<
int CDataLevel,
int CFile>
136 pValuesForTheCurrentYear.initializeFromStudy(study);
139 NextType::initializeFromStudy(study);
145 VariableAccessorType::InitializeAndReset(
results, study);
151 unsigned int height = area->miscGen.height;
152 (void)::memcpy(pValuesForTheCurrentYear.
hour,
153 area->miscGen.entry[Data::fhhRowBalance],
154 sizeof(
double) * height);
156 if (study->parameters.mode == Data::SimulationMode::Adequacy)
158 for (
unsigned int h = 0; h != height; ++h)
160 pValuesForTheCurrentYear.
hour[h] -= area->reserves
161 .entry[Data::fhrPrimaryReserve][h];
171 NextType::initializeFromArea(study, area);
177 NextType::initializeFromAreaLink(study, link);
180 void simulationBegin()
183 NextType::simulationBegin();
188 NextType::simulationEnd();
191 void yearBegin(
unsigned int year,
unsigned int numSpace)
194 NextType::yearBegin(year, numSpace);
197 void yearEndBuild(
State& state,
unsigned int year,
unsigned int numSpace)
200 NextType::yearEndBuild(state, year, numSpace);
203 void yearEnd(
unsigned int year,
unsigned int numSpace)
206 NextType::yearEnd(year, numSpace);
209 void computeSummary(
unsigned int year,
unsigned int numSpace)
212 NextType::computeSummary(year, numSpace);
215 void hourBegin(
unsigned int hourInTheYear)
218 NextType::hourBegin(hourInTheYear);
221 void hourForEachArea(
State& state,
unsigned int numSpace)
224 NextType::hourForEachArea(state, numSpace);
227 void localBuildAnnualSurveyReport(SurveyResults&
results,
233 results.isCurrentVarNA = AncestorType::isNonApplicable;
235 if (AncestorType::isPrinted[0])
240 pValuesForTheCurrentYear.template buildAnnualSurveyReport<VCardType>(
results,
248 typename VCardType::IntermediateValuesType pValuesForTheCurrentYear;
Definition of a link between two areas (Interconnection)
Definition: links.h:58
Definition for a single area.
Definition: area.h:51
Marginal RowBalance.
Definition: rowBalance.h:92
@ count
How many items have we got.
Definition: rowBalance.h:109
NextT NextType
Type of the next static variable.
Definition: rowBalance.h:95
VCardType::ResultsType ResultsType
List of expected results.
Definition: rowBalance.h:102
VCardRowBalance VCardType
VCard.
Definition: rowBalance.h:97
Variable::IVariable< RowBalance< NextT >, NextT, VCardType > AncestorType
Ancestor.
Definition: rowBalance.h:99
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: rowBalance.h:114
Definition: rowBalance.h:30
Results< R::AllYears::Raw< > > ResultsType
The expecte results.
Definition: rowBalance.h:52
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition: rowBalance.h:60
static std::string Description()
The short description of the variable.
Definition: rowBalance.h:44
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition: rowBalance.h:66
static std::string Caption()
Caption.
Definition: rowBalance.h:32
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition: rowBalance.h:70
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition: rowBalance.h:76
static std::string Unit()
Unit.
Definition: rowBalance.h:38
static constexpr uint8_t precision
Precision (views)
Definition: rowBalance.h:64
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition: rowBalance.h:72
VCardRowBalance VCardForSpatialAggregate
The VCard to look for for calculating spatial aggregates.
Definition: rowBalance.h:55
static constexpr uint8_t decimal
Decimal precision.
Definition: rowBalance.h:68
static constexpr uint8_t isPossiblyNonApplicable
Can this variable be non applicable (0 : no, 1 : yes)
Definition: rowBalance.h:78
static constexpr uint8_t categoryDataLevel
Data Level.
Definition: rowBalance.h:58