Improve verified routing cost and runtime

Use verified terminal and column constructions, cheaper straight profiles, and tighter cost bounds to reduce routing work. Reuse geometry in clearance checks and tuning while retaining verified coverage and timing constraints.

Report median routing time times squared cost in the benchmark tools and record the comparisons and regression coverage.
This commit is contained in:
Jan Petykiewicz 2026-12-05 12:05:07 -08:00
commit 13594632d4

View file

@ -94,7 +94,7 @@ For structured logging, `dataclasses.asdict(run)` preserves the per-net fields.
| `proximity_range` | `10.0` | Obstacle proximity scoring range in layout units. Scale it with the coordinates when changing units. Large perimeters use an exact boundary index once the sample budget is reached. |
| `bend_physical_length` | `None` | Optional authored centerline length for the shared custom 90-degree template, including tangent extensions. Search, refinement, and reports use it when supplied. |
| `distance_heuristic_weight` | `1.0` | Finite, nonnegative multiplier for the remaining-distance term only. Increase it to favor progress toward the target relative to estimated turn penalties. The routed path's objective stays the same. |
| `terminal_jog_limit` | `0` | Enables verified straight and single-turn candidates during native greedy warm start without corridors. For parallel ports with a lateral offset, it also caps the number of two-turn launch positions checked per net. Zero skips this planning step. |
| `terminal_jog_limit` | `0` | Enables verified straight and single-turn candidates during native greedy warm start without corridors. It also caps the number of two-turn jogs or four-turn detours checked per net. Zero skips this planning step. |
A custom S-bend outline uses local coordinates. Its input face is centered at `(0, 0)`, its output face at `(span, offset)`, and both ports face east. Use the same grid span as `SBendSeed(offset, radius)`, including any tangent extension to reach the output face. For example, an offset of `40` with radius `50` has its output at `(80, 40)`. The router rotates and translates the entire outline and uses it for collision checks and seed replay. Supply a separate outline to customize the opposite offset. Width matching allows a relative difference of `1e-12` to account for floating-point conversions. If multiple outlines apply to the same move, `route()` skips that move for the affected net and sets `sbend_template_error` in the final result and iteration callbacks. Direct calls to `SearchOptions.sbend_template()` and `sbend_outline()` raise `ValueError` for an ambiguous match. Moves with no matching outline use the circular S-bend. Set `SBendOutline.length` to use a process-specific centerline length for scoring, refinement, and reporting. The default is the nominal circular length. Automatic mode uses lattice search when an enabled outline matches a net width. Bundle mode requires circular bends for its nets.
@ -153,9 +153,11 @@ Increase the iteration limit when later reroutes might resolve conflicts. Adjust
| `guide_strength` | `0.75` | Maximum added guidance cost per unit length. Explicit guide and seed runs with at least two configured congestion iterations may try one additional iteration from the start with zero guidance cost. The retry retains corridor move proposals and wins only with higher verified coverage. |
| `seed_node_limit` | `600` | Total seed-search expansions per net, capped by the active search limit. |
| `infer_terminal_headings` | `False` | Let automatic or bundle mode choose headings for supported layouts with flexible port directions. Automatic preserves caller headings when initial paths are supplied. |
| `automatic_cost` | `"selective"` | Try a second column-planning pass based on route cost when the first pass chains short S-bends. Use `"always"` to try both passes or `"never"` to plan by span alone. |
| `automatic_cost` | `"selective"` | Try weighted column planning when the span planner chains short S-bends. Explicit length weights that put a premium on S-bends can also trigger a verified quarter-turn column candidate, including through shared apertures where adjacent columns leave too little room for a jog, or a detour between aligned ports for a single net. Use `"always"` to run both S-bend planning passes or `"never"` to plan by span alone. |
| `automatic_length_weights` | `None` | Optional straight, 90-degree bend, and S-bend length multipliers for automatic candidate selection. The default uses the search objective. |
When automatic cost planning uses explicit length weights, it may replace a verified column route's S-bend excursion with a lower-cost straight that fits the same endpoints and clears every other route.
### DiagnosticsOptions
The flags default to `False`.