Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
TSnumberData.h
1/*
2** Copyright 2007-2024, RTE (https://www.rte-france.com)
3** See AUTHORS.txt
4** SPDX-License-Identifier: MPL-2.0
5** This file is part of Antares-Simulator,
6** Adequacy and Performance assessment for interconnected energy networks.
7**
8** Antares_Simulator is free software: you can redistribute it and/or modify
9** it under the terms of the Mozilla Public Licence 2.0 as published by
10** the Mozilla Foundation, either version 2 of the License, or
11** (at your option) any later version.
12**
13** Antares_Simulator is distributed in the hope that it will be useful,
14** but WITHOUT ANY WARRANTY; without even the implied warranty of
15** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16** Mozilla Public Licence 2.0 for more details.
17**
18** You should have received a copy of the Mozilla Public Licence 2.0
19** along with Antares_Simulator. If not, see <https://opensource.org/license/mpl-2-0/>.
20*/
21#ifndef __LIBS_STUDY_SCENARIO_BUILDER_DATA_TS_NUMBER_H__
22#define __LIBS_STUDY_SCENARIO_BUILDER_DATA_TS_NUMBER_H__
23
24#include "scBuilderDataInterface.h"
25
26namespace Antares::Data::ScenarioBuilder
27{
32{
33public:
36
37public:
38 // We use default constructor and destructor
39
41
42
45 bool reset(const Study& study) override;
46
50 void saveToINIFile(const Study& study, Yuni::IO::File::Stream& file) const override;
51
59 void setTSnumber(uint index, uint year, uint value);
61
62 uint width() const override;
63 uint height() const override;
64
65 double get_value(uint x, uint y) const;
66 void set_value(uint x, uint y, uint value);
67
68protected:
69 virtual CString<512, false> get_prefix() const = 0;
70
71 virtual uint get_tsGenCount(const Study& study) const = 0;
72
73protected:
76
77}; // class TSNumberData
78
79// class TSNumberData : inline functions
80
81inline uint TSNumberData::width() const
82{
83 return pTSNumberRules.width;
84}
85
86inline uint TSNumberData::height() const
87{
89}
90
91inline double TSNumberData::get_value(uint x, uint y) const
92{
93 return pTSNumberRules.entry[y][x];
94}
95
96} // namespace Antares::Data::ScenarioBuilder
97
98#endif // __LIBS_STUDY_SCENARIO_BUILDER_DATA_TS_NUMBER_H__
Rules for TS numbers, for all years and a single timeseries.
Definition TSnumberData.h:32
bool reset(const Study &study) override
Reset data from the study.
Definition TSnumberData.cpp:30
void saveToINIFile(const Study &study, Yuni::IO::File::Stream &file) const override
Export the data into a mere INI file.
Definition TSnumberData.cpp:39
void setTSnumber(uint index, uint year, uint value)
Assign a single value.
Definition TSnumberData.cpp:66
MatrixType pTSNumberRules
All TS number overlay (0 if auto)
Definition TSnumberData.h:75
Interface for scenario builder data (time series, hydro levels, ...)
Definition scBuilderDataInterface.h:41
Definition study.h:61
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