Fix locked-order coverage and native benchmark scoring
This commit is contained in:
parent
7476209ef3
commit
b59888265d
1 changed files with 43 additions and 10 deletions
|
|
@ -17,7 +17,7 @@ import shapely
|
|||
from shapely.geometry import box, mapping
|
||||
|
||||
from inire import RoutingOptions, RoutingStage, route
|
||||
from inire.router._routing_policy import _best_trial
|
||||
from inire.router._routing_policy import LockPlan, _best_trial, _residual_problem
|
||||
from inire.router._routing_policy import _trial as _summarize_trial
|
||||
from inire.tests.direct_routing_policies import DIRECT_POLICIES
|
||||
from inire.tests.direct_routing_policies import direct_trials as _direct_trials
|
||||
|
|
@ -98,13 +98,7 @@ def _order_trials(problem: RoutingProblem, options: RoutingOptions, strategy: st
|
|||
seeds = {net_id: result.as_seed() for net_id, result in incumbents.items()}
|
||||
second_problem = replace(problem, initial_paths={**seeds, **problem.initial_paths})
|
||||
elif strategy == "seed-order-locked" and incumbents:
|
||||
locked = tuple(shape for result in incumbents.values() for shape in result.locked_geometry)
|
||||
second_problem = replace(
|
||||
problem,
|
||||
nets=tuple(net for net in problem.nets if net.net_id not in incumbents),
|
||||
static_obstacles=problem.static_obstacles + locked,
|
||||
initial_paths={net_id: seed for net_id, seed in problem.initial_paths.items() if net_id not in incumbents},
|
||||
)
|
||||
second_problem = _residual_problem(problem, LockPlan(incumbents))
|
||||
else:
|
||||
second_problem = problem
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue