Page 1 of 2

Schiersteiner Brücke - how to deal with construction sites?

Posted: Fri Feb 12, 2016 10:26 am
by Bernd Welter
Hello together,

I've been asked how to deal with traffic construction sites that are not part of our map data, e.g. with the famous "Schiersteiner Brücke" https://de.wikipedia.org/wiki/Schiersteiner_Br%C3%BCcke that links Wiesbaden-Schierstein with Mainz-Mombach.

PS: Please feel free to add further objects (official tunnel names, bridges, ...) in replies so we can make them searcheable ;-)

Well, there are several potrential strategies available to deal with such issues. A quick forum posting can't replace the documentation but maybe I can give you some hints and you can evaluate whether one of them fits your current challenge.
  • Approach #1 (quick and dirty): use an ExceptionPath object to malify the bridge and identify it by the street name:

    Code: Select all

    <ArrayOfExceptionPath_3>
    <ExceptionPath absTimeMalus="0" binaryPathDesc="" extSegments="" relMalus="2501" street="Schiersteiner Br?xmlns="http://xroute.xserver.ptvag.com">
    <wrappedNodes xsi:nil="true" />
    <polyline xsi:nil="true" />
    </ExceptionPath>
    </ArrayOfExceptionPath_3>
    This approach requires you to identify the object within the request which works fine for this bridge because of the street name. It might be more difficult to reference other objects,
    The left map shows the result of the routing based on the ExceptionPath with streetname=&quot;Schiersteiner Brücke&quot; and RelMalus=&quot;2501&quot;: the bridge is avoided and the track takes a large detour.
    The left map shows the result of the routing based on the ExceptionPath with streetname="Schiersteiner Brücke" and RelMalus="2501": the bridge is avoided and the track takes a large detour.
  • Approach #1b: precalculate a BinaryPathDescription of a street section which you want to block (e.g. if you want to block just a subsection of a specific highway but not the whole A123). Just use the BinaryPath instead of the StreetName, but still work with ExceptionPath and RelMalus=2501.
  • Approach #2 (less quick, much more effort): use the RoadEditor of Map&Guide Desktop: block the street in both directions and create a binary truckattributes file which can be used in the xRoute:

    Code: Select all

    <RoutingOption parameter="ROADEDITOR_LAYERNAME" value="SchiersteinerBr?xmlns="http://xroute.xserver.ptvag.com" />
    <RoutingOption parameter="ENABLE_ROADEDITOR" value="True" xmlns="http://xroute.xserver.ptvag.com" />
    This is how the RoadEditor looks like in Map&amp;Guide Desktop. I blocked the two directions and exported the data into a binary layer file. Afterwards I copied the file into my map folder/RE and referenced it during the routing call.
    This is how the RoadEditor looks like in Map&Guide Desktop. I blocked the two directions and exported the data into a binary layer file. Afterwards I copied the file into my map folder/RE and referenced it during the routing call.
  • For those who have proper access to a direct RoadEditor database you can also use the database approach.
Here are some screenshots... Have fun!

Best regards Bernd

PS: mercator coordinates of sample route:
914068/6447331 => 912599/6443504

Re: Schiersteiner Brücke - how to deal with construction sit

Posted: Fri Feb 12, 2016 10:33 am
by Bernd Welter
And another Example which works fine with ExceptionPath+StreetName+RelMalus:
  • Leverkusener Brücke
    Leverkusener Brücke

Re: Schiersteiner Brücke - how to deal with construction sit

Posted: Fri Feb 12, 2016 11:01 am
by Bernd Welter
Another important info:
The Leverkusener Brücke is blocked for trucks exceeding MAX_WEIGHT=3500.
So this is a conditional blocking and requires RoadEditor (or you have to decide about which ExceptionPaths you need for the current routing).
RoadEditor attributes MAX_WEIGHT used. This truck weighs 666 kilograms and is therefore allowed to use the bridge.
RoadEditor attributes MAX_WEIGHT used. This truck weighs 666 kilograms and is therefore allowed to use the bridge.
And this truck weighs 6666kg and exceeds the MAX_WEIGHT so it has to perform a detour.
And this truck weighs 6666kg and exceeds the MAX_WEIGHT so it has to perform a detour.

Re: Schiersteiner Brücke - how to deal with construction sit

Posted: Mon Feb 15, 2016 1:27 pm
by Bernd Welter
And here we go : another challenge is the so-called WARNOW Tunnel near Rostock.
Some customers want to avoid this tunnel because it raises toll lof type SPECIALCHARGETUNNEL.

https://de.wikipedia.org/wiki/Warnowtunnel
comparison of tracks with and without the tunnel. I used the simple EXCEPTIONPATH approach with streetname and relmalus for this blocking.
comparison of tracks with and without the tunnel. I used the simple EXCEPTIONPATH approach with streetname and relmalus for this blocking.
Best regards Bernd

Re: Schiersteiner Brücke - how to deal with construction sit

