21 #ifndef __SOLVER_SIMULATION_SOLVER_H__
22 #define __SOLVER_SIMULATION_SOLVER_H__
26 #include <yuni/job/queue/service.h>
28 #include <antares/benchmarking/DurationCollector.h>
29 #include <antares/logs/logs.h>
30 #include <antares/solver/simulation/ISimulationObserver.h>
31 #include <antares/study/study.h>
32 #include <antares/writer/writer_factory.h>
33 #include "antares/solver/hydro/management/management.h"
34 #include "antares/solver/misc/options.h"
35 #include "antares/solver/simulation/solver_utils.h"
36 #include "antares/solver/variable/state.h"
40 namespace Antares::Solver::Simulation
66 void checkWriter()
const;
80 void writeResults(
bool synthesis, uint year = 0, uint numSpace = 9999);
106 void loopThroughYears(uint firstYear, uint endYear, std::vector<Variable::State>& state);
109 uint pNbYearsReallyPerformed;
111 uint pNbMaxPerformedYearsInParallel;
121 std::map<uint, std::pair<std::string, std::string>> yearSimulationBuffers_;
122 std::mutex buffersMutex_;
130 std::reference_wrapper<ISimulationObserver> simulationObserver_;
131 void storeYearBuffers(uint year, std::string&& firstBuffer, std::string&& secondBuffer);
132 void aggregateAndWriteSimulationTables();
138 #include "solver.hxx"
Definition: i_writer.h:32
The ISimulationObserver class is an interface for observing the simulation.
Definition: ISimulationObserver.h:36
const ::Settings & settings
The global settings.
Definition: solver.h:85
void writeResults(bool synthesis, uint year=0, uint numSpace=9999)
Export the results to disk.
Definition: solver.hxx:366
Antares::Solver::IResultWriter & pResultWriter
Result writer.
Definition: solver.h:128
ISimulation(Data::Study &study, const ::Settings &settings, Benchmarking::DurationCollector &duration_collector, IResultWriter &resultWriter, Simulation::ISimulationObserver &simulationObserver)
Constructor (with a given study)
Definition: solver.hxx:237
void run()
Run the simulation.
Definition: solver.hxx:283
Data::Study & study
Reference to the current study.
Definition: solver.h:83
std::shared_ptr< Yuni::Job::QueueService > pQueueService
The queue service that runs every set of parallel years.
Definition: solver.h:126
~ISimulation()
Destructor.
Definition: solver.hxx:278
Definition: solver_utils.h:84
Definition: solver.hxx:46
Definition: DurationCollector.h:36
Definition: OptimisationsSimulationTable.h:31