Stride Reference Manual  - generated for commit 9643b11
stride::Person Class Reference

Store and handle person data. More...

#include <Person.h>

Collaboration diagram for stride::Person:
Collaboration graph

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...
 
HealthGetHealth ()
 Return person's health status. More...
 
const HealthGetHealth () 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
 

Detailed Description

Store and handle person data.

Definition at line 34 of file Person.h.

Constructor & Destructor Documentation

stride::Person::Person ( )
inline

Default construction (for population vector).

Definition at line 38 of file Person.h.

stride::Person::Person ( unsigned int  id,
float  age,
unsigned int  householdId,
unsigned int  k12SchoolId,
unsigned int  collegeId,
unsigned int  workId,
unsigned int  primaryCommunityId,
unsigned int  secondaryCommunityId 
)
inline

Constructor: set the person data.

Definition at line 41 of file Person.h.

References m_health, m_in_pools, and m_is_participant.

Member Function Documentation

bool stride::Person::operator!= ( const Person p) const
inline

Is this person not equal to the given person?

Definition at line 50 of file Person.h.

References m_id.

float stride::Person::GetAge ( ) const
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().

Here is the caller graph for this function:

Health& stride::Person::GetHealth ( )
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().

Here is the caller graph for this function:

const Health& stride::Person::GetHealth ( ) const
inline

Return person's health status.

Definition at line 59 of file Person.h.

References m_health.

unsigned int stride::Person::GetId ( ) const
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().

Here is the caller graph for this function:

unsigned int stride::Person::GetPoolId ( const ContactType::Id poolType) const
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().

Here is the caller graph for this function:

bool stride::Person::IsInPool ( const ContactType::Id poolType) const
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().

Here is the caller graph for this function:

bool stride::Person::IsSurveyParticipant ( ) const
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().

Here is the caller graph for this function:

void stride::Person::ParticipateInSurvey ( )
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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void stride::Person::SetAge ( unsigned int  newAge)
inline

Set the age of the person.

Definition at line 80 of file Person.h.

References m_age.

void stride::Person::SetId ( unsigned int  id)
inline

Set the id.

Definition at line 83 of file Person.h.

References m_id.

void stride::Person::SetPoolId ( ContactType::Id  type,
unsigned int  poolId 
)
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.

Member Data Documentation

float stride::Person::m_age
private

The age..

Definition at line 93 of file Person.h.

Referenced by GetAge(), and SetAge().

unsigned int stride::Person::m_id
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().

ContactType::IdSubscriptArray<unsigned int> stride::Person::m_pool_ids
private

Health info (immune, infected, etc) for this person.

Definition at line 98 of file Person.h.

Referenced by GetPoolId(), and SetPoolId().

Health stride::Person::m_health
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().

ContactType::IdSubscriptArray<bool> stride::Person::m_in_pools
private

Is this a participant in the social contact study?

Definition at line 104 of file Person.h.

Referenced by IsInPool(), Person(), and SetPoolId().

bool stride::Person::m_is_participant
private

Definition at line 107 of file Person.h.

Referenced by IsSurveyParticipant(), ParticipateInSurvey(), and Person().


The documentation for this class was generated from the following files: