This project shows how an airline can decide where to place spare aircraft each day to reduce the cost of delays.
See the interactive demo: Streamlit
See the overall proposed solution benchmark: Google Sheets
Flights sometimes fail due to technical issues. If a delay exceeds 3 hours, EU261/2004 requires passenger compensation:
- €250 per passenger for flights ≤ 1500 km
- €400 per passenger for flights > 1500 km
A spare aircraft can rescue a disrupted rotation, but keeping spares on standby is expensive. So the key question is:
Where should spares be positioned each day to minimize total expected cost (holding + fuel + compensation)?
- Read the schedule and group flights into daily rotations.
- Measure distances between airports to see which bases can reach a failure within 3 hours (≈1200 km).
- Estimate risk by calculating expected compensation for each flight and the remaining legs in its rotation.
- Optimize placement with a mixed‑integer model that chooses how many spares to keep at each airport per day.
- Validate the plan with simulated failure scenarios.
src/notebooks/scenario_analysis.ipynb— step‑by‑step walkthrough of the full pipelinemodels/— pre‑computed weekly optimization outputsscenarios/— simulation and benchmarking resultsdata/— schedule and airport inputs

