Refresh the routing walkthrough and record final verification

This commit is contained in:
Jan Petykiewicz 2026-11-28 21:01:41 -08:00
commit 1eed75ff5a
2 changed files with 9 additions and 7 deletions

View file

@ -14,7 +14,7 @@ Origin. The problem uses board 1 from Terminal-Bench pull request 345. [Pinned l
`build_problem()` reads the example entry into a `RoutingProblem` and `RoutingOptions`. The board is 2,500 by 1,000 units with seven rectangular keepouts and nine nets. The guides are 2 units wide, the clearance is 6, and both kinds of bends use radius 50. The fixed-heading case starts with no seeds and requires each net to launch and arrive heading east. [Example inputs](../examples/advanced-layouts.json) · [Problem builder](../examples/advanced_layouts.py#L34)
`route()` dispatches to automatic routing. The router checks whether any aligned terminal pairs are too close and whether a vertical cut has fewer tracks than nets that need to cross it. The board passes both checks, so automatic asks the constructive planners to verify all nine nets. [Automatic entry point](../inire/router/_automatic.py#L603) · [Capacity checks](../inire/router/_capacity.py#L27)
`route()` dispatches to automatic routing. The router checks whether any aligned terminal pairs are too close and whether a vertical cut has fewer tracks than nets that need to cross it. The board passes both checks, so automatic asks the constructive planners to verify all nine nets. [Automatic entry point](../inire/router/_automatic.py#L648) · [Capacity checks](../inire/router/_capacity.py#L28)
![The nine input nets surround seven rectangular keepouts. A cut at x = 500 has openings at the bottom, center, and top of the board.](figures/complex-routing-example-1-input.png)
@ -32,7 +32,7 @@ The dots mark waypoints in the proposed seeds. The lower inset shows the two con
## 3. Fit the required eastbound arrival
Automatic routing compares the bundle's inferred headings with the input. Only `net_08` differs. Its initial bundle arrives from the east heading west. The turnaround planner adjusts the upper shelf route `net_07` and brings `net_08` back below it. Near the target, `net_08` rises west of `x = 1112` and takes a final right turn to arrive heading east. The planner recompiles the two changed seeds and submits the full set for verification. [Constructive planner dispatch](../inire/router/_automatic.py#L206) · [Turnaround candidates](../inire/router/_perimeter.py#L103)
Automatic routing compares the bundle's inferred headings with the input. Only `net_08` differs. Its initial bundle arrives from the east heading west. The turnaround planner adjusts the upper shelf route `net_07` and brings `net_08` back below it. Near the target, `net_08` rises west of `x = 1112` and takes a final right turn to arrive heading east. The planner recompiles the two changed seeds and submits the full set for verification. [Constructive planner dispatch](../inire/router/_automatic.py#L238) · [Turnaround candidates](../inire/router/_perimeter.py#L103)
![Two views show the materialized shelf and return paths. In the initial plan net_08 arrives westbound. In the turnaround candidate it passes below the shelf, rises left of the target, and arrives eastbound.](figures/complex-routing-example-1-turnaround.png)
@ -40,13 +40,13 @@ The arrow above each red target square shows the arrival heading.
## 4. Verify the seeds and refine the layout
The first `bundle-turnaround` candidate verifies all nine nets. Automatic routing runs a worker in mode `off` for one iteration with a one-node search limit and refinement disabled. The worker materializes each seed into physical polygons, installs the paths, and rechecks the installed layout for port joins, board containment, and collisions. Every net has a complete seed, so the worker records zero A* expansions. The full coverage lets automatic routing skip its search trials. [Seeded worker setup](../inire/router/_automatic.py#L168) · [Seed installation](../inire/router/_router.py#L819) · [Physical verification](../inire/geometry/collision.py#L608)
The first `bundle-turnaround` candidate verifies all nine nets. Automatic routing runs a worker in mode `off` for one verification pass with a zero-node search limit and refinement disabled. The worker materializes each seed into physical polygons, installs the paths, and rechecks the installed layout for port joins, board containment, and collisions. The full coverage lets automatic routing skip its search trials. [Seeded worker setup](../inire/router/_automatic.py#L183) · [Seed installation](../inire/router/_router.py#L870) · [Physical verification](../inire/geometry/collision.py#L707)
![The upper panel shows the physical paths of the first four nets in installation order. The lower panel shows all nine paths after verification.](figures/complex-routing-example-1-verification.png)
The upper panel reconstructs the first four installed paths from the worker's verified seeds. The lower panel shows the full set checked together.
Automatic then replays the verified seeds in a worker with refinement enabled. The refiner tries replacing sections with at least four 90-degree bends and verifies the resulting layout. In this run, refinement changes `net_05` and `net_07` and keeps all nine nets verified. The refined layout wins on the configured objective, which includes component penalties as well as length. [Refinement handoff](../inire/router/_automatic.py#L584) · [Trial comparison](../inire/router/_routing_policy.py#L44)
Automatic then replays the verified seeds in a worker with refinement enabled. The refiner tries replacing sections with at least four 90-degree bends and verifies the resulting layout. In this run, refinement changes `net_05` and `net_07` and keeps all nine nets verified. The refined layout wins on the configured objective, which includes component penalties as well as length. [Refinement handoff](../inire/router/_automatic.py#L617) · [Trial comparison](../inire/router/_routing_policy.py#L45)
![The refined net_07 stays near the top edge longer and descends close to its target. Its earlier approach is dashed, and the outer return remains visible below it.](figures/complex-routing-example-1-refinement.png)
@ -91,7 +91,7 @@ Check the versions in the environment that runs Inire.
python -c 'import shapely; print(shapely.__version__, shapely.geos_version_string)'
```
Inire's base dependency permits Shapely 2.0 for lattice routing and constructive plans. With a compatible backend, automatic already uses triangulation whenever it needs corridor search. Here the ordered bundle and turnaround cover all nine nets, so automatic can move directly to verification. Explicit `guide` and `seed` also verify supplied paths without a mesh when `node_limit=0`.
Inire supports Shapely 2.0.7 for lattice routing and constructive plans. With a compatible backend, automatic already uses triangulation whenever it needs corridor search. Here the ordered bundle and turnaround cover all nine nets, so automatic can move directly to verification. Explicit `guide` and `seed` also verify supplied paths without a mesh when `node_limit=0`.
## Compare a guide-mode search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

After

Width:  |  Height:  |  Size: 130 KiB

Before After
Before After