Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
common-eco-adq.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_SIMULATION_COMMON_ECONOMY_ADEQUACY_H__
22#define __SOLVER_SIMULATION_COMMON_ECONOMY_ADEQUACY_H__
23
24#include <vector>
25
26#include <antares/study/study.h>
27#include "antares/solver/optimisation/opt_fonctions.h"
28#include "antares/solver/simulation/solver.h" // for definition of type yearRandomNumbers
29#include "antares/solver/variable/economy/all.h"
30#include "antares/solver/variable/economy/dispatchable-generation-margin.h" // for OP.MRG
31#include "antares/solver/variable/variable.h"
32
33namespace Antares
34{
35namespace Solver
36{
37namespace Simulation
38{
39// We use the namespace 'economy' here. That means it is mandatory
40// that adequacy has the same variable (to get the same type)
41typedef Solver::Variable::Economy::VCardBalance AvgExchangeVCardBalance;
43
52void PrepareRandomNumbers(Data::Study& study,
53 PROBLEME_HEBDO& problem,
54 yearRandomNumbers& randomForYear);
55
56void SetInitialHydroLevel(Data::Study& study,
57 PROBLEME_HEBDO& problem,
58 const HYDRO_VENTILATION_RESULTS& hydroVentilationResults);
59
60void BuildThermalPartOfWeeklyProblem(Data::Study& study,
61 PROBLEME_HEBDO& problem,
62 const int PasDeTempsDebut,
63 std::vector<std::vector<double>>& thermalNoises,
64 unsigned int year);
65
74bool ShouldUseQuadraticOptimisation(const Data::Study& study);
75
79void ComputeFlowQuad(Data::Study& study,
80 PROBLEME_HEBDO& problem,
81 const std::vector<AvgExchangeResults*>& balance,
82 unsigned int nbWeeks);
83
91void RemixHydroForAllAreas(const Data::AreaList& areas,
92 PROBLEME_HEBDO& problem,
93 Data::SheddingPolicy sheddingPolicy,
94 Data::SimplexOptimization splxOptimization,
95 uint numSpace,
96 uint hourInYear);
97
98/*
99** \brief Interpolates water values related to reservoir levels for outputs only
100**
101** \param areas : the areas of study
102** \param problem The weekly problem, from the solver
103*point of weekly simulation)
104** \param hourInYear The hour in the year of the first hour in the current week
105**
106** For any hour, the computed water values are related to the beginning of the hour, not the end.
107*/
108void interpolateWaterValue(const Data::AreaList& areas,
109 PROBLEME_HEBDO& problem,
110 const Date::Calendar& calendar,
111 int hourInTheYear);
112
113/*
114** \brief Updating the weekly simulation final reservoir level, to be used as a start for the next
115*week.
116**
117** \param areas : the areas of study
118** \param problem The weekly problem, from the solver
119*/
120void updatingWeeklyFinalHydroLevel(const Data::AreaList& areas, PROBLEME_HEBDO& problem);
121
122/*
123** \brief Compute the weighted average NTC for a link
124**
125** \param areas : the areas of study
126** \param link The link
127** \param Weighted average NTC for the direct direction
128** \param Weighted average NTC for the indirect direction
129*/
130int retrieveAverageNTC(const Data::Study& study,
131 const Matrix<>& capacities,
132 const Data::TimeSeriesNumbers& tsNumbers,
133 std::vector<double>& avg);
134
135void finalizeOptimizationStatistics(PROBLEME_HEBDO& problem,
137
138OptimizationOptions createOptimizationOptions(const Data::Study& study);
139
140} // namespace Simulation
141} // namespace Solver
142} // namespace Antares
143
144#endif // __SOLVER_SIMULATION_COMMON_ECONOMY_ADEQUACY_H__
A list of areas.
Definition area.h:366
Definition study.h:61
Definition series.h:42
Definition date.h:180
A n-by-n matrix.
Definition jit.h:30
VariableAccessor< typenameVCardT::ResultsType, VCardT::columnCount >::Type ResultsType
The true type used for the results.
Definition info.h:764
Definition sim_structure_probleme_economique.h:403