Preserve routing coverage and verify release and example regressions
This commit is contained in:
parent
e6ae242cb2
commit
8f6a917f51
1 changed files with 206 additions and 91 deletions
|
|
@ -1,5 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import time
|
||||
from dataclasses import dataclass, replace
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
|
|
@ -48,6 +49,7 @@ def build_routing_stack(problem: RoutingProblem, options: RoutingOptions) -> Rou
|
|||
danger_map,
|
||||
options.objective,
|
||||
greedy_h_weight=options.search.greedy_h_weight,
|
||||
distance_heuristic_weight=options.search.distance_heuristic_weight,
|
||||
)
|
||||
context = AStarContext(evaluator, problem, options)
|
||||
finder = PathFinder(context)
|
||||
|
|
@ -72,8 +74,9 @@ def route_once(
|
|||
if options.topology.mode == "automatic":
|
||||
raise ValueError("A single routing attempt requires an explicit planner mode")
|
||||
|
||||
started_at = time.monotonic()
|
||||
finder = build_routing_stack(problem, options).finder
|
||||
results = finder.route_all(iteration_callback=iteration_callback, phase_timer=phase_timer, corridors=corridors)
|
||||
results = finder.route_all(iteration_callback=iteration_callback, phase_timer=phase_timer, corridors=corridors, started_at=started_at)
|
||||
if options.topology.mode == "bundle":
|
||||
for result in results.values():
|
||||
if not result.is_valid:
|
||||
|
|
|
|||
Loading…
Reference in a new issue