Complete feasible stress layouts with verified routing fallbacks
This commit is contained in:
parent
d9f0e78330
commit
a2dfb73c33
1 changed files with 1022 additions and 76 deletions
|
|
@ -18,6 +18,7 @@ if TYPE_CHECKING:
|
|||
from inire.model import RoutingOptions, RoutingProblem
|
||||
from inire.results import RoutingResult
|
||||
from inire.router._router import PhaseTimer
|
||||
from inire.router._topology import Corridor
|
||||
|
||||
|
||||
@dataclass(frozen=True, slots=True)
|
||||
|
|
@ -72,13 +73,14 @@ def route_once(
|
|||
options: RoutingOptions,
|
||||
iteration_callback: Callable[[int, dict[str, RoutingResult]], None] | None = None,
|
||||
phase_timer: PhaseTimer | None = None,
|
||||
corridors: dict[str, tuple[Corridor, ...]] | None = None,
|
||||
) -> RoutingRunResult:
|
||||
"""Run one explicitly selected routing mode and capture its diagnostics."""
|
||||
if options.topology.mode == "automatic":
|
||||
raise ValueError("A single routing attempt requires an explicit planner mode")
|
||||
|
||||
finder = build_routing_stack(problem, options).finder
|
||||
results = finder.route_all(iteration_callback=iteration_callback, phase_timer=phase_timer)
|
||||
results = finder.route_all(iteration_callback=iteration_callback, phase_timer=phase_timer, corridors=corridors)
|
||||
if options.topology.mode == "bundle":
|
||||
board = box(*problem.bounds)
|
||||
for result in results.values():
|
||||
|
|
|
|||
Loading…
Reference in a new issue