23 #include <boost/property_tree/ptree.hpp> 35 if (poolType == Id::K12School || poolType == Id::College) {
37 }
else if (poolType == Id::Household) {
38 typeKey =
"household";
39 }
else if (poolType == Id::Workplace) {
41 }
else if (poolType == Id::PrimaryCommunity) {
42 typeKey =
"primary_community";
43 }
else if (poolType == Id::SecondaryCommunity) {
44 typeKey =
"secondary_community";
46 const string key{string(
"matrices.").append(typeKey)};
48 for (
const auto& participant : contactPt.get_child(key)) {
49 double totalContacts = 0;
50 for (
const auto& contact : participant.second.get_child(
"contacts")) {
51 totalContacts += contact.second.get<
double>(
"rate");
53 (*this)[i++] = totalContacts;
Id
Enumerates the ContactPool types.
constexpr unsigned int MaximumAge()
Maximum age for Persons.
AgeContactProfile()=default
Need to keep the default constructor available.
string ToString(Id c)
Converts a ContactPoolType::Id value to corresponding name.
Namespace for the simulator and related classes.
Namespace to manage types of ContactPool.