For an M/M/1 queue with mean interarrival time 1.25min and mean service time 1 minute, find:\(W_{q}\), \(W\), \(L_{q}\), \(L\), and \(\rho\).
JB:
For an \(M/M/1\) queuing system, we have exponential interarrival times, exponential service times, and a single server.
find mu and lambda:
Given that \(\lambda=\frac{1}{Arrival Avg}\) and \(\mu=\frac{1}{Service Avg}\) where \(\lambda\) is the mean arrival rate (which is the reciprocal of the expected value of the interarrival-time distribution) and \(\mu\) is the mean service rate of a single server.
# with mean interarrival time 1.25min and mean service time 1 minute, find:
arrival_avg <- 1.25
svc_avg <- 1 # aka E(S)
lambda <- 1/arrival_avg # min inter-arrival times
mu <- 1/svc_avg # min svc rate
(c(lambda, mu))
## [1] 0.8 1.0
finding p (rho):
Via section 2.3.1 I know that:\(\rho\) = \(\frac{\lambda}{\mu}\)
# Then, per the text:
p <- lambda/mu # Steady-state utilization of a server in a single server system
p
## [1] 0.8
finding L:
Given that for a single server system: \(L=\frac{\rho}{1-\rho}\), I find L:
L <- p/(1-p) # the steady-state average number of entities in system
L
## [1] 4
finding W:
Further, given Little’s Law \(L=\lambda W \), I can rearrange to find \(W\), namely: \(W=\frac{L}{\lambda}\)
W <- L/lambda # steady-state average time in system in min
W
## [1] 5
finding Wq:
Using the fact that the steady-state average time in a system is just the average time in queue plus the expected amount of time being served: \(W=W_{q}+E(S)\), I can rearrange to find: \(W_{q}=W-E(S)=W-E(S)=W-AvgSvcTime\):
Wq <- W - svc_avg #steady-state avg time in queue in min
Wq
## [1] 4
finding Lq:
Using Little’s law again \(L_{q}=\lambda W_{q}\) to find:
Lq <- Wq * lambda # avg number of in-queue entities
Lq
## [1] 3.2
Summary:
(c(arrival_avg, svc_avg, p, W, Wq, L, Lq))
## [1] 1.25 1.00 0.80 5.00 4.00 4.00 3.20
Notes:
\(W_{q}\): The steady-state average time in queue (excluding service times) of entities (at each station separately in a network, or overall across whole network).
\(W\): The steady-state average time in system (including service times) of entities (again, at each station separately or overall).
\(L_{q}\): the steady-state average number of entities in queue (at each station or overall). Note that this is over a finite time horizon \([0,h]\).
Then for a single queue:\(\int_{0}^{h} \frac{L_{q}(t)}{h}dt\).
Where \(L_{q}(t)\) is the number of entities in queue at time instant \(t\). This provides a weighted average number of entities over a finite time-frame such that: \(L_{q}=\lim_{h\to\infty}\overline{L_{q}}(h)\)
\(L\): the steady-state average number of entities in system (at each station or overall) - a time average similar to \(L_{q}\).
\(\rho\): The steady-state utilization of a server or group of parallel servers - typically for each station separately - as defined in \(\int_{0}^{h} \frac{L_{q}(t)}{h}dt\) but after letting \(h\) approach \(\infty\).