Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
base_post_process.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
#pragma once
22
23
#include <memory>
24
#include <vector>
25
26
#include "antares/solver/simulation/sim_structure_probleme_economique.h"
27
28
using namespace
Antares::Data;
29
using namespace
Antares::Date;
30
using
AdqPatchParams
=
Antares::Data::AdequacyPatch::AdqPatchParams
;
31
32
namespace
Antares::Solver::Simulation
33
{
34
35
struct
optRuntimeData
36
{
37
optRuntimeData
(
unsigned
int
y,
unsigned
int
w,
unsigned
int
h):
38
year(y),
39
week(w),
40
hourInTheYear(h)
41
{
42
}
43
44
unsigned
int
year = 0;
45
unsigned
int
week = 0;
46
unsigned
int
hourInTheYear = 0;
47
};
48
49
class
basePostProcessCommand
50
{
51
public
:
52
virtual
~basePostProcessCommand
() =
default
;
53
virtual
void
execute(
const
optRuntimeData
& opt_runtime_data) = 0;
54
55
protected
:
56
// Memeber functions
57
basePostProcessCommand
(
PROBLEME_HEBDO
* problemeHebdo);
58
59
// Data members
60
PROBLEME_HEBDO
* problemeHebdo_;
61
};
62
63
class
interfacePostProcessList
64
{
65
public
:
66
virtual
~interfacePostProcessList
() =
default
;
67
68
// gp : we should put all these arguments in a structure, so that we pass a structure
69
// gp : to the create(...) method, and to underlying calls to constructors.
70
// gp : In case we need new data for a new post process, we would not have to change
71
// gp : the constructors' signatures of the post process list classes.
72
static
std::unique_ptr<interfacePostProcessList> create(
AdqPatchParams
& adqPatchParams,
73
PROBLEME_HEBDO
* problemeHebdo,
74
uint numSpace,
75
AreaList
& areas,
76
SheddingPolicy sheddingPolicy,
77
SimplexOptimization splxOptimization,
78
Calendar
& calendar);
79
void
runAll(
const
optRuntimeData
& opt_runtime_data);
80
81
protected
:
82
// Member functions
83
interfacePostProcessList
(
PROBLEME_HEBDO
* problemeHebdo, uint numSpace);
84
85
// Data mambers
86
PROBLEME_HEBDO
*
const
problemeHebdo_ =
nullptr
;
87
const
unsigned
int
numSpace_;
88
std::vector<std::unique_ptr<basePostProcessCommand>> post_process_list;
89
};
90
91
}
// namespace Antares::Solver::Simulation
Antares::Data::AreaList
A list of areas.
Definition
area.h:366
Antares::Date::Calendar
Definition
date.h:180
Antares::Solver::Simulation::basePostProcessCommand
Definition
base_post_process.h:50
Antares::Solver::Simulation::interfacePostProcessList
Definition
base_post_process.h:64
Antares::Data::AdequacyPatch::AdqPatchParams
Definition
adq-patch-params.h:91
Antares::Solver::Simulation::optRuntimeData
Definition
base_post_process.h:36
PROBLEME_HEBDO
Definition
sim_structure_probleme_economique.h:403
src
solver
simulation
include
antares
solver
simulation
base_post_process.h
Generated by
1.12.0