High-performance routingA 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. is based on precomputed routing networks for specific sets of routing relevant parameters. Because of this, high-performance routing is less flexible than conventional routing, but provides the following advantages:
The calculation of distance matrices with conventional routing is often slow. It can consume much more time than a subsequent optimization by xTour or xCluster. In particular for large distance matrices, high-performance routing is crucial to achieve an acceptable performance. For xRoute an important use case is the computation of the detailed route corresponding to a relation of a distance matrix. With high-performance routing this route has exactly the distance and travel time that is stored in the distance matrix. This is not always the case with conventional routing because of heuristics.
High-performance routing requires precomputed routing networks. Each edge of such a network represents a path in the map. Only the main attributes of these paths are stored: The distance, travel time, and the abstract cost used for route selection. Furthermore, the structure of the network depends on the cost of the edges. Because of this a high-performance routing network is valid only for one specific set of parameters. For example, it is not possible to use a different speed because the cost of some edges would be different and the whole routing network would be invalid.
The relevant parameters for high-performance routing are parameters of the profileA 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. and the request alike that have an influence on the precomputed networks. These parameters are stored as meta data of every high-performance routing network and can be retrieved through the xData operation listHighPerformanceRoutingNetworks when the corresponding result fields are activated. The relevant parameters can be found among:
It is possible that the map provides already high-performance routing networks. They can be listed by the xData module.
Additionally, the user can create new high-performance routing networks. These user-created networks can also be deleted (map-provided networks cannot be deleted). The create and delete operations require an activated license key
highPerformanceRoutingManagement and are located in the xData module.
In order to use high-performance routing in xDima or xRoute an activated license key
highPerformanceRouting is required and the routing type has to be set to one of the following two high-performance routing types. In both cases it is checked if the routing relevant parameters of the request match the corresponding parameters of one of the available high-performance networks. For user-created networks also the combination of tenant and scope used to create the network has to be set. If a suitable high-performance routing network is found it will be used for routing. The difference of the two high-performance routing types is the treatment of the case when no matching high-performance routing network is available:
With API version 2.13 a direct selection mechanism has been introduced: As part of the route options the id of a high-performance routing network can be specified. This id must be set in combination with the routing type HIGH_PERFORMANCE_ROUTING (other routing types will return an exception). If the high-performance routing network is not available, an exception is returned. The profile and request parameters from the meta information of the high-performance routing network are used for linking and routing. Since API version 2.18, this mechanism is also available for the calculation of a distance matrix by specifying the id of a high-performance routing network in the distance matrix options.
In case a high-performance routing network is not used most likely one of the relevant routing parameters of the request is not the same as the ones in the high-performance routing networks.
If you are using xdima you have to replace "xroute" with "xdima" in the name of the logger. You can also add both loggers.
<Logger name="com.ptvgroup.xserver.xroute.router.ContractionHierarchiesTools" level="trace" additivity="false"> <AppenderRef ref="File"/> </Logger>
The major performance improvement of high-performance routing is achieved for the xDima service. However, also the performance of the xRoute service can benefit, depending on the request settings. The xRoute service consists of several parts. First, a basic routing is done which calculates only the distance and travel time. Then, if requested, the path has to be constructed with the detailed polylineA polyline is a continuous line composed of one or more line segments given as a set of tuples with x,y and optional z coordinates., segment attributes are retrieved from the map, emissions and toll prices are calculated, etc. With high-performance routing only the performance of the first basic routing part is improved. Hence, there will be only a big speed-up compared to conventional routing when no additional result fields are requested. Otherwise the subsequent steps dominate the xRoute calculation time.
The best performance is achieved if the whole high-performance routing network is already available in the main memory. The xServer services access the data using memory-mapped files. If the data is not yet available in main memory the part that is required is automatically loaded from the storage device, which is usually quite slow compared to a main memory access. In particular for the xRoute service this may cause a longer runtime with high-performance routing compared to conventional routing.
The high-performance routing networks in main memory are shared among all xServer and all their services. This is ensured by the memory-mapped files technique that is used for data access. Even if the size of the data is part of the size of each module's process there is in fact only one instance of it in main memory.
By default PTV xServer stores all high-performance routing networks on the server side regardless of whether they are used or not. By setting the configuration option
true an automatic removal of unused high-performance routing networks can be enabled. The time to live for unused
high-performance routing networks can be specified with the second option
core.highPerformanceRoutingNetworkRetentionTime. The default value is seven days.
|Integration Sample||How to Retrieve the Available Metainformation in the Map|
|Integration Sample||High-performance Routing|
|Technical Concept||Route Selection|
|Showcase||Compare xDima and xRoute Results|