Considering Vehicle Parameters at Waypoint

This article discusses the usecase of calculating a routeClosed 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. by taking into account the changes of 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. parameters at waypointClosed A waypoint is a geographic location used to specify start, destination and possible stopovers for a route..

Benefits

Calculates the best route and returns accurate emission and toll values, considering some structural changes on the vehicle. For example, the route is dependent of the loading weight of the vehicle ; this weight can change during a route when delivering or picking goods.

Prerequisites

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.

Concepts

During a route with intermediate waypoints, some parameters of the vehicle can change. For example, the fact that the vehicle picks or delivers goods, changes the loadWeight of the vehicle.
The consequences of changing some vehicle parameters are multiples.

  • These changes could affect the best calculated route, making a detour or on the opposite, don't do this detour anymore.
  • These changes may affect also the calculation of the emissions, tolls,... without changing the route.

For each waypoint of the route request, it is possible to specify some vehicle parameters. For the list of parameters, please refers to VehicleParametersAtWaypoint.
Please note that if a parameter is changed at an intermediate waypoint, it remains changed until the end of the route, or until the parameter is changed again at another waypoint.

Programming Guide

The example below shows the calculation of a route with an intermediate waypoint, in conjunction with the Feature Layer PTV_TruckAttributes, using the capability to change vehicle parameters at waypoint. Therefore the JavaScript bindings to the xRoute service API is used:

In the example above, a route with one intermediate stop is calculated twice.
The goal is to demonstrate that changing some vehicle parameters at the intermediate point, changes the route. For that we will use the PTV_TruckAttributes restrictions.

  • the full-loading route (orange line)
    If the vehicle is fully loaded, its weight is over 3500kg. The route should avoid all the restrictions and a detour is computated.
  • the empty-loading route (blue line)
    At the intermediate waypoint, the vehicle is emptied. The final route contains two legs. The first leg try to avoid the restrictions as much as possible (like the orange line). The second leg can pass through the restrictions, as the weight of the vehicle is now below the 3500kg.

Related Topics