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;
78 std::string
name()
override {
return context_.identifier(); }
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 Simulation runtime context data type.
Definition runtime_context.h:22
Defines the SimulationModule factory data type.
Definition modulefactory.h:21
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
adevs::Time update(adevs::SimEnv< int > *env) override
Called to assign a new state to the model at current time.
Definition simulation.cpp:97
void fini(adevs::Time clock) override
Called after the model has been removed from the simulation executive.
Definition simulation.cpp:130
adevs::Time init(adevs::SimEnv< int > *env) override
Called when the model is added to the simulation executive.
Definition simulation.cpp:54
void setup_run(unsigned int run_number, unsigned int seed) noexcept
Set up a new simulation run.
Definition simulation.cpp:49
Gender
Enumerates gender types.
Definition forward_type.h:18
Top-level namespace for Health-GPS Console host application.
Definition command_options.cpp:9
ScenarioType
Health GPS policy scenario types enumeration.
Definition scenario.h:17
AgeGenderTable< int > IntegerAgeGenderTable
Age and Gender lookup table for integer values.
Definition gender_table.h:177
Defines a virtual population person data type.
Definition person.h:39