Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
adequacy.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_ADEQUACY_H__
22#define __SOLVER_SIMULATION_ADEQUACY_H__
23
24#include "antares/infoCollection/StudyInfoCollector.h"
25#include "antares/solver/simulation/common-eco-adq.h"
26#include "antares/solver/simulation/opt_time_writer.h"
27#include "antares/solver/simulation/solver.h" // for definition of type yearRandomNumbers
28#include "antares/solver/variable/adequacy/all.h"
29#include "antares/solver/variable/economy/all.h"
30#include "antares/solver/variable/state.h"
31#include "antares/solver/variable/variable.h"
32
33namespace Antares::Solver::Simulation
34{
36{
37public:
39 static const char* Name()
40 {
41 return "adequacy";
42 }
43
45
46
52 IResultWriter& resultWriter,
53 Simulation::ISimulationObserver& simulationObserver);
55 ~Adequacy() = default;
57
58 Benchmarking::OptimizationInfo getOptimizationInfo() const;
59
65 bool preproOnly = false;
66
67protected:
68 void setNbPerformedYearsInParallel(uint nbMaxPerformedYearsInParallel);
69
70 bool simulationBegin();
71
72 bool year(Progression::Task& progression,
73 Variable::State& state,
74 uint numSpace,
75 yearRandomNumbers& randomForYear,
76 std::list<uint>& failedWeekList,
77 bool isFirstPerformedYearOfSimulation,
78 const HYDRO_VENTILATION_RESULTS&,
80 const Antares::Data::Area::ScratchMap& scratchmap);
81
82 void incrementProgression(Progression::Task& progression) const;
83
84 void simulationEnd();
85
89 void prepareClustersInMustRunMode(Data::Area::ScratchMap& scratchmap, uint year);
90
91 void initializeState(Variable::State& state, uint numSpace);
92
93private:
94 bool simplexIsRequired(uint hourInTheYear,
95 uint numSpace,
96 const HYDRO_VENTILATION_RESULTS&) const;
97
98 uint pNbWeeks;
99 uint pStartTime;
100 uint pNbMaxPerformedYearsInParallel;
101 std::vector<PROBLEME_HEBDO> pProblemesHebdo;
102 Matrix<> pRES;
103 IResultWriter& resultWriter;
104
105 std::reference_wrapper<Simulation::ISimulationObserver> simulationObserver_;
106}; // class Adequacy
107
108} // namespace Antares::Solver::Simulation
109
110#endif // __SOLVER_SIMULATION_ADEQUACY_H__
Definition study.h:61
A n-by-n matrix.
Definition jit.h:30
Definition i_writer.h:34
Definition progression.h:91
Solver::Variable::Adequacy::AllVariables variables
All variables.
Definition adequacy.h:63
Data::Study & study
Current study.
Definition adequacy.h:61
Adequacy(Data::Study &study, IResultWriter &resultWriter, Simulation::ISimulationObserver &simulationObserver)
Constructor.
Definition adequacy.cpp:32
bool preproOnly
Prepro only.
Definition adequacy.h:65
void prepareClustersInMustRunMode(Data::Area::ScratchMap &scratchmap, uint year)
Prepare clusters in 'must-run' mode.
Definition adequacy.cpp:401
static const char * Name()
Name of the type of simulation.
Definition adequacy.h:39
The ISimulationObserver class is an interface for observing the simulation.
Definition ISimulationObserver.h:36
Static list for all output variables.
Definition container.h:44
Definition opt_time_writer.h:30
Definition StudyInfoCollector.h:61