fix: Uber the first mile when no station is walkable from the origin #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-first-mile"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while probing query times: several genuinely long trips returned zero itineraries instead of a slow one.
Cause
The planner could Uber the last mile - ride to the station nearest a destination with no service and drive from there - but the scan only ever started from stations within
WALK.maxAccessM(1.5km) of the origin. If nothing was in range at the start, no station was ever ready to board and the search returned nothing at all. Affected: Breezy Point, much of Staten Island, most of Westchester off a Bee-Line route.Fix
The scan now takes an access profile alongside the existing egress one: walk where a station is in range, otherwise Uber to one of the nearest stations per system (same per-system candidate rule as the last mile, so a subway station is not crowded out by closer bus stops), capped by
MAX_FIRST_MILE_M= 20km so it does not offer a 40km ride to the nearest train. NewfirstMileUberoption, on by default.An itinerary can now have an Uber leg at each end, so:
Results
The benchmark cases, all of which start within walking distance of a stop, return identical itineraries.