Stride Reference Manual
1.0
|
Forward declaration of class Person. More...
#include <ThresholdData.h>
Public Member Functions | |
Person (unsigned int id, double age, unsigned int household_id, unsigned int school_id, unsigned int work_id, unsigned int primary_community_id, unsigned int secondary_community_id, unsigned int start_infectiousness, unsigned int start_symptomatic, unsigned int time_infectious, unsigned int time_symptomatic, double risk_averseness=0, bool is_on_vacation=false) | |
Constructor: set the person data. More... | |
bool | operator!= (const Person &p) const |
Is this person not equal to the given person? More... | |
double | getAge () const |
Get the age. More... | |
unsigned int | getClusterId (ClusterType cluster_type) const |
Get cluster ID of cluster_type. More... | |
char | getGender () const |
Return person's gender. More... | |
Health & | getHealth () |
Return person's health status. More... | |
const Health & | getHealth () const |
Return person's health status. More... | |
const BeliefPolicy::Data & | getBeliefData () const |
Return person's belief status. More... | |
unsigned int | getId () const |
Get the id. More... | |
bool | isInCluster (ClusterType c) const |
Check if a person is present today in a given cluster. More... | |
bool | isParticipatingInSurvey () 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 is_work_off, bool is_school_off, double fraction_infected) |
Update the health status and presence in clusters. More... | |
void | update (const Person *p) |
Update belief & behaviour upon meeting another Person. More... | |
bool | isOnVacation () const |
void | setOnVacation (bool is_on_vacation) |
Private Attributes | |
unsigned int | m_id |
The id. More... | |
double | m_age |
The age. More... | |
char | m_gender |
The gender. More... | |
unsigned int | m_household_id |
The household id. More... | |
unsigned int | m_school_id |
The school cluster id. More... | |
unsigned int | m_work_id |
The work cluster id. More... | |
unsigned int | m_primary_community_id |
The primary community id. More... | |
unsigned int | m_secondary_community_id |
The secondary community id. More... | |
bool | m_at_household |
Is person present at household today? More... | |
bool | m_at_school |
Is person present at school today? More... | |
bool | m_at_work |
Is person present at work today? More... | |
bool | m_at_primary_community |
Is person present at primary_community today? More... | |
bool | m_at_secondary_community |
Is person present at secundary_community today? More... | |
Health | m_health |
Health info for this person. More... | |
BeliefPolicy::Data | m_belief_data |
Info w.r.t. this Person's health beliefs. More... | |
bool | m_is_participant |
Is participating in the social contact study. More... | |
bool | m_is_on_vacation |
Is currently on a vacation and should be included in calculations. More... | |
Friends | |
template<class PersonType > | |
class | Traveller |
class | Hdf5Saver |
class | Hdf5Loader |
class | Traveller< Person< BehaviourPolicy, BeliefPolicy > > |
Forward declaration of class Person.
Store and handle person data.
Definition at line 15 of file ThresholdData.h.
|
inline |
Constructor: set the person data.
Definition at line 50 of file Person.h.
References stride::Person< BehaviourPolicy, BeliefPolicy >::m_belief_data.
|
inline |
Is this person not equal to the given person?
Definition at line 67 of file Person.h.
References stride::Person< BehaviourPolicy, BeliefPolicy >::m_id.
|
inline |
Get the age.
Definition at line 70 of file Person.h.
References stride::Person< BehaviourPolicy, BeliefPolicy >::getClusterId(), and stride::Person< BehaviourPolicy, BeliefPolicy >::m_age.
Referenced by stride::Cluster::getContactRate().
unsigned int stride::Person< BehaviourPolicy, BeliefPolicy >::getClusterId | ( | ClusterType | cluster_type | ) | const |
Get cluster ID of cluster_type.
Definition at line 27 of file Person.cpp.
References stride::Household, stride::PrimaryCommunity, stride::School, stride::SecondaryCommunity, and stride::Work.
Referenced by stride::Person< BehaviourPolicy, BeliefPolicy >::getAge(), stride::Simulator::returnForeignTravellers(), and stride::Simulator::sendNewTravellers().
|
inline |
Return person's gender.
Definition at line 76 of file Person.h.
References stride::Person< BehaviourPolicy, BeliefPolicy >::m_gender.
|
inline |
Return person's health status.
Definition at line 79 of file Person.h.
References stride::Person< BehaviourPolicy, BeliefPolicy >::m_health.
Referenced by stride::PopulationBuilder::build(), stride::ThresholdData::contact(), and stride::Simulator::hostForeignTravellers().
|
inline |
Return person's health status.
Definition at line 82 of file Person.h.
References stride::Person< BehaviourPolicy, BeliefPolicy >::m_health.
|
inline |
Return person's belief status.
Definition at line 85 of file Person.h.
References stride::Person< BehaviourPolicy, BeliefPolicy >::m_belief_data.
Referenced by stride::ThresholdData::contact().
|
inline |
Get the id.
Definition at line 88 of file Person.h.
References stride::Person< BehaviourPolicy, BeliefPolicy >::isInCluster(), and stride::Person< BehaviourPolicy, BeliefPolicy >::m_id.
Referenced by stride::Simulator::returnForeignTravellers(), and stride::Simulator::sendNewTravellers().
bool stride::Person< BehaviourPolicy, BeliefPolicy >::isInCluster | ( | ClusterType | c | ) | const |
Check if a person is present today in a given cluster.
Definition at line 45 of file Person.cpp.
References stride::Household, stride::PrimaryCommunity, stride::School, stride::SecondaryCommunity, and stride::Work.
Referenced by stride::Person< BehaviourPolicy, BeliefPolicy >::getId().
|
inline |
Does this person participates in the social contact study?
Definition at line 94 of file Person.h.
References stride::Person< BehaviourPolicy, BeliefPolicy >::m_is_participant.
Referenced by stride::PopulationBuilder::build().
|
inline |
Participate in social contact study and log person details.
Definition at line 97 of file Person.h.
References stride::Person< BehaviourPolicy, BeliefPolicy >::m_is_participant, and stride::Person< BehaviourPolicy, BeliefPolicy >::update().
Referenced by stride::PopulationBuilder::build().
void stride::Person< BehaviourPolicy, BeliefPolicy >::update | ( | bool | is_work_off, |
bool | is_school_off, | ||
double | fraction_infected | ||
) |
Update the health status and presence in clusters.
Definition at line 63 of file Person.cpp.
References stride::minAdultAge().
Referenced by stride::Person< BehaviourPolicy, BeliefPolicy >::participateInSurvey().
void stride::Person< BehaviourPolicy, BeliefPolicy >::update | ( | const Person< BehaviourPolicy, BeliefPolicy > * | p | ) |
Update belief & behaviour upon meeting another Person.
Definition at line 92 of file Person.cpp.
|
inline |
Definition at line 105 of file Person.h.
References stride::Person< BehaviourPolicy, BeliefPolicy >::m_is_on_vacation.
Referenced by stride::Simulator::sendNewTravellers().
|
inline |
Definition at line 107 of file Person.h.
References stride::Person< BehaviourPolicy, BeliefPolicy >::m_is_on_vacation.
Referenced by stride::Simulator::hostForeignTravellers(), and stride::Simulator::sendNewTravellers().
|
friend |
|
friend |
|
friend |
|
private |
The id.
Definition at line 112 of file Person.h.
Referenced by stride::Person< BehaviourPolicy, BeliefPolicy >::getId(), and stride::Person< BehaviourPolicy, BeliefPolicy >::operator!=().
|
private |
The age.
Definition at line 113 of file Person.h.
Referenced by stride::Person< BehaviourPolicy, BeliefPolicy >::getAge().
|
private |
The gender.
Definition at line 114 of file Person.h.
Referenced by stride::Person< BehaviourPolicy, BeliefPolicy >::getGender().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Health info for this person.
Definition at line 128 of file Person.h.
Referenced by stride::Person< BehaviourPolicy, BeliefPolicy >::getHealth().
|
private |
Info w.r.t. this Person's health beliefs.
Definition at line 129 of file Person.h.
Referenced by stride::Person< BehaviourPolicy, BeliefPolicy >::getBeliefData(), and stride::Person< BehaviourPolicy, BeliefPolicy >::Person().
|
private |
Is participating in the social contact study.
Definition at line 131 of file Person.h.
Referenced by stride::Person< BehaviourPolicy, BeliefPolicy >::isParticipatingInSurvey(), and stride::Person< BehaviourPolicy, BeliefPolicy >::participateInSurvey().
|
private |
Is currently on a vacation and should be included in calculations.
Note: Population already filters these people out when iterating
Definition at line 132 of file Person.h.
Referenced by stride::Person< BehaviourPolicy, BeliefPolicy >::isOnVacation(), and stride::Person< BehaviourPolicy, BeliefPolicy >::setOnVacation().