Skip to content

Seed complete routing approximations before congestion refinement - #175

Closed
AnasSarkiz wants to merge 4 commits into
agent/bugreport87-portpoint-reprofrom
fix/seed-complete-routing-approximation
Closed

Seed complete routing approximations before congestion refinement#175
AnasSarkiz wants to merge 4 commits into
agent/bugreport87-portpoint-reprofrom
fix/seed-complete-routing-approximation

Conversation

@AnasSarkiz

@AnasSarkiz AnasSarkiz commented Sep 5, 2026

Copy link
Copy Markdown
Member

Superseded by #179, which uses the existing routing and timeout-acceptance flow with a smaller change.

The pedometer case in tscircuit/tscircuit-autorouter#2385 reaches the iteration limit before selective reripping has retained a complete graph. Best-solution acceptance is already enabled, but there is no complete solution to restore.

Add createInitialAssignments to DuplicateCongestedPortSolver. The prepass retains its independently routed paths, gives different nets distinct crossing points, and seeds ordinary region assignments before congestion refinement. Distance-aware routing can ignore soft port penalties for a compact initial approximation. Existing assignments keep their geometry and port ownership. In this opt-in mode, duplicated points remain on shared rectangular edges, including near their endpoints; allocation-only callers retain their existing placement behavior.

The existing best-solution mechanism can then return a complete approximation when refinement reaches its cap. This does not assert zero congestion or DRC violations, and disconnected input still fails explicitly.

Integration and scope

Stacked on #167, which contains the merged #172 changes required by Pipeline9's current dependency pin. The diff contains only this library change and its tests/docs.

Consumers opt in with new DuplicateCongestedPortSolver(graph, { createInitialAssignments: true, useSerializedPortPenalties: false }), then refine the output with SelectiveReripTinyHyperGraphSolver. The prepass has its own routing budget. The companion Pipeline9 dependency/caller update is tscircuit/tscircuit-autorouter#2406. It uses this prepass to construct a complete final approximation if the normal graph search exhausts its budget without a complete candidate, including the 230-connection case previously excluded from the prepass. Generated seeds should remain ordinary rerippable routes, rather than being treated as caller-owned preloaded copper. Downstream high-density routing is outside this PR.

Validation

  • bun test: 133 passed, 1,118 assertions, including the committed routing-approximation SVG.
  • bun run typecheck, bun run format:check, bun run build, and git diff --check pass.
  • Regressions cover complete output with one refinement iteration, existing route geometry and port ownership, disconnected input, and horizontal/vertical boundary placement.
  • Local Pipeline9 reproduction with the opt-in caller change retains all 230 pedometer routes after a forced one-iteration graph budget. This validates the hypergraph stage only.

Snapshot

Complete approximation retained at the iteration limit

@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
tiny-hypergraph Ready Ready Preview Sep 5, 2026 2:23pm UTC

Request Review

@tscircuitbot

Copy link
Copy Markdown

Benchmark This PR

Run benchmarks by commenting on this PR:

/benchmark [benchmark.sh args...]
/benchmark --dataset <hg07|srj18> --limit <n> --solver <core|poly> --families <default|default+deep|all> --concurrency <n|auto>

Everything after /benchmark is forwarded directly to ./benchmark.sh.
Every command runs current main and the PR head sequentially on the same Blacksmith machine, then reports their results side by side.

Examples:

  • /benchmark -> all committed completed SRJ18 Pipeline7 cases, core solver
  • /benchmark --limit 4 -> first four committed Pipeline7 cases
  • /benchmark --dataset srj18 --concurrency auto -> srj18 samples with runner CPU-count concurrency
  • /benchmark --sample sample003 -> one committed SRJ18 Pipeline7 case
  • /benchmark --dataset hg07 --limit 20 --solver poly -> first 20 hg07 samples with the poly solver
  • /benchmark --dataset hg07 --limit 40 --families default+deep -> first 40 hg07 samples with deeper candidate families

Any PR whose title contains [BENCHMARK TEST] will automatically run the benchmark workflow on PR updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants