Preserve verify-only diagnostics and honor refinement objectives

This commit is contained in:
Jan Petykiewicz 2026-11-28 20:06:06 -08:00
commit 2611085808

View file

@ -46,10 +46,10 @@ def build_routing_stack(problem: RoutingProblem, options: RoutingOptions) -> Rou
danger_map = DangerMap(bounds=problem.bounds)
refinement = options.refinement
if options.congestion.max_iterations > 0 and (
if options.search.node_limit > 0 and options.congestion.max_iterations > 0 and (
options.objective.danger_weight or (refinement.enabled and refinement.objective is not None and refinement.objective.danger_weight)
):
danger_map.precompute(list(problem.static_obstacles))
danger_map.precompute(problem.static_obstacles)
evaluator = CostEvaluator.from_objective(
world,