Page 1 of 1

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

Posted: Tue Aug 08, 2023 8:21 am
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

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

Posted: Fri Aug 11, 2023 2:37 pm
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.

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

Posted: Mon Aug 14, 2023 6:57 am
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

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

Posted: Mon Aug 14, 2023 2:35 pm
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

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

Posted: Wed Aug 16, 2023 9:59 am
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!

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

Posted: Wed Aug 16, 2023 10:58 am
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!

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

Posted: Wed Aug 16, 2023 2:10 pm
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!