Wave-router: Auto-router for photonic and RF waveguides
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jan Petykiewicz 8a97c1e64b Check actual terminal faces in search and seed replay
Keep nominal terminal checks for standard geometry. Defer to materialized geometry when a custom outline can reach a terminal and report blocked terminals consistently in iteration callbacks.
2026-11-29 16:37:14 -08:00
archive/routing Clarify routing documentation and refresh example figures 2026-11-27 11:59:22 -08:00
docs Check actual terminal faces in search and seed replay 2026-11-29 16:37:14 -08:00
examples Keep route placement at the layout writer boundary 2026-11-29 16:36:32 -08:00
inire Check actual terminal faces in search and seed replay 2026-11-29 16:37:14 -08:00
plans Keep route placement at the layout writer boundary 2026-11-29 16:36:32 -08:00
scripts Repair exact visibility and hole rendering and streamline search state 2026-11-28 20:13:00 -08:00
.gitignore Separate user guides, benchmarks, and routing internals 2026-11-26 21:14:29 -08:00
.python-version Initial buildout 2026-03-07 08:26:29 -08:00
DOCS.md Keep route placement at the layout writer boundary 2026-11-29 16:36:32 -08:00
LICENSE.md initial commit 2026-03-06 18:48:04 -08:00
pyproject.toml Preserve routing coverage and verify release and example regressions 2026-11-28 20:57:22 -08:00
README.md Keep route placement at the layout writer boundary 2026-11-29 16:36:32 -08:00
uv.lock Package only runtime code in wheels and set compatible dependency floors 2026-11-28 20:42:25 -08:00

inire

Use Inire to connect ports on a photonic or RF layout with straight segments, 90-degree bends, and S-bends. Supply each connection's port coordinates and travel directions, along with the board bounds, keepouts, and allowed bend radii. Each result reports whether the route reached its target and passed verification. A search that stops early can return a partial path.

Install

From a checkout with Python 3.11 or newer, run pip install ..

Route a net

from inire import (
    NetSpec, Port, RoutingProblem,
    route,
)

start = Port(50, 100, 0)
target = Port(250, 100, 0)
net = NetSpec("input", start, target)
problem = RoutingProblem(
    bounds=(0, 0, 1000, 1000),
    nets=(net,),
    clearance=2,
)

run = route(problem)
result = run.results_by_net["input"]
if result.is_valid:
    print(result.report.total_length)
else:
    print(result.outcome)

A short solid waveguide connects the start at (50, 100) and target at (250, 100). Both port arrows point east.

The example prints 200.0 in the layout's coordinate unit. Both ports use heading 0 because the path leaves the source and enters the target travelling east. Use result.as_seed() to save the placement recipe.

Route your own layout

Develop Inire

  • To set up the development environment and find the relevant routing code, use the developer guide.
  • To measure routing coverage, cost, or runtime, run the routing benchmarks.

License

Inire is distributed under the GNU Affero General Public License v3.