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

Matching plugin: add a no u-turn properties #3595

Open
kaligrafy opened this issue Jan 22, 2017 · 5 comments
Open

Matching plugin: add a no u-turn properties #3595

kaligrafy opened this issue Jan 22, 2017 · 5 comments

Comments

@kaligrafy
Copy link

Would it be possible to add a no_uturn_in_matching flag properties in the lua profile so matching algorithm doesn't create uturns even when angle is large?

For now, I just commented lines 37 to 49 in /src/engine/plugins/match.cpp and it works well, but a parameter would be awesome.

Thanks!

@daniel-j-h
Copy link
Member

daniel-j-h commented Jan 23, 2017

Not sure what the general idea behind this was cc @TheMarex - but it is possible to add such a parameter for sure. Here's how you can do it:

Feel free to start this and open a PR early on where we can help you in case you're stuck :)

@kaligrafy
Copy link
Author

Thanks a lot!

In fact, the matching algorithm is quite useful to calculate shortest path when waypoints are approximate such as bus stops we need to serve in a 50m radius around a station location (this helps us determine the best precise location for each stop in a route during design phase). But as you know, allowing u-turns for buses is completely unrealistic. I'll prepare the PR. Thanks!

@daniel-j-h
Copy link
Member

Wow that's a cool use-case! Thanks for doing a PR!

@kaligrafy
Copy link
Author

Can somebody check the changes in my fork before I post a PR? Thanks!

@daniel-j-h
Copy link
Member

Just do a pull request 👍 this way we can leave comments directly on the code.

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

2 participants