21#ifndef __SOLVER_SIMULATION_SOLVER_H__
22#define __SOLVER_SIMULATION_SOLVER_H__
24#include <yuni/job/queue/service.h>
26#include <antares/benchmarking/DurationCollector.h>
27#include <antares/logs/logs.h>
28#include <antares/solver/simulation/ISimulationObserver.h>
29#include <antares/study/study.h>
30#include <antares/writer/writer_factory.h>
31#include "antares/solver/hydro/management/management.h"
32#include "antares/solver/misc/options.h"
33#include "antares/solver/simulation/solver.data.h"
34#include "antares/solver/simulation/solver_utils.h"
35#include "antares/solver/variable/state.h"
37namespace Antares::Solver::Simulation
64 void checkWriter()
const;
78 void writeResults(
bool synthesis, uint year = 0, uint numSpace = 9999);
89 void regenerateTimeSeries(uint year);
96 uint buildSetsOfParallelYears(uint firstYear,
98 std::vector<setOfParallelYears>& setsOfParallelYears);
105 void allocateMemoryForRandomNumbers(
randomNumbers& randomForParallelYears);
114 std::vector<uint>& years,
115 std::map<unsigned int, bool>& isYearPerformed,
128 void computeAnnualCostsStatistics(std::vector<Variable::State>& state,
137 void loopThroughYears(uint firstYear, uint endYear, std::vector<Variable::State>& state);
142 uint pNbYearsReallyPerformed;
144 uint pNbMaxPerformedYearsInParallel;
148 bool pFirstSetParallelWithAPerformedYearWasRun;
162 std::reference_wrapper<ISimulationObserver> simulationObserver_;
MersenneTwister Pseudo random number generator.
Definition mersenne-twister.h:41
Definition solver.data.h:29
The ISimulationObserver class is an interface for observing the simulation.
Definition ISimulationObserver.h:36
const ::Settings & settings
The global settings.
Definition solver.h:83
void writeResults(bool synthesis, uint year=0, uint numSpace=9999)
Export the results to disk.
Definition solver.hxx:357
Antares::Solver::IResultWriter & pResultWriter
Result writer.
Definition solver.h:160
ISimulation(Data::Study &study, const ::Settings &settings, Benchmarking::DurationCollector &duration_collector, IResultWriter &resultWriter, Simulation::ISimulationObserver &simulationObserver)
Constructor (with a given study)
Definition solver.hxx:222
void run()
Run the simulation.
Definition solver.hxx:270
Data::Study & study
Reference to the current study.
Definition solver.h:81
std::shared_ptr< Yuni::Job::QueueService > pQueueService
The queue service that runs every set of parallel years.
Definition solver.h:158
~ISimulation()
Destructor.
Definition solver.hxx:265
Definition solver_utils.h:90
Definition solver_utils.h:193
Definition DurationCollector.h:36
Definition solver_utils.h:34