Stride Reference Manual  1.0
stride::SimulatorBuilder Class Reference

Main class that contains and direct the virtual world. More...

#include <SimulatorBuilder.h>

Collaboration diagram for stride::SimulatorBuilder:
Collaboration graph

Static Public Member Functions

static std::shared_ptr< Simulatorbuild (const boost::property_tree::ptree &pt_config)
 Build simulator. More...
 
static std::shared_ptr< Simulatorbuild (const boost::property_tree::ptree &pt_config, const boost::property_tree::ptree &pt_disease, const boost::property_tree::ptree &pt_contact)
 Build simulator. More...
 

Static Private Member Functions

static void initializeClusters (std::shared_ptr< Simulator > sim, const boost::property_tree::ptree &pt_config)
 Initialize the clusters. More...
 
static void initializeDistricts (std::shared_ptr< Simulator > sim, const boost::property_tree::ptree &pt_config)
 Initialize the districts, duplicate city names are ignored (only the first occurrence is counted) More...
 
static std::map< std::pair< ClusterType, uint >, util::GeoCoordinateinitializeLocations (std::string filename)
 Initialize the locations (read the from the given file) and return them If the filename is "", it will assume that you use an older version of stride which has no locations, all locations will be in the origin (0,0) Unreadable input will result in zeroes/ClusterTypeNull. More...
 
static void initializeFacilities (std::shared_ptr< Simulator > sim, const boost::property_tree::ptree &pt_config)
 Initialize the facilities, duplicate facility names are ignored (only the first occurrence is counted) Unknown districts are ignored. More...
 

Detailed Description

Main class that contains and direct the virtual world.

Definition at line 41 of file SimulatorBuilder.h.

Member Function Documentation

static std::shared_ptr<Simulator> stride::SimulatorBuilder::build ( const boost::property_tree::ptree &  pt_config)
static
static std::shared_ptr<Simulator> stride::SimulatorBuilder::build ( const boost::property_tree::ptree &  pt_config,
const boost::property_tree::ptree &  pt_disease,
const boost::property_tree::ptree &  pt_contact 
)
static

Build simulator.

void stride::SimulatorBuilder::initializeClusters ( std::shared_ptr< Simulator sim,
const boost::property_tree::ptree &  pt_config 
)
staticprivate

Initialize the clusters.

Definition at line 156 of file SimulatorBuilder.cpp.

References stride::Household, stride::PrimaryCommunity, stride::School, stride::SecondaryCommunity, and stride::Work.

void stride::SimulatorBuilder::initializeDistricts ( std::shared_ptr< Simulator sim,
const boost::property_tree::ptree &  pt_config 
)
staticprivate

Initialize the districts, duplicate city names are ignored (only the first occurrence is counted)

Definition at line 240 of file SimulatorBuilder.cpp.

References stride::util::InstallDirs::getDataDir(), and stride::util::StringUtils::split().

map< pair< ClusterType, uint >, GeoCoordinate > stride::SimulatorBuilder::initializeLocations ( std::string  filename)
staticprivate

Initialize the locations (read the from the given file) and return them If the filename is "", it will assume that you use an older version of stride which has no locations, all locations will be in the origin (0,0) Unreadable input will result in zeroes/ClusterTypeNull.

Definition at line 292 of file SimulatorBuilder.cpp.

References stride::util::InstallDirs::getDataDir(), stride::util::StringUtils::split(), and stride::toClusterType().

void stride::SimulatorBuilder::initializeFacilities ( std::shared_ptr< Simulator sim,
const boost::property_tree::ptree &  pt_config 
)
staticprivate

Initialize the facilities, duplicate facility names are ignored (only the first occurrence is counted) Unknown districts are ignored.

Definition at line 327 of file SimulatorBuilder.cpp.


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