Separate user guides, benchmarks, and routing internals
This commit is contained in:
parent
24559bb6aa
commit
e4d5952677
1 changed files with 846 additions and 270 deletions
|
|
@ -1,26 +1,32 @@
|
|||
# Router architecture
|
||||
|
||||
Use this guide when changing how Inire chooses a route, spends search time, or accepts a path. The public `route()` entry point runs one worker for an explicit mode. Automatic mode can run several workers and choose among their results. Each worker has its own collision world and search state. That boundary matters when changing a retry because the new worker sees only the obstacles, locks, and seed hints that the caller passes to it. [Public API](../DOCS.md) · [Worker setup](../inire/router/_stack.py)
|
||||
Start with the stage that chooses the route, then inspect the worker that produced it. The public `route()` entry point runs one worker for an explicit mode. Automatic mode can run several. Each worker sees the obstacles, locks, and seed hints passed to it. [Public API](user/api-reference.md) · [Worker setup](../inire/router/_stack.py)
|
||||
|
||||
## Automatic routing
|
||||
|
||||

|
||||
|
||||
The diagram shows the usual sequence for arc bends. A verified layout can reach the routing target early. When attempts run out, selection keeps the best verified coverage found. Custom physical bends, polygonal proxies, or missing constrained triangulation take a lattice-only path.
|
||||
|
||||
1. **Establish a stopping target.** Each disjoint pair of incompatible fixed ports rules out one route. For supported rectangular cuts, the capacity check uses the narrowest guide to bound how many paths fit through each opening. Reaching one of these bounds can justify stopping with partial coverage. Keep those bounds separate from estimates such as corridor occupancy or a failed attempt. [Capacity checks](../inire/router/_capacity.py)
|
||||
2. **Exploit layout structure before search.** Bundles place ordered tracks through barriers. Column schedules assign tracks to openings and stagger turns between them. Compact planners fit local connections between constrained ports. A schedule supplies seeds to the ordinary verifier. This lets the planner make cheap geometric proposals while the verifier checks the resulting physical paths. [Bundles](../inire/router/_bundle.py) · [Columns](../inire/router/_columns.py) · [Compact planners](../inire/router/_compact.py)
|
||||
3. **Probe cheaply before spending the wider budget.** Direct trials can lock verified straight links and search for the remaining nets. A change in lock order or a small unlocked probe can free a nearby turn. The near-port stage uses up to 100 nodes per search and two congestion iterations for the arc proxy. Alternate proxies use the configured iteration limit because another shallow iteration can find a path the wider retry misses or finds at higher cost. The wider lookahead uses up to 500 nodes and the configured iteration limit. Both respect smaller caller limits. Guide and column attempts can precede the probe when the geometry makes them promising. [Stage order](../inire/router/_automatic.py) · [Direct trials](../inire/router/_routing_policy.py)
|
||||
4. **Choose what to keep fixed.** If the remaining ports are still connected with verified paths locked, route the unresolved nets around those paths. If locks disconnect the residual, use movable seed hints so the next search can move an incumbent. A residual with several nets sharing a portal can benefit from a different lane assignment. When those attempts stall, seed and lattice workers can search the whole layout. A final lattice retry can use the caller's ceiling. [Residual routing](../inire/router/_automatic.py) · [Corridors and lanes](topological-routing.md#corridor-planning-and-realization)
|
||||
5. **Accept a checked layout.** Compare verified coverage first. Cost breaks ties between candidates with identical verified IDs. A complete locked layout or an improving joint retry must pass its required whole-layout check before selection. Refinement is also a candidate replacement and must preserve the verified ID set. [Trial selection](../inire/router/_routing_policy.py)
|
||||
|
||||
The `stress-retry-straight-decoy` fixture shows why a valid link can be a poor lock. A straight trunk divides the board and blocks perpendicular nets. The probe can keep the branches and lower rail. A four-turn dogleg then completes the trunk around them without a wider search. If you change lock ordering or acceptance, check that all four nets still verify together. [Fixture](../inire/tests/stress_routing_benchmarks.py) · [Regression test](../inire/tests/test_routing_benchmarks.py)
|
||||
### Example of a poor lock
|
||||
|
||||
Automatic mode dispatches directly to lattice search for custom physical or polygonal proxy bends and when constrained triangulation is unavailable. Include those layouts when changing a fallback or geometry option. [Benchmark groups](topological-routing.md#benchmark-corpus)
|
||||
1. A straight trunk in `stress-retry-straight-decoy` fits on its own. Once locked, it divides the board and blocks two perpendicular nets.
|
||||
2. The probe can keep the branches and lower rail. A four-turn dogleg completes the trunk around them before wider search.
|
||||
3. If you change lock ordering or acceptance, check that all four nets still verify together. [Fixture](../inire/tests/stress_routing_benchmarks.py) · [Choose a benchmark](benchmarks.md#choose-a-case)
|
||||
|
||||
## Detailed search and congestion
|
||||
|
||||
A search state describes a snapped position and heading. Having the right coordinates alone leaves the terminal orientation unresolved. Straight, 90-degree bend, and S-bend moves compete in weighted A*. Ray casts, visible corners, and corridor waypoints suggest where a straight could end. This is why a move-generation change can fix a partial path even at the same node budget. Admission checks collision, cost, and state dominance before enqueuing candidates. [Move generation](../inire/router/_astar_moves.py) · [Admission](../inire/router/_astar_admission.py) · [Search](../inire/router/_search.py)
|
||||
- **Build and admit moves.** Weighted A* searches snapped positions and headings. Rays, visible corners, and corridor waypoints propose straight endpoints. Admission checks clearance, cost, and state dominance. A move-generation change can help a net reach its target at the same node budget. [Moves](../inire/router/_astar_moves.py) · [Admission](../inire/router/_astar_admission.py) · [Search](../inire/router/_search.py)
|
||||
|
||||
The congestion driver removes a net's old path, installs its replacement, and then routes other nets around or across it according to the active overlap penalty. Later iterations raise that penalty to encourage separation. A route that reached its target early in the iteration can collide with a net installed later. Verify the installed paths together before reviewing conflicts or reporting progress. The best iteration is ranked by completed nets, then conflict edges and dynamic collisions. Restore that snapshot before local repair. [Routing loop](../inire/router/_router.py) · [Congestion policy](../inire/router/_congestion_policy.py)
|
||||
- **Recheck the installed set.** The congestion driver replaces paths in routing order and raises the overlap penalty between unresolved iterations. A later route can collide with one completed earlier, so the driver verifies the installed set. It ranks snapshots by completed nets, then by conflicts and dynamic collisions. [Routing loop](../inire/router/_router.py) · [Congestion policy](../inire/router/_congestion_policy.py)
|
||||
|
||||
If the remaining conflicts involve a small set of nets, another global iteration can spend most of its budget revisiting the same geometry. Late iterations can reroute the conflicting subset and keep expensive incumbents. Pair-local repair can then try two orderings with the rest of the geometry held fixed. Verify a proposed pair again in the live world before accepting it. When comparing the iteration loop, include the final result and the handoff to local repair. [Pair-local search](../inire/router/_pair_local.py) · [Read an iteration trace](routing-diagnostics.md#traces)
|
||||
- **Repair a small conflict set.** Late iterations can focus on the conflicting nets. Pair-local repair restores the best snapshot, keeps the remaining geometry fixed, and tries two orderings for an eligible pair. It checks the proposed replacement in the live world. [Pair-local search](../inire/router/_pair_local.py) · [Read an iteration trace](routing-diagnostics.md#traces)
|
||||
|
||||
## Geometry and refinement
|
||||
|
||||
|
|
@ -39,4 +45,4 @@ Refinement looks for cheaper replacements in windows of a completed path. With a
|
|||
| Congestion, seeds, or pair-local repair | Coverage and conflict evolution at iteration boundaries, plus the final installed geometry after repair. |
|
||||
| Cost or refinement | Equal verified ID sets before comparing per-net lengths or costs. Check that the improvement survives whole-layout verification. |
|
||||
|
||||
Use [benchmark profiles](topological-routing.md#reproduce-a-comparison) for policy comparisons and [exact parity](routing-diagnostics.md#reproduce-and-compare) for behavior-preserving changes.
|
||||
Use [benchmark profiles](benchmarks.md#choose-a-profile) for policy comparisons and [exact parity](routing-diagnostics.md#reproduce-and-compare) for behavior-preserving changes.
|
||||
|
|
|
|||
Loading…
Reference in a new issue