When trying to calculate this route, I'm getting a VIOLATES_OPTIONS error with violations: [BLOCKED_ROADS].
Premium Android SDK 3.17
Route options:
val routeOptions = RouteOptions().apply {
transportMode = RouteOptions.TransportMode.TRUCK
truckHeight = vehicle.height
truckLength = vehicle.length
truckWidth = vehicle.width
truckWeightPerAxle = 10.0f
truckAxleCount = 2
truckTunnelCategory = RouteOptions.TunnelCategory.UNDEFINED
speedProfile = RouteOptions.SpeedProfile.FAST
routeType = RouteOptions.Type.FASTEST
}
Dynamic penalties:
val dynamicPenalty = DynamicPenalty().apply {
trafficPenaltyMode = Route.TrafficPenaltyMode.OPTIMAL
}
coreRouter.setDynamicPenalty(dynamicPenalty)
I already figured out by tweaking some of the parameters that the problem seems to be related to the vehicle length (which can vary depending on the vehicle), however there are still some questions:
Is there any way to figure out what the problem is (programatically) or get a more precise reason? Documentation says "The route uses roads which were blocked by dynamic penalties.", but what penalty exactly? Also it seems to be related to vehicle length and not one of the dynamic pentalties (error also occurs without any of those being set or when setting traffic penalty to DISABLED). We have a lot of users and investigating these errors by hand every time this error occurs is not very feasible.
Is there a way / plans to include the coordinates for where the violation took place? This would be incredibly useful IMO. I can't think of a workaround / handling this error, because I don't know the exact location where the issue originates and thus cannot evebn figure out the root cause / blacklist some area if we wanted to manually fix it.
And my last and most important question: What can I do to get an alternative route (that avoids the problematic / violating area)?