Nivaar Exam Prep

16-Civ-B10 Traffic Engineering · December 2018

Question 6 of 7: M/M/1 single cashier

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer) · Last updated

Notes on this paper

The paper’s own Note 1 invites a clear statement of any assumptions made and Note 2 permits any required-but-not-given data to be assumed; every assumption used below is stated explicitly where it is introduced. Page 2 reproduces the AASHTO 2001 metric stopping-sight-distance table, which Question 2 is built around.

Reference texts.

Canadian context. The answers are framed for Canadian practice: the TAC Geometric Design Guide for Canadian Roads and the MUTCDC are the governing documents, and metric design controls are used throughout.

Question 6: M/M/1 single cashier (5 × 4 marks)

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

Given. A single server, Poisson arrivals at 3 customers per 6 minutes and exponential service at 4 customers per 6 minutes. Converting both to the same unit, $\lambda = 3/6 = 0.500$ customers per minute and $\mu = 4/6 = 0.667$ customers per minute.

Find. $P_0$; the mean number waiting; the mean number in the system; the mean waiting time and the mean service time; and the probability that the queue exceeds three customers.

M/M/1: Poisson arrivals, exponential service, one cashier, FIFO arrivals lambda = 0.5/min waiting line, L_q = 2.250 cashier busy 75.00 per cent of the time; served at mu = 0.6667/min in system L = 3.000 W = 6.000 min, W_q = 4.500 min State probabilities P(n) = (1 − rho)·rho^n 0 0.250 1 0.188 2 0.141 3 0.105 4 0.079 5 0.059 6 7 8 9 10 11 12 n = number of customers in the system n ≥ 4: second cashier opens, probability 0.3164
Question 6. The single-channel queue and its geometric state distribution. The shaded states are those in which a second cashier would be opened.

Approach. This is a textbook M/M/1 (single channel, Poisson arrivals, exponential service, FIFO, infinite queue). Get the traffic intensity first; every other result is a function of it alone.

  1. Traffic intensity and stability. $$\rho = \frac{\lambda}{\mu} = \frac{0.500}{0.667} = \frac{3}{4} = 0.750$$ Since $\rho < 1$ the queue is stable and the steady-state formulae apply. The cashier is busy 75 per cent of the time.
  2. Part (a) — probability the cashier is free. The cashier is free exactly when the system is empty, and for M/M/1 the state probabilities are geometric, $P(n) = (1-\rho)\rho^{n}$, so $$P_0 = 1 - \rho = 1 - 0.750 = \boxed{0.250}$$ i.e. the cashier is idle a quarter of the time. Note that idle time and queueing coexist: the cashier is idle 25 per cent of the time and the average customer still waits, because arrivals are random rather than evenly spaced.
  3. Part (b) — average number waiting to be processed. This is the queue length excluding whoever is at the till: $$L_q = \frac{\rho^{2}}{1 - \rho} = \frac{0.750^{2}}{0.250} = \frac{0.5625}{0.250} = \boxed{2.25\ \text{customers}}$$
  4. Part (c) — average number of customers in line. Read against part (b), this part must mean the number in the system — the people waiting plus the one being served — otherwise it would repeat (b) verbatim: $$L = \frac{\rho}{1 - \rho} = \frac{0.750}{0.250} = \boxed{3.00\ \text{customers}}$$ The consistency check is immediate and exact: $L - L_q = 3.00 - 2.25 = 0.75 = \rho$, which is the expected number in service, as it must be for a single server.
  5. Part (d) — average wait, and average service time. By Little's law applied to the waiting line, $$W_q = \frac{L_q}{\lambda} = \frac{2.25}{0.500} = \boxed{4.50\ \text{min}} = 270\ \text{s}$$ and the mean service time is simply the reciprocal of the service rate, $$\frac{1}{\mu} = \frac{1}{0.667} = \boxed{1.50\ \text{min}} = 90\ \text{s}$$ Little's law closes on the total: $W = W_q + 1/\mu = 4.50 + 1.50 = 6.00$ min, and independently $W = L/\lambda = 3.00/0.500 = 6.00$ min. So a customer spends six minutes in the shop, 75 per cent of it queueing — the same 75 per cent as the traffic intensity, which is a property of the single-server model.
  6. Part (e) — probability a second cashier is opened. The trigger is “the line of customers is longer than 3”, i.e. more than three customers present, so the event is $n \ge 4$. The geometric tail of an M/M/1 system sums neatly: $$P(n \ge k) = \sum_{n=k}^{\infty}(1-\rho)\rho^{n} = \rho^{k}$$ so $$P(n \ge 4) = \rho^{4} = 0.750^{4} = \frac{81}{256} = \boxed{0.316}$$ A second cashier would be opened roughly 32 per cent of the time — often enough that the shop should probably schedule two.
  7. Check the tail against the state probabilities. Summing $(1-\rho)\rho^{n}$ from $n = 4$ upward numerically returns 0.3164, matching $\rho^{4}$ to four decimals, which confirms both the state distribution and the tail identity.
Check: reading of parts (b), (c) and (e). Parts (b) and (c) are worded almost identically (“waiting to be processed” and “in line”) yet carry 4 marks each, so they must be asking for different quantities: (b) is taken as $L_q$, the number waiting, and (c) as $L$, the number in the system. Likewise part (e) says “longer than 3 customers”, taken as $n \ge 4$ in the system, giving $\rho^4 = 0.316$. If instead the trigger were more than three waiting (i.e. $n \ge 5$), the answer would be $\rho^5 = 0.237$. The first reading is adopted because it matches the wording of the trigger and the convention of parts (b) and (c).
Question 6 — final results
QuantitySymbolResult
Traffic intensity$\rho$0.750 (cashier busy 75 per cent of the time)
(a) Probability the cashier is free$P_0$0.250
(b) Average number waiting$L_q$2.25 customers
(c) Average number in the system$L$3.00 customers
(d) Average wait in the queue$W_q$4.50 min (270 s)
(d) Average service time$1/\mu$1.50 min (90 s)
(d) Total time in the system$W$6.00 min, of which 75 per cent is waiting
(e) Probability a second cashier opens$P(n \ge 4)$0.316 (= 81/256; 0.237 on the queue-based reading)