Skip to content

spatial-monorepo


spatial-monorepo / wayfinding/src / RelaxationRung

Interface: RelaxationRung

Defined in: packages/wayfinding/src/grid-types.ts:187

One rung of the ordered relaxation ladder (Wayfinding v2 plan §3, HEB options[] crib sheet §7). findGridRouteWithLadder tries rungs in array order and stops at the first that yields a route — this is data, not control flow, so tuning the ladder never touches the search algorithm (issue #477 acceptance criteria).

accessible (opts.accessible) is deliberately NOT a rung field: it is a hard constraint applied identically at every rung (mirrors astar.ts's accessible handling, which skips inaccessible edges outright rather than de-prioritising them) — a wheelchair user can't "relax" their way onto a flight of stairs.

Properties

blockAvoidanceZones

blockAvoidanceZones: boolean

Defined in: packages/wayfinding/src/grid-types.ts:211

Block units named by the caller's soft-mode avoidanceZones at this rung (HEB's in-use/reserved-room analogue, Phase 5). 'hard'-mode zones (AvoidanceZone.blockMode, issue #473) are never gated by this flag — they are blocked at every rung unconditionally, see runLadderOnBaseGrid in grid-relaxation.ts.


blockRestricted

blockRestricted: boolean

Defined in: packages/wayfinding/src/grid-types.ts:203

Block units whose IMDF restriction is non-null at this rung. When the caller also supplies GridLadderOptions.restrictionSchedule (issue #473), a restricted unit only actually counts as blockable here while isRestrictionActiveNow(schedule, opts.now) is true — outside the schedule's closed windows it is treated as unrestricted regardless of this flag. Without a schedule, unchanged pre-#473 behaviour (always blockable when this flag is true).


clearanceM

clearanceM: number

Defined in: packages/wayfinding/src/grid-types.ts:191

Wall-vertex clearance disc radius (metres) at normal corners for this rung.


clearanceOpeningM

clearanceOpeningM: number

Defined in: packages/wayfinding/src/grid-types.ts:193

Wall-vertex clearance disc radius (metres) at opening-endpoint corners for this rung.


name

name: string

Defined in: packages/wayfinding/src/grid-types.ts:189

Human/debug-readable rung name — surfaced on the route result so callers can see which rung won.

Released under commercial licensing.