Skip to content

DijkstraPathPlanning returns a destination-only path when no path exists #160

Description

@ToB213

Problem

When a destination is unreachable, DijkstraPathPlanning.get_path() returns [to_entity_id] instead of an empty path. Consequently, get_distance() returns 0.0, making an unreachable destination indistinguishable from a valid zero-distance path.

Expected behavior

  • An unreachable destination returns [] from get_path().
  • Its distance is float("inf").
  • A path from an entity to itself still has distance 0.0.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions