Stride Reference Manual
- generated for commit 9643b11
|
Store and handle person data. More...
#include <Person.h>
Public Member Functions | |
Person () | |
Default construction (for population vector). More... | |
Person (unsigned int id, float age, unsigned int householdId, unsigned int k12SchoolId, unsigned int collegeId, unsigned int workId, unsigned int primaryCommunityId, unsigned int secondaryCommunityId) | |
Constructor: set the person data. More... | |
bool | operator!= (const Person &p) const |
Is this person not equal to the given person? More... | |
float | GetAge () const |
Get the age. More... | |
Health & | GetHealth () |
Return person's health status. More... | |
const Health & | GetHealth () const |
Return person's health status. More... | |
unsigned int | GetId () const |
Get the id. More... | |
unsigned int | GetPoolId (const ContactType::Id &poolType) const |
Get ID of contactpool_type. More... | |
bool | IsInPool (const ContactType::Id &poolType) const |
Check if a person is present today in a given contact pool. More... | |
bool | IsSurveyParticipant () const |
Does this person participates in the social contact study? More... | |
void | ParticipateInSurvey () |
Participate in social contact study and log person details. More... | |
void | Update (bool isWorkOff, bool isSchoolOff, bool adaptiveSymptomaticBehavior) |
Update the health status and presence in contact pools. More... | |
void | SetAge (unsigned int newAge) |
Set the age of the person. More... | |
void | SetId (unsigned int id) |
Set the id. More... | |
void | SetPoolId (ContactType::Id type, unsigned int poolId) |
Sets (for the type of ContactPool) the Id of the ContactPool the person belongs to. More... | |
Private Attributes | |
float | m_age |
The age.. More... | |
unsigned int | m_id |
The id. More... | |
ContactType::IdSubscriptArray< unsigned int > | m_pool_ids |
Health info (immune, infected, etc) for this person. More... | |
Health | m_health |
Is person present/absent in pools of each of the types (school, work, etc)? More... | |
ContactType::IdSubscriptArray< bool > | m_in_pools |
Is this a participant in the social contact study? More... | |
bool | m_is_participant |
|
inline |
|
inline |
Constructor: set the person data.
Definition at line 41 of file Person.h.
References m_health, m_in_pools, and m_is_participant.
|
inline |
|
inline |
Get the age.
Definition at line 53 of file Person.h.
References m_age.
Referenced by stride::Immunizer::Cocoon(), stride::DiseaseSeeder::Seed(), stride::SurveySeeder::Seed(), geopop::GeoGridJSONWriter::WritePerson(), and geopop::GeoGridProtoWriter::WritePerson().
|
inline |
Return person's health status.
Definition at line 56 of file Person.h.
References m_health.
Referenced by stride::Immunizer::Cocoon(), stride::Infector< LL, TIC, TO >::Exec(), stride::Infector< LL, TIC, true >::Exec(), stride::DiseaseSeeder::Seed(), and stride::SurveySeeder::Seed().
|
inline |
|
inline |
Get the id.
Definition at line 62 of file Person.h.
References m_id.
Referenced by stride::DiseaseSeeder::Seed(), stride::SurveySeeder::Seed(), geopop::GeoGridJSONWriter::WritePerson(), and geopop::GeoGridProtoWriter::WritePerson().
|
inline |
Get ID of contactpool_type.
Definition at line 65 of file Person.h.
References m_pool_ids.
Referenced by stride::DiseaseSeeder::Seed(), stride::SurveySeeder::Seed(), and geopop::GeoGridJSONWriter::WritePerson().
|
inline |
Check if a person is present today in a given contact pool.
Definition at line 68 of file Person.h.
References m_in_pools.
Referenced by stride::Infector< LL, TIC, TO >::Exec(), and stride::Infector< LL, TIC, true >::Exec().
|
inline |
Does this person participates in the social contact study?
Definition at line 71 of file Person.h.
References m_is_participant.
Referenced by stride::SurveySeeder::Seed().
|
inline |
Participate in social contact study and log person details.
Definition at line 74 of file Person.h.
References m_is_participant, and Update().
Referenced by stride::SurveySeeder::Seed().
void stride::Person::Update | ( | bool | isWorkOff, |
bool | isSchoolOff, | ||
bool | adaptiveSymptomaticBehavior | ||
) |
Update the health status and presence in contact pools.
Definition at line 31 of file Person.cpp.
References stride::MinAdultAge().
Referenced by ParticipateInSurvey().
|
inline |
|
inline |
|
inline |
Sets (for the type of ContactPool) the Id of the ContactPool the person belongs to.
Definition at line 86 of file Person.h.
References m_in_pools, and m_pool_ids.
|
private |
|
private |
The id.
Ids (school, work, etc) of pools you belong to Id value 0 means you do not belong to any pool of that type (e.g. school and work are mutually exclusive).
Definition at line 94 of file Person.h.
Referenced by GetId(), operator!=(), and SetId().
|
private |
Health info (immune, infected, etc) for this person.
Definition at line 98 of file Person.h.
Referenced by GetPoolId(), and SetPoolId().
|
private |
Is person present/absent in pools of each of the types (school, work, etc)?
Definition at line 101 of file Person.h.
Referenced by GetHealth(), and Person().
|
private |
Is this a participant in the social contact study?
Definition at line 104 of file Person.h.
Referenced by IsInPool(), Person(), and SetPoolId().
|
private |
Definition at line 107 of file Person.h.
Referenced by IsSurveyParticipant(), ParticipateInSurvey(), and Person().