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.
Post Reply
Judith Straub
Posts: 1
Joined: Mon Aug 05, 2019 9:02 am

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

Post 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
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

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

Post 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
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
Post Reply