Stride Reference Manual  1.0
Coordinator.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 #include <string>
5 #include <boost/property_tree/ptree.hpp>
6 
7 #include "calendar/Calendar.h"
8 #include "AsyncSimulator.h"
10 
11 namespace stride {
12 
13 using namespace std;
14 using namespace util;
15 
16 class Coordinator {
17 public:
18  Coordinator(const map<string, shared_ptr<AsyncSimulator>>& sims, const string& schedule,
19  boost::property_tree::ptree& config)
20  : m_sims(sims), m_calendar(config) {
21  if (schedule != "") {
22  // TODO Fix traveller schedule
23  m_traveller_schedule = TravellerScheduleReader().readSchedule(schedule);
24  }
25  }
26 
27  // TODO: Make this return a list of infected counts?
28  vector<SimulatorStatus> timeStep();
29 
30 
31 private:
33  map<string, shared_ptr<AsyncSimulator>> m_sims;
34  // TODO: Calendars are saved for every Simulator *and* the Coordinator
36 };
37 
38 }
Schedule m_traveller_schedule
Definition: Coordinator.h:32
Schedule readSchedule(string filename)
Expects a worthy path.
Header file for the Calendar class.
Time Dependent Person DataType.
Definition: NoBehaviour.h:17
Class that keeps track of the &#39;state&#39; of simulated world.
Definition: Calendar.h:36
Coordinator(const map< string, shared_ptr< AsyncSimulator >> &sims, const string &schedule, boost::property_tree::ptree &config)
Definition: Coordinator.h:18
array< vector< Flight >, 7 > Schedule
map< string, shared_ptr< AsyncSimulator > > m_sims
Definition: Coordinator.h:33
STL namespace.