shortcuts behave different than base edges in transition costing
- Dominant language
- C++
- Stars
- 6.2k
- Forks
- 981
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 14
Description
since https://github.com/valhalla/valhalla/pull/2651, we use `OSRMCarTurnDuration` to add transition cost for traffic light and turns. but we only add this to the `Cost::secs` in e.g. `AutoCost::TransitionCost` while we add our "own" logic with `stopimpact` to `Cost::cost`.
the problem with that is that when we create shortcuts we can only take into account duration penalties for turn costs, but not the `stopimpact` logic. that is because we can't set an edge's cost directly, we do it via its speed and attributes.
eventually this leads to different paths depending whether the expansion settled the base edges or the shortcut. I realized that during #4671 which had a lot of geometry differences where it turned out it was because a* expands less and hence uses less shortcuts compared to dijkstra.
it's just something to be aware of. the only thing we could do is remove `OSRMCarTurnDuration` again and use the `stopimpact` logic for everything. it could be done to shortcuts then too and likely we'd see more consistent path finding across algorithms.
Contributor guide
Assessment
This issue has not been assessed yet.