Antares Simulator
Power System Simulator
results.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_STORAGE_RESULTS_HXX__
22 #define __SOLVER_VARIABLE_STORAGE_RESULTS_HXX__
23 
24 namespace Antares::Solver::Variable
25 {
26 template<class FirstDecoratorT, template<class, int> class DecoratorForSpatialAggregateT>
28  Antares::Data::Study& study)
29 {
30  DecoratorType::initializeFromStudy(study);
31 }
32 
33 template<class FirstDecoratorT, template<class, int> class DecoratorForSpatialAggregateT>
34 template<class S, class VCardT>
36  SurveyResults& report,
37  const S& results,
38  int dataLevel,
39  int fileLevel,
40  int precision) const
41 {
42  // Ask to fullfil the report to the first decorator
43  DecoratorType::template buildSurveyReport<S, VCardT>(report,
44  results,
45  dataLevel,
46  fileLevel,
47  precision);
48 }
49 
50 template<class FirstDecoratorT, template<class, int> class DecoratorForSpatialAggregateT>
52  uint year,
53  const IntermediateValues& data)
54 {
55  DecoratorType::merge(year, data);
56 }
57 
58 template<class FirstDecoratorT, template<class, int> class DecoratorForSpatialAggregateT>
60 {
61  DecoratorType::reset();
62 }
63 
64 } // namespace Antares::Solver::Variable
65 
66 #endif // __SOLVER_VARIABLE_STORAGE_RESULTS_HXX__
Definition: study.h:57
Temporary buffer for allocating results for a single year.
Definition: intermediate.h:42
Definition: results.h:44
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
Class utility for building CSV results files.
Definition: surveyresults.h:41