Skip to content

Area Routing #7161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MarcelloPerathoner
Copy link
Contributor

@MarcelloPerathoner MarcelloPerathoner commented May 1, 2025

This PR provides routing over areas.

It builds a visibility graph of the area, then runs dijkstra from each entry point to reduce the number of edges, then adds the remaining edges as ways to the router.

  

Documentation

Issue

Fixes #64 #2655 #7146

Tasklist

TODO

  • entrances to buildings along the perimeter of the area,
  • PT stations in the middle of the area,
  • alternate algorithms, eg. retraction.

@DennisOSRM
Copy link
Collaborator

cool feature!

seems the linked screenshots don't show tho in the PR

@MarcelloPerathoner
Copy link
Contributor Author

seems the linked screenshots don't show tho in the PR

I re-uploaded them. Do they show now?

@DennisOSRM
Copy link
Collaborator

seems the linked screenshots don't show tho in the PR

I re-uploaded them. Do they show now?

They do. Thanks a lot

@DennisOSRM
Copy link
Collaborator

Had a first look at the change. First of all, great feature! I think this has been on the todo list for more than 10 years 😀

The main question I have is that we should probably own the Dijkstra implementation that is used and not fall back to boost.

@MarcelloPerathoner
Copy link
Contributor Author

Do we have a general dislike for boost? Just asking ...

@DennisOSRM
Copy link
Collaborator

Do we have a general dislike for boost? Just asking ...

Perhaps 😉

Also, routing is our expertise and we should own all routing logic.

@MarcelloPerathoner
Copy link
Contributor Author

Dijkstra in itself is trivial to implement. The hardest piece is the priority queue, if we don't want to take the one in boost. They use a 4-ary heap. A binary heap will do for our problem sizes. I will look into this.

@DennisOSRM
Copy link
Collaborator

The good news is that heap implementations already exist in our code base:

  • include/util/binary_heap.hpp
  • include/util/d_ary_heap.hpp

@DennisOSRM
Copy link
Collaborator

just tweaked the settings s.t. GitHub Actions should now run automatically on push.

@MarcelloPerathoner
Copy link
Contributor Author

I have now implemented Dijkstra and a binary heap that works with it. The d-ary heap in include/util/d_ary_heap.hpp looks like it could be coaxed into service too, but it is completely undocumented.

Shouldn't we drop / update the macos-x64 build since it is based on apple-clang-14? All other builds use clang >= 16.

@DennisOSRM
Copy link
Collaborator

Let me know when the change is ready for reviewing. 😉

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.

Route through squares (area=yes)
2 participants