Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
runtime.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 __ANTARES_LIBS_STUDY_RUNTIME_RUNTIME_INFOS_H__
22#define __ANTARES_LIBS_STUDY_RUNTIME_RUNTIME_INFOS_H__
23
24#include <string>
25#include <vector>
26
27#include <antares/mersenne-twister/mersenne-twister.h>
28#include <antares/study/parameters.h>
29
30namespace Antares::Data
31{
32
33class Study;
34
35enum RangeLimitsIndex
36{
37 rangeBegin = 0,
38 rangeEnd,
39 rangeCount,
40 rangeMax
41};
42
44{
45public:
49 void checkIntegrity() const;
50
52 uint hour[rangeMax];
54 uint day[rangeMax];
56 uint week[rangeMax];
58 uint month[rangeMax];
60 uint year[rangeMax];
61
62}; // class StudyRangeLimits
63
69{
70public:
72
73
82
86 bool loadFromStudy(Study& study);
87
88 void initializeRandomNumberGenerators(const Parameters& parameters);
89
90public:
92 uint nbYears;
93
96
98 SimulationMode mode;
99
101 uint interconnectionsCount() const;
103 std::vector<AreaLink*> areaLink;
104
107
110 uint thermalPlantTotalCountMustRun;
111
112 uint shortTermStorageCount = 0;
113 uint shortTermStorageCumulativeConstraintCount = 0;
114
116 bool thermalTSRefresh = false;
117
122
127
134
135 std::vector<std::vector<double>> transitMoyenInterconnexionsRecalculQuadratique;
136
137private:
138 void initializeRangeLimits(const Study& study, StudyRangeLimits& limits);
139 void removeDisabledShortTermStorageClustersFromSolverComputations(Study& study);
140 void removeAllRenewableClustersFromSolverComputations(Study& study);
141 void disableAllFilters(Study& study);
142 void checkThermalTSGeneration(Study& study);
143}; // struct StudyRuntimeInfos
144
145#ifdef NDEBUG
146inline void StudyRangeLimits::checkIntegrity() const
147{
148}
149#endif
150
151} // namespace Antares::Data
152
153#endif // __ANTARES_LIBS_STUDY_RUNTIME_RUNTIME_INFOS_H__
General data for a study.
Definition parameters.h:51
Runtime informations.
Definition runtime.h:69
uint nbYears
The number of years to process.
Definition runtime.h:92
bool quadraticOptimizationHasFailed
Flag to know if at least one error occured during the quadratic optimization.
Definition runtime.h:133
bool thermalTSRefresh
Override enable/disable TS generation per cluster.
Definition runtime.h:116
StudyRangeLimits rangeLimits
Range limits.
Definition runtime.h:95
SimulationMode mode
Mode of the simulation.
Definition runtime.h:98
std::vector< AreaLink * > areaLink
All interconnections.
Definition runtime.h:103
bool loadFromStudy(Study &study)
Reset internal data according a given study.
Definition runtime.cpp:298
uint simulationDaysPerMonth[12]
The number of simulation days per month.
Definition runtime.h:121
MersenneTwister random[seedMax]
Random numbers generators.
Definition runtime.h:106
uint thermalPlantTotalCount
Total.
Definition runtime.h:109
uint simulationDaysPerWeek[53]
The number of simulation days per week.
Definition runtime.h:126
uint interconnectionsCount() const
The number of interconnections.
Definition runtime.cpp:378
~StudyRuntimeInfos()
Destructor.
Definition runtime.cpp:435
StudyRuntimeInfos()
Default constructor.
Definition runtime.cpp:261
Definition study.h:61
MersenneTwister Pseudo random number generator.
Definition mersenne-twister.h:41
Definition runtime.h:44
uint week[rangeMax]
Week.
Definition runtime.h:56
void checkIntegrity() const
Dynamic bound-checking (debug only)
Definition runtime.cpp:441
uint month[rangeMax]
Month.
Definition runtime.h:58
uint day[rangeMax]
Day.
Definition runtime.h:54
uint year[rangeMax]
Year.
Definition runtime.h:60
uint hour[rangeMax]
Hours.
Definition runtime.h:52