chiaha-SLX Lab 2: Three bank tellers
Time: 45–50 minutes
You need: a browser, a chiaha-SLX sign-in, and the Erlang C formula (or a calculator that has it).
Open it: https://slx.chiaha.com/slx?open=deck/tellers
Learning goals
- Check a simulation against a closed-form result (Erlang C for M/M/c).
- See why a short run that starts empty doesn't match steady-state theory.
- Measure what one more server, or one fewer, does to waiting.
- Recognize an unstable queue from its output.
The problem
A bank lobby has three tellers and one line. Customers arrive at random, on average one every 4 minutes (exponential gaps). Service takes on average 10 minutes (exponential). The bank is open 480 minutes. This is an M/M/3 queue: arrival rate λ = 0.25 per minute, service rate μ = 0.1 per minute per teller.
Find these lines in the model:
| Line in the model | What it means |
|---|---|
Tellers capacity = 3 |
three tellers serve from one line |
iat = rv_expo(Arrivals, 4.0) |
a customer every 4 minutes on average |
rv_expo(Service, 10.0) |
10 minutes of service on average |
run_length = 480 |
the run length, in minutes |
served, waited, busy |
customers finished, total minutes spent in line, total teller-minutes of service |
Measures
Tick Show final values and set Runs to 5. For each run:
- Mean wait Wq =
waited ÷ served(minutes) - Mean number waiting Lq =
waited ÷ run_length - Utilization =
busy ÷ (tellers × run_length)
Average each measure over the five runs.
Before you run
Q1. Using Erlang C, work out for M/M/3 with λ = 0.25 and μ = 0.1: the utilization ρ, the probability a customer has to wait, Wq and Lq. Then do the same for four tellers.
Tasks
Keep Seed at 1 and Runs at 5.
- One day, as written. Run it. Record the three measures (averages of 5).
- A long run. Change
run_length = 480torun_length = 50000(about 104 days without closing). Run and record. - Add a teller. Change
capacity = 3tocapacity = 4, and setrun_lengthback to480. Run. Then setrun_length = 50000again and run once more. Remember to dividebusyby 4 now. - Lose a teller. Change
capacityto2andrun_lengthto480. Run. Then changerun_lengthto4800and run again.
Questions
Q2. How close is task 1 to your Erlang C answer from Q1? How close is task 2? Explain the difference.
Q3. Going from three tellers to four, by how much did the long-run mean wait drop? Utilization dropped from about 83% to about 62%. Is that a good trade for a bank? What would you want to know before deciding?
Q4. With two tellers, compare the mean wait after 480 minutes and after 4,800. Why does a longer run make the answer bigger instead of more precise? What does Erlang C say about this case?
Q5. In task 3's one-day run, served came out exactly the same as in task
1 for every run. Why? (Hint: what decides how many customers arrive?)
The answer key is shown to the course's instructor when signed in.