Theoretical
MM1 <- function(m_int, m_serv, sd){
lambda <- 1 / m_int # Mean rate of arrival (lambda)
mu <- 1 / m_serv # Mean service rate (mu)
var <- sd^2 # Variance of service time
rho <- lambda / mu # Utilization of the server
W_q <- (lambda * (var + 1 / mu^2)) / (2 * (1 - lambda/mu)) # Mean wait in the queue
W <- W_q + m_serv # Mean wait in the system
L_q <- lambda * W_q # Mean number of customers in the queue
L <- lambda * W # Mean number of customers in the system
df <- data.frame(rho, W_q, W, L_q, L)
knitr::kable(df)
}
MD1 <- MM1(1,0.9,0)
MD1
| rho | W_q | W | L_q | L |
|---|---|---|---|---|
| 0.9 | 4.05 | 4.95 | 4.05 | 4.95 |
| *** |
Got the following results afer running simulaton for 24 weeks with 4 days warm_up period and 10 replications:
Simio Model
Theory almost replicates the simulation for this instance.