Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
result.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 __STUDY_RESULT_AGGREGATOR_RESULT_H__
22#define __STUDY_RESULT_AGGREGATOR_RESULT_H__
23
24#include <map>
25
26#include <yuni/yuni.h>
27#include <yuni/core/string.h>
28
29#include <antares/memory/memory.h>
30#include "antares/solver/ts-generator/xcast/studydata.h"
31
32#include "datafile.h"
33#include "studydata.h"
34
35using namespace Yuni;
36
37enum
38{
39 maxSizePerCell = 42,
40};
41
43using CellData = char[maxSizePerCell];
44
46class CellColumnData final
47{
48public:
50
51
60
61public:
63 Antares::Memory::Stored<CellData>::Type rows;
65 uint height;
66
67}; // class CellColumnData
68
69class ResultMatrix final
70{
71public:
73
74
83
87 void resize(uint i);
88
92 bool saveToCSVFile(const Yuni::String& filename) const;
93
94public:
95 CellColumnData* columns;
97 uint width;
100
101}; // class ResultMatrix
102
103using ResultsAllVars = std::vector<ResultMatrix>;
104
105using ResultsForAllTimeLevels = std::map<DataFile::ShortString, ResultsAllVars>;
106using ResultsForAllDataLevels = std::map<DataFile::ShortString, ResultsForAllTimeLevels>;
107
108using ResultsForAllStudyItems = std::map<StudyData::ShortString512, ResultsForAllDataLevels>;
109
110#endif // __STUDY_RESULT_AGGREGATOR_RESULT_H__
A single column.
Definition result.h:47
uint height
The height of the column.
Definition result.h:65
~CellColumnData()
Destructor.
Definition result.cpp:52
CellColumnData()
Default constructor.
Definition result.cpp:42
Antares::Memory::Stored< CellData >::Type rows
All rows.
Definition result.h:63
Definition result.h:70
void resize(uint i)
Resize the pseudo matrix.
Definition result.cpp:75
bool saveToCSVFile(const Yuni::String &filename) const
Export the content of the matrix into a CSV file.
Definition result.cpp:82
ResultMatrix()
Default constructor.
Definition result.cpp:56
uint width
Width of the matrix.
Definition result.h:97
~ResultMatrix()
Destructor.
Definition result.cpp:70
uint heightAfterAggregation
Valid Height found after aggregation.
Definition result.h:99