OpenTripPlanner up to 2× Faster: RAPTOR Route Optimization for Transit Agencies
Route optimization for transit agencies, at the scale of national journey planners: OpenTripPlanner plans trips for agencies and governments worldwide. We found a change that makes the targeted routing phase of its RAPTOR (Round-Based Public Transit Routing) search up to two times faster — and got it merged upstream, enabled by default.
Published
- Industry
- Public transit, Mobility
- Region
- Global
- Services
- Performance engineering, Algorithm research, Open-source contribution
- Timeline
- 2026

- Faster targeted routing phase
- Up to 2×
- Merged into OTP, on by default
- Upstream
Who this helps: transit agencies running OTP
Route optimization for transit agencies runs, more often than not, on OpenTripPlanner (OTP), one of the world’s most widely used open-source multimodal journey planners. It combines transit schedules with walking, cycling and ridesharing, and its users range from single city agencies to national governments.
It powers trip planning for TriMet (Portland), MBTA (Boston), MARTA (Atlanta), LA Metro, Sound Transit (Seattle), HART (Tampa), METRO (Houston) and New York State DOT in the United States, and for nationwide deployments in Norway and Finland, Skånetrafiken in southern Sweden, Rennes and Grenoble in France, Piemonte/Torino and Trento in Italy, Lower Saxony and Leipzig in Germany, and Valencia in Spain.
What is RAPTOR?
RAPTOR (Round-Based Public Transit Routing) is an algorithm for finding journeys in public transport networks. It works in rounds directly on the timetable, without building a graph first: the first round finds every stop reachable on a single ride, and each further round allows one more transfer. OpenTripPlanner 2 uses RAPTOR for its transit search.
The problem: speeding up RAPTOR queries in OpenTripPlanner
- 01
Faster routing without destabilizing a mature engine
OTP serves enormous query volumes across large multimodal networks, so milliseconds saved per request add up to lower latency for riders and lower compute cost for the agencies running it. Any change had to be small, safe and easy to review, because it would ship to every deployment.
How we sped up RAPTOR routing
We profiled the hot paths of the routing core and targeted the highest-impact bottleneck. The fix is a few lines of code — sorting a list and adding a single early-exit test — which kept the change low-risk and easy to upstream.
The full technical write-up, with benchmarks across networks, is in our research article.

Results: RAPTOR routing up to 2× faster
- On OTP’s continuous performance benchmark, the targeted routing phase became up to two times faster in many networks.
- At Skånetrafiken, the public transport authority in southern Sweden, average response times dropped by at least 20% across the board after the change went into production.
- The change was merged into OpenTripPlanner and enabled by default, so every deployment benefits — from single agencies to nationwide systems.
- A minimal, low-risk change that is easy to maintain.
In the news

Spatial Source ·
Small code tweak leads to big journey mapper saving
Just 457 lines of code written by UNSW PhD candidate Andrii Rohovyi has vastly boosted the capabilities of OpenTripPlanner.
Read on Spatial Source ↗Medianet Newshub ·
UNSW researcher accelerates journey planning for millions of public transport users
A simple coding improvement developed by a UNSW PhD candidate is being integrated into one of the world’s most widely used open-source public transport journey planners.
Read on Medianet Newshub ↗The National Tribune ·
UNSW researcher accelerates journey planning for millions of public transport users
A simple coding improvement developed by a UNSW PhD candidate is being integrated into one of the world’s most widely used open-source public transport journey planners.
Read on The National Tribune ↗
UNSW Newsroom ·
UNSW researcher accelerates journey planning for millions of public transport users
A simple coding improvement developed by a UNSW PhD candidate is being integrated into one of the world’s most widely used open-source public transport journey planners.
Read on UNSW Newsroom ↗
After we put this into production at Skånetrafiken, the public transport authority in southern Sweden, we saw our average response times drop by at least 20% across the board. We’ve almost never seen improvements this big.
Project details
- Industry
- Public transit, Mobility
- Region
- Global
- Services
- Performance engineering, Algorithm research, Open-source contribution
- Technologies
- OpenTripPlanner
- Java
- RAPTOR
- Multimodal routing
- Timeline
- 2026
Discover more

HowToGet: almost anywhere in New South Wales, without a car
Public Transit · Routing · OpenTripPlanner · Open Data · Product

AI-powered construction monitoring platform
Construction · Computer Vision · VLM · Drones · 3D Visualization · SaaS

LLM-based credit scoring using transaction data
Scoring systems · Data Science · Fintech