31 m_logger->trace(
"Starting to populate Primary Communities");
33 for (
const shared_ptr<Location>& loc : geoGrid) {
34 if (loc->GetPopCount() == 0) {
39 const auto nearbyPools = geoGrid.GetNearbyPools(Id::PrimaryCommunity, *loc);
41 if (nearbyPools.empty()) {
46 const auto dist = m_rn_man.GetUniformIntGenerator(0, static_cast<int>(nearbyPools.size()), 0U);
47 for (
auto& hhPool : loc->RefPools(Id::Household)) {
48 for (
auto p : *hhPool) {
49 auto& pcPool = nearbyPools[dist()];
51 p->SetPoolId(Id::PrimaryCommunity, pcPool->GetId());
56 m_logger->trace(
"Done populating Primary Communities");
Header file for the Person class.
Configuration data mostly for generating a population, but also for computing the required number of ...
Header for the core ContactPool class.
A Geographic grid of simulation region contains Locations that in turn contain an index to the Contac...
Namespace for the geographic and demograhic classes.
Populator uses geo & pop data to populate ContactPools in the GeoGrid.
Namespace to manage types of ContactPool.