Unreachable Route Location

This article discusses the use case of start or destination locations of routesClosed A route corresponds to a path of a vehicle through the underlying transport network. The main attributes of a route are the distance and the time that the vehicle travels along the path. that are located at roads that are unreachable for the configured vehicleClosed The term vehicle describes what is being routed or planned for. Vehicles are used in route calculation, distance matrix calculation and effectively also in tour planning. In route calculation, vehicle properties like overall size, weight and speed are in focus. In tour planning, it is vehicle properties like capacity and availability. Commonly a vehicle is motorized, like a truck - including its trailer or a car. However also a bike or even a pedestrian are included in this definition.. For example, a location in a pedestrian zone that is the destination of a truck route.

Benefits

Even if a route locationClosed A route location is the position of an object to be routed to or from, which contains additional information on how to link this position to the road network and whether or or not this position is actually reached. Route locations are used as the input for route calculation and optimization throughout PTV xServer. is located at a road that is not reachable a route shall be returned. There are two main approaches:

  • The route on the road network starts or ends at a road nearby that is reachable for the vehicle.
  • The route starts or ends at the normally unreachable nearest road and contains roads that are not allowed for the vehicle. These roads are marked as "violated".

Prerequisites

Check if the following prerequisites are fulfilled before you start with the use case.

  • Installed and licensed PTV xRoute and xMap services.
  • Installed map includes Luxembourg by HERE with the Feature Layer theme PTV_TruckAttributes.

Programming Guide

The following xRoute examples show different typical cases of unreachable locations. The other routing based services like xDima show the same behavior.

Route from a park to a pedestrian zone

Delivery vehicles are not allowed to enter the park but they are allowed to enter the pedestrian zone in the center of Luxemburg.

The location in the park is connected to the road network by a segment of type LINK_SEGMENT represented by a straight line to the road outside the park. Such a long link segment is normally not desired and a result limitation of type WaypointNotLinkedLimitation is returned. If you do not want that the route contains the link segment from the location in the park to the road outside the park, use an OnRoadWaypoint instead of the OffRoadWaypoint.

If there is no reachable road segment within a distance of maximumDistanceToSegment the route cannot be calculated and a WaypointNotLinkableFault is returned. This is more important for unreachable islands that may be quite far from the nearest reachable road.

By default the roads that are normally prohibited but exceptionally allowed for delivery vehicles are assigned a penalty for route selection and thus are only used if there is no other alternative. The penalty to control this behavior is deliveryOnlyPenalty. When you set this penalty to 0 in the code below the pedestrian zone is treated as a normal road and the resulting route uses more of the pedestrian zone. However, with a penalty of 0 also other pedestrian zones in the middle of the route are treated as normal roads. Because of this the default is a high penalty.

Vehicles that do not deliver goods are not allowed to enter the pedestrian zone. This can be configured in the vehicle profileClosed A profile is a collection of parameters used to configure the request. Full profiles consist of a number of specialized sub-profiles like the VehicleProfile which describes the properties of a vehicle. by setting the field isDelivery to false. Then, the route on the road network starts at the nearest reachable road outside the pedestrian zone.

Route with truck restrictions

In the following example the start of the route is not reachable. The nearest road to the start location has no restriction but it can be left only by passing a road that cannot be used by vehicles higher than 280cm. This restriction is part of the Feature Layer theme "PTV_TruckAttributes".

By default, violations are enabled. Because of this the route can be calculated and starts directly at the nearest road to the given location. The route response contains information that the route violates the height restriction. More specific information about which part of the route is violated is contained in the segments and legs of the route response. If you reduce the height of the vehicle in the code below to a height less than 280cm the route can be calculated without violations.

If the violations are disabled in the code below the route cannot be calculated and the calculateRoute operation returns an exception.

Factory premises isolated by gates

Some factory premises are isolated from the main road network by gates and the roads inside these factory premises are attributed as normal roads without restrictions. Such road network characteristics have an impact on both linking a coordinate to a road segment as well as routing in the road network.

Road coordinates may be linked to isolated areas, because with violations enabled as it is the default, a route will always be found.

If violations are turned off, the coordinate will be linked to a different road segment returning an appropriate result limitation.

Whether or not the route is actually violated depends on the vehicle configuration. With the default profile all gates are allowed to be passed, because it is defined as to be free for deliveries (LegalCondition field isDelivery set to true). However, depending on the vehicle profile LegalCondition fields isDelivery and isEmergency, passing gates may result in a violation. The example below illustrates a routing which violates such a gate because in the vehicle profile it is defined that the used vehicle is neither a delivery (isDelivery set to false) nor an emergency vehicle (isEmergency set to false).

Related Topics