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.
Post Reply
epsilon
Posts: 5
Joined: Thu Mar 29, 2018 1:22 pm

Compute delay due to traffic

Post by epsilon »

Hi,
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='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation=\"http:///xroute/schema/XRouteProfile.xsd\">
	<FeatureLayer majorVersion='1' minorVersion='0'>
		<GlobalSettings enableTimeDependency='true' enableVehicleDependency='true'/>
		<Themes>
			<Theme id='PTV_TrafficIncidents' priorityLevel='101' enabled='true'/>
			<Theme id='PTV_TruckSpeedPatterns' priorityLevel='100' enabled='true'/>
		</Themes>
	</FeatureLayer>
	<Routing majorVersion='2' minorVersion='0'>
		<Course>
			<AdditionalDataRules enabled='true'/>
			<DynamicRouting  dynamicTimeOnStaticRoute='true' limitDynamicSpeedToStaticSpeed='true' />
		</Course>
		<Vehicle/>
	</Routing>
</Profile>
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
Attachments
ptv_forum_types_of_speed.JPG
Joost
Posts: 310
Joined: Fri Apr 25, 2014 1:46 pm

Re: Compute delay due to traffic

Post by Joost »

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:

https://xserver.ptvgroup.com/fileadmin/ ... ynamicInfo
Joost Claessen
Senior Technical Consultant
PTV Benelux
epsilon
Posts: 5
Joined: Thu Mar 29, 2018 1:22 pm

Re: Compute delay due to traffic

Post by epsilon »

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

Re: Compute delay due to traffic

Post by Bernd Welter »

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
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