Health-GPS
1.2.2.0
Global Health Policy Simulation model (Health-GPS)
|
Defines the simulation engine data type class. More...
#include <healthgps.h>
Public Member Functions | |
HealthGPS ()=delete | |
HealthGPS (SimulationDefinition &&definition, SimulationModuleFactory &factory, EventAggregator &bus) | |
Initialises a new instance of the HealthGPS class. More... | |
void | initialize () override |
Initialises the simulation experiment. More... | |
void | terminate () override |
Terminates the simulation experiment. More... | |
adevs::Time | init (adevs::SimEnv< int > *env) override |
Called when the model is added to the simulation executive. More... | |
adevs::Time | update (adevs::SimEnv< int > *env) override |
Called to assign a new state to the model at current time. More... | |
adevs::Time | update (adevs::SimEnv< int > *env, std::vector< int > &x) override |
Called to assign a new state to the model at current time, when input is present. More... | |
void | fini (adevs::Time clock) override |
Called after the model has been removed from the simulation executive. More... | |
void | setup_run (unsigned int run_number) noexcept override |
Set-up a new simulation run with default seed. More... | |
void | setup_run (unsigned int run_number, unsigned int seed) noexcept override |
Set-up a new simulation run. More... | |
![]() | |
Simulation ()=delete | |
Simulation (SimulationDefinition &&definition) | |
Initialises a new instance of the Simulation class. More... | |
virtual | ~Simulation ()=default |
Destroys a simulation instance. More... | |
ScenarioType | type () noexcept |
Gets the simulation type. More... | |
std::string | name () override |
Gets the simulation name. More... | |
Additional Inherited Members | |
![]() | |
SimulationDefinition | definition_ |
Defines the simulation engine data type class.
The simulation engine holds the modules instances and run-time context, manages the simulation clock and core algorithm sequencing.
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 |
|
explicit |
Initialises a new instance of the HealthGPS class.
definition | The simulation definition instance |
factory | The simulation modules factory instance |
bus | The message bus instance to use |
|
override |
Called after the model has been removed from the simulation executive.
clock | The time at which the model no longer exists. |
|
override |
Called when the model is added to the simulation executive.
env | The simulation executive environment |
|
overridevirtual |
Initialises the simulation experiment.
Implements hgps::Simulation.
|
overridevirtualnoexcept |
Set-up a new simulation run with default seed.
run_number | The run number |
Implements hgps::Simulation.
|
overridevirtualnoexcept |
Set-up a new simulation run.
run_number | The run number |
run_seed | The custom seed for random number generation |
Implements hgps::Simulation.
|
overridevirtual |
Terminates the simulation experiment.
Implements hgps::Simulation.
|
override |
Called to assign a new state to the model at current time.
env | The simulation executive environment |
|
override |
Called to assign a new state to the model at current time, when input is present.
This is not used with Health-GPS, the individuals are independent and nobody sends messages. If needed by future scenarios, e.g., agent-based models, the input was generated in the previous simulation instant and so this calculates the new state using state information from the previous instant.
env | The simulation executive environment |
x | Messages sent to the model. |