Stride Reference Manual
- generated for commit 9643b11
|
Builds poulation of a geographic grid. More...
#include <GeoPopBuilder.h>
Public Member Functions | |
GeoPopBuilder (const boost::property_tree::ptree &config, util::RnMan &rnMan, std::shared_ptr< spdlog::logger > strideLogger=nullptr) | |
Use constructor of base. More... | |
std::shared_ptr< Population > | Build (std::shared_ptr< Population > pop) override |
Generates a synthetic population. More... | |
![]() | |
AbstractPopBuilder (const boost::property_tree::ptree &config, util::RnMan &rnMan, std::shared_ptr< spdlog::logger > strideLogger=nullptr) | |
Initializing constructor. More... | |
virtual | ~AbstractPopBuilder ()=default |
Has to be virtual. More... | |
Private Member Functions | |
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. More... | |
void | MakePools (geopop::GeoGrid &geoGrid, const geopop::GeoGridConfig &geoGridConfig) |
Build and store the Geo part of the GeoGrid. More... | |
void | MakePersons (geopop::GeoGrid &geoGrid, const geopop::GeoGridConfig &geoGridConfig) |
Build and store the Pop part of the GeoGrid. More... | |
Additional Inherited Members | |
![]() | |
const boost::property_tree::ptree & | m_config |
Configuration property tree. More... | |
util::RnMan & | m_rn_man |
Random number generation management. More... | |
std::shared_ptr< spdlog::logger > | m_stride_logger |
Builds poulation of a geographic grid.
Definition at line 41 of file GeoPopBuilder.h.
stride::GeoPopBuilder::GeoPopBuilder | ( | const boost::property_tree::ptree & | config, |
util::RnMan & | rnMan, | ||
std::shared_ptr< spdlog::logger > | strideLogger = nullptr |
||
) |
Use constructor of base.
Initializing constructor.
config | Property_tree with general configuration settings. |
rnMan | Random number manager for pop build process. |
strideLogger | Logging. |
Definition at line 48 of file GeoPopBuilder.cpp.
|
overridevirtual |
Generates a synthetic population.
Implements stride::AbstractPopBuilder.
Definition at line 53 of file GeoPopBuilder.cpp.
References stride::AbstractPopBuilder::m_config, stride::AbstractPopBuilder::m_stride_logger, MakeLocations(), MakePersons(), MakePools(), and geopop::GeoGridConfig::SetData().
Referenced by stride::GenPopController::Control(), and stride::Population::Create().
|
private |
Read files with location data and constructs GeoGrid config.
Definition at line 103 of file GeoPopBuilder.cpp.
References geopop::ReaderFactory::CreateCommutesReader(), geopop::ReaderFactory::CreateLocationsReader(), geopop::GeoGridConfig::param, and geopop::GeoGridConfig::pop_size.
Referenced by Build().
|
private |
Build and store the Geo part of the GeoGrid.
Definition at line 120 of file GeoPopBuilder.cpp.
References stride::AbstractPopBuilder::m_rn_man, and stride::AbstractPopBuilder::m_stride_logger.
Referenced by Build().
|
private |
Build and store the Pop part of the GeoGrid.
Definition at line 135 of file GeoPopBuilder.cpp.
References stride::AbstractPopBuilder::m_rn_man, and stride::AbstractPopBuilder::m_stride_logger.
Referenced by Build().