Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
economy.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_ECONOMY_H__
22#define __SOLVER_SIMULATION_ECONOMY_H__
23
24#include "antares/infoCollection/StudyInfoCollector.h"
25#include "antares/solver/optimisation/weekly_optimization.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/economy/all.h"
29#include "antares/solver/variable/state.h"
30#include "antares/solver/variable/variable.h"
31
32#include "base_post_process.h"
33
34namespace Antares::Solver::Simulation
35{
37{
38public:
40 static const char* Name()
41 {
42 return "economy";
43 }
44
45public:
47
48
54 IResultWriter& resultWriter,
55 Simulation::ISimulationObserver& simulationObserver);
57 ~Economy() = default;
59
60 Benchmarking::OptimizationInfo getOptimizationInfo() const;
61
62public:
69
70protected:
71 void setNbPerformedYearsInParallel(uint nbMaxPerformedYearsInParallel);
72
73 bool simulationBegin();
74
75 bool year(Progression::Task& progression,
76 Variable::State& state,
77 uint numSpace,
78 yearRandomNumbers& randomForYear,
79 std::list<uint>& failedWeekList,
80 bool isFirstPerformedYearOfSimulation,
81 const HYDRO_VENTILATION_RESULTS&,
83 const Antares::Data::Area::ScratchMap& scratchmap);
84
85 void incrementProgression(Progression::Task& progression);
86
87 void simulationEnd();
88
92 void prepareClustersInMustRunMode(Data::Area::ScratchMap& scratchmap, uint year);
93
94 void initializeState(Variable::State& state, uint numSpace);
95
96private:
97 uint pNbWeeks;
98 uint pStartTime;
99 uint pNbMaxPerformedYearsInParallel;
100 std::vector<PROBLEME_HEBDO> pProblemesHebdo;
101 std::vector<Optimization::WeeklyOptimization> weeklyOptProblems_;
102 std::vector<std::unique_ptr<interfacePostProcessList>> postProcessesList_;
103 IResultWriter& resultWriter;
104 std::reference_wrapper<Simulation::ISimulationObserver> simulationObserver_;
105}; // class Economy
106
107} // namespace Antares::Solver::Simulation
108
109#endif // __SOLVER_SIMULATION_ECONOMY_H__
Definition study.h:61
Definition i_writer.h:34
Definition progression.h:91
Data::Study & study
Current study.
Definition economy.h:64
bool preproOnly
Prepro only.
Definition economy.h:68
static const char * Name()
Name of the type of simulation.
Definition economy.h:40
void prepareClustersInMustRunMode(Data::Area::ScratchMap &scratchmap, uint year)
Prepare clusters in 'must-run' mode.
Definition economy.cpp:270
Solver::Variable::Economy::AllVariables variables
All variables.
Definition economy.h:66
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