Skip to content
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

Planned improvement : batch routing #120

Open
chourmo opened this issue Aug 21, 2019 · 3 comments
Open

Planned improvement : batch routing #120

chourmo opened this issue Aug 21, 2019 · 3 comments

Comments

@chourmo
Copy link

chourmo commented Aug 21, 2019

The documentation mentions a planned improvement of "Batch (multi-threaded) routing between a large number of pairs of nodes in the network".

Is this still planned ?

@smmaurer
Copy link
Member

We'd still love to have that functionality, but unfortunately I don't think we have the development capacity to tackle it any time soon.

The NetworkX package has some tools for this, though:

https://networkx.github.io/documentation/networkx-1.10/reference/algorithms.shortest_paths.html

And I've heard that the sp package is very fast for calculating many-to-many shortest paths (although it doesn't look like there's much documentation):

https://github.com/cb-cities/sp

@knaaptime
Copy link

you might also check out https://github.com/GeoDaCenter/spatial_access

@tomalrussell
Copy link

I'm interested in this too, in the context of batch routing for transport simulations on regional/national networks. I wondered if anyone had any initial thoughts on a suitable approach?

Looking around:

Reading the docs for shortest_paths this looks like almost the API I would like. With this, if I pass sources=[a,b,c], targets=[d,e,f], I would get routes [a-d, b-e, c-f]. For full many-to-many, I would like to get [a-d, a-e, a-f, b-d, b-e, b-f, c-d, c-e, c-f]. (Note that I could construct a longer list of sources and targets to pass to the current API and get exactly that.)

Looking at Accessibility::Routes the approach is to find one route between source-target pairs at a time (or in parallel). I would expect (? needs testing) it to be faster to look for shortest paths from a single source to all targets at the same time.

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

No branches or pull requests

5 participants