Optimization · Case study
Schedule-aware railway routing
- Organization
- IIT Madras
- Context
- Undergraduate thesis · awarded maximum grade
- Period
- 2023
- Methods
- Time-expanded graphs · Dynamic programming · Pruning heuristics
- Tools
- Python · C++
Max. grade
thesis evaluation
01Problem
In a road network you can leave whenever you like. In a railway network you can only move when a scheduled train does. Travel time between two stations therefore depends on arrival time, because a missed connection means waiting for the next departure. A route that visits a set of stations must be planned against the timetable, not a static distance matrix.
This makes it a temporal variant of the Traveling Salesman Problem. The usual TSP machinery assumes fixed edge costs, so it does not apply directly.
02Formulation
Build a time-expanded graph where each node is a station at a specific time, . Two kinds of edges encode the timetable:
- Ride edge: a scheduled train departing at and arriving at at
- Wait edge: stay at station until its next event time
Every path in is feasible by construction, so timetable constraints disappear from the search. With a set of required stations, the objective is the makespan, the time at which the route completes:
Dynamic programming runs over states , the current time-station node and the set of required stations already visited, keeping the earliest arrival for each state.
03Method
- Dynamic programming over (node, visited-set) states on the time-expanded graph.
- Pruning heuristics discard partial routes that cannot lead to a better solution, keeping the state space tractable.
- Implemented in Python and C++.
04Validation and results
Tested on sampled timetable data against greedy baselines. The method improved feasible scheduling and reduced makespan relative to the greedy baselines. The thesis was awarded the maximum grade.
05Limitations
- State space grows exponentially in the number of required stations; pruning helps in practice but does not change the worst case.
- Evaluated on sampled timetables, not a full national schedule.