Block Ferrys

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.

Block Ferrys

Postby Max Beermann » Thu Jan 10, 2019 10:46 am

Hey Bernd,

I am already blocking/avoiding severeal countrys, bridge, polylines, etc.
As you know - you helped me;)

Now I have a new challenge - maybe you have an idea.

I want to block the ferry from NL-Rotterdam > GB-Hull.
But others ferry-connections should remain (e.g. NL-Rotterdam > GB-Harwich).

If it is possible:
How would you do that?

Many thanks in advance!
Max
User avatar
Max Beermann
 
Posts: 41
Joined: Tue Oct 30, 2018 7:36 am

Re: Block Ferrys

Postby Bernd Welter » Fri Jan 11, 2019 9:21 am

Hello Max,

how about using the ExceptionPath with the nodes of the ferries?
Comparable to this...

viewtopic.php?f=7&t=673&p=1967&hilit=ferry#p1967

Best regards,
Bernd
Bernd Welter
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
 
Posts: 1440
Joined: Mon Apr 14, 2014 10:28 am

Re: Block Ferrys

Postby Max Beermann » Fri Jan 11, 2019 9:53 am

Hi Bernd,

oh that looks interesting > but I think i have to improve my xServer-skills for that.

Maybe it is getting easier for me:
I want to make sure, that - in case of a GB-destination - the ferry from Calais to Dover will be used.

I could avoid all the surrounding ferrys > but why not prefer the ferry from Calais to Dover(?):
My thought is the following, but the parameters are wrong and maybe finally ArrayOfExceptionPath is not the right one to pic:

If Start <> "GB" and Destination = "GB" then

Code: Select all
<ArrayOfExceptionPath_4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >       <ExceptionPath absTimeMalus="0" binaryPathDesc="" extSegments="" relMalus="-99" street=" Ferry Calais "xmlns="http://xroute.xserver.ptvag.com">            <wrappedNodes xsi:nil="true" />            <polyline xsi:nil="true" />      </ExceptionPath>      </ArrayOfExceptionPath_4>     



Maybe you know what I mean/what to do?


Thanks for all your kind help!
Max
User avatar
Max Beermann
 
Posts: 41
Joined: Tue Oct 30, 2018 7:36 am

Re: Block Ferrys

Postby Bernd Welter » Fri Jan 11, 2019 2:38 pm

Hello Max,

there's always potential ;-)

If you want to enforce a specific ferry you could identify the ferry connection via xlocate.findCombinedTransport... and use the ID of the ferry connection to specify combinedTransportId
https://xserver.ptvgroup.com/fileadmin/ ... ation.html#com.ptvag.xserver.xroute.WaypointDesc%3FTocPath%3DDeveloper's%2520Guide%7CAPI%2520Documentation%7CAPI%2520Documentation%2520PTV%2520xRoute%7CComponent%2520xroute%7CClasses%7C_____89

Best regards,
Bernd
Bernd Welter
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
 
Posts: 1440
Joined: Mon Apr 14, 2014 10:28 am

Re: Block Ferrys

Postby Max Beermann » Fri Jan 11, 2019 2:48 pm

Hello Bernd,

cool > seems like this is what I am looking for.

I will get along with it within the next week and will give you a feedback!

Thanks and have a nice weekend
Max
User avatar
Max Beermann
 
Posts: 41
Joined: Tue Oct 30, 2018 7:36 am

Re: Block Ferrys

Postby Max Beermann » Mon Jan 14, 2019 9:11 am

Good morning Bernd,

works great - Thanks!

Best regards
Max
User avatar
Max Beermann
 
Posts: 41
Joined: Tue Oct 30, 2018 7:36 am

Re: Block Ferrys

Postby biro.daniel » Mon Apr 15, 2019 1:42 pm

Dear Bernd,

I have the same issue as Max: when routing between Calais and Dover (50.968637698, 1.873768495; 51.131455905, 1.3286909207), the GB-FR direction is all good (it uses the ferry), however the opposite direction (FR-GB) uses the Euro tunnel, and I cannot force to use the ferry in this case too. To tell the truth, I was not able to make the routing use the ferry instead of the Euro tunnel in any cases, when tried to relocate the FR coordinates.

Currently, we are looking for a solution where we can use only coordinates (and not FerryIds) for routing requests. Do you have an idea what is the issue here? Does the opposite direction have different parameters (eg. cost) that would make prefer the tunnel?

Thank you in advance,
Daniel

Max Beermann wrote:Hi Bernd,

oh that looks interesting > but I think i have to improve my xServer-skills for that.

Maybe it is getting easier for me:
I want to make sure, that - in case of a GB-destination - the ferry from Calais to Dover will be used.

I could avoid all the surrounding ferrys > but why not prefer the ferry from Calais to Dover(?):
My thought is the following, but the parameters are wrong and maybe finally ArrayOfExceptionPath is not the right one to pic:

If Start <> "GB" and Destination = "GB" then

Code: Select all
<ArrayOfExceptionPath_4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >       <ExceptionPath absTimeMalus="0" binaryPathDesc="" extSegments="" relMalus="-99" street=" Ferry Calais "xmlns="http://xroute.xserver.ptvag.com">            <wrappedNodes xsi:nil="true" />            <polyline xsi:nil="true" />      </ExceptionPath>      </ArrayOfExceptionPath_4>     



Maybe you know what I mean/what to do?


Thanks for all your kind help!
Max
biro.daniel
 
Posts: 39
Joined: Tue Aug 23, 2016 8:08 am

Re: Block Ferrys

Postby Bernd Welter » Wed Apr 17, 2019 3:35 pm

Hello Daniel,


maybe the following description helps:
Among other approaches the motivation for a different track could be
- block elements on the unwanted route (define penalties AKA malus)
- make elements of the desired route more attractive (reduce their costs)

I created a simple routing from FR to GB using your coordinates and it took the tunnel.
By setting the OPTIMIZATION to an extreme value of "0" I encountered the change of the route:
tunnel.PNG
Looks like the way through the tunnel produces some additional kilometers but the additional way saves "time".

Let's have a look at the tunnel's own values (period, to be more precise):
"Calais - Dover" requires about 7140 seconds (about 120mins)
"the Tunnel" requires 5400 seconds (=90min)

I then played with optimization:
in my environment the behaviour switches between 73% and 75%.

I recommend that we have a 1:1 session to discuss how to approach this.

Best regards,
Bernd
Bernd Welter
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
 
Posts: 1440
Joined: Mon Apr 14, 2014 10:28 am


Return to PTV xRouteServer

cron