mm1 <- function (lam, mu) {
# If p is less than 1, we have a stable queue
p <- lam/mu
# Lq is the steady state average number of entities in the queue
Lq <- p^2 / (1-p)
#L is the steady state average number of entities in the system (rather than the number in queue)
L <- p / (1-p)
#Wq is the steady state average time in the queue
Wq <- Lq/lam
#W is the steady state average time in the system
W <- Wq + (1/mu)
df <- data.frame(p=p, Lq=Lq, L=L, W=W, Wq=Wq)
return(df)
}
df <- mm1((120/60), (190/60))
df
## p Lq L W Wq
## 1 0.6315789 1.082707 1.714286 0.8571429 0.5413534
df$W
## [1] 0.8571429
#Steady State entities expected to be in the system in 100 hours
60/df$W*100
## [1] 7000
As we would expect, the numbers using Simio Processes are very similar to those of the model using the standard library.