Remix.run Logo
namibj 3 hours ago

I'd like to point out that according to a tech blog or similar from years back, Google Maps public transit routing supposedly employs the zone-boundary hierarchy to do similar preprocessing, exploiting that at least in networks like e.g. Germany, there's a hierarchy level roughly corresponding to what is perceptually "same city" where the number of border crossings between the zones has a local minimum (splitting a zone and merging two adjacent zones would both increase the border crossing count of the resulting zone relative to the local minima one).

They then do all-pairs precomputing between the border nodes and connections within the zone; then use this to cheaply handle the long-distance travel, while only needing to do full non-precomputable pathing locally within the start and the end zone (and ofc jumping across the contractions on the way between the border of the start zone and the border of the destination zone).