1-bend visibility graph
Also known as 1-bend visibility graph search
routing connector-routing
The 1-bend visibility graph search finds a short orthogonal route, made of horizontal and vertical segments, with few bends. Its nodes are the ports and the obstacle corners, each corner with a heading along one of its sides. An edge joins two nodes when a path with at most one bend connects them. A* over this graph tries only routes that hug obstacles, and the paper proves that one of them is optimal for length and bends. In connector-routing it is opt-in (Search::OneBend), because tests found a narrow slit where it misses the optimum.
Pseudocode
algorithm OneBendSearch(s, t)input: source port s, target port t, orthogonal visibility graph G of the sceneoutput: a route from s to t with low length and bend costN ← hugging-headings(scene) ∪ endpoint-nodes(s, t) ▷ (corner, heading along a side)OPEN ← start-states(s) ▷ ordered by f = g + estimate(n, t)while OPEN ≠ ∅ don ← extract-min(OPEN)if arrives(n, t) then ▷ at t, moving against one of its directionsreturn path-to(n)for each (m, c) in one-bend-successors(n) doif g[n] + c < g[m] theng[m] ← g[n] + cparent[m] ← ninsert-or-update(OPEN, m)return ovg-route(s, t) ▷ fallback: A* over G itselffunction one-bend-successors(n)▷ edges are made on demand by walking G; the quadratic edge set is never storedS ← ∅for each b in ⟨point(n)⟩ ++ ray(G, point(n), heading(n)) doif b ≠ point(n) and ((b, heading(n)) ∈ N or arrives((b, heading(n)), t)) thenS ← S ∪ {((b, heading(n)), length-cost(n, b))} ▷ straight, no bendif b ≠ point(n) or may-bend-in-place(n) then ▷ not at the start, not after an empty legfor each p in perpendicular(heading(n)) dofor each w in ⟨b⟩ ++ ray(G, b, p) do ▷ w = b: an empty second legif (w, p) ∈ N or (w ≠ b and arrives((w, p), t)) thenS ← S ∪ {((w, p), length-cost(n, b, w) + bend-penalty)}return SIn the crates
connector-routingOpt-in A* over the lazily generated 1-bend visibility graph of obstacle-hugging routes; not exact in general.
Lineage
Led to
Nothing on this site.
Papers
- Seeing Around Corners: Fast Orthogonal Connector Routing Kim Marriott, Peter J. Stuckey, Michael Wybrow · 2014· Diagrammatic Representation and Inference (Diagrams 2014), LNCS