This article discusses the usecase of calculating a routeA 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. by taking into account only the long-term blockings.
Calculates the best route taking into account only long-term closures for a certain period. This allows for example to determine the typical routes for a planning project.
Check if the following prerequisites are fulfilled before you start with the use case.
Installed and licensed PTV xRoute service.
Installed map includes Luxembourg by HERE with the Feature Layer theme PTV_TruckAttributes.
The Feature Layer PTV_TruckAttributes defines specific attributes for road like maximum weight, height, etc..., but contains also information like road closure which could be time-dependent (every morning between 7h-9h near a school, for example). With the requestOption timeConsideration it is possible to define the way how this time-dependent information should be taking into account. For details see the technical concept about time consideration.
Regarding the specific usecase of long-term blockings, the TimeSpanConsideration scenario can be used.
This scenario allows to define a specific interval during which the time-dependent attributes should be considered. Typically, if a road is blocked during the whole period, it will be considered as blocked. Otherwise, the road will be considered as not blocked. Considering this period, whatever the real departure time of the vehicleThe 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., only these long-term attributes would be considered for the route calculation.
The use of Feature Layers with time-dependent data depending on (small) time slots (like PTV_SpeedPatterns) cannot be used in this scenario.
The example below shows the calculation of a route in conjunction with the Feature Layer PTV_TruckAttributes, using TimeSpanConsideration scenario. Therefore the JavaScript bindings to the xRoute service API is used:
In the example above, a route is calculated twice with the same reference time (12 p.m.) but different time spans. The shortest route passes through a segment with a time-dependent restriction : it is blocked from Monday to Friday between 8h-17h.