Skip to content

fix: handle unreachable paths in DijkstraPathPlanning - #161

Open
ToB213 wants to merge 1 commit into
adf-python:mainfrom
ToB213:fix/dijkstra-shortest-path
Open

ToB213 wants to merge 1 commit into
adf-python:mainfrom
ToB213:fix/dijkstra-shortest-path

Conversation

@ToB213

@ToB213 ToB213 commented Sep 21, 2026

Copy link
Copy Markdown

Summary

Fix DijkstraPathPlanning so unreachable destinations do not produce a destination-only path or a zero distance.

Changes

  • Return an empty path and float("inf") for unreachable destinations.
  • Use a shared weighted shortest-path search for single and multiple destinations.
  • Select the destination with the shortest total distance, rather than the fewest edges, when multiple destinations are given.

Fixes #160

…thPlanning

Return an empty path and infinite distance when a destination is unreachable. Use weighted shortest paths when selecting among multiple destinations.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DijkstraPathPlanning returns a destination-only path when no path exists

1 participant