include failed nets in congestion map
This commit is contained in:
parent
f505694523
commit
d2d619fe1f
1 changed files with 12 additions and 13 deletions
|
|
@ -264,19 +264,18 @@ class PathFinder:
|
|||
abs(last_p.y - target.y) < 1e-6 and
|
||||
abs(last_p.orientation - target.orientation) < 0.1)
|
||||
|
||||
# 3. Add to index ONLY if it reached the target
|
||||
if reached:
|
||||
all_geoms = []
|
||||
all_dilated = []
|
||||
for res in path:
|
||||
all_geoms.extend(res.geometry)
|
||||
if res.dilated_geometry:
|
||||
all_dilated.extend(res.dilated_geometry)
|
||||
else:
|
||||
dilation = self.cost_evaluator.collision_engine.clearance / 2.0
|
||||
all_dilated.extend([p.buffer(dilation) for p in res.geometry])
|
||||
# 3. Add to index (even if partial) so other nets negotiate around it
|
||||
all_geoms = []
|
||||
all_dilated = []
|
||||
for res in path:
|
||||
all_geoms.extend(res.geometry)
|
||||
if res.dilated_geometry:
|
||||
all_dilated.extend(res.dilated_geometry)
|
||||
else:
|
||||
dilation = self.cost_evaluator.collision_engine.clearance / 2.0
|
||||
all_dilated.extend([p.buffer(dilation) for p in res.geometry])
|
||||
|
||||
self.cost_evaluator.collision_engine.add_path(net_id, all_geoms, dilated_geometry=all_dilated)
|
||||
self.cost_evaluator.collision_engine.add_path(net_id, all_geoms, dilated_geometry=all_dilated)
|
||||
|
||||
# Check if this new path has any congestion
|
||||
collision_count = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue