👩🔬 1. Are the stated assumptions sufficient? – Gap Analysis & extra hypotheses
| Given in the statement | Strictly needed to build a tractable model | Typical additions (👇 I’ll use them later) |
|---|
| Arrival process | Two independent Poisson streams (rates λ₁, λ₂) | ✔️ yes | – |
| Service-time law | Exponential, rates μ₁, μ₂ | ✔️ yes (→ memoryless) | – |
| Number of servers | Decision variables s₁, s₂ | ✔️ yes | – |
| Routing rule | “Take the preferred server if idle, otherwise the alternative” | ✔️ but we must clarify who can seize which pool when waiting | We add A3 + A4 below |
| Waiting discipline | “Customers remain in the waiting queue” | ❌ not fully specified | Need queue capacity, queue discipline |
| Performance goal | “How many servers should be provided …” | ❌ we need an explicit SLA | e.g. P(wait)>α, or E[W] ≤ τ |
| Economic goal | Cost of servers c₁, c₂ | ✔️ yes | May also add holding-cost h per sec waiting |
Extra assumptions I will make so that the problem becomes an analyzable M/M/s/s or M/M/s + M/M/s “overflow” model:
A1 Infinite common waiting room (no loss).
A2 First-Come-First-Served (FCFS) in the common queue.
A3 A class-1 customer will always accept a type-2 server if it becomes free while he is at the head of the queue (and vice-versa).
A4 Service does not depend on the class actually served: once a customer captures a server of pool j he is served at rate μⱼ.
(If A3 or A4 sound unrealistic, the entire Markov chain changes; I’ll note variants later.)
With {A1–A4} we have a two-pool, two-class flexible server network of the “skill-based / cross-training” type, but with a simple preference matrix:
Servers that a class-i customer will take
------------------------------------------
Pool 1 Pool 2
Class-1 1st 2nd
Class-2 2nd 1st
👩💻 2. An exact Markov description exists … but explodes in size
Let
• s₁, s₂ = number of servers in pools 1 and 2 (our decision variables)
• n₁, n₂ = #busy servers in pools 1 and 2
• q = #customers in queue
State = (n₁, n₂, q) ; 0 ≤ n₁≤ s₁, 0 ≤ n₂≤ s₂, q ≥ 0
Arrival rates are constant (λ₁, λ₂). Departure rates depend on (n₁, n₂).
Transitions are linear ⇨ birth-and-death on a 3-D lattice → solvable by Matrix-Geometric methods, but only for tiny s₁, s₂. Hence we need an approximation for sizing.
📏 3. A practical capacity-sizing approximation
The favourite approach in call-center & telephony engineering is a two-stage decomposition:
Stage 1 Each class i first tries its “home” pool i. We size that pool by Erlang-C so that the offered load ρᵢ=λᵢ/μᵢ yields an acceptable delay for the share that is actually accepted.
Stage 2 Calls that find pool i full overflow to the other pool. The overflow stream is still approximately Poisson but with rate λᵢ⁰≈λᵢ P(full_i). We add that extra load to the other pool and re-solve. Iterate until convergence.
Mathematically:
(1) For tentative capacities (s₁, s₂) compute
P(wait in pool i)=ErlangC(sᵢ, ρᵢ) :=
[ ( (ρᵢ^{sᵢ}/sᵢ!) [sᵢ µᵢ / (sᵢµᵢ − λᵢ) ] ) ] / Σ_{k=0}^{sᵢ−1} (ρᵢ^{k}/k!) + (ρᵢ^{sᵢ}/sᵢ!) [sᵢ µᵢ/(sᵢµᵢ−λᵢ)]
(2) Overflow rate from class 1 to pool 2 λ₁⁰ = λ₁ · P(wait₁)·P(all s₁ busy)
Same for λ₂⁰.
(3) Effective offered load to pool 2 becomes
ρ₂’ = (λ₂ + λ₁⁰)/μ₂, and likewise ρ₁’ = (λ₁ + λ₂⁰)/μ₁.
(4) Recompute Erlang-C with (ρ₁’,ρ₂’). Loop until (ρᵢ’, P(waitᵢ)) stabilize.
Finally we check the user-defined SLA, e.g.
E[Wᵢ] = P(waitᵢ) · 1/(sᵢμᵢ−λᵢ’) ≤ τᵢ or P(waitᵢ) ≤ αᵢ
If SLA is met we compute total purchase cost C = c₁s₁ + c₂s₂.
Otherwise increment s₁ or s₂ by one (whichever yields the higher marginal improvement per dollar) and repeat.
Because Erlang-C is monotone in sᵢ, this greedy search converges quickly.
👓 4. A compact algorithm
Input: λ1, λ2, μ1, μ2, c1, c2, SLA = {α1, α2 or τ1, τ2}
Initialize s1 = ceil(ρ1)+1 , s2 = ceil(ρ2)+1 # start slightly above load
repeat
Compute ErlangC(s1,ρ1), ErlangC(s2,ρ2)
Compute overflow λ1⁰, λ2⁰
Update ρ1’, ρ2’; recompute ErlangC with new loads
until |ρ1’−ρ1_prev|, |ρ2’−ρ2_prev| < ε
if SLA satisfied: return (s1,s2, C=c1 s1 + c2 s2)
else
Evaluate ΔSLA/ΔCost for adding 1 server in pool 1 vs 2
Add the more cost-effective server, loop
This produces near-optimal capacities in milliseconds for the usual contact-center size range (s ≤ 200). If the accuracy of the overflow approximation worries you, Monte-Carlo simulation of the exact Markov chain can be run on the final (s₁,s₂) to double-check the KPIs.
🔬 5. Variants & further refinements
- Finite queue (size K) – replace Erlang-C by Erlang-B with overflow, or an M/M/s/K birth-death.
- Class-dependent service speeds – one may assume μᵢⱼ when class i uses pool j; the two-stage method still works but with different service rates in Stage 2.
- Balking after observing the delay – add a state-dependent abandonment rate θ; use Erlang-A formulas instead of Erlang-C.
- Revenue optimisation – add γᵢ per served customer and solve min {c₁s₁+c₂s₂ − γ₁λ₁(1-P(block₁)) − γ₂λ₂(1-P(block₂))}.
🚀 6. Take-away cheat-sheet
• Keep μ, λ, s in the traffic intensity region ρ<1 for each pool including overflow – otherwise instability.
• Use Erlang-C+overflow for quick sizing, Monte-Carlo to validate.
• Target delay quantile ≤ 15 s (typical help-desk) → leads to Staffing ≈ load + β√load, β≈2 (square-root-staffing).
• Cheapest next server = argmin_j { cⱼ / |∂(SLA)/∂sⱼ| }.
That delivers a rigorous yet practical recipe to decide how many type-1 and type-2 servers you must purchase given λ, μ and cost parameters.