Route Violations

Characteristic

Short description

Use

Detailed Consideration

Routes are usually violated if one of the waypointsA waypoint is a geographic location used to specify start, destination and possible stopovers for a route. is on a road which is prohibited for the current vehicle, e.g. the vehicle is generally prohibited, exceeds a weight limit, carries hazardous goods, or violates some other regulation.

It may also happen that one of the waypoints is in an area which has only one access road which is prohibited for the vehicle, e.g. due to a height limit, or the access is restricted by a gate or bollard. See also Unreachable Route Location.

In case restrictions on road segments or nodes are violated the field RouteResponse.violated is set to true. The same flag is present for route legs, segments and nodes as well as for distance matrix relations.

In order to best find the violated segments or nodes along the route, there is a RouteViolationEvent for each kind of violation which contains more information including its reason. There is an event when entering an area and another one when exiting an area marked with the AccessType ENTER and EXIT. If the distance is less than 100 meters, the restriction is assumed to be passed such as a gate or a bridge, i.e. it is not considered to be an area. There is only one event marked with AccessType PASS.

Currently, prohibited segments and long-term traffic incidents can be violated.
Prohibited segments have a penalty of 2501. Very often access in pedestrian zones or other restricted areas is allowed for delivery vehicles. These segments have a penalty of 2501 if the flag isDelivery is not set. If it is set, i.e. the vehicle is marked as a delivery vehicle, the penalty is 2500 which has a similar effect on the route calculation, but there is no violated segment and no event. See the documentation of Feature Layer PTV_TruckAttributes for details on these regulations.
Long-term traffic incidents with a zero speed (such like road works that cause a road closure for several weeks) can also be violated. In this case, the travel time of the segments is the maximum travel time without this blocking.

Some violations are only available when using a PathWaypoint. For example, a path waypoint on an highway with a storedProfile bicycle will result in a violated route.

When disabling route violations, such route requests result in a RouteNotFoundException.

Good to know

Limitations

Currently the following restrictions can produce violations:

Roads generally prohibited for cars are not fully supported, but it is guaranteed that a violated route does not contain a segment driving the wrong direction of a one-way road.

Usually, a route is violated only if there is no other valid route. In mountain areas or fjords it may happen that the route is violated even if there is a valid route as the detour is too long.

Integration Sample Unreachable Route Location
Showcase Consider Route Events