The Problem
180 passengers, 60 overhead bins, zero coordination. Watch what happens when bags are placed first-come, first-served with no data and no plan.
0
Gate-checked bags
0.0
Avg bin search distance
rows from assigned seat
0s
Boarding time elapsed
0
Passenger conflicts
searched beyond own row
Progress: 0 / 180
The Data Structure
Every passenger already declares their bags at check-in. This is the composite data structure that turns that data into a zero-conflict boarding plan.
Check-In Counter
Checked in: 0 / 180
Step or play to begin check-in
No segment tree data available. Initialize the simulation to view the tree.
Like BullMQ's Redis Sorted Sets: O(log n) insertion and range queries for capacity tracking
Priority queue is empty. Check in passengers to populate the queue.
Like BullMQ's priority queue: (priority << 32) + counter scoring ensures boarding group order with FIFO within groups
Capacity Gauge
0 / 240 slots committed
Like BullMQ's rate limiter: { max: 240, duration: boardingWindow } - once the rate limit is hit, new jobs (bags) are delayed (gate-checked)
No allocations yet. Check in passengers to see bin assignments.
The Algorithm
Four bin-packing strategies running on the same 180-passenger dataset. Watch how algorithmic choice alone determines whether bins overflow or stay organized.
key insight
The check-in allocation algorithm (BullMQ-optimized) achieves near-optimal bin utilization because it converts an ONLINE problem (passengers arrive one at a time with no advance info) into an OFFLINE problem (all data is known at check-in before boarding begins). This is the fundamental insight: airlines already have the data. They just process it too late.
The Check-In Notification System
Real-time passenger communication transforms bin allocation from a gate-time scramble into a check-in-time certainty.
Check-In (online)
Bag Declaration
System Allocates Bin Slot
Gate Arrival (bin shown on pass)
Boarding (direct to assigned bin)
Check-in notification
ChaosPlane Airlines
How many carry-on bags?
Selected: 1 bag
Gate display board
Flight UA 1234 — Overhead Bin Status
Enhanced boarding pass
ChaosPlane
UA 1234
Passenger
Jane Smith
Seat
14A
Group
3
Bin
NO BIN INFO
Current boarding passes have no bin information. One additional field eliminates all searching.
key insight
Airlines already send notifications during check-in (seat assignments, upgrade offers, gate changes). Adding bin allocation is zero additional infrastructure — it is a software update, not a hardware purchase. The $750K-per-aircraft retrofit for larger bins is unnecessary if you allocate existing space intelligently.
The Numbers
Real industry data quantifying the impact of algorithmic bin allocation versus the status quo.
$7.27B
Annual U.S. checked bag fees driving carry-on overcrowding
28%
Potential improvement in bin utilization with algorithmic allocation
1M
Passengers avoiding gate-checking annually with optimized bins
~$0
Additional hardware cost for check-in-based bin allocation
Before vs. after comparison
Run the simulation to see comparison data
Algorithm performance hierarchy
Approximation ratio (lower is better)