Closed cmhodgson closed 3 years ago
Turn costs (tc) should be included as an option in the enable parameter.
Turn costs should include separate costs for both commercial and non-commercial vehicles. In other words, turn costs should be a function of both turn-type (e.g., left, right) and isTruck where isTruck is a boolean that is true if vehicle being routed is a commercial vehicle; false otherwise
In Routable BC Maker, in addition to computing turn-class, compute and store inner turn angle. This angle could be used to implement dynamic turn-restrictions such as no left-turn for trucks if inner turn angle < 30 degrees and truck length > X metres.
We can calculate turn angles on the fly relatively inexpensively and already do support this use case.
This is implemented and in both refractions dev and the gov delivery/dev environment.
Verified in delivery
The previous turn costs model did not allow for changing turn costs per request. We propose:
Note that this will re-introduce a minor issue with the "shortest" route sometimes being faster than the calculated "fastest" route, but we have determined that this issue is minor in comparison to the importance including turn costs in the calculation of optimal routes.