bcgov / ols-router

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

Add support for finding best route with overrides #301

Open mraross opened 3 years ago

mraross commented 3 years ago

Find the best truck route in a way that allows a user to override some restrictions. These overrides will result in a best route that goes through violated restrictions. The RDM API will have sufficient data to allow the Route Planner to determine if a given restriction may be overridden, whether or not manual approval of an override by a permit authority is required. If manual approval is not required, the RDM API must provide driving instructions that mitigate the violation. These instructions must be included in the turn-by-turn directions.

In addition to best route, return a list of all overriden restrictions including any predefined mitigation.

Could add an &allowOverrides parameter to truck/directions resource to enable this mode.

Here's how this might work:

  1. In the app, the user defines waypoints then asks the app to make a truck/directions request with &allowOverrides=true.

  2. The Route Planner finds the best route by applying hard restrictions and allowing soft restrictions to be violated. If a soft restriction has a predefined mitigation strategy such as a counterflow maneuver, that maneuver is added to the driving instructions. Best route and a list of violated restrictions are returned to the app.

  3. In the app, the user defines driving instructions to mitigate each violated restriction The app attaches driving instructions to the appropriate violated restriction.

  4. In the app, the user asks the app to make another truck/directions request with &allowSoftViolations=true and provides the list of mitigatedViolations (restrictionId,instruction).

  5. The Route Planner finds the best route and a list of all violated soft restrictions and adds supplied migitation instructions to turn-by-turn directions for each violated restriction. Unmitigated restriction violations, if any, are returned along with best route and directions.

  6. In the app, if any unmitigated restriction violations are returned by geocoder, the user may continue to migitate restrictions, change route waypoints and ask the app to submit a new truck/directions request , or give up.

[LS001 - piii, LS002 - pii]

alixcote commented 1 year ago

Review additional details from ticket #161