Share stable net ordering across routing planners
This commit is contained in:
parent
083f4365b4
commit
5120ef52e2
1 changed files with 37 additions and 38 deletions
|
|
@ -14,13 +14,13 @@ from shapely.geometry import box
|
|||
|
||||
from inire.constants import TOLERANCE_LINEAR
|
||||
from inire.geometry.collision import RoutingWorld
|
||||
from inire.geometry.primitives import port_local_coordinates
|
||||
from inire.model import resolve_bend_geometry
|
||||
from inire.results import AutomaticRoutingReport, RoutingStage, RoutingTiming, _planner_for_mode, _sum_route_metrics
|
||||
from inire.router._bundle import ordered_bundle_terminal_headings, plan_ordered_bundle
|
||||
from inire.router._capacity import cut_capacity, port_conflicts
|
||||
from inire.router._columns import column_jog_candidates, column_seed_candidates
|
||||
from inire.router._compact import compact_port_seed_set, short_shift_seed_set
|
||||
from inire.router._congestion_policy import ordered_nets
|
||||
from inire.router._perimeter import (
|
||||
bundle_turnaround_candidates,
|
||||
perimeter_detour_candidates,
|
||||
|
|
@ -546,14 +546,7 @@ class _AutomaticRun:
|
|||
return None
|
||||
policy = "joint-portal-lanes"
|
||||
unresolved = frozenset(net.net_id for net in residual.nets if net.net_id not in previous.valid_costs)
|
||||
order = options.congestion.net_order
|
||||
nets = residual.nets
|
||||
if order != "user":
|
||||
nets = tuple(sorted(
|
||||
nets,
|
||||
key=lambda net: sum(map(abs, port_local_coordinates(net.start, net.target.x, net.target.y))),
|
||||
reverse=order == "longest",
|
||||
))
|
||||
nets = ordered_nets(residual.nets, options.congestion.net_order)
|
||||
with self._time("plan", planner="corridor-seed", mode="seed", policy=policy):
|
||||
corridors = plan_corridors(
|
||||
residual.bounds,
|
||||
|
|
|
|||
Loading…
Reference in a new issue