AccessRoute HK
ACCESSROUTE HK / METHOD 01

Policy-Constrained Route Planning

See how travel needs, rain and facility closures change a route. Then explore the algorithm behind the choice.

EXPLORE THE IDEA

Change a setting. Watch the route change.

The planner first removes connections you cannot use, then compares the remaining paths.

Read the technical method ↓
Getting around
Weather
Try a facility closure

An abstract teaching graph. Routes use the same policy and search code as the application.

Calculating the route…
Selected Available Unavailable

What does “best route” mean?

A hard rule removes a connection entirely. A preference changes how the planner compares usable connections. In rain-aware balanced mode, less uncovered distance wins first; cost breaks ties. Shortest mode keeps the hard rules and compares distance. If every connection between floors is blocked, the planner returns no route.

Scroll the figure horizontally to read all panels ↔

Three panels show a cross-floor mobility graph, edge filtering and objective costs, then lexicographic Dijkstra with a priority queue and current-anchor replanning.
Figure 1. Policies construct a feasible graph before lexicographic Dijkstra selects a path. (a) Cross-floor graph representation. (b) Hard constraints and objective costs. (c) Search, reconstruction and replanning.
01 / FORMULATION

Constraints define the feasible graph

A mobility graph G = (V, E) stores public-path nodes and directed connections across floors. Each node carries a map ID, longitude, latitude and optional floor. Each edge carries length, travel mode, indoor and shelter flags, accessibility attributes and an optional facility ID. A bidirectional edge contributes one arc in each direction.

The query context contains endpoints s, t, user constraints u, objective o, weather w and the events active at time τ. A blocking policy excludes an edge; each remaining policy contributes a finite, nonnegative penalty.

Aτ = {a : active(a) ∧ start(a) ≤ τ < end(a)}
(1)

An event without an expiry has end(a) = ∞.

Eτ = {e ∈ E : allowed(e, u, Aτ)}
(2)

Hard constraints

Policies check step-free access, slope and width limits, opening times, facility closures and explicit exclusions. Strict accessibility mode also rejects unknown accessibility attributes and missing dimensions required by the query.

Event overlays

Events target facility IDs or edge IDs. The planner constructs a fresh adjacency list for each query, so closures and restorations leave the stored base graph intact.

Exposure takes priority when the objective requires it

For sheltered routing, the primary weight counts outdoor distance without shelter. For indoor routing, it counts all outdoor distance. Other objectives use a zero primary weight. The secondary weight combines an objective-dependent base cost with policy penalties.

Primary edge weight qo(e)
ObjectivePrimary weight
ShelteredEdge length if outdoor and uncovered; zero otherwise.
IndoorEdge length if outdoor; zero otherwise.
Balanced, shortest, least effort, fastestZero.
co(e) = bo(e) + ∑p ∈ policies πp(e),   πp(e) ≥ 0
(3)

The base cost bo is edge length, except that fastest mode uses estimated traversal and waiting time. Policy penalties depend on the objective: shortest mode suppresses soft penalties; least-effort mode increases stair, escalator and slope penalties. The fastest score combines time with policy penalties. It therefore expresses a routing preference score. Balanced mode switches to sheltered ordering when rain or a covered-route preference applies.

P* = arg minP : s ↝ t, P ⊆ Eτlex 〈 ∑e ∈ P qo(e), ∑e ∈ P co(e) 〉
(4)

Lexicographic order compares the first component, then breaks ties with the second. Every edge weight has nonnegative components.

02 / ALGORITHM

A priority queue orders two-component path labels

Algorithm 1 Policy-Constrained Lexicographic Dijkstra

Input: Graph G, endpoints s, t, context (u, o, w, Aτ).

Output: A feasible node / edge sequence, or no_route with policy reason codes.

  1. Build adjacency over Eτ; attach weights (qo, co) to each arc.
  2. Set D[v] ← (∞, ∞) and pred[v] ← ∅ for every node.
  3. Set D[s] ← (0, 0); push (D[s], s) into min-heap Q; settled ← ∅.
  4. while Q is nonempty do
  5. (d, v) ← extract-minlex(Q).
  6. if v ∈ settled or d ≠ D[v] then continue.
  7. if v = t then break; otherwise add v to settled.
  8. for each feasible outgoing arc e = (v, z) do
  9. d′ ← D[v] + (qo(e), co(e)).
  10. if d′ <lex D[z] then
  11. D[z] ← d′; pred[z] ← (v, e); push (d′, z) into Q.
  12. if D[t] = (∞, ∞) then return no_route.
  13. Backtrack pred from t to s; aggregate distance, metrics, reasons and warnings.
  14. return the reconstructed route.

The binary heap avoids a linear scan of unsettled nodes. On the stored mobility graphs, search takes O((|V| + |E|) log |V|). Context changes trigger a fresh search from the current anchor; the session retains completed journey stages.

03 / IMPLEMENTATION

Route outputs retain policy decisions

The route returns node IDs, edge IDs, distance, preference cost, exposure and time metrics, policy reasons and data-quality warnings. A segmentation pass converts its edge sequence into floor, transition, bridge and outdoor instructions.

Engine boundary. This formulation describes the general graph engine. The field-route wrapper also evaluates stored, ordered route sequences to preserve their exit identities. It applies the same edge policies and uses graph search when connecting an anchor to a branch.
METHOD 02 Retrieval-augmented visual localization