diff --git a/pyproject.toml b/pyproject.toml index b669133..5966637 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "multimodalrouter" -version = "0.1.12" +version = "0.1.13" description = "A graph-based routing library for dynamic routing." readme = "README.md" license = { file = "LICENSE.md" } diff --git a/src/multimodalrouter/graph/graph.py b/src/multimodalrouter/graph/graph.py index e594fc8..70f8585 100644 --- a/src/multimodalrouter/graph/graph.py +++ b/src/multimodalrouter/graph/graph.py @@ -447,6 +447,11 @@ def _dijkstra_single_source( # best result per target results: dict[str, tuple[PathNode, EdgeMetadata, tuple]] = {} + if allowed_modes is None: + allowed_modes = list(self.TransportModes.values()) + if self.drivingEnabled: + allowed_modes.append("driving") + while pq: priority, _, path_node, acc_metrics = heapq.heappop(pq) hub_id = path_node.hub_id diff --git a/tests/unit/test_routegraph_public_features.py b/tests/unit/test_routegraph_public_features.py index 62fb65a..8d8dd79 100644 --- a/tests/unit/test_routegraph_public_features.py +++ b/tests/unit/test_routegraph_public_features.py @@ -842,7 +842,7 @@ def test_lexicographic_hops_beats_long_chain(self): route = graph.find_shortest_path( 'A', 'J', - allowed_modes=['mv'], + allowed_modes=None, # tests default optimization_metric=['hops', 'distance'], verbose=True, )