P-004 · 2026 · Team project · Industry partner
Lüneburg Public Bus Routing with HVV Timetable Data
School bus routing for KVG Lüneburg: GTFS timetable processing, passenger assignment and an evaluation comparing existing services with optimised routes.
One passenger demand, three routing scenarios
Same passenger assignment: departure, transfer and duration checks
The planning problem
Bus routes for school journeys must meet arrival windows, capacity limits and limits on journey duration and transfers. Our team of over 20 students, working with KVG in Leuphana’s Machine Learning Lab, compared the existing public timetable in two regions of Landkreis Lüneburg with dedicated school-bus routes designed by three algorithms: linear programming, a genetic algorithm and simulated annealing.
Building the timetable baseline
The baseline answers a simple question: how well does the existing public timetable already serve these pupils? I built a pipeline that filters the HVV GTFS feed to school-day trips between 04:30 and 08:30. I checked the result against official PDF schedules, found four bus lines missing from the feed and added them, verified by hand, to a consolidated schedule.
Assigning pupils to services
For each pupil, the assignment logic searches transit stops within 1 km of home, finds trips that reach the school in time and allows at most two transfers. Better transfer indexing and spatial search raised the share of matched pupils from 85% to 98.9% in development. I added configurable preferences for fewer transfers, shorter journeys or later departures, and compliance reports that explain every violation or failed match.
Comparing routing approaches
I built the evaluation workflow that puts the baseline and the three algorithms on the same footing. It loads every scenario’s routes, assigns pupils with the same logic, and reports coverage, commute efficiency, equity, bus count and utilisation. Along the way I fixed identifier mismatches between schedules, a time-conversion bug and a misleading detour metric, which I replaced with an efficiency ratio of actual to allowed commute.
Results
Across 1,007 pupils, the existing timetable and the simulated annealing routes served everyone, while linear programming and the genetic algorithm left 94 and 183 pupils unassigned. Commutes stayed well within the limits in every scenario, but linear programming produced much longer journeys in the southern region. No algorithm was best on every measure: dedicated routes beat the baseline on several criteria, at the cost of extra buses.
My role and limits
My part was the baseline and the evaluation, including the methodology and comparison slides for the team presentation; the routing algorithms were built by other team members. Passenger records, precise locations and detailed schedules are not published here. The figures below are aggregate results from the team’s final presentation.