Antares Simulator
Power System Simulator
endoflist.h
1 /*
2  * Copyright 2007-2025, 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 __SOLVER_END_OF_LIST_END_OF_LIST_H__
22 #define __SOLVER_END_OF_LIST_END_OF_LIST_H__
23 
24 #include <yuni/yuni.h>
25 
26 #include <antares/study/study.h>
27 
28 #include "state.h"
29 #include "surveyresults.h"
30 
31 // To remove warnings (unused variable) at compile time on linux
32 #define UNUSED_VARIABLE(x) (void)(x)
33 
34 namespace Antares::Solver::Variable::Container
35 {
36 class EndOfList
37 {
38 public:
40  typedef void NextType;
41 
42  enum
43  {
45  count = 0,
46  };
47 
48  template<int CategoryDataLevel, int CategoryFile>
49  struct Statistics
50  {
51  enum
52  {
53  count = 0
54  };
55  };
56 
57 public:
63  template<class PredicateT>
64  static void RetrieveVariableList(PredicateT&)
65  {
66  }
67 
68 public:
70 
71  EndOfList()
72  {
73  }
74 
75  ~EndOfList()
76  {
77  }
78 
80 
81  static void initializeFromStudy([[maybe_unused]] Data::Study& study)
82  {
83  }
84 
85  static void initializeFromArea(Data::Study*, Data::Area*)
86  {
87  }
88 
89  static void initializeFromThermalCluster(Data::Study*, Data::Area*, Data::ThermalCluster*)
90  {
91  }
92 
93  static void initializeFromAreaLink(Data::Study*, Data::AreaLink*)
94  {
95  }
96 
97  void broadcastNonApplicability(bool)
98  {
99  }
100 
101  void getPrintStatusFromStudy([[maybe_unused]] Data::Study& study)
102  {
103  }
104 
105  void supplyMaxNumberOfColumns([[maybe_unused]] Data::Study& study)
106  {
107  }
108 
109  static void simulationBegin()
110  {
111  }
112 
113  static void simulationEnd()
114  {
115  }
116 
117  static void yearBegin(unsigned int, unsigned int)
118  {
119  }
120 
121  static void yearEndBuildPrepareDataForEachThermalCluster(State& state, uint year, uint numSpace)
122  {
123  UNUSED_VARIABLE(state);
124  UNUSED_VARIABLE(year);
125  UNUSED_VARIABLE(numSpace);
126  }
127 
128  static void yearEndBuildForEachThermalCluster(State& state, uint year, uint numSpace)
129  {
130  UNUSED_VARIABLE(state);
131  UNUSED_VARIABLE(year);
132  UNUSED_VARIABLE(numSpace);
133  }
134 
135  static void yearEndBuild(State&, unsigned int, unsigned int)
136  {
137  }
138 
139  static void yearEnd(unsigned int, unsigned int)
140  {
141  }
142 
143  static void computeSummary(unsigned int year, unsigned int numSpace)
144  {
145  UNUSED_VARIABLE(year);
146  UNUSED_VARIABLE(numSpace);
147  }
148 
149  template<class V>
150  void yearEndSpatialAggregates(V&, unsigned int, uint)
151  {
152  }
153 
154  template<class V, class SetT>
155  void yearEndSpatialAggregates(V&, unsigned int, const SetT&, uint numSpace)
156  {
157  UNUSED_VARIABLE(numSpace);
158  }
159 
160  template<class V>
161  static void computeSpatialAggregatesSummary(V&, unsigned int, unsigned int)
162  {
163  }
164 
165  template<class V>
166  static void simulationEndSpatialAggregates(V&)
167  {
168  }
169 
170  template<class V, class SetT>
171  void simulationEndSpatialAggregates(V&, const SetT&)
172  {
173  }
174 
175  static void weekBegin(State&)
176  {
177  }
178 
179  static void weekForEachArea(State&, uint numSpace)
180  {
181  UNUSED_VARIABLE(numSpace);
182  }
183 
184  static void weekEnd(State&)
185  {
186  }
187 
188  static void hourBegin(unsigned int)
189  {
190  }
191 
192  static void hourForEachArea(State&, uint numSpace)
193  {
194  UNUSED_VARIABLE(numSpace);
195  }
196 
197  static void hourForEachLink(State&, uint numSpace)
198  {
199  UNUSED_VARIABLE(numSpace);
200  }
201 
202  static void hourEnd(State&, unsigned int)
203  {
204  }
205 
206  static void buildSurveyReport(SurveyResults&, int, int, int)
207  {
208  }
209 
210  static void buildAnnualSurveyReport(SurveyResults&, int, int, int, uint)
211  {
212  }
213 
214  static void buildDigest(SurveyResults&, int, int)
215  {
216  }
217 
218  static void beforeYearByYearExport(uint /*year*/, uint)
219  {
220  }
221 
222  template<class I>
223  static void provideInformations(I&)
224  {
225  }
226 
227  template<class SearchVCardT, class O>
228  static void computeSpatialAggregateWith(O&)
229  {
230  assert(false);
231  }
232 
233  template<class SearchVCardT, class O>
234  static void computeSpatialAggregateWith(O&, const Data::Area*)
235  {
236  assert(false);
237  }
238 
239  template<class SearchVCardT, class O>
240  static void computeSpatialAggregateWith(O&, const Data::Area*, uint numSpace)
241  {
242  UNUSED_VARIABLE(numSpace);
243  }
244 
245  template<class VCardToFindT>
246  const double* retrieveHourlyResultsForCurrentYear(uint) const
247  {
248  return nullptr;
249  }
250 
251  template<class VCardToFindT, class O>
252  static void retrieveResultsForArea(O** /*result*/, const Data::Area*)
253  {
254  // Does nothing - this method may be called from a leaf
255  // Consequently we can not throw an error from here if the variable `result`
256  // is not initialized.
257  }
258 
259  template<class VCardToFindT, class O>
260  static void retrieveResultsForThermalCluster(O** /*result*/, const Data::ThermalCluster*)
261  {
262  // Does nothing - this method may be called from a leaf
263  // Consequently we can not throw an error from here if the variable `result`
264  // is not initialized.
265  }
266 
267  template<class VCardToFindT, class O>
268  static void retrieveResultsForLink(O** /*result*/, const Data::AreaLink*)
269  {
270  // Does nothing - this method may be called from a leaf
271  // Consequently we can not throw an error from here if the variable `result`
272  // is not initialized.
273  }
274 
275  void localBuildAnnualSurveyReport(SurveyResults&, int, int, unsigned int) const
276  {
277  // Does nothing
278  }
279 
280 }; // class EndOfList
281 
282 } // namespace Antares::Solver::Variable::Container
283 
284 #endif // __SOLVER_END_OF_LIST_END_OF_LIST_H__
Definition for a single area.
Definition: area.h:51
Definition: study.h:57
A single thermal cluster.
Definition: cluster.h:76
void NextType
Type of the next static variable.
Definition: endoflist.h:40
@ count
How many items have we got.
Definition: endoflist.h:45
static void RetrieveVariableList(PredicateT &)
Retrieve the list of all individual variables.
Definition: endoflist.h:64
Definition: cbuilder.h:120