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

Builds a simulator based a configuration property tree. More...

#include <SimBuilder.h>

Collaboration diagram for stride::SimBuilder:
Collaboration graph

Public Member Functions

 SimBuilder (const boost::property_tree::ptree &config)
 Initializing SimBuilder. More...
 
std::shared_ptr< SimBuild (std::shared_ptr< Sim > sim, std::shared_ptr< Population > pop, util::RnMan rnMan)
 Build the simulator and return it afterwards. More...
 

Private Member Functions

boost::property_tree::ptree ReadAgeContactPtree ()
 Get the contact configuration data. More...
 
boost::property_tree::ptree ReadDiseasePtree ()
 Get the disease configuration data. More...
 

Private Attributes

boost::property_tree::ptree m_config
 Run config in ptree. More...
 

Detailed Description

Builds a simulator based a configuration property tree.

It

  • reads any additional configuration files (disease, contact, ...)
  • initializes calendar and random number manager for the simulator
  • builds a population and contact pool system (
    See also
    PopulationBuilder)
  • deals with health and immunity (
    See also
    HealthSeeder,
    DiseaseBuilder)

Definition at line 41 of file SimBuilder.h.

Constructor & Destructor Documentation

stride::SimBuilder::SimBuilder ( const boost::property_tree::ptree &  config)
explicit

Initializing SimBuilder.

Definition at line 39 of file SimBuilder.cpp.

Member Function Documentation

shared_ptr< Sim > stride::SimBuilder::Build ( std::shared_ptr< Sim sim,
std::shared_ptr< Population pop,
util::RnMan  rnMan 
)

Build the simulator and return it afterwards.

Definition at line 41 of file SimBuilder.cpp.

References stride::ContactType::IdList, m_config, ReadAgeContactPtree(), ReadDiseasePtree(), stride::HealthSeeder::Seed(), stride::DiseaseSeeder::Seed(), stride::SurveySeeder::Seed(), and stride::ContactLogMode::ToMode().

Here is the call graph for this function:

ptree stride::SimBuilder::ReadAgeContactPtree ( )
private

Get the contact configuration data.

Definition at line 107 of file SimBuilder.cpp.

References stride::util::FileSys::GetDataDir(), m_config, and stride::util::FileSys::ReadPtreeFile().

Referenced by Build().

Here is the call graph for this function:

Here is the caller graph for this function:

ptree stride::SimBuilder::ReadDiseasePtree ( )
private

Get the disease configuration data.

Definition at line 114 of file SimBuilder.cpp.

References stride::util::FileSys::GetDataDir(), m_config, and stride::util::FileSys::ReadPtreeFile().

Referenced by Build().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

boost::property_tree::ptree stride::SimBuilder::m_config
private

Run config in ptree.

Definition at line 58 of file SimBuilder.h.

Referenced by Build(), ReadAgeContactPtree(), and ReadDiseasePtree().


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