bcgov / ols-router

BC Advanced Route Planner
https://bcgov.github.io/ols-router/
Apache License 2.0
24 stars 11 forks source link

Support Vehicle-Specific turn restrictions (trucks) #209

Closed cmhodgson closed 3 years ago

cmhodgson commented 4 years ago

The turn restrictions that Translink has provided include some turn restrictions (including multi-segment/U-turns) which apply only to trucks. In order to match their routing results we need to support vehicle-specific turn restrictions in the routing code.

cmhodgson commented 4 years ago

We are planning to add a vehicle type field to the turn cost csv table, and in the case of a truck restriction, add additional rows with the vehicle field set to "truck", representing the restriction. The non-truck cost row would still exist for non-truck vehicles. This field could potentially contain multiple vehicle types separated by some delimiter, to show which types of vehicles are affected by the restriction.

cmhodgson commented 4 years ago

This is done and working in our dev server. Note that the turn_cost.csv file is now turn_restriction.csv, as turn costs are no longer supported and crossing costs are now handled separately.