I made this queue simulation that shows how the percent of all customers that waited more than 15 minutes changes when more servers are added to the system:
I then plotted the results in ggplot (code not shown, but I can add if someone is interested). The plots look like this - confirming that when more servers are added, the percent of customers that waited longer than 15 minutes increases at a lesser rate:
My Question: Suppose if instead of a constant arrival rate, I have a custom arrival rate vector:
That is, for each value of sim_time 1,2,3,4,... we insert my_arrival_vector[1], my_arrival_vector[2], my_arrival_vector[3] etc number of new people into the queue.
Is it possible to feed this vector into the simulation directly instead?
Note: Plotting Code
combined_waiting_data <- rbind(results_k3$waiting_percentage_data, results_k4$waiting_percentage_data)
waiting_percentage_plot_k3 <- ggplot(results_k3$waiting_percentage_data, aes(x = time, y = percentage, group = interaction(simulation, k), color = factor(k))) +
geom_line(alpha = 0.7) +
stat_summary(fun = mean, geom = "line", aes(group = 1), color = "black", size = 1) +
labs(title = paste("Percentage of People Waiting >", k_minutes, "Minutes (k=3)"),
subtitle = paste("Arrival Rate =", lambda, ", Service Rate =", mu),
x = "Time", y = "Percentage", color = "Number of Servers (k)") +
theme_minimal()
waiting_percentage_plot_k4 <- ggplot(results_k4$waiting_percentage_data, aes(x = time, y = percentage, group = interaction(simulation, k), color = factor(k))) +
geom_line(alpha = 0.7) +
stat_summary(fun = mean, geom = "line", aes(group = 1), color = "black", size = 1) +
labs(title = paste("Percentage of People Waiting >", k_minutes, "Minutes (k=4)"),
subtitle = paste("Arrival Rate =", lambda, ", Service Rate =", mu),
x = "Time", y = "Percentage", color = "Number of Servers (k)") +
theme_minimal()
grid.arrange(waiting_percentage_plot_k3, waiting_percentage_plot_k4, ncol = 2)
I made this queue simulation that shows how the percent of all customers that waited more than 15 minutes changes when more servers are added to the system:
I then plotted the results in ggplot (code not shown, but I can add if someone is interested). The plots look like this - confirming that when more servers are added, the percent of customers that waited longer than 15 minutes increases at a lesser rate:
My Question: Suppose if instead of a constant arrival rate, I have a custom arrival rate vector:
That is, for each value of sim_time 1,2,3,4,... we insert my_arrival_vector[1], my_arrival_vector[2], my_arrival_vector[3] etc number of new people into the queue.
Is it possible to feed this vector into the simulation directly instead?
Note: Plotting Code