21#ifndef __LIBS_STUDY_SCENARIO_BUILDER_DATA_HYDRO_LEVELS_H__
22#define __LIBS_STUDY_SCENARIO_BUILDER_DATA_HYDRO_LEVELS_H__
26#include "scBuilderDataInterface.h"
32namespace ScenarioBuilder
68 void setTSnumber(uint index, uint year,
double value);
71 uint width()
const override;
73 uint height()
const override;
75 double get_value(uint x, uint y)
const;
77 void set_value(uint x, uint y,
double value);
85 const std::string addToPrefix_;
95 assert(areaindex < pHydroLevelsRules.
width);
96 if (year < pHydroLevelsRules.
height)
98 pHydroLevelsRules[areaindex][year] = value;
102inline uint hydroLevelsData::width()
const
104 return pHydroLevelsRules.
width;
107inline uint hydroLevelsData::height()
const
109 return pHydroLevelsRules.
height;
112inline double hydroLevelsData::get_value(uint x, uint y)
const
114 return pHydroLevelsRules.
entry[y][x];
119 study.scenarioInitialHydroLevels.copyFrom(matrix);
124 study.scenarioFinalHydroLevels.copyFrom(matrix);
Interface for scenario builder data (time series, hydro levels, ...)
Definition scBuilderDataInterface.h:41
Rules for hydro levels, for all years and areas.
Definition hydroLevelsData.h:38
void saveToINIFile(const Study &study, Yuni::IO::File::Stream &file) const override
Export the data into a mere INI file.
Definition hydroLevelsData.cpp:48
bool apply(Study &study) override
Apply the changes to the study corresponding data (time series, hydro levels, ...)
Definition hydroLevelsData.cpp:83
void setTSnumber(uint index, uint year, double value)
Assign a single value.
Definition hydroLevelsData.h:93
bool reset(const Study &study) override
Reset data from the study.
Definition hydroLevelsData.cpp:38
ColumnType * entry
All entries of the matrix (bidimensional array)
Definition matrix.h:445
uint width
Width of the matrix.
Definition matrix.h:441
uint height
Height of the matrix.
Definition matrix.h:443