Türkçe
Home

2026

market-queue-lab

When checkouts get busy, a separate line for each checkout keeps customers waiting less than one shared line.

65%checkout occupancy above which separate lines pull ahead.

Python, TypeScript, React Three Fiber

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

Method

  1. Discrete-event simulation. I wrote the engine in TypeScript so the same engine runs in the browser.
  2. Validation against theory. I compared the engine with Erlang-C, Pollaczek–Khinchine and Little’s law; the deviation stays within 1.3%.
  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.
  4. 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.
  5. 3D store. The scene is not a separate animation; it replays the event log produced by the engine at real walking speed.

Findings

What I don’t know

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.