Simulations as models: assumptions in a checkout queue
Computer ScienceAlgorithms & Problem SolvingAges 17–18
How do you mainly use this simulation?
Use it with your class: students open it from a link or a QR code, with no account needed.
A real checkout line, recorded for one afternoon at a campus minimarket, set against a simulation of it. Tick or untick four simplifying assumptions (customers arrive at equal intervals, every service takes the same time, nobody leaves a long line, the arrival rate stays the same all afternoon), run the seeded model or average 100 runs, and compare the mean and longest waits with the observed afternoon. A results table records the bias of each assumption set.
Lesson: Simulations as abstractions: simplifying assumptions, random numbers and bias
What it shows
A simulation is an abstraction of the real world: it keeps some details and leaves others out. Here a checkout queue is modelled for one afternoon, and every model gets the inputs measured on a real afternoon at a minimarket till: how many customers came and how long they took to serve. Each simplifying assumption makes the model easier to build, but it can bias the answer, giving waits that are too short or too long, and the recorded waits show by how much. Because the model uses random numbers, one run can be far from typical, so averages of many runs are compared.
How to use
Tick the assumptions the model should make, then press Run to watch the afternoon, or Average of 100 runs. The grey line is the observed afternoon and the blue line is the model. Read the mean and longest waits and the bias in the tiles; each run is recorded in the table. Change Tills open to ask what-if questions, and the Random seed to see another run.
Parameters you can change
- Arrivals at equal intervals
- Every customer takes the same service time
- Nobody leaves a long line
- The arrival rate stays the same all afternoon
- Tills open 1–4
- Random seed 1–999
Questions to explore
- How does the model's mean wait change as you untick the four assumptions one by one?
- Which two assumptions change the mean wait the most, and why do they shorten it?
- Why should you compare averages of many runs rather than a single run?