Fix core geometry snapping, A* target lookahead, and test configurations
This commit is contained in:
parent
24ca402f67
commit
d438c5b7c7
88 changed files with 1463 additions and 476 deletions
|
|
@ -27,10 +27,10 @@ def main() -> None:
|
|||
danger_map = DangerMap(bounds=bounds)
|
||||
danger_map.precompute(obstacles)
|
||||
|
||||
evaluator = CostEvaluator(engine, danger_map, greedy_h_weight=1.5)
|
||||
evaluator = CostEvaluator(engine, danger_map, greedy_h_weight=1.5, unit_length_cost=0.5, bend_penalty=100.0, sbend_penalty=200.0, congestion_penalty=100.0)
|
||||
|
||||
router = AStarRouter(evaluator, node_limit=10000, snap_size=10.0)
|
||||
pf = PathFinder(router, evaluator, max_iterations=20, base_congestion_penalty=500.0)
|
||||
router = AStarRouter(evaluator, node_limit=1000000, snap_size=5.0)
|
||||
pf = PathFinder(router, evaluator, max_iterations=10, base_congestion_penalty=100.0)
|
||||
|
||||
# 2. Define Netlist
|
||||
netlist = {}
|
||||
|
|
@ -51,6 +51,8 @@ def main() -> None:
|
|||
|
||||
def iteration_callback(idx, current_results):
|
||||
print(f" Iteration {idx} finished. Successes: {sum(1 for r in current_results.values() if r.is_valid)}/{len(netlist)}")
|
||||
print(pf.router.get_metrics_summary())
|
||||
pf.router.reset_metrics()
|
||||
# fig, ax = plot_routing_results(current_results, obstacles, bounds, netlist=netlist)
|
||||
# plot_danger_map(danger_map, ax=ax)
|
||||
# fig.savefig(f"examples/07_iteration_{idx:02d}.png")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue