Stride Reference Manual  - generated for commit 9643b11
stride::GeoPopBuilder Class Reference

Builds poulation of a geographic grid. More...

#include <GeoPopBuilder.h>

Inheritance diagram for stride::GeoPopBuilder:
Inheritance graph
Collaboration diagram for stride::GeoPopBuilder:
Collaboration graph

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< PopulationBuild (std::shared_ptr< Population > pop) override
 Generates a synthetic population. More...
 
- Public Member Functions inherited from stride::AbstractPopBuilder
 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

- Protected Attributes inherited from stride::AbstractPopBuilder
const boost::property_tree::ptree & m_config
 Configuration property tree. More...
 
util::RnManm_rn_man
 Random number generation management. More...
 
std::shared_ptr< spdlog::logger > m_stride_logger
 

Detailed Description

Builds poulation of a geographic grid.

Definition at line 41 of file GeoPopBuilder.h.

Constructor & Destructor Documentation

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.

Parameters
configProperty_tree with general configuration settings.
rnManRandom number manager for pop build process.
strideLoggerLogging.

Definition at line 48 of file GeoPopBuilder.cpp.

Member Function Documentation

shared_ptr< Population > stride::GeoPopBuilder::Build ( std::shared_ptr< Population pop)
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().

Here is the call graph for this function:

Here is the caller graph for this function:

void stride::GeoPopBuilder::MakeLocations ( geopop::GeoGrid geoGrid,
const geopop::GeoGridConfig geoGridConfig,
const std::string &  citiesFileName,
const std::string &  commutingFileName 
)
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().

Here is the call graph for this function:

Here is the caller graph for this function:

void stride::GeoPopBuilder::MakePools ( geopop::GeoGrid geoGrid,
const geopop::GeoGridConfig geoGridConfig 
)
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().

Here is the caller graph for this function:

void stride::GeoPopBuilder::MakePersons ( geopop::GeoGrid geoGrid,
const geopop::GeoGridConfig geoGridConfig 
)
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().

Here is the caller graph for this function:


The documentation for this class was generated from the following files: