Question
Does one shared line keep supermarket customers waiting less, or a separate line for each checkout? The textbook answer is clear: the shared line. I wanted to know whether that answer holds in a real store.
Data
- Real checkout records published by Antczak and Weron (2019): about 163,000 transactions over three periods, plus cashier login records.
- From these records I learned the arrival profile, basket size, payment type and scanning time.
- The data has no direct waiting times. Instead I used the gap between a cashier finishing one customer and starting the next.
Method
- Discrete-event simulation. I wrote the engine in TypeScript so the same engine runs in the browser.
- Validation against theory. I compared the engine with Erlang-C, Pollaczek–Khinchine and Little’s law; the deviation stays within 1.3%.
- Validation on unseen data. I learned the parameters only from training periods and tested the model on a period it had never seen. If the test period leaks into training, the code stops with an error.
- Surrogate model. I trained a gradient boosting model on a sweep of 15,000 scenarios; on the site it instantly suggests how many checkouts to open hour by hour.
- 3D store. The scene is not a separate animation; it replays the event log produced by the engine at real walking speed.
Findings
- In the textbook model, the shared line wins at every load.
- The data adds two things: every customer comes with a cashier changeover of about 16 seconds, and the store runs its checkouts at about 93% occupancy.
- Adding two costs of a shared line changes the picture: the walk to the free checkout (from the 3D scene’s geometry) and a 6.86% cashier slowdown (Wang and Zhou, 2018). Above about 65% occupancy, separate lines keep people waiting less; above 80%, the walk alone is enough.
- Validation caught two model errors: basket size changed with day and time, and the number of open checkouts was inflated. Fixing both brought the occupancy error down from 9.5% to 6.5%.
What I don’t know
- The slowdown rate is borrowed from another store. That is why the site also shows, at every load, how much slowdown separate lines would need to pull ahead.
- The model predicts well how an hour behaves on average, but poorly which hour will be unusual (hourly correlation 0.53).
- The data comes from a single store; the result should not be carried over to other store layouts directly.
What I learned
The most instructive part was validation. I could only find the model’s errors by comparing it with data it had never seen.