Technical Concepts > About High-Performance Routing

About High-Performance Routing

Using precomputed high-performance routing networks accelerates the calculation of distance matrices. Route calculation is based on precomputed contracted versions of the routing network (i.e. the whole map). Compared to classical routing, actual route calculation is significantly accelerated.

The pre-computation of the high-performance routing networks takes some time and can be done with the Routing Network Generator located in the tools directory of each PTV xServer which supports high-performance routing. Each high-performance routing network is generated for an entire map and for exactly one configuration and routing profile. Using the PTV xDima Server this could be for example default configuration and Profile = truck, for the PTV xRoute Server it could be Profile = truckfast. To use high-performance routing networks for other profiles, additional routing networks have to be generated.

To use the RoutingNetworkGenerator, you have to configure the corresponding PTV xServer and start the RoutingNetworkGenerator executable as described in the enclosed documentation. In a first step, the tool extracts all necessary information from the data and configuration folder of the PTV xServer and writes it to a .ini file. In a second step, the actual high-performance routing network is generated.

The RoutingNetworkGenerator creates a dedicated data structure used for high-performance routing.

Benefit

This function is based on a pre-calculated routing network for a defined map and defined vehicle profiles. When calculating the route, the algorithm accesses this pre-calculated routing network, which considerably speeds up the process compared to conventional processes. If another map or vehicle profile is accessed, the PTV xServer automatically switches to the known flexible routing.

Prerequisites

Recommended memory settings

To achieve the best performance with routing networks, it should be possible to hold all available routing networks in memory at the same time. The PTV xServer can use any vehicle profile with an associated routing network without loading the routing network into memory first. Since PTV xServer 1.18.1 different worker processes (also from different PTV xServer instances) can share a great part of the routing networks that are held in memory. Only about 10% of the routing network need to be loaded by each worker process separately.

An optimal memory setup would be:

Create a Routing Network

The RoutingNetworkGenerator executable takes at least one parameter. The required first parameter is the name of the routing profile.
Example:

routingnetworkgenerator dimaTruck.xml

The following optional parameters are:

-referenceTime The reference time for the use of time dependent feature layers and toll scenario selection. The date/time format has to be: YYYY-MM-DDTHH:MM:SSZ, which means that the exact time zone has to be specified even if it is +00:00. Examples:
routingnetworkgenerator dimaTruck.xml -referenceTime 2015-03-03T15:00:00+02:00

routingnetworkgenerator carfast.xml -referenceTime 2015-03-03T09:00:00+00:00
-roadEditorLayer

DEPRECATED: use FeatureLayer PTV_TruckAttributes instead.
The name of the road editor layer or the folder containing the layer data. Example:
(referencing a folder):

routingnetworkgenerator dimaTruck.xml -roadEditorLayer truckattributes

If a layerName is also set in the xml profile, both names have to be identical.
(referencing a file):
routingnetworkgenerator dimaTruck.xml -roadEditorLayer TruckAttributes_120432_0

You do not need to adapt configuration files since the RoutingNetworkGenerator fetches all needed information such as map path, vehicle profile, or RoadEditor layer configuration from the the conf directory of the PTV xServer.

The corresponding PTV xServer should not run during routing network generation. The map directory will be altered, which may lead to inconsistencies.

The resulting high-performance routing network will be stored in a directory named CH within the configured map directory. The name CH stems from the data structure which is called "Contraction Hierarchy".

Get metadata of an existing Routing Network

You can use the RoutingNetworkGenerator to get information (e.g. used vehicle parameters, map details) of already generated high-performance routing networks.
Example:

routingnetworkgenerator -show <XSERVER_ROOT>/data/map/CH/dimaTruck.chData

Caution: The data format of the routing networks changed with PTV xServer 1.18.1. You can still use routing networks from previous versions, but if you want to show their contents, you need to use the RoutingNetworkGenerator version 1.18.0.