Planning & Search in Rust
Esc

Loading…

↑↓ move ↵ open Esc close
Colour theme
All algorithms

Nudging

Also known as Orthogonal nudging

routing connector-routing

Nudging moves route segments apart, so that connectors which share a channel (the free space between obstacles) no longer lie on top of each other. One pass moves the vertical segments and a second pass the horizontal ones; segments that end at a port stay fixed. Separation constraints of the form x_v − x_u ≥ gap keep the order of neighbouring segments, so routes keep their shape and get no new crossings. connector-routing solves them exactly, with no linear program: it finds the largest common gap and puts each segment midway in its free range. Full nudging (full) also lets boxes move and grow to make room.

Pseudocode

algorithm Nudge(R, O, δ, cap)input: routes R on the routing graph, obstacles O, separation δ, largest spread gap capoutput: one polyline per route, with shared stretches moved apartfor each pass in ⟨x, y⟩ do                 ▷ x moves vertical segments, then y horizontalS ← maximal-segments(R, pass)            ▷ a segment that ends at a port is fixedS ← order-on-lines(S)                    ▷ the path order of the routes on each lineC ← scan-line-constraints(S, O)          ▷ each x_v − x_u ≥ gap, all forward in scan orderPLACED ← ∅while some movable segment of S is not in PLACED do      ▷ water-filling roundsfor each M in components(C, S ∖ PLACED) do             ▷ placed segments are constantst ← largest-gap(M, cap)              ▷ binary search on feasible(lowest(M, t))if t < δ thent ← largest-gap(M, cap) with obstacle gaps relaxed to 0lo ← lowest(M, t)                    ▷ one forward pass: longest pathshi ← highest(M, t)                   ▷ one backward passB ← Mif t < cap thenB ← bottleneck(M, lo, hi)          ▷ the members with the least slackfor each s in B dox[s] ← ⌊(lo[s] + hi[s]) / 2⌋       ▷ a component open on one side packs at lo or hiPLACED ← PLACED ∪ Breturn polylines(R, x)

In the crates

Lineage

Comes from

builds on VPSC

Led to

Orthogonal drawing pipeline combines it

Papers

  1. Orthogonal Connector Routing Michael Wybrow, Kim Marriott, Peter J. Stuckey · 2010· Graph Drawing (GD 2009), LNCS introduces doi 10.1007/978-3-642-11805-0_22
  2. A Simple Pipeline for Orthogonal Graph Drawing Tim Hegemann, Alexander Wolff · 2023· Graph Drawing and Network Visualization (GD 2023), LNCS extends doi 10.1007/978-3-031-49275-4_12 arXiv 2309.01671