Lesson 25: Model I: Applications, Costing and Design Decisions¶
25.1 Learning Outcomes¶
By the end of this hour a student will be able to:
- Build a total-cost model combining the cost of waiting and the cost of service.
- Find the optimal service rate both by enumeration and by calculus.
- Compare pooled and separate queues, and quantify the pooling gain.
- Decide whether an investment in faster or additional service is economically justified.
- Recognise why averaging the arrival rate understates congestion (Jensen's inequality).
25.2 The Economic Framework¶
A queue imposes two costs that move in opposite directions.
| Cost | Symbol | Behaviour as service capacity rises |
|---|---|---|
| Cost of waiting — lost custom, idle machines, staff time, goodwill | \(C_w\) per customer per unit time | falls |
| Cost of service — wages, equipment, space | \(C_s\) per unit of service capacity per unit time | rises |
Total-cost model. $\(\boxed{\ TC = C_w L_s + C_s \mu\ }\tag{1.1}\)$ where \(L_s\) is the expected number in the system and \(\mu\) is the service rate purchased.
Two modelling decisions must be made consciously:
- \(L_s\) or \(L_q\)? Use \(L_s\) when the customer's entire time in the system is costly — a broken machine costs money while it is being repaired as well as while it waits. Use \(L_q\) when only waiting is wasteful — a shopper's time at the till is unavoidable, the time in the queue is not.
- Units must match. \(C_w\) is a cost per customer per unit time; \(L_s\) is a pure number (customers). Their product is a cost per unit time, which is what \(C_s\mu\) also must be.
The optimal service rate by calculus¶
Substituting \(L_s = \dfrac{\lambda}{\mu-\lambda}\) into (1.1):
Result (optimal service rate). $\(\boxed{\ \mu^{*}=\lambda+\sqrt{\frac{C_w\lambda}{C_s}}\ }\tag{1.2}\)$ and since \(\dfrac{d^2TC}{d\mu^2}=\dfrac{2C_w\lambda}{(\mu-\lambda)^3}>0\) for \(\mu>\lambda\), the function is convex and \(\mu^*\) is a global minimum.
Read (1.2) carefully: the excess capacity \(\mu^*-\lambda\) grows like \(\sqrt{\lambda}\), not like \(\lambda\). Doubling the workload does not require doubling the spare capacity — an instance of the square-root staffing rule that governs call centres and hospital wards alike.
25.3 Pooling: One Fast Server or Several Slow Ones?¶
This is the single most useful practical result in queuing theory.
Suppose a total arrival rate \(\lambda\) must be served by capacity \(c\mu\). Three architectures:
A. SEPARATE QUEUES B. POOLED, ONE FAST C. POOLED, c SERVERS
lam/2 -> [q1] -> (S1) lam -> [q] -> (BIG) lam -> [q] -+-> (S1)
lam/2 -> [q2] -> (S2) speed 2mu +-> (S2)
All three have the same total capacity and therefore the same utilisation \(\rho\). They do not give the same waiting time, because in A a server can sit idle while the other queue has people in it. That idleness is pure waste, and pooling eliminates it.
Pooling principle. Merging separate queues into one shared queue never increases the mean waiting time, and usually reduces it substantially. The gain comes entirely from removing the possibility of an idle server beside a non-empty queue.
Problem 2 below quantifies all three.
25.4 Solved Problems¶
Problem 1 — The optimal service rate¶
Customers arrive at a service desk at \(\lambda=8\) per hour. Waiting costs the firm \(₹50\) per customer per hour spent in the system. Service capacity costs \(₹10\) per unit of \(\mu\) per hour (so a desk capable of \(\mu\) services per hour costs \(₹10\mu\) per hour). Available equipment offers \(\mu = 10, 12, 15\) or \(20\) per hour. Which should be bought, and what is the theoretical optimum?
Solution.
Step 1 — enumerate. \(L_s = \dfrac{8}{\mu-8}\).
| \(\mu\) | \(\rho\) | \(L_s\) | Waiting cost \(50L_s\) | Service cost \(10\mu\) | Total |
|---|---|---|---|---|---|
| 10 | 0.800 | 4.0000 | ₹200.00 | ₹100 | ₹300.00 |
| 12 | 0.667 | 2.0000 | ₹100.00 | ₹120 | ₹220.00 |
| 15 | 0.533 | 1.1429 | ₹57.14 | ₹150 | ₹207.14 |
| 20 | 0.400 | 0.6667 | ₹33.33 | ₹200 | ₹233.33 |
Buy the \(\mu=15\) machine, at a total cost of \(₹207.14\) per hour.
Step 2 — the continuous optimum. From (1.2),
Interpretation. The best available machine (\(\mu=15\)) costs only \(₹0.65\) per hour more than the unattainable ideal — the total-cost curve is flat near its minimum, so a close-enough choice is nearly free. This flatness is typical and is good news: precise estimates of \(C_w\) are rarely needed.
Note also that the cheapest machine is by far the worst overall: it saves \(₹50\) per hour of capital and loses \(₹143\) per hour in waiting.
Problem 2 — Separate queues versus pooling¶
A repair depot receives \(\lambda=18\) jobs per hour. Compare:
- A — two independent counters, each with its own queue receiving \(9\) jobs/h, each serving at \(\mu = 12\)/h.
- B — one counter twice as fast, \(\mu = 24\)/h, single queue.
- C — two counters at \(\mu = 12\)/h fed by a single common queue (\(M/M/2\)).
Solution. All three have the same total capacity \(24\)/h and hence \(\rho = 18/24 = 0.75\).
A — two separate \(M/M/1\) queues, each \(\lambda=9\), \(\mu=12\), \(\rho=0.75\):
Total in the system across both counters: \(2\times3 = 6\) jobs.
B — one server at \(\mu=24\):
C — \(M/M/2\) with \(\mu=12\) (formulas derived in Lesson 27; quoted here for comparison):
| Architecture | \(W_s\) | Improvement over A | |
|---|---|---|---|
| A | two queues, two servers | 20.00 min | — |
| C | one queue, two servers | 11.43 min | \(\mathbf{-43\,\%}\) |
| B | one queue, one double-speed server | 10.00 min | \(\mathbf{-50\,\%}\) |
Interpretation — three separate lessons in one table.
- Pooling the queue (A → C) cuts waiting by 43 % at zero capital cost. No new equipment, no faster service: only a rope guiding everyone into one line. This is precisely why banks, airports and post offices adopted single-queue systems.
- One fast server beats two half-speed servers (C → B). A single fast server never suffers the case where one server is idle while a job waits behind another. When the choice is available, consolidation wins.
- But B is not always achievable — you cannot merge two surgeons into one who operates twice as fast. C is the realistic improvement, and it is free.
Problem 3 — Is a faster machine worth buying?¶
A workshop's single machine processes jobs at \(\mu = 8\) per hour against arrivals of \(\lambda = 6\) per hour. Each job in the system costs the firm \(₹120\) per hour. A faster machine achieving \(\mu = 10\) per hour would cost an extra \(₹200\) per hour to lease. Should the firm lease it?
Solution.
Present system: \(\rho=6/8=0.75\), \(L_s=\dfrac{0.75}{0.25}=3\) jobs.
Proposed system: \(\rho=6/10=0.6\), \(L_s=\dfrac{0.6}{0.4}=1.5\) jobs.
Do not lease. The upgrade saves \(₹180\) per hour of waiting cost but costs \(₹200\) per hour, a net loss of \(₹20\) per hour (\(₹160{,}000\) per year at \(8{,}000\) operating hours).
Break-even analysis. The lease is justified only if its cost is below the saving:
Equivalently, the firm should lease if the true waiting cost exceeds \(C_w = \dfrac{200}{1.5}=₹133.33\) per job-hour.
Interpretation. The decision turns entirely on \(C_w\), which is the hardest number in the model to estimate. Report the break-even value rather than a bare yes/no — "lease it if a job standing idle costs you more than ₹133 an hour" is far more useful to a manager than "no".
Problem 4 — Why you must not average the arrival rate¶
A helpdesk faces \(\lambda = 4\) per hour for half the day and \(\lambda = 9\) per hour for the other half; \(\mu = 10\) per hour throughout. A consultant computes the average arrival rate \(\bar\lambda = 6.5\)/h and reports \(L_s\) from that. What is wrong, and by how much?
Solution.
The consultant's calculation:
The correct calculation — compute \(L_s\) in each regime, then average:
| Period | \(\lambda\) | \(\rho\) | \(L_s\) | \(W_s\) |
|---|---|---|---|---|
| Off-peak | 4 | 0.40 | 0.6667 | 10 min |
| Peak | 9 | 0.90 | 9.0000 | 60 min |
| Time-average | \(\tfrac12(0.6667+9)=\mathbf{4.833}\) |
The consultant's figure understates congestion by a factor of 2.6.
Why. \(L_s(\lambda)=\dfrac{\lambda}{\mu-\lambda}\) is a convex function of \(\lambda\). By Jensen's inequality, for a convex \(f\),
The average of the congestion always exceeds the congestion at the average. The more variable the load, the worse the error.
Interpretation. Peaks dominate queuing performance, and averaging destroys exactly the information that matters. Analyse each period separately — never feed a daily-average arrival rate into a queuing formula. This is among the most common and most expensive errors in applied OR.
Problem 5 — Machine maintenance: how many mechanics?¶
Machines in a plant break down in a Poisson stream at \(\lambda = 2\) per hour. One mechanic repairs at an exponential rate \(\mu = 3\) per hour and is paid \(₹100\) per hour. Machine downtime costs \(₹400\) per machine per hour. Evaluate: (a) the present system; (b) hiring a second identical mechanic (a shared queue, \(M/M/2\)); (c) replacing the mechanic with an expert at \(\mu = 6\)/h paid \(₹250\) per hour.
Solution. Downtime is costly for the whole time a machine is out of action, so we use \(L_s\).
(a) One mechanic. \(\rho = 2/3\):
(b) Two mechanics, \(M/M/2\) at \(\mu=3\). With \(r=\lambda/\mu = 2/3\) and \(\rho=r/2=1/3\) (Lesson 27 formulas):
(c) One expert, \(\mu = 6\). \(\rho = 1/3\):
| Option | Mechanics | \(L_s\) | Downtime cost | Labour cost | Total |
|---|---|---|---|---|---|
| (a) present | 1 at \(\mu=3\) | 2.00 | ₹800 | ₹100 | ₹900 |
| (b) two ordinary | 2 at \(\mu=3\) | 0.75 | ₹300 | ₹200 | ₹500 |
| (c) one expert | 1 at \(\mu=6\) | 0.50 | ₹200 | ₹250 | ₹450 |
Hire the expert. Saving over the present system: \(₹450\) per hour, about \(₹36\) lakh a year on a single-shift basis.
Interpretation. Note that (c) beats (b) even though the expert costs \(₹50\) per hour more than two ordinary mechanics combined — the consolidation effect of Problem 2 again. Note too that the present system spends eight times more on downtime than on labour: whenever the waiting cost dwarfs the service cost, the system is almost certainly under-resourced, and that ratio is the quickest diagnostic a manager can apply.
25.5 Practice Problems¶
- \(\lambda = 12\)/h, \(C_w = ₹80\) per customer-hour, \(C_s = ₹20\) per unit \(\mu\) per hour. Find \(\mu^{*}\) and the minimum total cost. (Answer: \(\mu^*=12+\sqrt{48}=18.93\)/h; \(TC=₹517.13\)/h)
- Recompute Problem 1 using \(L_q\) instead of \(L_s\) in the objective. Does the recommendation change? (Answer: \(\mu=15\) still wins; the totals fall but their ordering does not)
- Two clerks each handle their own queue at \(\mu=5\)/h with \(\lambda=4\)/h each. Compute \(W_q\); then compute \(W_q\) for an \(M/M/2\) system with \(\lambda=8\)/h, \(\mu=5\)/h. (Answer: \(48\) min vs \(21.33\) min — pooling cuts waiting by \(55.6\,\%\))
- In Problem 3, at what lease cost per hour does the faster machine become worthwhile? (Answer: below \(₹180\) per hour)
- A firm reports "our servers run at 92 % utilisation, which is excellent efficiency." Write a three-sentence reply using the results of Lesson 24 and this lesson.
25.6 Summary¶
- Total cost = waiting cost + service cost: \(TC = C_wL_s + C_s\mu\). Use \(L_s\) when the whole sojourn is costly, \(L_q\) when only waiting is wasted.
- The optimum is \(\mu^{*}=\lambda+\sqrt{C_w\lambda/C_s}\); the required excess capacity grows as \(\sqrt{\lambda}\), and the cost curve is flat near the optimum, so approximate choices are cheap.
- Pooling is the best free improvement in operations. One shared queue beat two separate queues by \(43\,\%\) in Problem 2 with no new equipment.
- One fast server beats several slow ones of equal total capacity — when that choice is physically available.
- Investment decisions should be reported as break-even values of \(C_w\), since \(C_w\) is the least reliable input.
- Never average the arrival rate. \(L_s(\lambda)\) is convex, so Jensen's inequality guarantees the averaged figure understates congestion — by a factor of \(2.6\) in Problem 4.
- If waiting cost hugely exceeds service cost, the system is under-resourced. That ratio is the fastest diagnostic available.
Next lesson: L26 — Model II, \((M/M/1):(N/\text{FCFS})\), the finite-capacity queue.
Practise now: unit3-queue-inventory-lab.html → Cost Optimiser: enter \(C_w\) and \(C_s\), sweep
\(\mu\), and see the waiting-cost and service-cost curves cross at \(\mu^{*}\).