Skip to content

Enforce zero-intersection geometric routing - #134

Draft
seveibar wants to merge 2 commits into
mainfrom
agent/reject-greedy-single-layer-crossings
Draft

Enforce zero-intersection geometric routing#134
seveibar wants to merge 2 commits into
mainfrom
agent/reject-greedy-single-layer-crossings

Conversation

@seveibar

@seveibar seveibar commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • validate greedy final hops with the same hard constraints as normal routing
  • track actual segment endpoint coordinates instead of relying only on boundary-angle ordering
  • add REQUIRE_ZERO_INTERSECTIONS for solves that must rerip every same-layer or cross-layer intersection
  • accept immutable fixedRegionSegments so routes can avoid pre-routed fanout copper
  • selectively rerip routes that cross another route or fixed geometry
  • preserve the best partial state for bounded high-density solves

Why

The clad1 RP2040 route exposed three gaps in the existing intersection model. Interior ports can make angular interval ordering disagree with physical segment geometry, pre-routed fanout traces were invisible to the hypergraph cost model, and the timeout/greedy path could accept a crossing final hop. Together those paths could report a nominally routed graph while emitting intersecting copper.

The new strict mode uses real coordinates, includes immutable incoming geometry, and refuses to finish until both same-layer and crossing-layer intersection counts are zero.

Validation

  • bun run typecheck
  • 28 focused solver, selective-rerip, bus-routing, and region-path tests pass
  • new regressions cover interior-port geometric crossings, fixed geometry surviving rerips, strict zero-intersection acceptance, and reripping real intersections
  • clad1 RP2040 integration reaches 117/117 graph connections with zero reported geometric intersections

@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
tiny-hypergraph Ready Ready Preview, Comment Jul 28, 2026 8:17am

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.
The result comment shows the matching dataset from the latest stored main-branch benchmark artifact beside the PR run; main is not rerun for each PR benchmark request.

Examples:

  • /benchmark -> hg07, all samples, core solver
  • /benchmark --dataset srj18 --limit 20 -> first 20 srj18 samples
  • /benchmark --dataset srj18 --concurrency auto -> srj18 samples with runner CPU-count concurrency
  • /benchmark --sample sample002 -> one hg07 sample
  • /benchmark --limit 20 --solver poly -> first 20 hg07 samples with the poly solver
  • /benchmark --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.

@seveibar seveibar changed the title Reject crossings in greedy final routes Enforce zero-intersection geometric routing Jul 28, 2026
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