Recover bounded routes around bends and through narrow corridors
This commit is contained in:
parent
d02dbb872f
commit
af3ddfbb09
1 changed files with 616 additions and 73 deletions
|
|
@ -14,7 +14,7 @@ from inire.router.cost import CostEvaluator
|
|||
from inire.router.danger_map import DangerMap
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from collections.abc import Mapping, Set
|
||||
from collections.abc import Callable, Mapping, Set
|
||||
|
||||
from inire.model import NetSpec
|
||||
|
||||
|
|
@ -75,6 +75,7 @@ def search_pair_candidate(
|
|||
pair_order: tuple[str, str],
|
||||
*,
|
||||
needs_self_collision_check: Set[str],
|
||||
expired: Callable[[], bool] | None = None,
|
||||
) -> tuple[dict[str, RoutingResult], int] | None:
|
||||
"""Return both locally verified replacements and their search work."""
|
||||
local = _build_pair_local_context(context, ordered_nets, incumbent_results, pair_order)
|
||||
|
|
@ -93,6 +94,7 @@ def search_pair_candidate(
|
|||
guidance_seed=guidance_seed,
|
||||
guidance_bonus=guidance_bonus,
|
||||
node_limit=options.search.node_limit,
|
||||
expired=expired,
|
||||
)
|
||||
path = route_astar(
|
||||
net.start,
|
||||
|
|
|
|||
Loading…
Reference in a new issue