Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
results.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 __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
30namespace Antares
31{
32namespace Solver
33{
34namespace Variable
35{
36template<class FirstDecoratorT = Empty, // The first decorator for the results
37 template<class, int> class DecoratorForSpatialAggregateT = R::AllYears::Raw>
38class Results;
39
46template<class FirstDecoratorT, template<class, int> class DecoratorForSpatialAggregateT>
47class Results: public FirstDecoratorT
48{
49public:
51 typedef FirstDecoratorT DecoratorType;
52
53 enum
54 {
56 count = DecoratorType::count,
57 };
58
59 enum
60 {
61 categoryFile = FirstDecoratorT::categoryFile,
62 };
63
64public:
69
73 void reset();
74
78 void merge(uint year, const IntermediateValues& data);
79
80 template<class S, class VCardT>
81 void buildSurveyReport(SurveyResults& report,
82 const S& results,
83 int dataLevel,
84 int fileLevel,
85 int precision) const;
86
87 template<class VCardT>
88 void buildDigest(SurveyResults& results, int digestLevel, int dataLevel) const
89 {
90 // Next
91 DecoratorType::template buildDigest<VCardT>(results, digestLevel, dataLevel);
92 }
93
94 Antares::Memory::Stored<double>::ConstReturnType hourlyValuesForSpatialAggregate() const
95 {
96 return DecoratorType::template hourlyValuesForSpatialAggregate<
97 DecoratorForSpatialAggregateT>();
98 }
99
100}; // class Results
101
102} // namespace Variable
103} // namespace Solver
104} // namespace Antares
105
106#include "average.h"
107#include "empty.h"
108#include "minmax.h"
109#include "raw.h"
110#include "results.hxx"
111#include "stdDeviation.h"
112
113#endif // __SOLVER_VARIABLE_STORAGE_RESULTS_H__
Definition study.h:61
Definition results.h:48
void reset()
Reset all values.
Definition results.hxx:63
@ count
The count if item in the list.
Definition results.h:56
FirstDecoratorT DecoratorType
Type of the first decorator.
Definition results.h:51
void initializeFromStudy(Antares::Data::Study &)
Initialize result outputs from study.
Definition results.hxx:31
void merge(uint year, const IntermediateValues &data)
Merge the intermediate values.
Definition results.hxx:55
Definition variable.h:25
bool Empty()
Get if some jobs are still running.
Definition action.cpp:140