Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
output.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 __ANTARES_LIBS_STUDY_OUTPUT_H__
22#define __ANTARES_LIBS_STUDY_OUTPUT_H__
23
24#include <functional>
25#include <map>
26#include <memory>
27
28#include <yuni/yuni.h>
29#include <yuni/core/string.h>
30
31#include "antares/study/study.h"
32
33namespace Antares
34{
35namespace Data
36{
37
38// TODO VP: remove with GUI
39class Output final
40{
41public:
43 using Ptr = std::shared_ptr<Output>;
45 using List = std::list<Ptr>;
47 using Title = Yuni::CString<128, false>;
49 using Name = Yuni::CString<128, false>;
50
52 using MapByTimestamp = std::map<int64_t, Ptr>;
54 using MapByTimestampDesc = std::map<int64_t, Ptr, std::greater<int64_t>>;
55
56public:
60 static void RetrieveListFromStudy(List& out, const Study& study);
61
62public:
64
65
68 explicit Output(const AnyString& folder);
70
74 bool loadFromFolder(const AnyString& folder);
75
77 bool valid() const;
78
80 bool operator<(const Output& rhs) const;
81
82public:
86 int64_t timestamp;
88 Data::SimulationMode mode;
90 int menuID;
95
101 YString path;
102
103}; // class Output
104
105} // namespace Data
106} // namespace Antares
107
108#include "output.hxx"
109
110#endif // __ANTARES_STUDY_LIBS_OUTPUT_H__
Definition output.h:40
Yuni::CString< 128, false > Name
Name.
Definition output.h:49
int viewMenuID
Tag for storing a wx menu id (from the menu output)
Definition output.h:92
std::map< int64_t, Ptr, std::greater< int64_t > > MapByTimestampDesc
Map of study output info, ordered by their timestamp (desc)
Definition output.h:54
Data::SimulationMode mode
Mode (economy/adequacy/other)
Definition output.h:88
Title title
Title to use for visual representation of the output.
Definition output.h:97
std::list< Ptr > List
List.
Definition output.h:45
Yuni::CString< 128, false > Title
Title.
Definition output.h:47
int64_t timestamp
Date/time when the simulation has been launched.
Definition output.h:86
bool operator<(const Output &rhs) const
Operator <.
Definition output.hxx:28
StudyVersion version
Version of the solver used for the simulation.
Definition output.h:84
bool valid() const
Get if the output folder previously loaded is valid.
Definition output.cpp:104
Output(const AnyString &folder)
Constructor, with an output folder.
Definition output.cpp:94
bool loadFromFolder(const AnyString &folder)
Load data from an output folder.
Definition output.cpp:110
std::shared_ptr< Output > Ptr
Smartptr.
Definition output.h:43
Name name
Name.
Definition output.h:99
int outputViewerID
Tag for storing a wx menu id (for the output viewer)
Definition output.h:94
static void RetrieveListFromStudy(List &out, const Study &study)
Retrieve the list of all available outputs.
Definition output.cpp:195
std::map< int64_t, Ptr > MapByTimestamp
Map of study output info, ordered by their timestamp.
Definition output.h:52
YString path
Output folder.
Definition output.h:101
int menuID
Tag for storing a wx menu id.
Definition output.h:90
Version of a study.
Definition version.h:36
Definition study.h:61