37 using namespace ContactType;
47 sim->m_population = std::move(pop);
48 sim->m_track_index_case =
m_config.get<
bool>(
"run.track_index_case");
49 sim->m_adaptive_symptomatic_behavior =
m_config.get<
bool>(
"run.adaptive_symptomatic_behavior",
true);
50 sim->m_num_threads =
m_config.get<
unsigned int>(
"run.num_threads");
51 sim->m_calendar = make_shared<Calendar>(
m_config);
53 sim->m_rn_man = std::move(rnMan);
59 for (
unsigned int i = 0; i < sim->m_num_threads; i++) {
60 auto gen = sim->m_rn_man.GetUniform01Generator(i);
63 const auto& select = make_tuple(sim->m_contact_log_mode, sim->m_track_index_case);
78 sim->m_transmission_profile.Initialize(
m_config, diseasePt);
83 const double detection_probability =
m_config.get<
double>(
"run.case_detection_probability", 0.0);
84 sim->m_public_health_agency.Initialize(detection_probability);
109 const auto fn =
m_config.get<
string>(
"run.age_contact_matrix_file",
"contact_matrix.xml");
116 const auto fn =
m_config.get<
string>(
"run.disease_config_file");
void Seed(const std::shared_ptr< Population > &pop, std::vector< ContactHandler > &handlers)
Seeds the population with Health data.
static filesys::path GetDataDir()
/// Return data dir (only relevant when use_install_dirs mode is active)
boost::property_tree::ptree ReadAgeContactPtree()
Get the contact configuration data.
constexpr std::initializer_list< Id > IdList
To allow iteration over the type ids.
Seeds the population with survey participants.
Mechanism to select the appropriate Infector template to execute.
Id ToMode(const string &s)
Converts a string with name to LogMode value.
SimBuilder(const boost::property_tree::ptree &config)
Initializing SimBuilder.
Header for the DiseaseSeeder class.
Seeds population w.r.t immunity (natural immunity, vaccination, ...) and infection.
Header for the SimBuilder class.
Processes the contacts between persons and determines whether transmission occurs.
std::shared_ptr< Sim > Build(std::shared_ptr< Sim > sim, std::shared_ptr< Population > pop, util::RnMan rnMan)
Build the simulator and return it afterwards.
static boost::property_tree::ptree ReadPtreeFile(const filesys::path &f_p)
Read ptree from file at path.
Definition of ContactPool Id Type.
boost::property_tree::ptree m_config
Run config in ptree.
Header file for the SurveySeeder class.
boost::property_tree::ptree ReadDiseasePtree()
Get the disease configuration data.
Header for the Simulator class.
Interface for install directory queries.
std::shared_ptr< Population > Seed(std::shared_ptr< Population > pop)
Seeds the population with survey participants.
Contact rates as a function of age.
Namespace for the simulator and related classes.
void Seed(std::shared_ptr< Population > pop)
Build the simulator.
Header file for the HealthSeeder.
Header for the InfectorMap.
Seeds the population with Health data.