1Demonstration 1 of 4
The policy that improves the average
Does the scheduling rule that shortens the routine wait help the population?
Shortest first serves routine patients ahead of complex ones, so the routine mean falls and the complex mean rises sharply. The complex group is small enough that the routine gain looks good, but the share-weighted mean still rises.
Mean wait is in periods. Routine patients need 0.8 service units, complex patients 2.0. The population mean weights each group's mean wait by its share of arrivals. The equity gap is the worst group's mean wait divided by the best.
Predict first. Under shortest first with a quarter of arrivals complex, is the population mean wait above or below 1.5?
Choose an example
Constructed example: the chapter's two-policy comparison and the stress-test case mixes, recomputed with the pack's run and equity_gap functions.
Calculated values
- Scheduling
- First come, first served
- Complex share of arrivals
- 0.25
- Routine mean wait
- 1.23
- Complex mean wait
- 1.17
- Population mean wait
- 1.22
- Equity gap
- 1.05
- Patients never served
- 0
Population mean = 0.75 x 1.231 + 0.25 x 1.168 = 1.215. Gap = 1.231 / 1.168 = 1.05, close to a tie. 0 patients were still in the queue when the run ended.
Use the idea
Put the per-group table and the gap beside the aggregate in every comparison of scheduling or triage rules.
Where the conclusion applies
A teaching model: a batch is served at each period end, with fixed seed 5 and 18 arrivals a period. The ordering can change with other seeds or case mixes.
Check your understanding: With waits of 0.94 routine and 5.89 complex and a quarter complex, what is the population mean?
Chapter 34 source: section "The policy that improves the average". Demonstration C34-D01.
2Demonstration 2 of 4
The staffing rule swings and does not settle
What does a staffing rule that scales its target from current staff do over sixty periods?
The target is a multiple of current staff, so the rule has no fixed establishment to return to. A long wait raises staff, queues clear, and the next report is short, so staff falls again.
Staff is the number of heads, between 4 and 30. Each period the target is current staff times the observed mean wait over the target wait of 1.0, and staff moves one adjustment time's fraction of the way.
Predict first. With adjustment time 4, does staff stay near its starting 10 or swing widely?
Choose an example
Constructed example: the chapter's staffing run, with extra adjustment times defined for this reader, run with the pack's run function.
Calculated values
- Scheduling
- First come, first served
- Adjustment time
- 4
- Lowest staff
- 8.6
- Highest staff
- 28.7
- Mean staff, last 20 periods
- 21.3
- Patients never served
- 0
Each period moves staff by (target - staff) / 4. In period 1 staff went from 10.0 to 8.65, so the target was 10.0 + 4 x (-1.35) = 4.59 heads, a mean wait of 4.59 / 10.0 x 1.0 = 0.46. The rule asked for that many heads because the first period's served patients waited that long. Over the run staff swings from 8.6 to 28.7.
Use the idea
Anchor a staffing rule to a stated establishment and check whether the loop oscillates before reading the queue results.
Where the conclusion applies
Seed 5, 18 arrivals a period, and a rule that reads only the mean wait of the patients served. Adjustment times 2 and 8 are values defined for this reader, not printed in the chapter.
Check your understanding: If staff goes from 10 to 12 with adjustment time 4, what target did the rule set?
Chapter 34 source: section "What the staffing loop does, and does not, add". Demonstration C34-D02.
3Demonstration 3 of 4
A mean can hide the tail
Does the group gap look the same on the mean and on the 90th percentile?
Waits are skewed to the right, so the tail sits well above the mean. Shortest first stretches the complex group's tail most, and a mean-only report understates how long some patients wait.
The 90th percentile wait is the value that 90 percent of a group's served patients waited no longer than. The gap is the worse group's value divided by the better group's.
Predict first. Under shortest first, is the complex group's 90th percentile wait above or below 1.5 times its mean?
Choose an example
Constructed example: the chapter's two scheduling runs, with the percentile column added from the pack's run function.
Calculated values
- Scheduling
- First come, first served
- Statistic shown
- Mean wait
- Routine
- 1.23
- Complex
- 1.17
- Gap (worst over best)
- 1.05
- Complex 90th percentile
- 2.15
Gap on the mean wait = 1.231 / 1.168 = 1.05. The same run's complex 90th percentile is 2.15, so a report that shows only the mean leaves the other statistic out.
Use the idea
Report a mean and a high percentile per group in the same row.
Where the conclusion applies
The percentile is the pack's rule, the value at position int(0.9 x (n - 1)) in the sorted waits. A different percentile rule would shift the numbers slightly.
Check your understanding: If the routine group waits 2.0 and the complex group 11.0 at the 90th percentile, what is the gap?
Chapter 34 source: section "Reporting subgroup results". Demonstration C34-D03.
4Demonstration 4 of 4
Stress the arrivals until a group disappears
What happens to each group, and to the equity gap, as arrivals rise?
Past capacity the queue grows. Shortest first always serves routine patients first, so when the queue never empties the complex group is never reached and has no mean wait to compare.
Arrivals per period are 12, 18, 24 or 36 over 60 periods. Served counts and the queue left at the end must add to all arrivals. A group with no served patients has no mean wait.
Predict first. With 36 arrivals and shortest first, how many complex patients are served?
Choose an example
Constructed example: arrival rates defined for this reader around the chapter's 18, run with the pack's run function.
Calculated values
- Arrivals per period
- 18
- Scheduling
- First come, first served
- Routine served
- 811
- Complex served
- 269
- Left in the queue
- 0
- Equity gap
- 1.05
Arrivals = 18 x 60 = 1080. Served + left = 811 + 269 + 0 = 1080, so no patient is lost from the count. Gap = 1.231 / 1.168 = 1.05. First come, first served keeps the groups close.
Use the idea
Run the overload case before trusting a scheduling rule, and report who is never served, not only who waits.
Where the conclusion applies
Arrivals scale in the pack's way, rounded to whole patients, and staff is capped at 30. A model that lets staffing grow without bound would not reach this case.
Check your understanding: With 24 arrivals, 1073 routine served, 345 complex served and 22 left, do the counts add to all arrivals?
Chapter 34 source: section "Stress tests". Demonstration C34-D04.