Recover bounded routes around bends and through narrow corridors

This commit is contained in:
Jan Petykiewicz 2026-11-28 20:29:40 -08:00
commit af3ddfbb09

View file

@ -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,