Complete feasible stress layouts with verified routing fallbacks

This commit is contained in:
Jan Petykiewicz 2026-11-26 15:23:24 -08:00
commit a2dfb73c33

10
DOCS.md
View file

@ -123,6 +123,8 @@ Use `RoutingProblem.initial_paths` to provide semantic per-net seeds. Seeds are
| `objective` | `None` | Optional override objective for refinement. `None` reuses the search objective. |
| `max_windows_per_net` | `24` | Maximum candidate windows attempted per net, shared across improvement rounds. Use `1` for a faster pass or `None` to remove the window limit. |
The refiner scores candidate moves from their ports and lengths before building polygons. When the incumbent is valid in the current collision world, it verifies the replacement window against obstacles, other nets, and the unchanged parts of its own path. The router verifies the final layout in full.
## Topological Routing
`RoutingOptions.topology` accepts a `TopologyOptions` value. The `mode` is the caller's routing choice. In automatic mode, inire selects a planner for the layout and can retry with another one. Seed mode generates verified initial paths before the current router completes and refines the layout.
@ -175,7 +177,13 @@ Automatic routing verifies generated layouts with inire and uses guide, seed, an
Automatic carries caller-supplied paths into the usual seed handling. For custom bend geometry or an installation without constrained triangulation, it uses the lattice router directly at the configured limit. The optional refinement pass runs on the selected layout when enabled. Set `TopologyOptions(mode="off")` to select lattice-only routing explicitly.
For unseeded layouts made up of more than two short, forward, same-heading shifts across both axes, automatic can run the full initial guide budget first. If that pass falls short, the near-port probe and other fallbacks remain available. The identical guide retry is skipped when the first pass ran without a timeout. Calls with an iteration callback, shuffled net ordering, or at most 100 nodes per search use the regular search order.
For eligible unseeded layouts with fixed headings along both axes, `local-sbend` fits one S-bend between each pair of shifted ports using a configured radius and an exact forward span on the port lattice. It samples positions along the link, packs paths to meet clearance, and accepts the layout only after all nets pass verification. Crossings use the supplied port positions and keepouts.
If short, forward, same-heading shifts across both axes still need search, automatic can run the full initial guide budget first. The near-port probe and other fallbacks follow if needed. The identical guide retry is skipped when the first pass ran without a timeout. Calls with an iteration callback, shuffled net ordering, or at most 100 nodes per search use the regular search order.
If the initial probe leaves unresolved nets on an ordered horizontal bank, `column-jogs` can assign lanes across separated obstacle columns. It schedules the rises and drops as staggered pairs of 90-degree turns, using each net's width and the configured clearance. When only one net remains after an incumbent-residual attempt, `residual-dogleg` tries a four-turn detour through gaps between the locked paths and obstacles. Both planners verify the complete layout before selecting it.
When an incumbent-residual attempt falls short of the routing bound, automatic can retry a shared portal with a joint lane assignment. It keeps the incumbent paths locked and assigns distinct lanes to two to four residual nets at one portal. The retry needs an unresolved net at that portal and a changed guide. It uses the initial node budget and at most three congestion iterations. An improving candidate is checked together with the incumbent paths before it can be selected.
The report records the `selected_planner`, `verified_net_ids`, and the overall `max_routed` upper bound. Each stage includes the verified net IDs and any paths that went outside the board. A path whose physical geometry crosses the board boundary has `result.report.out_of_bounds=True`, which contributes one collision to the result. `result.reached_target` still records whether that path reached its target port.