inire/README.md
Jan Petykiewicz 63acb94642 Fix routing correctness and bound optional routing work
Check physical keepout clearance, retain useful partial paths, and account for all pair repair searches. Verify complete seeds early and recover narrower corridors when shared guides are blocked.

Keep frontier diagnostics outside routing decisions and bound their work by the worker deadline. Correct benchmark scaling and scenario validation, and update the guides and release metadata.
2026-12-02 17:16:34 -08:00

52 lines
1.8 KiB
Markdown

# inire
Inire routes photonic and RF layouts with straights, 90-degree bends, and S-bends.
## Install
From a checkout with Python 3.11 or newer, run `pip install .`. Inire requires Shapely 2.1 or newer and checks at import that Shapely is linked against GEOS 3.10 or newer.
## Route a net
```python
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.](https://mpxd.net/code/jan/inire/raw/branch/topo/docs/figures/first-route.png)
The example prints `200.0`. Heading `0` is east at both ports.
## Route your own layout
- [Layout inputs](https://mpxd.net/code/jan/inire/src/branch/topo/docs/user/route-a-layout.md#user-content-define-the-inputs)
- [Partial routes](https://mpxd.net/code/jan/inire/src/branch/topo/docs/user/tune-and-troubleshoot.md#user-content-why-a-net-stopped-short)
- [Placement recipes](https://mpxd.net/code/jan/inire/src/branch/topo/docs/user/route-a-layout.md#user-content-save-a-placement-recipe)
- [User guide](https://mpxd.net/code/jan/inire/src/branch/topo/DOCS.md)
## Develop Inire
- [Developer guide](https://mpxd.net/code/jan/inire/src/branch/topo/docs/development.md)
- [Routing benchmarks](https://mpxd.net/code/jan/inire/src/branch/topo/docs/benchmarks.md)
## License
Inire is distributed under the [GNU Affero General Public License v3](https://mpxd.net/code/jan/inire/src/branch/topo/LICENSE.md).