36 #include <boost/property_tree/ptree.hpp> 38 #include <spdlog/logger.h> 44 using namespace ContactType;
61 ggConfig.
SetData(
m_config.get<
string>(
"run.geopop_gen.household_file"));
66 auto& geoGrid = pop->RefGeoGrid();
72 auto geopop_gen =
m_config.get_child(
"run.geopop_gen");
73 if (geopop_gen.count(
"commuting_file")) {
74 commutesFile =
m_config.get<
string>(
"run.geopop_gen.commuting_file");
104 const string& commutingFileName)
107 locationsReader->FillGeoGrid(geoGrid);
109 if (!commutingFileName.empty()) {
111 commutesReader->FillGeoGrid(geoGrid);
114 for (
const shared_ptr<Location>& loc : geoGrid) {
std::shared_ptr< Population > Build(std::shared_ptr< Population > pop) override
Generates a synthetic population.
void MakeLocations(geopop::GeoGrid &geoGrid, const geopop::GeoGridConfig &geoGridConfig, const std::string &citiesFileName, const std::string &commutingFileName)
Read files with location data and constructs GeoGrid config.
Configuration data mostly for generating a population, but also for computing the required number of ...
void SetData(const std::string &householdsFileName)
Read the househould data file, parse it and set data.
Populator< stride::ContactType::Id::SecondaryCommunity > SecondaryCommunityPopulator
Base Class for PopBuilders.
Generator< stride::ContactType::Id::K12School > K12SchoolGenerator
Populator< stride::ContactType::Id::K12School > K12SchoolPopulator
Generator< stride::ContactType::Id::College > CollegeGenerator
void MakePools(geopop::GeoGrid &geoGrid, const geopop::GeoGridConfig &geoGridConfig)
Build and store the Geo part of the GeoGrid.
static std::shared_ptr< CommutesReader > CreateCommutesReader(const std::string &filename)
Create a CommutesReader based on the filename relative to the data directory.
A Geographic grid of simulation region contains Locations that in turn contain an index to the Contac...
static std::shared_ptr< LocationsReader > CreateLocationsReader(const std::string &filename)
Create a Reader based on the filename relative to the data directory.
Definition of ContactPool Id Type.
unsigned int pop_size
Target population size for the generated population.
Populator< stride::ContactType::Id::PrimaryCommunity > PrimaryCommunityPopulator
Namespace for the geographic and demograhic classes.
Generator< stride::ContactType::Id::SecondaryCommunity > SecondaryCommunityGenerator
struct geopop::GeoGridConfig::@0 param
util::RnMan & m_rn_man
Random number generation management.
Header file for the SurveySeeder class.
Populator< stride::ContactType::Id::Workplace > WorkplacePopulator
Header file for the core Population class.
void MakePersons(geopop::GeoGrid &geoGrid, const geopop::GeoGridConfig &geoGridConfig)
Build and store the Pop part of the GeoGrid.
std::shared_ptr< spdlog::logger > m_stride_logger
Miscellaneous string utilities.
Interface for install directory queries.
Populator< stride::ContactType::Id::Household > HouseholdPopulator
GeoPopBuilder(const boost::property_tree::ptree &config, util::RnMan &rnMan, std::shared_ptr< spdlog::logger > strideLogger=nullptr)
Use constructor of base.
const boost::property_tree::ptree & m_config
Configuration property tree.
Namespace for the simulator and related classes.
Generator< stride::ContactType::Id::Workplace > WorkplaceGenerator
Populator< stride::ContactType::Id::College > CollegePopulator
Generator< stride::ContactType::Id::Household > HouseholdGenerator
Generator< stride::ContactType::Id::PrimaryCommunity > PrimaryCommunityGenerator