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

Runs a simulation multiple times, with different random engine seeds. More...

#include <StanController.h>

Inheritance diagram for stride::StanController:
Inheritance graph
Collaboration diagram for stride::StanController:
Collaboration graph

Public Member Functions

 StanController (const boost::property_tree::ptree &config, const std::string &name="StanController")
 Straight initialization. More...
 
void Control ()
 Actual run of the simulator. More...
 

Additional Inherited Members

- Protected Member Functions inherited from stride::ControlHelper
 ControlHelper ()
 Empty controller: used as target for delegation. More...
 
void CheckEnv ()
 Check install environment. More...
 
void CheckOutputPrefix ()
 
void InstallLogger ()
 Make the appropriate logger for cli environment and register as stride_logger. More...
 
void LogStartup ()
 Logs info on setup for cli environment to stride_logger. More...
 
void RegisterViewers (std::shared_ptr< SimRunner > runner)
 Register the viewers of the SimRunner. More...
 
void Shutdown ()
 Logs info on setup for cli environment to stride_logger. More...
 
 ControlHelper (const boost::property_tree::ptree &config, std::string name)
 Straight initialization. More...
 
 ~ControlHelper ()
 Simple destructor. More...
 
- Protected Attributes inherited from stride::ControlHelper
boost::property_tree::ptree m_config
 Main configuration for run and sim. More...
 
std::string m_name
 Contoller's name. More...
 
std::string m_output_prefix
 Prefix to output (name prefix or prefix dir) More...
 
util::Stopwatch m_run_clock
 Stopwatch for timing the computation. More...
 
std::shared_ptr< spdlog::logger > m_stride_logger
 General logger. More...
 
bool m_use_install_dirs
 Working dir or install dir mode. More...
 

Detailed Description

Runs a simulation multiple times, with different random engine seeds.

The infection count at each day is captured a a text file is produced with the infection counts over time and the associated boxplot data. The runs are in parallel (iff OpenMP available), individuals runs not.

StanController setup functions include (

See also
ControlHelper):
  • checks the OpenMP environment
  • checks the file system environment
  • interprets and executes the ouput prefix
  • intalls a stride logger
The StanController execution:
  • produces a random seed for each run
  • creates a population (
Population) for each run
  • creates a simulation runner (
SimRunner) for each run
  • registers the appropriate viewer for each runner
  • runs the simulations
  • produces the output.
The procedure implies that the parameters "run.rng_seed" and also "run.num_threads" in the configuration are overriden for the individual runs.

The output is textual and consists of multiple CSV blocks separated by blank lines. The first block has the time evolution of the infection count in rows, the second block has the boxplot data in columns. The format is amenable to the gnuplot plotting tool (so in each CSV block the header row with column labels starts with a '#').

Definition at line 57 of file StanController.h.

Constructor & Destructor Documentation

stride::StanController::StanController ( const boost::property_tree::ptree &  config,
const std::string &  name = "StanController" 
)
explicit

Straight initialization.

Definition at line 46 of file StanController.cpp.

Member Function Documentation


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