Improve routing quality with bounded cost refinement

This commit is contained in:
Jan Petykiewicz 2026-12-05 12:25:58 -08:00
commit db685794e5

View file

@ -141,6 +141,27 @@ The tuning case measures a four-turn detour inside a caller-supplied window. The
For constant timing models, a verified choice can eliminate a later candidate at the exact same adjusted delay when it also costs the same or less. In seven interleaved octagonal runs without refinement, this reduced the tuning median from 2.26 s to 1.02 s. Both runs considered 1,334 proposals and selected identical routes at zero residual skew and the same catalog cost. Verified replacements fell from 524 to 136. The released-reservation case completed one independent route with retry and zero with retry disabled.
## Routing cost holdouts
```sh
PYTHONPATH=. python scripts/benchmark_catalog_routing.py --case peer-cost-holdout --mode typed --repeat 30
PYTHONPATH=. python scripts/benchmark_catalog_routing.py --case matched-cost-holdout --mode typed --repeat 30
```
Both cases put a bypass beside a straight lane where the two routes compete for clearance. The matched case adds a reference lane. Each includes two authored reference layouts, which are verified before routing is timed. The benchmark starts from the ports and keepouts and reports the reference costs alongside its own result. The references for the matched case must both satisfy the zero-skew constraint.
In 30 interleaved runs per mode against `1359463`, the router completed every net on both holdouts. The matched result kept zero skew.
| Case | Prior cost | New cost | Cheaper reference | Change in time × cost² |
| --- | ---: | ---: | ---: | ---: |
| Competing profiles | 0.9560 | 0.5477 | 0.5480 | −34% in both modes |
| Matched competing profiles | 1.4160 | 0.7967 | 0.7970 | −23% typed, −24% octagonal |
After a complete layout verifies, catalog refinement can try a cheaper straight profile that displaces one independent peer. It ranks straight spans by potential savings, checks at most four spans, and can reroute at most two peers in separate trials. It accepts a trial only if it lowers the joint cost, verifies the entire layout, and keeps any affected match group within tolerance.
Native automatic routing with explicit length weights ranks windows containing S-bends by the difference between their verified cost and a geometric lower bound. It budgets up to one eighth of the preceding search expansions for this pass and caps it at 12 windows. It accepts only cheaper, verified splices into the incumbent.
In five interleaved native runs, the six-net splitter dropped from 39,963.88 to 36,661.15 in weighted cost and improved its time × cost² score by 15%. The single-net north-launch case kept its route and took about 5% longer.
## Catalog acceptance checks