34 : m_clock(
"total_clock"), m_config(configPt), m_sim(
std::move(sim))
47 const auto numDays =
m_config.get<
unsigned int>(
"run.num_days");
50 if (
m_sim->GetCalendar()->GetSimulationDay() == 0) {
55 for (
unsigned int i = 0; i < numSteps; i++) {
57 if (
m_sim->GetCalendar()->GetSimulationDay() < numDays - 1) {
61 }
else if (
m_sim->GetCalendar()->GetSimulationDay() == numDays - 1) {
Namespace to manage events signalled by the SimRunner.
SimRunner(const boost::property_tree::ptree &configPt, std::shared_ptr< Sim > sim)
Initialization with property tree.
Stopwatch & Start()
Starts stopwatch if it was stopped.
Stopwatch & Stop()
Stops the stopwatch if it was running.
void Notify(const EventType &e)
void Run()
Run simulator for as many steps/days as indicated in config.
std::shared_ptr< Sim > m_sim
Simulator object.
Header file for the core Population class.
util::Stopwatch m_clock
Stopwatch for timing the computation.
Header for the Simulator class.
Header file for the Calendar class.
Namespace for the simulator and related classes.
boost::property_tree::ptree m_config
Ptree with configuration.
Header for the SimRunner class.