Posted: Wed Feb 17, 2016 11:09 am
by Bernd Welter
I've been asked for some lines of code... here we are... C# rules.
I created a single element of type ExceptionPath based on the streetname.
The "Schiersteiner Brücke" is blocked due to the malus=2501.
The relevant part starts in line #49:

Code: Select all

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using XServer;

namespace RoutingBeispiel
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            XRouteWSService svcRoute = new XRouteWSService();
            WaypointDesc wpdStart = new WaypointDesc()
            {
                linkType = LinkType.AUTO_LINKING,
                wrappedCoords = new XServer.Point[] {
                    new XServer.Point() {
                        point = new PlainPoint() {
                            x = 913800,
                            y = 6447494
                        }
                    }
                }
            };
            WaypointDesc wpdDestination = new WaypointDesc()
            {
                linkType = LinkType.AUTO_LINKING,
                wrappedCoords = new XServer.Point[] {
                    new XServer.Point() {
                        point = new PlainPoint() {
                            x = 913407,
                            y = 6443915
                        }
                    }
                }
            };
            WaypointDesc[] wpdStationlist = new WaypointDesc[] {
                wpdStart,
                wpdDestination
            };

            ExceptionPath exSchiersteinerBridge = new ExceptionPath() {
                relMalus = 2501,
                street = "Schiersteiner Brücke"
            };

            ExceptionPath[] arrExceptionPaths = new ExceptionPath[] {
                exSchiersteinerBridge
            };


            RouteInfo routeNoPath = svcRoute.calculateRouteInfo(wpdStationlist, null, null, null);
            RouteInfo routeWithPath = svcRoute.calculateRouteInfo(wpdStationlist, null, arrExceptionPaths, null);
            ;

        }
    }
}

Re: Schiersteiner Brücke - how to deal with construction sit

Posted: Mon Oct 17, 2016 2:06 pm
by Bernd Welter
Here is another example: the LONDON BRIDGE
Left map: using the LONDON BRIDGE is possible - there is no INTERSECTING LINE defined.<br />Right map: crossing the bridge is forbidden due to the INTERSCTING LINE with a malus of 2600
Left map: using the LONDON BRIDGE is possible - there is no INTERSECTING LINE defined.
Right map: crossing the bridge is forbidden due to the INTERSCTING LINE with a malus of 2600

Re: Schiersteiner Brücke - how to deal with construction sit

Posted: Mon Sep 10, 2018 7:56 am
by Bernd Welter
Hi therem

Another (unfortunately quite extreme) example is mentioned here: the recent Genovese bridge collapse

I recommend to subscribe to that thread because we will announce further info over there.

Best regards,
Bernd

Re: Schiersteiner Brücke - how to deal with construction sit

Posted: Fri Dec 28, 2018 11:16 am
by Max Beermann
Hey there,

is it also possible to block more than one bridge?

For example: I want to block "Mülheimer-Brücke" and "Leverkusener-Brücke"?

When I execute the following code > the routing only blocks the last one ("Leverkusener-Brücke").

Code: Select all

      <ArrayOfExceptionPath_4>
        <ns6:ExceptionPath xmlns:ns6="http://xroute.xserver.ptvag.com" street="Mülheimer Brücke" relMalus="2501" extSegments="" binaryPathDesc="" absTimeMalus="0">
          <ns6:wrappedNodes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
        </ns6:ExceptionPath>
        <ns6:ExceptionPath xmlns:ns6="http://xroute.xserver.ptvag.com" street="Leverkusener Brücke" relMalus="2501" extSegments="" binaryPathDesc="" absTimeMalus="0">
          <ns6:wrappedNodes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
        </ns6:ExceptionPath>
      </ArrayOfExceptionPath_4>
Thanks in advance
Max Beermann

Re: Schiersteiner Brücke - how to deal with construction sit

Posted: Fri Dec 28, 2018 11:57 am
by Bernd Welter
Hello Max,

honestly I wasn't aware of this little statement, too.

best regards,
Bernd

https://xserver.ptvgroup.com/fileadmin/ ... eptionPath
Alternative description representing an optional list of segments which match certain street names resp. street numbers.
The list of segments includes all segments which match at least one of the street names resp. street numbers.
The syntax for this description is:
<streetname>[/<streetname>]*
absTimeMalus will be ignored if this attribute is non-empty, instead relMalus will be considered.
If more than one ExceptionPath elements contain a non-empty 'street' attribute, only the last occurrence will be considered.
calculateMatrixInfo() does not support this attribute.

Re: Schiersteiner Brücke - how to deal with construction sit

Posted: Fri Dec 28, 2018 1:46 pm
by Max Beermann
Hey Bernd,

thanks for your fast replay - works perfectly!

Code: Select all

      <ArrayOfExceptionPath_4>
        <ns6:ExceptionPath xmlns:ns6="http://xroute.xserver.ptvag.com" street="[Mülheimer Brücke]/[Leverkusener Brücke]" relMalus="2501" extSegments="" binaryPathDesc="" absTimeMalus="0">
          <ns6:wrappedNodes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
        </ns6:ExceptionPath>
      </ArrayOfExceptionPath_4>
Happy new year!
Max