Page 1 of 1

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

Posted: Fri Aug 30, 2019 2:03 pm
by Judith Straub
Hi,

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

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

Posted: Fri Aug 30, 2019 2:15 pm
by Bernd Welter
Hello Judith,

sounds lkike you need to apply the DynamicTimeOnStaticRoute mechamism:
Here is s sample snippet for xRoute 1:

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Profile parent="truckfast" xmlns:ns2="http://www.ptv.de/com/ptvag/xserver/engines/xpoidbaccess">
    <FeatureLayer majorVersion='1' minorVersion='0'>
<GlobalSettings enableTimeDependency="true" enableVehicleDependency="true"/>
      <Themes>
          <Theme id='PTV_TrafficIncidents' enabled='true'/>
      </Themes>
    </FeatureLayer>
    <Routing majorVersion="2" minorVersion="0">
     <Course>
      <AdditionalDataRules enabled='true'/>
     <DynamicRouting dynamicTimeOnStaticRoute="true" layerName="PTV_TrafficIncidents" 
     limitDynamicSpeedToStaticSpeed="true" useFreeFlowSpeed="false"
     useLegacyDynamic="false">
     </DynamicRouting>
     </Course>
    </Routing>
</Profile>
left: standard route, determined without TrafficIncidents (569km / 6h35m)<br />Middle: dynamic route performing a detour around the traffic South of Hannover (570km / 8h30m) <br />Right: standard route geometry with dynamic time: longer driving period due to jam (569km / 12h15m)<br /><br />So the path of the left and the right route are equal but the driving times differ.
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