transitous
transitous copied to clipboard
OSM routing solution
There's multiple different OSM-based routing modules in MOTIS:
-
osrm
(with foot, bike and car profile) -
ppr
-
parking
(does that actually route itself or delegate toosrm-foot
/ppr
?) - Valhalla (experimental, not used by default, meant as an alternative for some of the other)
Those are used from other modules:
-
nigiri
can use either one of those for enabling intermodal routing -
gbfs
depends onosrm-foot
explicitly (as that's faster thanppr
, althoughppr
would produce equally usable results) -
parking
depends on ???
And there's issues with those:
-
osrm
,ppr
andparking
fail to import the full European dataset, running out of memory. -
osrm-foot
is significantly faster thanppr
(therefore used bygbfs
) butppr
has the better results due to supporting profiles (and thus preferred for walking routes), but both use distinct databases and thus having both significantly increase the data import cost. -
parking
is even more expensive to import - Valhalla has a bit of missing API to be a viable full replacement for
osrm
andppr
, see https://github.com/motis-project/motis/issues/439#issuecomment-1944603630. - Valhalla integration needs work due to significant memory leaks (see also https://github.com/motis-project/motis/issues/439).
How do we resolve this?
Possible options:
(1) No intermodal routing, disable all of this.
Worst possible outcome IMHO, but can be a useful temporary step to unblock work on the GTFS pipeline while this issue is investigated.
(2) Make OSRM/PPR import work
At this point this would likely mean obtaining large high speed SSD storage and enable swapping. OSRM documentation suggests with a total of 350G a full planet file is importable. We have to consider that this isn't a one-time thing though, there is no support for incremental update. Whether ppr
and parking
also work with this then is unknown, at least parking
seemed 3x more RAM-expensive in the local CH test.
When done all MOTIS features would become available.
(3) Make Valhalla work as a replacement to OSRM/PPR
This would likely mean development efforts on Valhalla and/or MOTIS. Valhalla seems able to import the full EU dataset with less than 24G RAM (although I/O heavy), so even a full planet import is not unthinkable. Valhalla does have support for foot/bike/car routing and could thus in theory replace osrm
and possibly ppr
(profile support to be verified). gbfs
doesn't work with Valhalla yet, how that will perform eventually is unknown. And how this impacts/relates to parking
is also unknown.
Going this way would enable intermodal routing for foot/bike/car in a first step, while gbfs
and parking
would probably take longer to become available.