Dynamic C-server Queueing System Simulation  1.0
Simulating data for delay prediction
queue_graph.h
Go to the documentation of this file.
1 #include "station.h"
2 #include "tandem.h"
3 #ifndef GRAPH_H
4 #define GRAPH_H
5 // Directed Graphs only station_list[0] -> entry station_list[N-1] -> exit
6 class graph
7 {
8  int num_nodes;
9  int N ; //Number of custmer in system
11  std::vector< std::vector< std::pair<int,int> > > network ; // { adjacent node,weight of edge to that node }
12  std::vector<station> station_list; // 0 : Entry to system , -1 : Exit to station
13  std::vector<std::tuple<int, float, int, float, float>> system_counter_variable;
14  /*
15  0 - Customer id
16  1 - Time of arrival
17  2 - Number of people in system at arrival
18  3 - Service times at last station
19  4 - Departure times of system
20  */
21 public:
22  graph(int init_N, int init_max_queue_len, std::vector<std::vector<std::pair<int, int>>> init_network, std::vector<station> temp);
23  // void calculate_distance();
24  std::tuple<int, float> find_least_dep_time();
25  void add_customer_to_graph(float t, int customer_id);
26  void departure_updates(int station_index, float t);
27  void server_updates(float t);
28  void write_to_csv(std::string file_name);
29 };
30 #endif
std::vector< std::vector< std::pair< int, int > > > network
Definition: queue_graph.h:11
std::vector< std::tuple< int, float, int, float, float > > system_counter_variable
Definition: queue_graph.h:13
graph(int init_N, int init_max_queue_len, std::vector< std::vector< std::pair< int, int >>> init_network, std::vector< station > temp)
Definition: queue_graph.cpp:3
int num_nodes
Definition: queue_graph.h:8
void departure_updates(int station_index, float t)
Definition: queue_graph.cpp:72
std::vector< station > station_list
Definition: queue_graph.h:12
std::tuple< int, float > find_least_dep_time()
Definition: queue_graph.cpp:56
Definition: queue_graph.h:6
void add_customer_to_graph(float t, int customer_id)
Definition: queue_graph.cpp:49
void server_updates(float t)
Definition: queue_graph.cpp:41
void write_to_csv(std::string file_name)
Definition: queue_graph.cpp:115
int N
Definition: queue_graph.h:9
int max_queue_len
Definition: queue_graph.h:10