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

Faster routing with cyclestreets #1

Open
mem48 opened this issue Feb 8, 2023 · 3 comments
Open

Faster routing with cyclestreets #1

mem48 opened this issue Feb 8, 2023 · 3 comments

Comments

@mem48
Copy link

mem48 commented Feb 8, 2023

@Robinlovelace I've pushed a new function journey2 to this fork of the package.

I've done a quick rewrite of the journey function using the code from opentripplanner. It is very hacky, and doesn't return exactly the same results, because I had trouble understanding how you were parsing the json returned by cyclestreets.

But I'm getting a healthy 31 routes/second out of the function.

There is more parsing to do on the outputs, as it has whole routes and segments in the same data frame. But this seems like useful work to me?

@Robinlovelace
Copy link

But I'm getting a healthy 31 routes/second out of the function.

Impressive! If you could put in a PR to the cyclestreets package that could be a good way to capture benefits from this work. Surprised the speed-up is so high: seemed we were getting only max ~10 routes/s on the batch routing UI. Parallelising it can speed it up but that's sending queries one-route-at-a-time.

@Robinlovelace
Copy link

Robinlovelace commented Feb 8, 2023

PR opened: https://github.com/cyclestreets/cyclestreets-r/pull/45/files

Not sure this is the best use of time but if you can get the balanced routes it could help with this issue: nptscot/npt#31

@mem48
Copy link
Author

mem48 commented Feb 8, 2023

I'm doing a large scale test

image

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

No branches or pull requests

2 participants