AirCascade
I’ve always been struck by how one delayed flight in the morning can quietly wreck an airline’s entire day. I wanted to model why that happens rather than predict it. So this isn’t a forecast that learns from history, it’s a mechanistic model of the actual operational logic. You drop a delay on a hub and watch it cascade across the real European network in real time.
Highlights
- The whole thing is a longest-path problem on a dependency graph of the day’s flights. A leg can’t push back until its aircraft has landed, its crew is legal, and its gate is free, so the delay just follows the critical path through the day.
- Three real coupling channels create the edges: aircraft rotations, crew pairings, and gate conflicts. Crews fly trips that hop between different aircraft at hubs, so crew delay spreads on a completely different graph than the planes do.
- Delays compound non-linearly. Small ones get absorbed by schedule buffers; past a threshold the excess propagates and multiplies. Push far enough and crews hit their FAR-117 duty limit, time out, and the network stops delaying flights and starts cancelling them.
- It ranks the highest-leverage airports, where the same shock does the most system-wide damage, purely from the dynamics. It rediscovers the real European hub order (Brussels, Dublin, Frankfurt, Amsterdam, Paris…) without ever being told what a hub is.
- Flags the most vulnerable routes and plots the recovery curve for the whole day, plus a live animated map of the cascade spreading.
Tech Stack
- Python, standard library only - the entire propagation engine, no NetworkX or numpy
- From-scratch directed graph + Kahn topological sort + longest-path relaxation
- OpenFlights - real airports and routes (the daily schedule on top is modeled)
- HTML Canvas + vanilla JS - the animated map and the charts
- Vercel - hosting
Notes
- The network is real but the schedule is synthesized. Airlines don’t hand out tail-level schedules, so I generated plausible aircraft rotations, crew pairings and gate assignments on top of the real route map. It’s clearly a model, not a real timetable, and I say so everywhere it matters.
- My favourite part is that the leverage ranking recovers the real hub structure on its own. I never told it Brussels or Frankfurt were important, the dynamics did.
- Getting the crew channel right was the thing that made it feel real. Because crews swap planes at hubs, a crew timing out strands an aircraft somewhere it wasn’t supposed to be, and that’s what makes big meltdowns so hard to recover from.
- The crew-duty cliff is the most interesting emergent behaviour. Push the shock past a few hours and crews start timing out en masse, so the network stops just running flights late and starts cancelling them outright.
- Built the simulation in a day and the visualization in another. I wanted it to be a system-dynamics thing, which felt like a harder and more honest problem than another predictor.
Check it out: AirCascade