My Project
simulator.h
Go to the documentation of this file.
1 
6 #ifndef SRC_SIMULATOR_H_
7 #define SRC_SIMULATOR_H_
8 
9 #include <list>
10 #include <vector>
11 #include <ostream>
12 
13 #include "src/bus.h"
14 #include "src/stop.h"
15 #include "src/route.h"
21 class Simulator {
22  public:
23  virtual bool Start(std::ostream& out) = 0;
24  virtual bool Update(std::ostream& out) = 0;
25 
26  protected:
27  // bus and stop list will be iterated over to update
28  // ist is efficient in traversal
29  std::list<Bus *> active_buses_; // buses leave scope
30  std::list<Stop *> all_stops_;
31 
32  // prototype_routes and distance lists will be accessed directly
33  // list is not efficient at direct selection by index
34  // routes below a for copying on bus creation
35  std::vector<Route *> prototype_routes_;
36  std::vector<double *> distance_between_sets_;
37  std::vector<PassengerGenerator *> passenger_generators_;
38  // std::vector<std:list<double>> passenger_generation_probability_lists;
39 };
40 
41 #endif // SRC_SIMULATOR_H_
stop.h
Simulator
Virtual class to simulate the transit system.
Definition: simulator.h:21
passenger_generator.h
route.h
bus.h