Illustrate the intermediate stages of complex-routing example 1

This commit is contained in:
Jan Petykiewicz 2026-11-27 19:28:48 -08:00
commit c3e420eadb

View file

@ -24,6 +24,7 @@ from inire.tests.direct_routing_policies import direct_trials as _direct_trials
from inire.tests.routing_corpus import (
AUTOMATIC_POLICIES,
CASE_GROUPS,
EXAMPLE_NAMES,
PROFILES,
automatic_options,
benchmark_weighted_length,
@ -266,7 +267,8 @@ def main() -> None:
)
parser.add_argument(
"--case",
choices=tuple(CASE_GROUPS),
choices=tuple(name for name in CASE_GROUPS if name not in EXAMPLE_NAMES),
type=lambda name: EXAMPLE_NAMES.get(name, name),
action="append",
help="Select a case or suite. Use 'corpus' to select all boards.",
)
@ -304,7 +306,8 @@ def main() -> None:
):
print(f"{title} (--case {group})")
for case in CASE_GROUPS[group]:
print(f" {case.name:40} {case.description}")
name = EXAMPLE_NAMES.get(case.name, case.name)
print(f" {name:40} {case.description}")
return
if (args.nodes and min(args.nodes) < 1) or (args.iterations is not None and args.iterations < 1) or args.repeat < 1:
parser.error("--nodes, --iterations and --repeat must be positive")
@ -346,7 +349,8 @@ def main() -> None:
budgets = tuple(dict.fromkeys(args.nodes or (base.search.node_limit,)))
iterations = base.congestion.max_iterations if args.iterations is None else args.iterations
for budget in budgets:
print(f"{case.name} | {budget} nodes per attempt", flush=True)
name = EXAMPLE_NAMES.get(case.name, case.name)
print(f"{name} | {budget} nodes per attempt", flush=True)
options = replace(
base,
topology=topology,