Compute delay due to traffic

This forum deals with any kind of routing computation whether it is simple A:B-routing, calculation of isochrones, simple matrix computation or nearest search.

Compute delay due to traffic

Postby epsilon » Thu Mar 29, 2018 2:39 pm

I have a question about the following scenario: Assume that the we have a net driving time of 1 hour to the next station in the case of time independent data. Now I want to include PTV_TruckSpeedPattern and PTV_TrafficIncidents in order to compute the delay to the next station. In order to do that I have to relate the static speed to the dynamic speed.

The problem with my configuration (see below) is the following: The feature layer gives me normSpeedType=FreeFlow and vCalc the dynamic speed. In order to compute the delay I would need the comparison with the static speed. One can obtain the static speed from another calculateRoute-call which I want to avoid.

So, is there a possibility to get the static speed and the dynamic speed in one call?

The configuration for the computation of the dynamic driving times is the following:

Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<Profile xmlns:xsi='' xsi:noNamespaceSchemaLocation=\"http:///xroute/schema/XRouteProfile.xsd\">
   <FeatureLayer majorVersion='1' minorVersion='0'>
      <GlobalSettings enableTimeDependency='true' enableVehicleDependency='true'/>
         <Theme id='PTV_TrafficIncidents' priorityLevel='101' enabled='true'/>
         <Theme id='PTV_TruckSpeedPatterns' priorityLevel='100' enabled='true'/>
   <Routing majorVersion='2' minorVersion='0'>
         <AdditionalDataRules enabled='true'/>
         <DynamicRouting  dynamicTimeOnStaticRoute='true' limitDynamicSpeedToStaticSpeed='true' />

The picture shows the speed profiles given in the response:
In the first row we see the static picture (vCalc on the left hand side and NormSpeed on the right hand side) and in the second one the dynamic picture.

Thank you in advance.

Edit bij jcl: added code block and indentation for readabilitiy
Posts: 5
Joined: Thu Mar 29, 2018 1:22 pm

Re: Compute delay due to traffic

Postby Joost » Fri Mar 30, 2018 6:56 am

If you use calculateRoute or calculatedExtendedRoute you can set ResultListOptions.dynamicInfo to true. xRoute will then return in the Route object the dynamicInfo which containts the differences between static routing (no time depdendant data) and dynamic routing (with time dependant data). Documentation: ... ynamicInfo
Joost Claessen
Senior Technical Consultant
PTV Benelux
Posts: 232
Joined: Fri Apr 25, 2014 1:46 pm

Re: Compute delay due to traffic

Postby epsilon » Tue Apr 03, 2018 10:07 am

Thank you very much for your answer. I am really sorry but the scenario was not precisely stated.

The problem is that I want to compute the delay along the entire route between the stations and not only between the stations. In particular, when given a starting point and a destination. I want to compare the static speed with the time dependent speed on each section with the same starting point (e.g. compute the delay made on the first 10 km, 20 km, 30 km and so on).

So I would need the static speed profile (time independent) as well as the dynamic speed profile (including Traffic Incidents and TruckSpeedPatterns) in one call.
Posts: 5
Joined: Thu Mar 29, 2018 1:22 pm

Re: Compute delay due to traffic

Postby Bernd Welter » Tue Jul 31, 2018 12:00 pm

Hi there,

from my perspective you have to call xRoute twice to align both way-time-schemes for such a more in-depth visualization.

Best regards,

Bernd Welter
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
Posts: 1335
Joined: Mon Apr 14, 2014 10:28 am

Return to PTV xRouteServer