Antares Simulator
Power System Simulator
variable.hxx
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_VARIABLE_VARIABLE_HXX__
22 #define __SOLVER_VARIABLE_VARIABLE_HXX__
23 
24 #include <yuni/core/static/types.h>
25 
26 #include <antares/study/variable-print-info.h>
27 
28 namespace Antares::Solver::Variable
29 {
30 
31 template<class ChildT, class NextT, class VCardT>
33 {
34  // Initialization
35  // You should prefer the methods initializeFromStudy() or similiar
36  // to initialize the internal variables
37 
38  // Number of column, where dimension -1 (dynamic) is avoided
39  pColumnCount = VCardType::columnCount > 1 ? VCardType::columnCount : 1;
40 
41  // Allocation
42  // Does current output variable appear non applicable in all output reports (of any kind :
43  // area or district reports, annual or over all years reports, digest, ...) ?
44  isNonApplicable = new bool[pColumnCount];
45  // Does current output variable column(s) appear in all reports ?
46  isPrinted = new bool[pColumnCount];
47 
48  // Initializing default print to true
49  for (uint i = 0; i < pColumnCount; i++)
50  {
51  isPrinted[i] = true;
52  }
53 }
54 
55 template<class ChildT, class NextT, class VCardT>
57 {
58  delete[] isNonApplicable;
59  delete[] isPrinted;
60 }
61 
62 template<class ChildT, class NextT, class VCardT>
64 {
65  // Next
66  NextType::initializeFromStudy(study);
67 }
68 
69 template<class ChildT, class NextT, class VCardT>
70 template<class R>
72  Data::Study& study)
73 {
74  VariableAccessorType::InitializeAndReset(results, study);
75 }
76 
77 template<class ChildT, class NextT, class VCardT>
79  Data::Area* area)
80 {
81  // Next
82  NextType::initializeFromArea(study, area);
83 }
84 
85 template<class ChildT, class NextT, class VCardT>
88 {
89  // Next
90  NextType::initializeFromAreaLink(study, link);
91 }
92 
93 template<class ChildT, class NextT, class VCardT>
95  Data::Study* study,
96  Data::Area* area,
97  Data::ThermalCluster* cluster)
98 {
99  // Next
100  NextType::initializeFromThermalCluster(study, area, cluster);
101 }
102 
103 template<class ChildT, class NextT, class VCardT>
104 inline void IVariable<ChildT, NextT, VCardT>::broadcastNonApplicability(bool applyNonApplicable)
105 {
106  if (VCardType::isPossiblyNonApplicable != 0 && applyNonApplicable)
107  {
108  for (uint i = 0; i != pColumnCount; ++i)
109  {
110  isNonApplicable[i] = true;
111  }
112  }
113  else
114  {
115  for (uint i = 0; i != pColumnCount; ++i)
116  {
117  isNonApplicable[i] = false;
118  }
119  }
120 
121  NextType::broadcastNonApplicability(applyNonApplicable);
122 }
123 
124 template<class ChildT, class NextT, class VCardT>
126 {
127  // Next
128  NextType::simulationBegin();
129 }
130 
131 template<class ChildT, class NextT, class VCardT>
133 {
134  NextType::simulationEnd();
135 }
136 
137 template<class ChildT, class NextT, class VCardT>
139 {
140  return VCardT::ResultsType::count;
141 }
142 
143 template<class ChildT, class NextT, class VCardT>
145 {
146  // Next variable
147  NextType::yearBegin(year);
148 }
149 
150 template<class ChildT, class NextT, class VCardT>
152 {
153  // Next variable
154  NextType::yearEnd(year);
155 }
156 
157 template<class ChildT, class NextT, class VCardT>
158 template<class V>
160  uint year,
161  unsigned int numSpace)
162 {
163  // Next variable
164  NextType::yearEndSpatialAggregates(allVars, year, numSpace);
165 }
166 
167 template<class ChildT, class NextT, class VCardT>
168 template<class V, class SetT>
170  uint year,
171  const SetT& set)
172 {
173  // Next variable
174  NextType::yearEndSpatialAggregates(allVars, year, set);
175 }
176 
177 template<class ChildT, class NextT, class VCardT>
179  State& state,
180  uint year,
181  uint numSpace)
182 {
183  // Next variable
184  NextType::yearEndBuildPrepareDataForEachThermalCluster(state, year, numSpace);
185 }
186 
187 template<class ChildT, class NextT, class VCardT>
188 template<class V>
190 {
191  // Next variable
192  NextType::simulationEndSpatialAggregates(allVars);
193 }
194 
195 template<class ChildT, class NextT, class VCardT>
196 template<class V, class SetT>
198  const SetT& set)
199 {
200  // Next variable
201  NextType::simulationEndSpatialAggregates(allVars, set);
202 }
203 
204 template<class ChildT, class NextT, class VCardT>
206 {
207  // Next variable
208  NextType::weekBegin(state);
209 }
210 
211 template<class ChildT, class NextT, class VCardT>
212 inline void IVariable<ChildT, NextT, VCardT>::weekForEachArea(State& state, unsigned int numSpace)
213 {
214  // Next variable
215  NextType::weekForEachArea(state, numSpace);
216 }
217 
218 template<class ChildT, class NextT, class VCardT>
219 inline void IVariable<ChildT, NextT, VCardT>::hourBegin(uint hourInTheYear)
220 {
221  // Next variable
222  NextType::hourBegin(hourInTheYear);
223 }
224 
225 template<class ChildT, class NextT, class VCardT>
227 {
228  // Next variable
229  NextType::hourForEachArea(state);
230 }
231 
232 template<class ChildT, class NextT, class VCardT>
233 inline void IVariable<ChildT, NextT, VCardT>::hourForEachArea(State& state, unsigned int numSpace)
234 {
235  // Next variable
236  NextType::hourForEachArea(state, numSpace);
237 }
238 
239 template<class ChildT, class NextT, class VCardT>
241  State& state,
242  unsigned int year,
243  unsigned int numSpace)
244 {
245  // Next item in the list
246  NextType::yearEndBuildForEachThermalCluster(state, year, numSpace);
247 }
248 
249 template<class ChildT, class NextT, class VCardT>
250 inline void IVariable<ChildT, NextT, VCardT>::hourForEachLink(State& state, unsigned int numSpace)
251 {
252  // Next item in the list
253  NextType::hourForEachLink(state, numSpace);
254 }
255 
256 template<class ChildT, class NextT, class VCardT>
257 inline void IVariable<ChildT, NextT, VCardT>::hourEnd(State& state, uint hourInTheYear)
258 {
259  // Next
260  NextType::hourEnd(state, hourInTheYear);
261 }
262 
263 template<class ChildT, class NextT, class VCardT>
265 {
266  // Next
267  NextType::weekEnd(state);
268 }
269 
270 template<class ChildT, class NextT, class VCardT>
272  int dataLevel,
273  int fileLevel,
274  int precision) const
275 {
276  // Generating value for the area
277  // Only if there are some results to export...
278  if (0 != ResultsType::count)
279  {
280  // And only if we match the current data level _and_ precision level
281  if ((dataLevel & VCardType::categoryDataLevel) && (fileLevel & VCardType::categoryFileLevel)
282  && (precision & VCardType::precision))
283  {
284  // Initializing pointer on variable non applicable and print stati arrays to beginning
285  results.isPrinted = isPrinted;
286  results.isCurrentVarNA = isNonApplicable;
287 
288  VariableAccessorType::template BuildSurveyReport<VCardType>(results,
289  pResults,
290  dataLevel,
291  fileLevel,
292  precision);
293  }
294  }
295 
296  // Ask to the next item in the static list to export
297  // its results as well
298  NextType::buildSurveyReport(results, dataLevel, fileLevel, precision);
299 }
300 
301 template<class ChildT, class NextT, class VCardT>
303  int dataLevel,
304  int fileLevel,
305  int precision,
306  uint numSpace) const
307 {
308  // Generating value for the area
309  // Only if there are some results to export...
310  if (0 != ResultsType::count)
311  {
312  // And only if we match the current data level _and_ precision level
313  if ((dataLevel & VCardType::categoryDataLevel) && (fileLevel & VCardType::categoryFileLevel)
314  && (precision & VCardType::precision))
315  {
316  // Getting its intermediate results
317  static_cast<const ChildT*>(this)->localBuildAnnualSurveyReport(results,
318  fileLevel,
319  precision,
320  numSpace);
321  }
322  }
323 
324  // Ask to the next item in the static list to export
325  // its results as well
326  NextType::buildAnnualSurveyReport(results, dataLevel, fileLevel, precision, numSpace);
327 }
328 
329 template<class ChildT, class NextT, class VCardT>
330 inline void IVariable<ChildT, NextT, VCardT>::buildDigest(SurveyResults& results,
331  int digestLevel,
332  int dataLevel) const
333 {
334  // Generate the Digest for the local results (areas part)
335  if (VCardType::columnCount != 0
336  && (VCardType::categoryDataLevel & Category::DataLevel::setOfAreas
337  || VCardType::categoryDataLevel & Category::DataLevel::area
338  || VCardType::categoryDataLevel & Category::DataLevel::link))
339  {
340  // Initializing pointer on variable non applicable and print stati arrays to beginning
341  results.isPrinted = isPrinted;
342  results.isCurrentVarNA = isNonApplicable;
343 
344  VariableAccessorType::template BuildDigest<VCardT>(results,
345  pResults,
346  digestLevel,
347  dataLevel);
348  }
349  // Ask to build the digest to the next variable
350  NextType::buildDigest(results, digestLevel, dataLevel);
351 }
352 
353 template<class ChildT, class NextT, class VCardT>
354 inline void IVariable<ChildT, NextT, VCardT>::beforeYearByYearExport(uint year, uint numspace)
355 {
356  NextType::beforeYearByYearExport(year, numspace);
357 }
358 
359 template<class ChildT, class NextT, class VCardT>
360 template<class I>
362 {
363  // Begining of the node
364  if (VCardType::nodeDepthForGUI)
365  {
366  infos.template beginNode<VCardType>();
367  // Next variable in the list
368  NextType::template provideInformations<I>(infos);
369  // End of the node
370  infos.endNode();
371  }
372  else
373  {
374  // Giving our VCard
375  infos.template addVCard<VCardType>();
376  // Next variable in the list
377  NextType::template provideInformations<I>(infos);
378  }
379 }
380 
381 template<class ChildT, class NextT, class VCardT>
382 template<class SearchVCardT, class O>
384 {
385  // if this variable has the vcard we are looking for,
386  // then we will add our results
387  // In the most cases, the variable `out` is intermediate results.
388 
389  if (Yuni::Static::Type::StrictlyEqual<VCardT, SearchVCardT>::Yes)
390  {
392  Yuni::Static::Type::StrictlyEqual<VCardT, SearchVCardT>::Yes, // To avoid instanciation
393  VCardT::spatialAggregate, // The spatial cluster operation to perform
394  VCardType // The VCard
395  >::Perform(out, *(static_cast<ChildT*>(this)), numSpace);
396  return;
397  }
398  // Otherwise we keep looking
399  NextType::template computeSpatialAggregateWith<SearchVCardT, O>(out, numSpace);
400 }
401 
402 template<class ChildT, class NextT, class VCardT>
403 template<class SearchVCardT, class O>
405  const Data::Area* area)
406 {
407  NextType::template computeSpatialAggregateWith<SearchVCardT, O>(out, area);
408 }
409 
410 namespace // anonymous
411 {
412 template<int Match>
413 struct RetrieveResultsAssignment
414 {
415  enum
416  {
417  Yes = 1
418  };
419 
420  template<class ResultsT, class O>
421  static void Do(ResultsT& varResults, O** result)
422  {
423  *result = &varResults;
424  }
425 };
426 
427 template<>
428 struct RetrieveResultsAssignment<0>
429 {
430  enum
431  {
432  Yes = 0
433  };
434 
435  template<class ResultsT, class O>
436  static void Do(ResultsT&, O**)
437  {
438  // Do nothing
439  }
440 };
441 
442 } // namespace
443 
444 template<class ChildT, class NextT, class VCardT>
445 template<class VCardToFindT>
446 inline const double* IVariable<ChildT, NextT, VCardT>::retrieveHourlyResultsForCurrentYear(
447  uint numSpace) const
448 {
449  using AssignT = RetrieveResultsAssignment<
450  Yuni::Static::Type::StrictlyEqual<VCardT, VCardToFindT>::Yes>;
451  return (AssignT::Yes)
452  ? nullptr
453  : NextType::template retrieveHourlyResultsForCurrentYear<VCardToFindT>(numSpace);
454 }
455 
456 template<class ChildT, class NextT, class VCardT>
457 template<class VCardToFindT>
458 inline void IVariable<ChildT, NextT, VCardT>::retrieveResultsForArea(
459  typename Storage<VCardToFindT>::ResultsType** result,
460  const Data::Area* area)
461 {
462  using AssignT = RetrieveResultsAssignment<
463  Yuni::Static::Type::StrictlyEqual<VCardT, VCardToFindT>::Yes>;
464  AssignT::Do(pResults, result);
465  if (!AssignT::Yes)
466  {
467  NextType::template retrieveResultsForArea<VCardToFindT>(result, area);
468  }
469 }
470 
471 template<class ChildT, class NextT, class VCardT>
472 template<class VCardToFindT>
473 inline void IVariable<ChildT, NextT, VCardT>::retrieveResultsForThermalCluster(
474  typename Storage<VCardToFindT>::ResultsType** result,
475  const Data::ThermalCluster* cluster)
476 {
477  using AssignT = RetrieveResultsAssignment<
478  Yuni::Static::Type::StrictlyEqual<VCardT, VCardToFindT>::Yes>;
479  AssignT::Do(pResults, result);
480  if (!AssignT::Yes)
481  {
482  NextType::template retrieveResultsForThermalCluster<VCardToFindT>(result, cluster);
483  }
484 }
485 
486 template<class ChildT, class NextT, class VCardT>
487 template<class VCardToFindT>
488 inline void IVariable<ChildT, NextT, VCardT>::retrieveResultsForLink(
489  typename Storage<VCardToFindT>::ResultsType** result,
490  const Data::AreaLink* link)
491 {
492  using AssignT = RetrieveResultsAssignment<
493  Yuni::Static::Type::StrictlyEqual<VCardT, VCardToFindT>::Yes>;
494  AssignT::Do(pResults, result);
495  if (!AssignT::Yes)
496  {
497  NextType::template retrieveResultsForLink<VCardToFindT>(result, link);
498  }
499 }
500 
501 namespace // anonymous
502 {
503 template<int ColumnT>
504 struct HourlyResultsForCurrentYear
505 {
506  template<class R>
507  static Antares::Memory::Stored<double>::ConstReturnType Get(const R& results, uint column)
508  {
509  return results[column].hourlyValuesForSpatialAggregate();
510  }
511 };
512 
513 template<>
514 struct HourlyResultsForCurrentYear<Category::singleColumn>
515 {
516  template<class R>
517  static Antares::Memory::Stored<double>::ConstReturnType Get(const R& results, uint)
518  {
519  return results.hourlyValuesForSpatialAggregate();
520  }
521 };
522 
523 template<>
524 struct HourlyResultsForCurrentYear<Category::noColumn>
525 {
526  template<class R>
527  static Antares::Memory::Stored<double>::ConstReturnType Get(const R&, uint)
528  {
530  }
531 };
532 
533 } // anonymous namespace
534 
535 template<class ChildT, class NextT, class VCardT>
536 inline Antares::Memory::Stored<double>::ConstReturnType
537 IVariable<ChildT, NextT, VCardT>::retrieveRawHourlyValuesForCurrentYear(uint column,
538  uint /* numSpace */) const
539 {
540  return HourlyResultsForCurrentYear<VCardType::columnCount>::Get(pResults, column);
541 }
542 
543 template<class ChildT, class NextT, class VCardT>
545  const
546 {
547  return pResults;
548 }
549 
550 // ===================================================================
551 // Each output variable gets registered in the print info collector
552 // ===================================================================
553 
554 // class RetrieveVariableListHelper goes with function RetrieveVariableList(...).
555 // This class is used to make a different Do(...) treatment depending on current
556 // VCardType::columnCount. Recall that a variable can be single, dynamic or multiple.
557 namespace // anonymous
558 {
559 template<int ColumnT, class VCardT, class ChildT>
560 class RetrieveVariableListHelper
561 {
562 public:
563  template<class PredicateT>
564  static void Do(PredicateT& predicate)
565  {
566  for (int i = 0; i < VCardT::columnCount; ++i)
567  {
568  predicate.add(VCardT::Multiple::Caption(i),
569  VCardT::Multiple::Unit(i),
570  VCardT::Description());
571  }
572  }
573 
574  // Function used to build the collection of variables print info from the static variables list.
575  // Multiple variable function version.
576  static void Do(Data::variablePrintInfoCollector& printInfoCollector)
577  {
578  for (int i = 0; i < VCardT::columnCount; ++i)
579  {
580  printInfoCollector.add(VCardT::Multiple::Caption(i),
581  VCardT::categoryDataLevel,
582  VCardT::categoryFileLevel);
583  }
584  }
585 };
586 
587 template<class VCardT, class ChildT>
588 class RetrieveVariableListHelper<Category::singleColumn, VCardT, ChildT>
589 {
590 public:
591  template<class PredicateT>
592  static void Do(PredicateT& predicate)
593  {
594  predicate.add(VCardT::Caption(), VCardT::Unit(), VCardT::Description());
595  }
596 
597  // Function used to build the collection of variables print info from the static variables list.
598  // Single variable function version.
599  static void Do(Data::variablePrintInfoCollector& printInfoCollector)
600  {
601  printInfoCollector.add(VCardT::Caption(),
602  VCardT::categoryDataLevel,
603  VCardT::categoryFileLevel);
604  }
605 };
606 
607 template<class VCardT, class ChildT>
608 class RetrieveVariableListHelper<Category::dynamicColumns, VCardT, ChildT>
609 {
610 public:
611  template<class PredicateT>
612  static void Do(PredicateT&)
613  {
614  }
615 
616  // Function used to build the collection of variables print info from the static variables list.
617  // Dynamic variable function version.
618  static void Do(Data::variablePrintInfoCollector& printInfoCollector)
619  {
620  printInfoCollector.add(VCardT::Caption(),
621  VCardT::categoryDataLevel,
622  VCardT::categoryFileLevel);
623  }
624 };
625 
626 } // anonymous namespace
627 
628 template<class ChildT, class NextT, class VCardT>
629 template<class PredicateT>
631 {
632  RetrieveVariableListHelper<VCardType::columnCount, VCardType, ChildT>::Do(predicate);
633  // Go to the next variable
634  NextType::RetrieveVariableList(predicate);
635 }
636 
637 // =============================================================================
638 // Each output variable gets its print status from the study parameters
639 // =============================================================================
640 
641 // The class GetPrintStatusHelper is used to make a different Do(...) treatment depending on current
642 // VCardType::columnCount. Recall that a variable can be single, dynamic or multiple.
643 namespace // anonymous
644 {
645 // Case : the variable is multiple
646 template<int ColumnT, class VCardT>
647 class GetPrintStatusHelper
648 {
649 public:
650  static void Do(Data::Study& study, bool* isPrinted)
651  {
652  for (uint i = 0; i != VCardT::columnCount; ++i)
653  {
654  // Shifting inside the variables print info collection until reaching the print info
655  // associated with the current name, and then getting its print status.
656  isPrinted[i] = study.parameters.variablesPrintInfo.isPrinted(
657  VCardT::Multiple::Caption(i));
658  }
659  }
660 };
661 
662 // Case : the variable is single
663 template<class VCardT>
664 class GetPrintStatusHelper<Category::singleColumn, VCardT>
665 {
666 public:
667  static void Do(Data::Study& study, bool* isPrinted)
668  {
669  // Shifting inside the variables print info collection until reaching the print info
670  // associated with the current name, and then getting its print status.
671  isPrinted[0] = study.parameters.variablesPrintInfo.isPrinted(VCardT::Caption());
672  }
673 };
674 
675 // Case : the variable is dynamic
676 template<class VCardT>
677 class GetPrintStatusHelper<Category::dynamicColumns, VCardT>
678 {
679 public:
680  static void Do(Data::Study& study, bool* isPrinted)
681  {
682  // Shifting inside the variables print info collection until reaching the print info
683  // associated with the current name, and then getting its print status.
684  isPrinted[0] = study.parameters.variablesPrintInfo.isPrinted(VCardT::Caption());
685  }
686 };
687 } // namespace
688 
689 template<class ChildT, class NextT, class VCardT>
690 inline void IVariable<ChildT, NextT, VCardT>::getPrintStatusFromStudy(Data::Study& study)
691 {
692  GetPrintStatusHelper<VCardType::columnCount, VCardType>::Do(study, isPrinted);
693  // Go to the next variable
694  NextType::getPrintStatusFromStudy(study);
695 }
696 
697 // =======================================================================
698 // Each output variable supplies the maximum number of columns it takes
699 // in an ouptut report to the variable print info instance
700 // =======================================================================
701 
702 // The class SupplyMaxNbColumnsHelper is used to make a different Do(...) treatment depending on
703 // current VCardType::columnCount : recall that a variable can be single, dynamic or multiple.
704 namespace // anonymous
705 {
706 // Case : the variable is multiple
707 template<int ColumnT, class VCardT>
708 class SupplyMaxNbColumnsHelper
709 {
710 public:
711  static void Do(Data::Study& study, uint maxNumberColumns)
712  {
713  for (uint i = 0; i != VCardT::columnCount; ++i)
714  {
715  study.parameters.variablesPrintInfo.setMaxColumns(VCardT::Multiple::Caption(i),
716  maxNumberColumns);
717  }
718  }
719 };
720 
721 // Case : the variable is single
722 template<class VCardT>
723 class SupplyMaxNbColumnsHelper<Category::singleColumn, VCardT>
724 {
725 public:
726  static void Do(Data::Study& study, uint maxNumberColumns)
727  {
728  study.parameters.variablesPrintInfo.setMaxColumns(VCardT::Caption(), maxNumberColumns);
729  }
730 };
731 
732 // Case : the variable is dynamic
733 template<class VCardT>
734 class SupplyMaxNbColumnsHelper<Category::dynamicColumns, VCardT>
735 {
736 public:
737  static void Do(Data::Study& study, uint maxNumberColumns)
738  {
739  study.parameters.variablesPrintInfo.setMaxColumns(VCardT::Caption(), maxNumberColumns);
740  }
741 };
742 } // namespace
743 
744 template<class ChildT, class NextT, class VCardT>
745 inline void IVariable<ChildT, NextT, VCardT>::supplyMaxNumberOfColumns(Data::Study& study)
746 {
747  auto max_columns = static_cast<const ChildT*>(this)->getMaxNumberColumns();
748  SupplyMaxNbColumnsHelper<VCardType::columnCount, VCardType>::Do(study,
749  static_cast<uint>(max_columns));
750  // Go to the next variable
751  NextType::supplyMaxNumberOfColumns(study);
752 }
753 
754 } // namespace Antares::Solver::Variable
755 
756 #endif // __SOLVER_VARIABLE_VARIABLE_HXX__
Definition for a single area.
Definition: area.h:51
Definition: study.h:57
A single thermal cluster.
Definition: cluster.h:76
Definition: variable-print-info.h:82
Interface for any variable.
Definition: variable.h:47
static void RetrieveVariableList(PredicateT &predicate)
Retrieve the list of all individual variables.
Definition: variable.hxx:630
const StoredResultType & results() const
The results.
Definition: variable.hxx:544
VCardT VCardType
VCard.
Definition: variable.h:56
void simulationEnd()
Notify to all variables that the simulation has finished.
Definition: variable.hxx:132
void hourEnd(State &state, uint hourInTheYear)
Event: A new hour in the year has just ended.
Definition: variable.hxx:257
void yearEnd(uint year)
Notify to all variables that the year is now over.
Definition: variable.hxx:151
void yearEndBuildPrepareDataForEachThermalCluster(State &state, uint year, uint numSpace)
Notify to all variables to prepare data for the close to year end calculations for each thermal clust...
Definition: variable.hxx:178
void hourForEachArea(State &state)
Event: For a given hour in the year, walking through all areas.
Definition: variable.hxx:226
static void provideInformations(I &infos)
"Print" informations about the variable tree
Definition: variable.hxx:361
static void InitializeResultsFromStudy(R &results, Data::Study &study)
Initialize the results of the variable.
Definition: variable.hxx:71
void simulationBegin()
Notify to all variables that the simulation is about to begin.
Definition: variable.hxx:125
void yearEndBuildForEachThermalCluster(State &state, uint year, uint numSpace)
Notify to all variables that the year is close to end.
Definition: variable.hxx:240
void initializeFromArea(Data::Study *study, Data::Area *area)
Initialize the variable with a specific area.
Definition: variable.hxx:78
IVariable()
Default constructor.
Definition: variable.hxx:32
void initializeFromStudy(Data::Study &study)
Initialize the variable.
Definition: variable.hxx:63
void beforeYearByYearExport(uint year, uint numSpace)
Event triggered before exporting a year-by-year survey report.
Definition: variable.hxx:354
void hourBegin(uint hourInTheYear)
Event: A new hour in the year has just began.
Definition: variable.hxx:219
void initializeFromLink(Data::Study *study, Data::AreaLink *link)
Initialize the variable with a specific link between two areas.
Definition: variable.hxx:86
void hourForEachLink(State &state, uint numSpace)
Event: For a given hour in the year, walking through all links.
Definition: variable.hxx:250
void computeSpatialAggregateWith(O &out, uint numSpace)
Compute the spatial cluster with the results of a single variable.
Definition: variable.hxx:383
void initializeFromThermalCluster(Data::Study *study, Data::Area *area, Data::ThermalCluster *cluster)
Initialize the variable with a specific thermal cluster.
Definition: variable.hxx:94
void yearBegin(uint year)
Notify to all variables that a new year is about to start.
Definition: variable.hxx:144
Definition: state.h:71
Class utility for building CSV results files.
Definition: surveyresults.h:41
bool * isPrinted
Same thing for print status (do we print the current output variable ?)
Definition: surveyresults.h:134
bool * isCurrentVarNA
Definition: surveyresults.h:132
Definition: memory.h:38
VariableAccessor< typename VCardT::ResultsType, VCardT::columnCount >::Type ResultsType
The true type used for the results.
Definition: info.h:760