Illustrate the intermediate stages of complex-routing example 1
This commit is contained in:
parent
365c14c59a
commit
c3e420eadb
3 changed files with 402 additions and 86 deletions
|
|
@ -196,7 +196,7 @@
|
|||
["outside_upper", [589, 353, 180], [33, 353, 180], 2]
|
||||
]
|
||||
},
|
||||
"terminal-bench": {
|
||||
"complex-routing-example-1": {
|
||||
"bounds": [0, 0, 2500, 1000],
|
||||
"clearance": 6.0,
|
||||
"bend_radii": [50.0],
|
||||
|
|
@ -223,7 +223,7 @@
|
|||
["net_08", [12, 450, 0], [1112, 991, 0], 2.0]
|
||||
]
|
||||
},
|
||||
"terminal-bench-point-terminals": {
|
||||
"complex-routing-example-1-point-terminals": {
|
||||
"bounds": [0, 0, 2500, 1000],
|
||||
"clearance": 6.0,
|
||||
"bend_radii": [50.0],
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
# Advanced routing examples
|
||||
|
||||
Compare the input board and the calculated routes on layouts with tight turns, shared openings, or preplaced crossing cells. The layouts come from Inire's stress tests and the nine-net Terminal-Bench cases.
|
||||
Compare the input board and the calculated routes on layouts with tight turns, shared openings, or preplaced crossing cells. The layouts come from Inire's stress tests and the nine-net example.
|
||||
|
||||
- [Competing passages](#competing-passages) for different guide widths and routes travelling in both directions.
|
||||
- [Bend and return room](#bend-and-return-room) for alternating detours, short shifts, and branches.
|
||||
- [Placed crossings](#placed-crossings) for access slots and external detours.
|
||||
- [Nine-net Terminal-Bench board](#nine-net-terminal-bench-board) for fixed and inferred headings on the same input.
|
||||
- [Complex-routing example 1](#complex-routing-example-1) for fixed and inferred headings on the same input.
|
||||
|
||||
## Run a layout
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ Select a case by its name below. Repeat `--case` to draw several layouts, or omi
|
|||
```sh
|
||||
python examples/advanced_layouts.py \
|
||||
--case stress-crossings-shared-outside-detour \
|
||||
--case terminal-bench \
|
||||
--case complex-routing-example-1 \
|
||||
--output-dir /tmp/inire-advanced-routes
|
||||
```
|
||||
|
||||
|
|
@ -90,20 +90,20 @@ In `stress-crossings-shared-outside-detour`, a straight external waveguide joins
|
|||
|
||||

|
||||
|
||||
## Nine-net Terminal-Bench board
|
||||
## Complex-routing example 1
|
||||
|
||||
Nine closely spaced source ports on the left feed routes around seven keepouts. Both examples use guides 2 units wide, a clearance of 6 units, and a radius of 50 units for bends and S-bends. For the original board data and the waypoint export command, see the [Terminal-Bench fixture guide](../docs/benchmark-fixtures.md#automatic-nine-net-terminal-bench-routing).
|
||||
Nine closely spaced source ports on the left feed routes around seven keepouts. Both variants use guides 2 units wide, a clearance of 6 units, and a radius of 50 units for bends and S-bends. [Fixture and waypoint export](../docs/benchmark-fixtures.md#complex-routing-example-1)
|
||||
|
||||
To follow how the router builds and checks the paths in these figures, read the [Terminal-Bench walkthrough](../docs/terminal-bench-walkthrough.md).
|
||||
To see the lane plan, turnaround, and refinement, follow the [illustrated walkthrough](../docs/complex-routing-example-1.md).
|
||||
|
||||
### Fixed eastbound headings
|
||||
|
||||
In `terminal-bench`, all routes must leave and arrive heading east. Follow `net_08` from the bottommost source around the board. Near the top edge, it turns back to approach its target from the west.
|
||||
In `complex-routing-example-1`, all routes must leave and arrive heading east. Follow `net_08` from the bottommost source around the board. Near the top edge, it turns back to approach its target from the west.
|
||||
|
||||

|
||||

|
||||
|
||||
### Point terminals
|
||||
|
||||
In `terminal-bench-point-terminals`, the coordinates are the same and `infer_terminal_headings=True` lets the planner choose directions. The setup shows just the port positions. In the result, `net_08` enters its target from the east and avoids the final turnaround.
|
||||
In `complex-routing-example-1-point-terminals`, `infer_terminal_headings=True` lets the planner choose directions at the same port coordinates. In the result, `net_08` enters its target from the east and avoids the final turnaround.
|
||||
|
||||

|
||||

|
||||
|
|
|
|||
|
|
@ -28,6 +28,9 @@ if TYPE_CHECKING:
|
|||
from inire import RoutingRunResult
|
||||
|
||||
INPUTS = Path(__file__).with_name("advanced-layouts.json")
|
||||
COMPLEX_EXAMPLE = "complex-routing-example-1"
|
||||
COMPLEX_EXAMPLE_POINTS = f"{COMPLEX_EXAMPLE}-point-terminals"
|
||||
_CASE_ALIASES = {"terminal-bench": COMPLEX_EXAMPLE, "terminal-bench-point-terminals": COMPLEX_EXAMPLE_POINTS}
|
||||
COLORS = ("#007189", "#af511b", "#654a99", "#427326", "#b73c62", "#975b2d", "#2f569a", "#734359", "#328179")
|
||||
|
||||
|
||||
|
|
@ -108,7 +111,10 @@ def _plot_case(problem: RoutingProblem, options: RoutingOptions, run: RoutingRun
|
|||
def main() -> int:
|
||||
layouts = loads(INPUTS.read_text(encoding="utf-8"))
|
||||
parser = ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--case", action="append", choices=layouts, help="Layout to route. Repeat to select several. Defaults to all.")
|
||||
parser.add_argument(
|
||||
"--case", action="append", choices=layouts, type=lambda name: _CASE_ALIASES.get(name, name),
|
||||
help="Layout to route. Repeat to select several. Defaults to all.",
|
||||
)
|
||||
parser.add_argument("--output-dir", type=Path, default=INPUTS.parent, help="Directory for the setup and result PNGs.")
|
||||
args = parser.parse_args()
|
||||
args.output_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
|
|
|||
Loading…
Reference in a new issue