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"
67 & (Category::FileLevel::id
68 | Category::FileLevel::va);
79 static constexpr uint8_t spatialAggregateMode = Category::spatialAggregateOnce;
80 static constexpr uint8_t spatialAggregatePostProcessing = 0;
96template<
class NextT = Container::EndOfList>
118 template<
int CDataLevel,
int CFile>
142 pValuesForTheCurrentYear.initializeFromStudy(study);
145 NextType::initializeFromStudy(study);
151 VariableAccessorType::InitializeAndReset(
results, study);
157 unsigned int height = area->miscGen.height;
158 (void)::memcpy(pValuesForTheCurrentYear.
hour,
159 area->miscGen.entry[Data::fhhRowBalance],
160 sizeof(
double) * height);
162 if (study->parameters.mode == Data::SimulationMode::Adequacy)
164 for (
unsigned int h = 0; h != height; ++h)
166 pValuesForTheCurrentYear.
hour[h] -= area->reserves
167 .entry[Data::fhrPrimaryReserve][h];
177 NextType::initializeFromArea(study, area);
183 NextType::initializeFromAreaLink(study, link);
186 void simulationBegin()
189 NextType::simulationBegin();
194 NextType::simulationEnd();
197 void yearBegin(
unsigned int year,
unsigned int numSpace)
200 NextType::yearBegin(year, numSpace);
203 void yearEndBuild(
State& state,
unsigned int year,
unsigned int numSpace)
206 NextType::yearEndBuild(state, year, numSpace);
209 void yearEnd(
unsigned int year,
unsigned int numSpace)
212 NextType::yearEnd(year, numSpace);
215 void computeSummary(std::map<unsigned int, unsigned int>& numSpaceToYear,
216 unsigned int nbYearsForCurrentSummary)
219 NextType::computeSummary(numSpaceToYear, nbYearsForCurrentSummary);
222 void hourBegin(
unsigned int hourInTheYear)
225 NextType::hourBegin(hourInTheYear);
228 void hourForEachArea(
State& state,
unsigned int numSpace)
231 NextType::hourForEachArea(state, numSpace);
234 void localBuildAnnualSurveyReport(SurveyResults&
results,
240 results.isCurrentVarNA = AncestorType::isNonApplicable;
242 if (AncestorType::isPrinted[0])
247 pValuesForTheCurrentYear.template buildAnnualSurveyReport<VCardType>(
results,
255 typename VCardType::IntermediateValuesType pValuesForTheCurrentYear;
Definition of a link between two areas (Interconnection)
Definition links.h:50
Definition for a single area.
Definition area.h:52
Marginal RowBalance.
Definition rowBalance.h:98
VCardRowBalance VCardType
VCard.
Definition rowBalance.h:103
Variable::IVariable< RowBalance< NextT >, NextT, VCardType > AncestorType
Ancestor.
Definition rowBalance.h:105
NextT NextType
Type of the next static variable.
Definition rowBalance.h:101
@ count
How many items have we got.
Definition rowBalance.h:115
VCardType::ResultsType ResultsType
List of expected results.
Definition rowBalance.h:108
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 rowBalance.h:120
Definition rowBalance.h:36
static constexpr uint8_t categoryFileLevel
File level (provided by the type of the results)
Definition rowBalance.h:66
static std::string Description()
The short description of the variable.
Definition rowBalance.h:50
static constexpr uint8_t nodeDepthForGUI
Indentation (GUI)
Definition rowBalance.h:72
static std::string Caption()
Caption.
Definition rowBalance.h:38
static constexpr int columnCount
Number of columns used by the variable (One ResultsType per column)
Definition rowBalance.h:76
static constexpr uint8_t hasIntermediateValues
Intermediate values.
Definition rowBalance.h:82
static std::string Unit()
Unit.
Definition rowBalance.h:44
Results< R::AllYears::Raw< > > ResultsType
The expecte results.
Definition rowBalance.h:58
static constexpr uint8_t precision
Precision (views)
Definition rowBalance.h:70
static constexpr uint8_t spatialAggregate
The Spatial aggregation.
Definition rowBalance.h:78
static constexpr uint8_t decimal
Decimal precision.
Definition rowBalance.h:74
static constexpr uint8_t isPossiblyNonApplicable
Can this variable be non applicable (0 : no, 1 : yes)
Definition rowBalance.h:84
static constexpr uint8_t categoryDataLevel
Data Level.
Definition rowBalance.h:64
VCardRowBalance VCardForSpatialAggregate
The VCard to look for for calculating spatial aggregates.
Definition rowBalance.h:61