21 #ifndef __LIBS_STUDY_SCENARIO_BUILDER_DATA_HYDRO_LEVELS_H__
22 #define __LIBS_STUDY_SCENARIO_BUILDER_DATA_HYDRO_LEVELS_H__
26 #include "scBuilderDataInterface.h"
28 namespace Antares::Data::ScenarioBuilder
56 void saveToINIFile(
const Study& study, Yuni::IO::File::Stream& file)
const override;
66 void setTSnumber(uint index, uint year,
double value);
69 uint width()
const override;
71 uint height()
const override;
73 double get_value(uint x, uint y)
const;
75 void set_value(uint x, uint y,
double value);
83 const std::string addToPrefix_;
93 assert(areaindex < pHydroLevelsRules.
width);
94 if (year < pHydroLevelsRules.
height)
96 pHydroLevelsRules[areaindex][year] = value;
100 inline uint hydroLevelsData::width()
const
102 return pHydroLevelsRules.
width;
105 inline uint hydroLevelsData::height()
const
107 return pHydroLevelsRules.
height;
110 inline double hydroLevelsData::get_value(uint x, uint y)
const
112 return pHydroLevelsRules.
entry[y][x];
117 study.scenarioInitialHydroLevels.copyFrom(matrix);
122 study.scenarioFinalHydroLevels.copyFrom(matrix);
Interface for scenario builder data (time series, hydro levels, ...)
Definition: scBuilderDataInterface.h:37
Rules for hydro levels, for all years and areas.
Definition: hydroLevelsData.h:34
bool apply(Study &study) override
Apply the changes to the study corresponding data (time series, hydro levels, ...)
Definition: hydroLevelsData.cpp:86
void setTSnumber(uint index, uint year, double value)
Assign a single value.
Definition: hydroLevelsData.h:91
bool reset(const Study &study) override
Reset data from the study.
Definition: hydroLevelsData.cpp:39
A n-by-n matrix.
Definition: matrix.h:44
uint height
Height of the matrix.
Definition: matrix.h:443
ColumnType * entry
All entries of the matrix (bidimensional array)
Definition: matrix.h:445
uint width
Width of the matrix.
Definition: matrix.h:441