How can I calculate the dynamic travel time on a route?

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.

How can I calculate the dynamic travel time on a route?

Postby Judith Straub » Fri Aug 30, 2019 2:03 pm


We use xroute to calculate routes including the PTV_TrafficIncidents. Usually the xRoute searches the fastest path and therefore performs a detour if a traffic incident is on the standard route.

What we need is this:
Is it possible to determine the time that is required on the standard route even if we have to slow down or wait due to a traffic jam?
If it is possible: how does it work then?

Best regards
Judith Straub
Posts: 1
Joined: Mon Aug 05, 2019 9:02 am

Re: How can I calculate the dynamic travel time on a route?

Postby Bernd Welter » Fri Aug 30, 2019 2:15 pm

Hello Judith,

sounds lkike you need to apply the DynamicTimeOnStaticRoute mechamism:
Here is s sample snippet for xRoute 1:
xml code
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Profile parent="truckfast" xmlns:ns2="">
<FeatureLayer majorVersion='1' minorVersion='0'>
<GlobalSettings enableTimeDependency="true" enableVehicleDependency="true"/>
<Theme id='PTV_TrafficIncidents' enabled='true'/>
<Routing majorVersion="2" minorVersion="0">
<AdditionalDataRules enabled='true'/>
<DynamicRouting dynamicTimeOnStaticRoute="true" layerName="PTV_TrafficIncidents"
limitDynamicSpeedToStaticSpeed="true" useFreeFlowSpeed="false"

left: standard route, determined without TrafficIncidents (569km / 6h35m)
Middle: dynamic route performing a detour around the traffic South of Hannover (570km / 8h30m)
Right: standard route geometry with dynamic time: longer driving period due to jam (569km / 12h15m)

So the path of the left and the right route are equal but the driving times differ.

Does this answer the question?
C u,
Bernd Welter
Senior Technical Consultant Developer Components
PTV GROUP - Germany

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

Return to PTV xRouteServer