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

Simulator can time step and reveal some of the key data. More...

#include <Sim.h>

Collaboration diagram for stride::Sim:
Collaboration graph

Public Member Functions

std::shared_ptr< CalendarGetCalendar () const
 Calendar for the simulated world. More...
 
std::string GetConfigValue (const std::string &attribute) const
 Get the Sim configuration for the given attribute. More...
 
std::shared_ptr< PopulationGetPopulation ()
 Get the population. More...
 
double GetTransmissionProbability () const
 Get the stored transmission probability. More...
 
util::RnManRefRnManager ()
 Get the random number manager. More...
 
const TransmissionProfileRefTransmissionProfile () const
 Get the transmission profile. More...
 
void TimeStep ()
 Run one time step, computing full simulation (default) or only index case. More...
 

Static Public Member Functions

static std::shared_ptr< SimCreate (const boost::property_tree::ptree &config, std::shared_ptr< Population > pop, util::RnMan rnMan)
 Create Sim initialized by the configuration in property tree and population. More...
 
static std::shared_ptr< SimCreate (const std::string &configString, std::shared_ptr< Population > pop, util::RnMan rnMan)
 For use in python environment: create Sim using configuration string i.o. ptree. More...
 

Private Member Functions

 Sim ()
 Constructor for empty Simulator. More...
 

Private Attributes

boost::property_tree::ptree m_config
 Configuration property tree. More...
 
ContactLogMode::Id m_contact_log_mode
 Specifies contact/transmission logging mode. More...
 
unsigned int m_num_threads
 The number of (OpenMP) threads. More...
 
bool m_track_index_case
 General simulation or tracking index case. More...
 
bool m_adaptive_symptomatic_behavior
 Should symptomatic cases stay home? More...
 
std::shared_ptr< Calendarm_calendar
 Management of calendar. More...
 
AgeContactProfiles m_contact_profiles
 Contact profiles w.r.t age. More...
 
std::vector< ContactHandlerm_handlers
 Contact handlers (rng & rates). More...
 
InfectorExecm_infector
 Executes contacts/transmission loops in contact pool. More...
 
std::shared_ptr< Populationm_population
 Pointer to the Population. More...
 
util::RnMan m_rn_man
 Random number generation management. More...
 
TransmissionProfile m_transmission_profile
 Profile of disease. More...
 
PublicHealthAgency m_public_health_agency
 Agency to implement reactive strategies. More...
 

Friends

class SimBuilder
 

Detailed Description

Simulator can time step and reveal some of the key data.

The Subject base class used for the interaction with the python environment only.

Definition at line 46 of file Sim.h.

Constructor & Destructor Documentation

stride::Sim::Sim ( )
explicitprivate

Constructor for empty Simulator.

Definition at line 39 of file Sim.cpp.

References Create(), stride::ContactLogMode::None, and SimBuilder.

Here is the call graph for this function:

Member Function Documentation

static std::shared_ptr<Sim> stride::Sim::Create ( const boost::property_tree::ptree &  config,
std::shared_ptr< Population pop,
util::RnMan  rnMan 
)
static

Create Sim initialized by the configuration in property tree and population.

Referenced by stride::SimController::Control(), stride::StanController::Control(), Create(), and Sim().

Here is the caller graph for this function:

std::shared_ptr< Sim > stride::Sim::Create ( const std::string &  configString,
std::shared_ptr< Population pop,
util::RnMan  rnMan 
)
static

For use in python environment: create Sim using configuration string i.o. ptree.

Definition at line 58 of file Sim.cpp.

References Create(), and stride::util::RunConfigManager::FromString().

Here is the call graph for this function:

std::shared_ptr<Calendar> stride::Sim::GetCalendar ( ) const
inline

Calendar for the simulated world.

Initialized with the start date in the simulation world. Use GetCalendar()->GetSimulationDay() for the number of days simulated.

Definition at line 58 of file Sim.h.

std::string stride::Sim::GetConfigValue ( const std::string &  attribute) const
inline

Get the Sim configuration for the given attribute.

Definition at line 61 of file Sim.h.

std::shared_ptr<Population> stride::Sim::GetPopulation ( )
inline

Get the population.

Definition at line 64 of file Sim.h.

double stride::Sim::GetTransmissionProbability ( ) const
inline

Get the stored transmission probability.

Definition at line 67 of file Sim.h.

util::RnMan& stride::Sim::RefRnManager ( )
inline

Get the random number manager.

Definition at line 70 of file Sim.h.

const TransmissionProfile& stride::Sim::RefTransmissionProfile ( ) const
inline

Get the transmission profile.

Definition at line 73 of file Sim.h.

Friends And Related Function Documentation

friend class SimBuilder
friend

Definition at line 82 of file Sim.h.

Referenced by Sim().

Member Data Documentation

boost::property_tree::ptree stride::Sim::m_config
private

Configuration property tree.

Definition at line 85 of file Sim.h.

ContactLogMode::Id stride::Sim::m_contact_log_mode
private

Specifies contact/transmission logging mode.

Definition at line 86 of file Sim.h.

unsigned int stride::Sim::m_num_threads
private

The number of (OpenMP) threads.

Definition at line 87 of file Sim.h.

bool stride::Sim::m_track_index_case
private

General simulation or tracking index case.

Definition at line 88 of file Sim.h.

bool stride::Sim::m_adaptive_symptomatic_behavior
private

Should symptomatic cases stay home?

Definition at line 89 of file Sim.h.

Referenced by TimeStep().

std::shared_ptr<Calendar> stride::Sim::m_calendar
private

Management of calendar.

Definition at line 91 of file Sim.h.

Referenced by TimeStep().

AgeContactProfiles stride::Sim::m_contact_profiles
private

Contact profiles w.r.t age.

Definition at line 92 of file Sim.h.

Referenced by TimeStep().

std::vector<ContactHandler> stride::Sim::m_handlers
private

Contact handlers (rng & rates).

Definition at line 93 of file Sim.h.

Referenced by TimeStep().

InfectorExec* stride::Sim::m_infector
private

Executes contacts/transmission loops in contact pool.

Definition at line 94 of file Sim.h.

Referenced by TimeStep().

std::shared_ptr<Population> stride::Sim::m_population
private

Pointer to the Population.

Definition at line 95 of file Sim.h.

Referenced by TimeStep().

util::RnMan stride::Sim::m_rn_man
private

Random number generation management.

Definition at line 96 of file Sim.h.

Referenced by TimeStep().

TransmissionProfile stride::Sim::m_transmission_profile
private

Profile of disease.

Definition at line 98 of file Sim.h.

Referenced by TimeStep().

PublicHealthAgency stride::Sim::m_public_health_agency
private

Agency to implement reactive strategies.

Definition at line 99 of file Sim.h.

Referenced by TimeStep().


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