tweak ex7 tunavles for 6 iter convergence
This commit is contained in:
parent
6ec953b76e
commit
b1feaa89f8
1 changed files with 4 additions and 4 deletions
|
|
@ -27,10 +27,10 @@ def main() -> None:
|
||||||
danger_map = DangerMap(bounds=bounds)
|
danger_map = DangerMap(bounds=bounds)
|
||||||
danger_map.precompute(obstacles)
|
danger_map.precompute(obstacles)
|
||||||
|
|
||||||
evaluator = CostEvaluator(engine, danger_map, greedy_h_weight=2.0, unit_length_cost=0.1, bend_penalty=100.0, sbend_penalty=400.0, congestion_penalty=20.0)
|
evaluator = CostEvaluator(engine, danger_map, greedy_h_weight=1.5, unit_length_cost=0.1, bend_penalty=100.0, sbend_penalty=400.0, congestion_penalty=100.0)
|
||||||
|
|
||||||
router = AStarRouter(evaluator, node_limit=2000000, snap_size=5.0, bend_radii=[50.0], sbend_radii=[50.0], use_analytical_sbends=False)
|
router = AStarRouter(evaluator, node_limit=2000000, snap_size=5.0, bend_radii=[50.0], sbend_radii=[50.0], use_analytical_sbends=False)
|
||||||
pf = PathFinder(router, evaluator, max_iterations=15, base_congestion_penalty=20.0, congestion_multiplier=1.2)
|
pf = PathFinder(router, evaluator, max_iterations=15, base_congestion_penalty=100.0, congestion_multiplier=1.4)
|
||||||
|
|
||||||
# 2. Define Netlist
|
# 2. Define Netlist
|
||||||
netlist = {}
|
netlist = {}
|
||||||
|
|
@ -90,8 +90,8 @@ def main() -> None:
|
||||||
top_hotspots = sorted(hotspots.items(), key=lambda x: x[1], reverse=True)[:3]
|
top_hotspots = sorted(hotspots.items(), key=lambda x: x[1], reverse=True)[:3]
|
||||||
print(f" Top Hotspots: {top_hotspots}")
|
print(f" Top Hotspots: {top_hotspots}")
|
||||||
|
|
||||||
# Adaptive Greediness: Decay from 2.0 to 1.1 over 25 iterations
|
# Adaptive Greediness: Decay from 1.5 to 1.1 over 10 iterations
|
||||||
new_greedy = max(1.1, 2.0 - ((idx + 1) / 25.0))
|
new_greedy = max(1.1, 1.5 - ((idx + 1) / 10.0) * 0.4)
|
||||||
evaluator.greedy_h_weight = new_greedy
|
evaluator.greedy_h_weight = new_greedy
|
||||||
print(f" Adaptive Greedy Weight for Next Iteration: {new_greedy:.3f}")
|
print(f" Adaptive Greedy Weight for Next Iteration: {new_greedy:.3f}")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue