Antares Simulator
Power System Simulator
results.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_VARIABLE_STORAGE_RESULTS_H__
22 #define __SOLVER_VARIABLE_STORAGE_RESULTS_H__
23 
24 #include <antares/study/study.h>
25 
26 #include "../categories.h"
27 #include "fwd.h"
28 #include "intermediate.h"
29 
30 namespace Antares::Solver::Variable
31 {
32 template<class FirstDecoratorT = Empty, // The first decorator for the results
33  template<class, int> class DecoratorForSpatialAggregateT = R::AllYears::Raw>
34 class Results;
35 
42 template<class FirstDecoratorT, template<class, int> class DecoratorForSpatialAggregateT>
43 class Results: public FirstDecoratorT
44 {
45 public:
47  typedef FirstDecoratorT DecoratorType;
48 
49  enum
50  {
52  count = DecoratorType::count,
53  };
54 
55  enum
56  {
57  categoryFile = FirstDecoratorT::categoryFile,
58  };
59 
60 public:
65 
69  void reset();
70 
74  void merge(uint year, const IntermediateValues& data);
75 
76  template<class S, class VCardT>
77  void buildSurveyReport(SurveyResults& report,
78  const S& results,
79  int dataLevel,
80  int fileLevel,
81  int precision) const;
82 
83  template<class VCardT>
84  void buildDigest(SurveyResults& results, int digestLevel, int dataLevel) const
85  {
86  // Next
87  DecoratorType::template buildDigest<VCardT>(results, digestLevel, dataLevel);
88  }
89 
90  Antares::Memory::Stored<double>::ConstReturnType hourlyValuesForSpatialAggregate() const
91  {
92  return DecoratorType::template hourlyValuesForSpatialAggregate<
93  DecoratorForSpatialAggregateT>();
94  }
95 
96 }; // class Results
97 
98 } // namespace Antares::Solver::Variable
99 
100 #include "average.h"
101 #include "empty.h"
102 #include "minmax.h"
103 #include "raw.h"
104 #include "results.hxx"
105 #include "stdDeviation.h"
106 
107 #endif // __SOLVER_VARIABLE_STORAGE_RESULTS_H__
Definition: study.h:57
Definition: results.h:44
@ count
The count if item in the list.
Definition: results.h:52
void reset()
Reset all values.
Definition: results.hxx:59
void initializeFromStudy(Antares::Data::Study &)
Initialize result outputs from study.
Definition: results.hxx:27
void merge(uint year, const IntermediateValues &data)
Merge the intermediate values.
Definition: results.hxx:51
FirstDecoratorT DecoratorType
Type of the first decorator.
Definition: results.h:47
bool Empty()
Get if some jobs are still running.
Definition: action.cpp:149