Refactor routing internals and archive retry benchmarks

This commit is contained in:
Jan Petykiewicz 2026-11-26 19:58:46 -08:00
commit ea5cfe7f31

View file

@ -9,7 +9,7 @@ from inire.constants import TOLERANCE_LINEAR
from inire.model import ObjectiveWeights
if TYPE_CHECKING:
from collections.abc import Sequence
from collections.abc import Iterable, Mapping, Sequence
from typing import Protocol
from inire.geometry.collision import RoutingWorld
@ -26,6 +26,10 @@ if TYPE_CHECKING:
def move_type(self) -> MoveKind: ...
def weighted_path_length(path: Iterable[ScoreableMove], weights: Mapping[MoveKind, float]) -> float:
return sum(component.length * weights[component.move_type] for component in path)
class CostEvaluator:
__slots__ = (
"collision_engine",