10#include <adevs/adevs.h>
34 std::shared_ptr<const EventAggregator> bus,
35 std::shared_ptr<const ModelInput> inputs,
36 std::unique_ptr<Scenario> scenario);
44 adevs::Time
init(adevs::SimEnv<int> *env)
override;
49 adevs::Time
update(adevs::SimEnv<int> *env)
override;
61 adevs::Time
update(adevs::SimEnv<int> *env, std::vector<int> &x)
override;
65 void fini(adevs::Time clock)
override;
70 void setup_run(
unsigned int run_number,
unsigned int seed)
noexcept;
82 std::shared_ptr<UpdatableModule> ses_;
83 std::shared_ptr<DemographicModule> demographic_;
84 std::shared_ptr<RiskFactorHostModule> risk_factor_;
85 std::shared_ptr<DiseaseModule> disease_;
86 std::shared_ptr<UpdatableModule> analysis_;
87 adevs::Time end_time_;
89 void initialise_population();
90 void update_population();
91 void print_initial_population_statistics();
93 void update_net_immigration();
97 void apply_net_migration(
int net_value,
unsigned int age,
const core::Gender &gender);
100 std::map<std::string, core::UnivariateSummary> create_input_data_summary()
const;
102 static Person partial_clone_entity(
const Person &source)
noexcept;
Defines the age and gender lookup table data type.
Definition gender_table.h:120
Defines the Simulation runtime context data type.
Definition runtime_context.h:22
const std::string & identifier() const noexcept
Gets the simulation identifier for outside world messages.
Definition runtime_context.cpp:43
Scenario & scenario() const noexcept
Gets a reference to the simulation scenario instance.
Definition runtime_context.cpp:27
virtual ScenarioType type() const noexcept=0
Gets the scenario type identifier.
Defines the SimulationModule factory data type.
Definition modulefactory.h:21
Defines the simulation engine data type class.
Definition simulation.h:24
virtual ~Simulation()=default
Destroys a simulation instance.
ScenarioType type() noexcept
Gets the simulation type.
Definition simulation.h:74
std::string name() override
Gets the simulation name.
Definition simulation.h:78
void fini(adevs::Time clock) override
Called after the model has been removed from the simulation executive.
Definition simulation.cpp:126
adevs::Time init(adevs::SimEnv< int > *env) override
Called when the model is added to the simulation executive.
Definition simulation.cpp:50
void setup_run(unsigned int run_number, unsigned int seed) noexcept
Set up a new simulation run.
Definition simulation.cpp:45
Gender
Enumerates gender types.
Definition forward_type.h:18
Top-level namespace for Health-GPS Console host application.
Definition command_options.cpp:8
@ update
Simulation time has updated, time = time + 1.
ScenarioType
Health GPS policy scenario types enumeration.
Definition scenario.h:17
Defines a virtual population person data type.
Definition person.h:39