OpenTripPlanner
Past, Present and the Future
Hannes Junnila
FOSDEM 2023 — 4 February 2023
About me
Tinkered with OTP since ~2011
hannes.junnila@gmail.com
Past — OpenTripPlanner 1
Present — OpenTripPlanner 2
Future — Roadmap
Agenda
Past
Pain points with OTP 1
Time-dependent A* search with trip banning
Run search
Ban trips in
found path
Present
OTP Routing Process
Flex Search
Extends the stops the user can reach by utilizing flexible transit, which has no fixed timetables/route
Transfer Optimizer
Optimizes where to transfer between each leg pair in the itineraries
Street Search
Searches for the nearest stops, where the user can board a transit vehicle
Itinerary Filtering/Decorating
Filters down the itineraries presented to the user and enriches them eg. with price
Transit Search
Searches the scheduled routes between the stops close to the origin and destination
API Routing Request
API Routing Response
Street Search
Fixed Route
09:00
09:05
09:08
09:12
09:15
09:20
09:24
09:30
Hail and Ride Sections
09:00
09:05
09:08
09:12
09:15
09:20
09:24
09:30
Flexible Areas
Area A
Flexible Areas
Area A
Area B
Flexible Areas
Area A
Area B
Area C
Fixed Stops in an Area
Area A
Feeder services
Area A
Complex services
Area A
Area B
Raptor
State | Transit Strategy | Search direction | Optimization | Result | Response time |
Standard | Standard | Forward | - | Paths [ time, transfers ] | 66 ms |
Standard | Standard | Reverse | - | Paths [ time, transfers ] | 68 ms |
BestTime | Standard | Forward | - | Best time & hops, No paths | 63 ms |
BestTime | Standard | Reverse | - | Best time & hops, No paths | 60 ms |
Standard | NoWait | Forward | 1 iteration | Paths [ time, transfers ] | 49 ms |
Standard | NoWait | Reverse | 1 iteration | Paths [ time, transfers ] | 48 ms |
BestTime | NoWait | Forward | 1 iteration | Best time & hops, No paths | 41 ms |
BestTime | NoWait | Reverse | 1 iteration | Best time & hops, No paths | 37 ms |
MC | MC | Forward | - | Paths [ time, transfers, cost ] | 508 ms |
MC | MC | Forward | Heuristic Destination Check | Paths [ time, transfers, cost ] | 320 ms |
28
Samples
�Search�Window�2 - 20 h��Dataset
Norway
Transfer optimization
Where to transfer between a pair of trips?
* Not in raptor
Itinerary Filtering & Decorating
NeTEx–GTFS
Different formats have different benefits
Sandbox extensions
GraphQL APIs
Two APIs with different vocabularies
Vector tiles
Travel time analysis
Simplified operations
https://docs.opentripplanner.org/en/dev-2.x/BuildConfiguration/
//build-config.json
{
"transitModelTimeZone": "Europe/Brussels",
"osmCacheDataInMem": "true",
"osm": [
{
"source": "https://download.geofabrik.de/europe/belgium-latest.osm.pbf",
"osmTagMapping": "germany"
}
],
"transitFeeds": [
{
"type": "gtfs",
"feedId": "NMBS",
"source": "http://gtfs.irail.be/nmbs/gtfs/latest.zip"
},
{
"type": "gtfs",
"feedId": "LIJN",
"source": "http://gtfs.irail.be/de-lijn/de_lijn-gtfs.zip"
},
{
"type": "gtfs",
"feedId": "TEC",
"source": "https://gtfs.irail.be/tec/tec-gtfs.zip"
},
{
"type": "gtfs",
"feedId": "MIVB",
"source": "https://gtfs.irail.be/mivb/mivb-gtfs.zip"
},
]
}
Future
Performance
Competition neutrality
Unified GraphQL API