inire/examples
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-27 11:59:22 -08:00
..
01_simple_route.png add missing images 2026-04-06 16:42:40 -07:00
01_simple_route.py rework structure of everything 2026-03-30 15:32:29 -07:00
02_congestion_resolution.png Clarify routing documentation and refresh example figures 2026-11-27 11:59:22 -08:00
02_congestion_resolution.py example fixes and improvements 2026-03-30 23:40:29 -07:00
03_locked_paths.png Add refinement by default 2026-03-29 15:46:37 -07:00
03_locked_paths.py Demonstrate locked routes with two public routing calls 2026-11-27 00:38:00 -08:00
04_sbends_and_radii.png add missing images 2026-04-06 16:42:40 -07:00
04_sbends_and_radii.py rework structure of everything 2026-03-30 15:32:29 -07:00
05_orientation_stress.png Clarify routing documentation and refresh example figures 2026-11-27 11:59:22 -08:00
05_orientation_stress.py Clarify routing documentation and refresh example figures 2026-11-27 11:59:22 -08:00
06_bend_collision_models.png Clarify routing documentation and refresh example figures 2026-11-27 11:59:22 -08:00
06_bend_collision_models.py example fixes and improvements 2026-03-30 23:40:29 -07:00
07_large_scale_routing.png add missing images 2026-04-06 16:42:40 -07:00
07_large_scale_routing.py fix examples 2026-03-30 21:22:20 -07:00
08_custom_bend_geometry.png add missing images 2026-04-06 16:42:40 -07:00
08_custom_bend_geometry.py example fixes and improvements 2026-03-30 23:40:29 -07:00
09_unroutable_best_effort.png Clarify routing documentation and refresh example figures 2026-11-27 11:59:22 -08:00
09_unroutable_best_effort.py Tie routing documentation to user and developer workflows 2026-11-27 10:15:54 -08:00
advanced-layouts.json Show stress and Terminal-Bench layouts in the examples gallery 2026-11-27 10:16:12 -08:00
advanced.md Clarify routing documentation and refresh example figures 2026-11-27 11:59:22 -08:00
advanced_layouts.py Show stress and Terminal-Bench layouts in the examples gallery 2026-11-27 10:16:12 -08:00
README.md Clarify routing documentation and refresh example figures 2026-11-27 11:59:22 -08:00

Routing examples

After installing Inire, run the scripts from the repository root. They save PNGs in examples/ by default. Arrows at ports show the direction the route leaves its source or enters its target.

python examples/01_simple_route.py

Start with a connection

Script What to look for Preview
Simple route A straight waveguide connects two eastbound ports 80 units apart. Straight connection
Port headings Two routes connect ports just 20 units apart. The lower route departs east and arrives west. The middle route departs north and arrives south. Both need room to turn. Two heading reversals and a straight route

Route around fixed geometry

A second waveguide makes a U-shaped detour around the left end of a fixed straight waveguide.

The first call routes a straight waveguide. The second uses its polygons as keepouts, so the new northbound connection passes to the left of the fixed route. Run 03_locked_paths.py to reproduce the detour. To hold a route fixed in your own design, follow the route reuse workflow.

Fit bends to available room

An S-bend shifts one route 5 units upward. The other route shifts 80 units upward using two 90-degree bends.

Run 04_sbends_and_radii.py to compare a 5-unit shift made with an S-bend and an 80-unit shift made with two 90-degree bends. Both routes leave and arrive heading east. The two 90-degree turns use radius 10 from the allowed radii of 10 and 30.

Script What to look for Preview
Bend proxies Compare three separate runs. The middle route has round physical bends and uses rectangles to check for collisions during search. The bottom route uses a right-angle polygon for both. Arc, box proxy, and custom bend
Custom bends Two runs connect the same ports. Compare the standard arc with the custom right-angle bend. The shaded box at the turn shows the custom bend's search proxy. Two bends at the same corner

The dashed outlines show the shapes used for collision checks during search. The solid outlines show the physical waveguides.

Diagnose congestion or an incomplete route

Script What to look for Preview
Congestion resolution The eastbound route bends around the lower ends of two straight vertical routes. Detour around vertical routes
Best-effort result At node_limit=3, the route stops after its first turn with outcome partial. At 500 it reaches the target heading west. Three versus 500 nodes
Fan-out Ten routes pass through one opening in a wall and spread out to widely spaced targets on the right. Ten routes through one opening

The fan-out script includes a callback that can adjust the search weight for later iterations. With these settings, the automatically generated starting paths already pass verification. For a multi-net example built on the public API, try the two-crossing layout.

Route a challenging layout

Compare each board's inputs with its verified routes in the advanced gallery. It covers mixed widths, competing passages, preplaced crossings, and both heading configurations of the nine-net Terminal-Bench board.