xRoute calculateRoute not using Roundabout for turn

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
Ries
Posts: 6
Joined: Wed Aug 16, 2017 7:57 am

xRoute calculateRoute not using Roundabout for turn

Post by Ries »

Hi,

I have a problem with xRoute's calculateRoute function: Having three waypoints the calculated route makes a long detour instead of using a roundabout for a much shorter route (on the attached image I have marked the expected route in green).

Any help/pointers would be appreciated.

Json Request:

Code: Select all

{
  "waypoints": [
    {
      "$type": "WaypointDesc",
      "linkType": "NEXT_SEGMENT",
      "fuzzyRadius": 0,
      "coords": [
        {
          "$type": "Point",
          "point": {
            "$type": "PlainPoint",
            "x":	10.805523,
            "y": 53.696013
          }
        }
      ]
    },
    {
      "$type": "WaypointDesc",
      "linkType": "NEXT_SEGMENT",
      "fuzzyRadius": 0,
      "coords": [
        {
          "$type": "Point",
          "point": {
            "$type": "PlainPoint",
            "x": 10.80550016454624,
            "y": 53.696549005418177

          }
        }
      ]
    },
    {
      "$type": "WaypointDesc",
      "linkType": "NEXT_SEGMENT",
      "fuzzyRadius": 0,
      "coords": [
        {
          "$type": "Point",
          "point": {
            "$type": "PlainPoint",
            "x": 10.805411578124581,
            "y": 53.695153428461083

            
          }
        }
      ]
    }
  ],
  "exceptionPaths": null,
  "details": {
    "manoeuvres": true,
    "polygon": true,
    "detailLevel": "STANDARD",
    "segments": true,
    "featureDescriptions": true
  },
  "callerContext": {
    "properties": [
      {
        "key": "CoordFormat",
        "value": "OG_GEODECIMAL"
      },
      {
        "key": "ResponseGeometry",
        "value": "WKB"
      },
      {
        "key": "Profile",
        "value": "Truck"
      }
    ]
  }
}
Image
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: xRoute calculateRoute not using Roundabout for turn

Post by Bernd Welter »

Hello Tobias,

which map (or Service URL) do you use?
WHat happens if you add a point of the roundabout to the input waypoints list?

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: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: xRoute calculateRoute not using Roundabout for turn

Post by Bernd Welter »

Hi again,

I reproduced the scenario on the following service URL:
https://api-test.cloud.ptvgroup.com/pag ... quest.html
shorter distance (496m) but longer period (112sec)
shorter distance (496m) but longer period (112sec)
longer distance (512m), but shorter period (105sec)
longer distance (512m), but shorter period (105sec)
So by optimizing "by period" you get the track without the roundabout...

Any further questions?

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:
Ries
Posts: 6
Joined: Wed Aug 16, 2017 7:57 am

Re: xRoute calculateRoute not using Roundabout for turn

Post by Ries »

Hi Bernd,

thanks for your reply, but it does not quite capture my problem.
In your case the difference between the two routes is only 7 seconds / 16 meters and depending on distance or time one or the other route is better.

However in my case, as displayed on the screenshot in my original post, the computed route is much worse in time as well as distance.

Computed Route (red): distance: 2869, time: 398
Expected Route (green): distance: ~568, time: ~86

I'm using the PTV xServer Raw Request Runner on a local server (JSON, xRoute, calculateRoute).

Best regards, Tobias
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: xRoute calculateRoute not using Roundabout for turn

Post by Bernd Welter »

Hello Tobias,

which map is in use?

The screenshots on your map look like there's an older map in use - some roads are missing.

This doesn't answer the question as a whole but I need to know it to understand/reproduce the whole story,

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:
frs
Posts: 6
Joined: Tue Jan 20, 2015 4:00 pm

Re: xRoute calculateRoute not using Roundabout for turn

Post by frs »

Hi,

probably this is due to the "fast turning ban heuristic" which is enabled by default. It can be disabled with the routing profile parameter useFastTurningBanHeuristic (https://api-test.cloud.ptvgroup.com/man ... nHeuristic). The parameter can be set for example by the following caller context property ProfileXMLSnippet in the request:

Code: Select all

{
  "key": "ProfileXMLSnippet",
  "value": "<Profile><Routing majorVersion=\"2\" minorVersion=\"0\"><Algorithm useFastTurningBanHeuristic=\"false\"/></Routing></Profile>"   
}
Note that disabling the fast turning ban heuristic has an impact on the routing performance, the calculation time can increase by a factor of 2.

Hope that helps, best regards,

Frank
Frank Schulz
Senior Software Engineer
PTV Logistics
Ries
Posts: 6
Joined: Wed Aug 16, 2017 7:57 am

Re: xRoute calculateRoute not using Roundabout for turn

Post by Ries »

Hi Frank,

Sorry for the delayed response.

Using your snippet results in the expected route :D

We will also update the map as proposed by Bernd (currently we use the map from Here: EUR2018_2aH_Master.zip with PTV xServer Bundle 1.24.0.4).

Thanks for your help,
Tobias
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: xRoute calculateRoute not using Roundabout for turn

Post by Bernd Welter »

Hi guys,

thanks for the feedback - sounds like "no further todo for Bernd at the moment" ;-)

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