4.10 Problems

Problem 2

Develop a queing model \((M/M/1)\) with an arrival rate, \(\lambda\), of 120 entities per hour and a service rate, \(\mu\), of 190 entities per hour. Compute the respective values for the steady state and the expected number of entities in the system during a 100-hour period.

# rates are in minutes
l <- 120/60
m <- 190/60

c_names <- c("MetricEstimated", "Steady_State", "Simulaiton")
r_names <- c("Utilizaiton (p)", "Number in System (L)", "Number in queue (Lq)",
             "Time in system (W)", "Time in queue (Wq)")
mm1 <- data.frame(matrix(NA, nrow = length(r_names), ncol = length(c_names)))

names(mm1) <- c_names
mm1$MetricEstimated <- r_names

mm1$Steady_State <- c(l/m, l/(m-l), (l^2)/(m*(m-l)), 1/(m-l), l/(m*(m-l)))
mm1$Simulaiton <- c(0.626562, 1.7141, 1.0286, 0.8662, 0.5198)
(mm1)
##        MetricEstimated Steady_State Simulaiton
## 1      Utilizaiton (p)    0.6315789   0.626562
## 2 Number in System (L)    1.7142857   1.714100
## 3 Number in queue (Lq)    1.0827068   1.028600
## 4   Time in system (W)    0.8571429   0.866200
## 5   Time in queue (Wq)    0.5413534   0.519800

Comparing the steady state solution to the simulation, which ran for 100 hours, the majority of the values are fairly close. The error does not seem to exceed 0.07 for any of the results; fairly good approximation from a relatively short simulation time with no warm-up period.

Problem 3

Using the same model from Problem 2, create an experiment with 100 replications. Observe the SMORE plot for the time that entities spend in the system. Experiment with the plot settings.

Experimenting with numerous warm-up periods and settling on 50 hours, the SMORE result is pictured below. The 95% confidence interval for the mean (golden-brown area of the distribution) does not catch the steady state theoretical value of 0.8571. The mean below is 0.8789, The maximum frequency does appear to be in our ballpark for the steady state mean, but there is too much “noise” on the right tail of the distribution every time the simulation is run.

Of the suspected reasons for the mismatch is sampling error due to the model not being able to run for a long enough period to quieten the noise on the right tail.

Problem 9

Replicate the model from Problem 2 using Simio processes and compare the run times

Using the Simio process, each replication took around 0.3 seconds. Using the built-in functions in Simio, each process took approximately 7.8 seconds to run. The level of complexity setting up the Simio process was much more involved than using the built-in default settings, but the run time is faster (on my machine at least) by a factor of ~ 26. This a a trade-off that one would need to make when designing a model.

In addition, the model produced very similar results to that in Problem 2.

Problem 12

Animate the model from Problem 2 with the idea that the server is a cashier at a fast food restaraunt. Use Simio’s standard symbols for the animation

The above image is a run-time animation of the server process described in Problem 2