26 template<
class BehaviourPolicy,
class BeliefPolicy>
28 switch (cluster_type) {
30 return m_household_id;
36 return m_primary_community_id;
38 return m_secondary_community_id;
40 throw runtime_error(
string(__func__) +
"> Should not reach default.");
44 template<
class BehaviourPolicy,
class BeliefPolicy>
48 return m_at_household && !m_is_on_vacation;
50 return m_at_school && !m_is_on_vacation;
52 return m_at_work && !m_is_on_vacation;
54 return m_at_primary_community && !m_is_on_vacation;
56 return m_at_secondary_community && !m_is_on_vacation;
58 throw runtime_error(
string(__func__) +
"> Should not reach default.");
62 template<
class BehaviourPolicy,
class BeliefPolicy>
69 if (m_health.isSusceptible() || (m_health.isInfected() && (!m_health.isSymptomatic()))) {
70 if (BehaviourPolicy::practicesVaccination(m_belief_data)) {
76 if (is_work_off || (m_age <=
minAdultAge() && is_school_off)) {
79 m_at_secondary_community =
false;
80 m_at_primary_community =
true;
84 m_at_secondary_community =
true;
85 m_at_primary_community =
false;
88 BeliefPolicy::update(m_belief_data, m_health);
91 template<
class BehaviourPolicy,
class BeliefPolicy>
94 BeliefPolicy::update(m_belief_data, p);
Time Dependent Person DataType.
Header file for the Person class.
Forward declaration of class Person.
Definition of ClusterType.
unsigned int getClusterId(ClusterType cluster_type) const
Get cluster ID of cluster_type.
bool isInCluster(ClusterType c) const
Check if a person is present today in a given cluster.
ClusterType
Enumerates the cluster types.
constexpr unsigned int minAdultAge()
Maximum age for Person's.
void update(bool is_work_off, bool is_school_off, double fraction_infected)
Update the health status and presence in clusters.