Health-GPS
1.2.2.0
Global Health Policy Simulation model (Health-GPS)
|
Defines the simulation executive data type class. More...
#include <modelrunner.h>
Public Member Functions | |
ModelRunner ()=delete | |
ModelRunner (EventAggregator &bus, std::unique_ptr< RandomBitGenerator > generator) noexcept | |
Initialises a new instance of the ModelRunner class. More... | |
double | run (Simulation &baseline, const unsigned int trial_runs) |
Run an experiment for baseline scenario only. More... | |
double | run (Simulation &baseline, Simulation &intervention, const unsigned int trial_runs) |
Run an experiment for baseline and intervention scenarios. More... | |
bool | is_running () const noexcept |
Gets a value indicating whether an experiment is current running. More... | |
void | cancel () noexcept |
Cancel a running experiment. More... | |
Defines the simulation executive data type class.
The simulation executive holds the simulation engine instances and manages the execution of experiments by completing multiple runs of the same scenario. The executive controls the number of runs required, current run number, progress notifications, random number generator seeds for each run, and the parallel evaluation for the two scenarios..
Health-GPS uses a simpler version of adevs (A Discrete EVent System simulator) library (https://sourceforge.net/projects/bdevs), which contain only four header files, but provides an intuitive modelling interface for agent-based models, without requiring familiarity with the full aspects of the DEVS formalism.
|
delete |
|
noexcept |
Initialises a new instance of the ModelRunner class.
bus | The message bus instance to use for notification |
generator | Random number generator for runs management |
|
noexcept |
Cancel a running experiment.
|
noexcept |
Gets a value indicating whether an experiment is current running.
double hgps::ModelRunner::run | ( | Simulation & | baseline, |
const unsigned int | trial_runs | ||
) |
Run an experiment for baseline scenario only.
baseline | The simulation engine instance |
trial_runs | Experiment number of runs |
std::invalid_argument | for non-baseline scenario type or negative number of runs. |
double hgps::ModelRunner::run | ( | Simulation & | baseline, |
Simulation & | intervention, | ||
const unsigned int | trial_runs | ||
) |
Run an experiment for baseline and intervention scenarios.
baseline | The simulation engine instance for baseline scenario |
intervention | The simulation engine instance for intervention scenario |
trial_runs | Experiment number of runs |
std::invalid_argument | for scenario type mismatch or negative number of runs. |