Bags are checked in at random, ride the feeder belt, queue for the scanners, are sorted into one of three flight chutes by a tilt-tray sorter and are carried to the aircraft by tug trains. A bag that is not in the hold when the hold closes is mishandled. Set the number of scanners and tugs to hit the target. Drag to orbit, pinch or wheel to zoom, use the View button to jump to a zone. Bag colour shows its flight (A blue, B amber, C green); red means it already missed its flight.
A stand-alone check (separate code from the airport model): Poisson arrivals at one or three scanners, 250 000 bags each. The mean wait is compared with the Pollaczek-Khinchine formula (one scanner) and with Erlang C (three scanners, random scan times), and the queue length seen by arriving bags is compared with Little's law.
Runs 6 simulated hours for every combination of 1 to 4 scanners and 1 to 6 tugs, using your other settings, and marks the cells at or below the target.
What is modelled. A discrete-event simulation of one hold-baggage line. Bags arrive as a Poisson process with rate λ (exponential gaps), each is assigned to one of the flights that are still checking in. Stages in series: feeder belt induction, scanners, optional manual review, sorter induction, flight chute, tug train, aircraft hold. Three flights are always open, staggered by 20 minutes; check-in closes 45 minutes after a flight opens and the hold closes at 60 minutes. A bag not loaded by then counts as mishandled (missed its flight); real airports also count damaged and lost bags, which are not modelled. Industry figures are of the order of a few mishandled bags per thousand passengers, so the default target of 5 per 1000 is a plausible round number, not a regulatory limit.
Scanners as a queue. The scanner stage is a queue with c identical servers, a shared line and mean service time s. Its load is ρ = λ s / c. The scanner is a generic black box: it has a service time and an abstract alarm probability. An alarmed bag takes a detour to manual review (a delay with a mean you set) and then rejoins. No detection physics, thresholds or screening procedures are modelled or implied.
Waiting time, one server. For Poisson arrivals and a service time with mean s and variability cs (standard deviation / mean), the Pollaczek-Khinchine formula gives the mean wait before service:
A fixed scan time (cs = 0, the M/D/1 queue) waits half as long as a random one (M/M/1). Either way Wq → ∞ as ρ → 1: at 90 % load a bag waits 4.5 scan times, at 99 % about 50.
Several scanners. With c servers and random service times the exact result is Erlang C: P(wait) = C(c, a) with offered load a = λ s, and Wq = C(c, a) / (c/s − λ). For other service-time variability the Allen-Cunneen approximation multiplies this by (1 + cs²)/2. Pooling matters: three scanners sharing one line at 80 % load wait much less than three separate lines of one scanner at 80 %.
Little's law. In a stable system the average number of bags inside equals the arrival rate times the average time inside: L = λ W. The panel checks it on the whole airport (time-averaged bags in the system against the exit rate times the mean time from check-in to leaving), and Experiment A checks the queue-length version.
Belts and sorter. A belt can carry at most one bag per minimum spacing p, so its capacity is v / p bags per second and its load is λ p / v. A tilt-tray sorter hands out one empty tray per slot time, so the induction is a deterministic server whose service time is the slot. A bag whose tag is not read at the diverter makes a whole extra lap and then queues again, so the sorter sees an effective rate λ / (1 − pmisread) and its load is λ sslot / (1 − pmisread).
Tug trains. A tug leaves for a chute when a full train (24 bags) is ready, when check-in has closed, or when the hold closes within 15 minutes. One round trip takes T = 2 tin + tload + 2 d / v + K tunload, so n tugs carry at most n K / T bags per second and the load is ρ = λ T / (n K). Dispatch serves the earliest deadline first. Adding a tug helps until another stage becomes the bottleneck; a faster tug or a shorter apron road raises capacity in the same way.
Why mishandled bags jump. While ρ stays below 1 every stage clears its queue before the hold closes and almost no bag is late. Once one stage passes ρ = 1 its queue grows without limit, the flights that check in later run out of time, and the mishandled rate rises steeply instead of gradually. Near ρ = 1 the result also depends strongly on random luck, which is why the crew finder is noisy at the edge.
Simplifications. Poisson arrivals with no peak-hour pattern; bags are identical points on a belt (no jams, weights, gaps or tray collisions); belt and tug distances are shortened on screen but the times use the real lengths and speeds from the sliders; no breakdowns, shift changes, transfer bags, damage or loss; manual review has unlimited staff; tug drivers never wait. The scanner wait shown live is compared with the Allen-Cunneen value, which assumes Poisson arrivals; bags leaving the feeder belt are slightly smoother than Poisson, so the live number usually sits a little below the formula. The exact tests are in Experiment A. This is a teaching model of generic equipment, not affiliated with any airline, airport or equipment maker.