if (FALSE) {
n_customers <- 50
arrival_rate <- 1.8
service_rate <- 1
arrivals <- cumsum(rexp(n_customers, arrival_rate))
service <- rexp(n_customers, service_rate)
queue_obj <- queue_step(arrivals, service, servers = 2)
plot(queue_obj)
library(ggplot2)
## density plots of arrival and departure times
plot(queue_obj, which = 1)
## histograms of arrival and departure times
plot(queue_obj, which = 2)
## density plots of waiting and system times
plot(queue_obj, which = 3)
## step function of queue length
plot(queue_obj, which = 4)
## line range plot of customer and server status
plot(queue_obj, which = 5)
## empirical distribution plot of arrival and departure times
plot(queue_obj, which = 6)
}
Run the code above in your browser using DataLab