33 const auto schoolCount =
34 static_cast<unsigned int>(ceil(pupilCount / static_cast<double>(ggConfig.
people[Id::K12School])));
36 vector<double> weights;
37 for (
const auto& loc : geoGrid) {
38 weights.push_back(loc->GetPopFraction());
41 if (weights.empty()) {
46 const auto dist = m_rn_man.GetDiscreteGenerator(weights, 0U);
47 auto pop = geoGrid.GetPopulation();
49 for (
auto i = 0U; i < schoolCount; i++) {
50 const auto loc = geoGrid[dist()];
51 AddPools(*loc, pop, ggConfig);
struct geopop::GeoGridConfig::@2 info
Configuration data mostly for generating a population, but also for computing the required number of ...
unsigned int popcount_k12school
Numbers of individuals in K12School.
A Geographic grid of simulation region contains Locations that in turn contain an index to the Contac...
Namespace for the geographic and demograhic classes.
stride::ContactType::IdSubscriptArray< unsigned int > people
People per unit (= Household, K12School, College, etc.) for each of the ContactTypes.
void Apply(GeoGrid &, const GeoGridConfig &)
Generate ContactPools for ContactType::Id as sepcified by data in GeoGridConfig.
Namespace for the simulator and related classes.
Namespace to manage types of ContactPool.