-
Notifications
You must be signed in to change notification settings - Fork 344
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
Penalty for uturns #1213
Comments
Currently we have no way to know whether a u-turn is happening at a given location while optimizing. Looking at the matrices we only have pair-wise costs, but deciding on whether a u-turn happens is not a pair-wise thing as it's depending on previous and next location. For example A->B->C may result in a u-turn at B while A->B->D means continuing straight at B, all depending on location display and shortest path selection at routing level. To address that, we'd have to know that B->C has a different cost (more expensive) if coming from A. An alternative would be to make sure matrix values are consistent with having no u-turns at waypoints by forcing the vehicle approach ( |
My thought was to provide the necessary information to VROOM with two new matrices for the start and end direction. |
Currently whenever we need to evaluate an edge cost, we directly reach to the relevant value in the matrix. Changing this would add quite some boilerplate because you'd have to add a whole new logic to pick the "right" values depending on the context. And this kind of call is all over the place in many different contexts: building heuristic routes, evaluating gain and validity for local search moves etc. Not saying it is not feasible, just that that would be a significant change to the codebase. |
Would it be possible to add a penalty to stops where the vehicle has to turn around instead of continuing straight?
When the addresses are spread out very far it doesn't matter much, but if addresses are close by this could result in much better solutions.
See also valhalla/valhalla#5072
The text was updated successfully, but these errors were encountered: