You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(routing): plan trips around per-waypoint times and dwell
A stop can now carry its own schedule: leave after a time, be there by a
time, an appointment that fixes both, and how long you stay. A pure solver
in @openmapx/core turns those constraints plus a leg-travel oracle into one
canonical trip schedule — arrival, departure, dwell and wait at every stop,
with violations naming the exact waypoint and shortfall.
Ground trips are served by POST /directions/schedule. A dwell-only trip
takes one provider call, mapping dwell onto Valhalla's per-location
`waiting` so the engine's own clock advances across each stop and later legs
are costed for the later hour. Any window constraint switches to explicit
leg chaining — one two-point call per leg, pinned to the instant the solver
computed — concatenated back into a single route so the map, route card and
turn-by-turn consume it unchanged. Multi-stop public transport is served by
POST /transit/plan/chain, which plans one connection per segment and hands
each segment's realtime arrival to the next.
Providers declare per-semantic support as native, emulated, approximate or
unsupported. The worst level across the semantics a request uses becomes the
response fidelity, so an OSRM-only deployment gets a correct schedule
labelled as an estimate rather than a 503. A repo-wide gate keeps those
declarations complete and internally consistent.
Dwell is deliberately excluded from route duration — it belongs to the
schedule, not the driving time. Stop-order optimisation is refused while a
window is set, because reordering could move you past an appointment.
Also moves the trip-level departure time out of DirectionsPanelContent's
local state into directionsStore. The map's independent directions query
never saw it there, so a timed trip made the panel and the map key different
cache entries and draw different routes.
Closes#308
0 commit comments