How to avoid: the Elbtunnel (based on xroute1, tunnel restriction code)

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

How to avoid: the Elbtunnel (based on xroute1, tunnel restriction code)

Post by Bernd Welter »

Hi there,

I've been asked how to consider the Elbtunnel in Hamburg in terms of "tunnel restriction codes" in xRoute1.
Here's an example - check this snippet:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<Profile>
	<Common coordinateFormat="OG_GEODECIMAL" language="en" majorVersion="1" minorVersion="0"/>
	<FeatureLayer majorVersion="1" minorVersion="0">
		<GlobalSettings enableTimeDependency="true" enableVehicleDependency="true"/>
		<Themes>
			<Theme id="PTV_TruckAttributes" enabled="true" priorityLevel="0"/>
		</Themes>
	</FeatureLayer>
	<Routing majorVersion="2" minorVersion="0">
		<Course distanceTimeWeighting="80" enforceShortestRoute="false">
			<BasicDataRules>
				<Toll extraTollMalus="0" tollMalus="0" vignetteMalus="0"/>
			</BasicDataRules>
			<AdditionalDataRules enabled="true" />
			<Violations>
				<SegmentBlockingViolations cost="0" enabled="true"/>
			</Violations>
		</Course>
		<Vehicle>
			<Physical>
				<Weight emptyWeight="7500" loadWeight="0" totalPermittedWeight="15000"/>
				<Dimension height="250" heightAboveFrontAxle="80" length="1200" width="220"/>
			</Physical>
			<Load hazardousGoodsType="NONE" loadType="GOODS" tunnelRestrictionCode="B"/>
		</Vehicle>
	</Routing>
</Profile>
Violations allowed - penalty = 0
Violations allowed - penalty = 0
Violations forbidden
Violations forbidden
And here's an exanmple for xRoute2. I Iterated over 7 days, hourly routing start
And here's an exanmple for xRoute2. I Iterated over 7 days, hourly routing start
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:
Stefan
Posts: 5
Joined: Tue Jul 31, 2018 10:55 am

Re: How to avoid: the Elbtunnel (based on xroute1, tunnel restriction code)

Post by Stefan »

As i personally was rather confused about the codes and their meaning, this site is helpful:
Link to gefahrgutshop.de
csm_Gefahrgutshop_Tunnel-Matrix-2020_04de33f14e.jpg
So if i transport a product with tunnelcode E, i can drive through the elbtunnel if its not between 23-5 o'clock
as the restriction is of code C then.
User avatar
Bernd Welter
Site Admin
Posts: 2574
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: How to avoid: the Elbtunnel (based on xroute1, tunnel restriction code)

Post by Bernd Welter »

Hello Stefan,

thanks for the Link - you've been too quick for me: I was just preparing such a diagram ;-)

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

Re: How to avoid: the Elbtunnel (based on xroute1, tunnel restriction code)

Post by Bernd Welter »

ok, looks like we made it very challenging when it comes to proper parameters in the profile... here's what you should set in a proper manner:

1. Enable the FeatureLayer id="PTV_TruckAttributes" to consider the legal restrictions
2. Enable TimeDependency: @FeatureLayer.GLobalSettings.enableTimeDependency
3. Enable Routing.Course.AdditionalDataRules
4. VehicleSpecific : set it to false
5. Vehicle.Load--> tunnelRestrictionCode = "whatever you want"...
6. RoutingOption.START_TIME

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<Profile>
	<FeatureLayer majorVersion="1" minorVersion="0">
		<GlobalSettings enableTimeDependency="true" enableVehicleDependency="true"/>
		<Themes>
			<Theme id="PTV_TruckAttributes" enabled="true" priorityLevel="0"/>
		</Themes>
	</FeatureLayer>
	<Routing majorVersion="2" minorVersion="0">
		<Course distanceTimeWeighting="80" enforceShortestRoute="false">
			<AdditionalDataRules enabled="true" layerName="">
				<VehicleSpecific enabled="false">
				</VehicleSpecific>
			</AdditionalDataRules>
			<Violations>
				<SegmentBlockingViolations cost="50000" enabled="false"/>
			</Violations>
		</Course>
		<Vehicle>
			<Load hazardousGoodsType="NONE" loadType="GOODS" tunnelRestrictionCode="D"/>
		</Vehicle>
	</Routing>
</Profile>

:!: it is also an option to set "vehicleSpecific==true" but then you have to define each child property such as "restrictedTunnel" or "residential" or "delivery". Check the documentation
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:
User avatar
Bernd Welter
Site Admin
Posts: 2574
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: How to avoid: the Elbtunnel (based on xroute1, tunnel restriction code)

Post by Bernd Welter »

wow - just made another test with xServer2 and identified this important effect.

Officially the Elbtunnel is labeled as
  • 05:00-23:00 : E
  • otherwise: C
Now from a legal perspective the tunnel is blocked for B-vehicles. No matter what time it is.
From a technical perspective you have to apply a time consideration - otherwise the time dependent TruckATtributes aren't considered.

Pirates be warned!
Attachments
5:00-23:00 : category E, <br />outside that timeframe C
5:00-23:00 : category E,
outside that timeframe C
Vehicle is &quot;tunnel-B&quot;, no time consideration mode activated (use snapshot==false) but the Tunnel is used: which is not correct
Vehicle is "tunnel-B", no time consideration mode activated (use snapshot==false) but the Tunnel is used: which is not correct
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:
User avatar
Bernd Welter
Site Admin
Posts: 2574
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: How to avoid: the Elbtunnel (based on xroute1, tunnel restriction code)

Post by Bernd Welter »

As a reaction to this thread my attention was drawn to the Krohnstiegtunnel in Hamburg which is also regulated via time dependent restrictions.

The image shows 25 different start times and refers to a vehicle with tunnel code D.
During the "night time" (15:00-06:00) the vehicle takes the tunnel.
During the daytime (06:00:15:00) a detour applies.
Krohnstiegtunnel in Hamburg (single routes)
Krohnstiegtunnel in Hamburg (single routes)
Krohnstiegtunnel in Hamburg
Krohnstiegtunnel in Hamburg
Last but not least there are further similar restrictions near the Hamburg airport.
Hamburg airport
Hamburg airport
Thanks to Andre for the hint!
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:
User avatar
Bernd Welter
Site Admin
Posts: 2574
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: How to avoid: the Elbtunnel (based on xroute1, tunnel restriction code)

Post by Bernd Welter »

Another important info:

I just discussed this topic with a player who requested
  • Featurelayer PTV_TruckAttributes
  • Old School "TruckAttributes" binary data
in a single transaction. This produces garbage...
The binary data does not support time dependency and therefor uses one and the same "condition" for a segment no matter what time it ist.

Long story short:
Please do not mix BIN and FL. If your subsystem supports PTV_TruckAttributes then go for it - only for it!
Attachments
RoadEditor / OldTechnology :  one time independent condition
RoadEditor / OldTechnology : one time independent condition
FeatureLayer / New technology:  including time dependent settings
FeatureLayer / New technology: including time dependent settings
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