Question 2.61

  • For an M/M/1 queue with the mean interarrival time 1.25 minutes and mean service time1 Minute, find all five of Wq, W, L, Lq and \(\rho\ \) .
library(knitr)


ServiceTime <- 1
ArrivalRate <- 1/1.25
ServiceRate <- 1 / ServiceTime
E_s <- ServiceTime

my_value <- function(ServiceTime, ArrivalRate, ServiceRate,E_s){
               L <- ArrivalRate/((1/E_s) - (ArrivalRate))
               W <- L/ArrivalRate
               Wq <- W - E_s
               Lq <- ArrivalRate*Wq
               P <- ArrivalRate / ServiceTime
      return(data.frame(L, W, Wq, P, Lq))
}


kable(my_value(1,0.8,1,1 ))
L W Wq P Lq
4 5 4 0.8 3.2

Question 2.62

  • Repeat Problem 1, except assume that the service time are not Exponentially distributed, but rather (countinuously) Uniformly Distributed with a=0.1, b=1.9.
question2 <-runif(my_value(1,0.8,1,1), min=0.1, max=1.9)
question2
## [1] 1.539701 1.688169 1.386346 1.205264 1.477273

Question 2.63

  • Repeat Problem 1, except assume that the service time are Triagularly Distributed with a=0.1, b=1.9, mode m=1.0.
suppressMessages(library(mc2d))
dtriang(my_value(1,0.8,1,1),min=0.1, mode = 1, max=1.9, log=F)
## [[1]]
## [1] 0
## 
## [[2]]
## [1] 0
## 
## [[3]]
## [1] 0
## 
## [[4]]
## [1] 0.8641975
## 
## [[5]]
## [1] 0

Question 2.65

Repeat Problem 1, except for an M/M/3 queue with mean interarrival time 1.25 minutes and mean service time 3 minutes at each three servers. Use mmc.exe

library(queueing)
mmc <- NewInput.MMC(lambda=0.8, mu=0.3333, c=3)

summary(QueueingModel(mmc))
## The inputs of the model M/M/c are:
## lambda: 0.8, mu: 0.3333, c: 3, n: 0, method: Exact
## 
## The outputs of the model M/M/c are:
## 
## The probability (p0, p1, ..., pn) of the n = 0 clients in the system are:
## 0.05615175
## The traffic intensity is: 2.4002400240024
## The server use is: 0.8000800080008
## The mean number of clients in the system is: 4.99082009178808
## The mean number of clients in the queue is: 2.59058006778568
## The mean number of clients in the server is: 2.4002400240024
## The mean time spend in the system is: 6.23852511473511
## The mean time spend in the queue is: 3.2382250847321
## The mean time spend in the server is: 3.000300030003
## The mean time spend in the queue when there is queue is: 5.00250125062532
## The throughput is: 0.8
  • Solution:

Using MMC.EXE, with the syntax [ mmc 0.8 0.3333 3] which represent “mmc lambda mu c” the following results were obtain:

Utilization: 0.80001

p(0): 0.05618

NumInSystem: 4.9890

NumInQueue: 2.5889

TimeInSytem: 6.2362

TimeInQueue: 3.2362