Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
store-timeseries-numbers.hxx
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 __ANTARES_LIBS_STUDY_STORE_TIMESERIES_HXX__
22#define __ANTARES_LIBS_STUDY_STORE_TIMESERIES_HXX__
23
24namespace Antares::Data
25{
26template<int TimeSeriesT>
27void singleAreaStoreTimeseriesNumbers(Solver::IResultWriter& writer, const Area& area)
28{
29 switch (TimeSeriesT)
30 {
31 // Load
32 case timeSeriesLoad:
33 storeTimeseriesNumbersForLoad(writer, area);
34 break;
35 // Solar
36 case timeSeriesSolar:
37 storeTimeseriesNumbersForSolar(writer, area);
38 break;
39 // Hydro
40 case timeSeriesHydro:
41 storeTimeseriesNumbersForHydro(writer, area);
42 break;
43 // Wind
44 case timeSeriesWind:
45 storeTimeseriesNumbersForWind(writer, area);
46 break;
47 // Thermal
48 case timeSeriesThermal:
49 storeTimeseriesNumbersForThermal(writer, area);
50 break;
51 // Renewable
52 case timeSeriesRenewable:
53 storeTimeseriesNumbersForRenewable(writer, area);
54 break;
55 // Transmission capacities (NTC)
56 case timeSeriesTransmissionCapacities:
57 storeTimeseriesNumbersForTransmissionCapacities(writer, area);
58 break;
59 default:
60 break;
61 }
62}
63
64template<int TimeSeriesT>
65void storeTimeseriesNumbers(Solver::IResultWriter& writer, const AreaList& area)
66{
67 // Each area in the list
68 area.each([&writer](const Area& a)
69 { singleAreaStoreTimeseriesNumbers<TimeSeriesT>(writer, a); });
70}
71} // namespace Antares::Data
72
73#endif // __ANTARES_LIBS_STUDY_STORE_TIMESERIES_HXX__