Skip to content

Should SampleSearch use the registered PathPlanning module? #157

Description

@ToB213

SampleSearch registers a PathPlanning module:

self._path_planning = cast(
    PathPlanning,
    module_manager.get_module(
        "SampleSearch.PathPlanning",
        "adf_core_python.implement.module.algorithm.a_star_path_planning.AStarPathPlanning",
    ),
)
self.register_sub_module(self._path_planning)

However, the registered module does not appear to be used when selecting the next building.

Currently, calculate() selects the nearest building using:

distance = self._world_info.get_distance(
    self._agent_info.get_entity_id(),
    building_id,
)

WorldInfo.get_distance() calculates the Euclidean distance between the coordinates of the two entities, which does not take the road network or path distance into account.

Would it be better to use the registered PathPlanning module to select the nearest building (e.g., based on the shortest-path distance)?

Alternatively, if using Euclidean distance here is intentional, should we remove the unused PathPlanning module from SampleSearch?

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