53 Person(std::size_t
id)
noexcept;
62 void set_id(std::size_t
id)
noexcept;
72 std::size_t
id() const noexcept;
184 void emigrate(const
unsigned int time);
189 void die(const
unsigned int time);
193 bool is_alive_{
true};
194 bool has_emigrated_{
false};
195 unsigned int time_of_death_{};
196 unsigned int time_of_migration_{};
198 static std::map<core::Identifier, std::function<double(
const Person &)>> current_dispatcher;
Sector
Enumerates sector types.
Definition forward_type.h:39
Gender
Enumerates gender types.
Definition forward_type.h:18
Income
Enumerates income categories.
Definition forward_type.h:51
Top-level namespace for Health-GPS Console host application.
Definition command_options.cpp:8
DiseaseStatus
Disease status enumeration.
Definition person.h:11
@ free
Declared free from condition.
@ active
Current with the condition.
Global namespace.
Definition column_iterator.h:123
Defines the disease history data type.
Definition person.h:20
DiseaseStatus status
The disease current status.
Definition person.h:22
int start_time
Disease start time.
Definition person.h:25
Disease clone() const noexcept
Clone a disease history entry.
Definition person.h:32
int time_since_onset
Disease time since onset (cancer disease only)
Definition person.h:28
Defines a virtual population person data type.
Definition person.h:39
bool has_emigrated() const noexcept
Determine if a Person has emigrated from the population.
Definition person.cpp:49
std::map< core::Identifier, Disease > diseases
Diseases history and current status.
Definition person.h:112
float sector_to_value() const
Gets the sector enumeration as a number.
Definition person.cpp:97
unsigned int time_of_death() const noexcept
Gets the time of death, for dead, non-alive individuals only.
Definition person.cpp:51
float region_to_value() const
Gets the region as a numeric value for analysis.
Definition person.cpp:125
void set_id(std::size_t id) noexcept
Set the person identifier (Population use when placing or recycling slots).
Definition person.cpp:43
float income_to_value() const
Gets the income enumeration as a number.
Definition person.cpp:108
core::Gender gender
The assigned gender.
Definition person.h:75
double ses
Social-economic status (SES) assigned value.
Definition person.h:106
std::size_t id() const noexcept
Gets this instance unique identifier.
Definition person.cpp:45
std::string gender_to_string() const
Gets the gender enumeration name string.
Definition person.cpp:88
std::string region
Region category (dynamically assigned from CSV)
Definition person.h:84
bool is_alive() const noexcept
Determine if a Person is current alive.
Definition person.cpp:47
double get_risk_factor_value(const core::Identifier &key) const
Gets a risk factor current value.
Definition person.cpp:57
double physical_activity
Physical activity level.
Definition person.h:103
std::size_t income_adjustment_stratum
Income adjustment stratum index (0..N-1) for optional stratum-specific factors mean.
Definition person.h:97
void emigrate(const unsigned int time)
Emigrate this instance from the virtual population.
Definition person.cpp:163
bool has_income_adjustment_stratum
Whether income_adjustment_stratum has been assigned for this simulation step.
Definition person.h:100
double income_continuous
Continuous income value (for FINCH approach)
Definition person.h:93
float ethnicity_to_value() const
Gets the ethnicity as a numeric value for analysis.
Definition person.cpp:144
bool has_assigned_id() const noexcept
Whether Population has assigned a lifetime ID to this instance.
Definition person.h:65
unsigned int time_of_migration() const noexcept
Gets the time of migration, for emigrated individuals only.
Definition person.cpp:53
core::Sector sector
Sector (region) assigned value.
Definition person.h:81
std::map< core::Identifier, double > risk_factors
Current risk factors values.
Definition person.h:109
bool is_active() const noexcept
Gets a value indicating whether a Person is current active in the population.
Definition person.cpp:55
std::string ethnicity
Ethnicity category (dynamically assigned from CSV)
Definition person.h:87
float gender_to_value() const
Gets the gender enumeration as a number for analysis.
Definition person.cpp:79
unsigned int age
Current age in years.
Definition person.h:78
Person()
Initialise a new instance without an assigned ID (unassigned_id).
core::Income income
Income category.
Definition person.h:90
void die(const unsigned int time)
Mark this instance as dead.
Definition person.cpp:172
bool over_18() const noexcept
Check if person is an adult (18 or over)
Definition person.cpp:95
static constexpr std::size_t unassigned_id
Sentinel returned by default constructors until Population assigns an ID.
Definition person.h:49