Page 1 of 1

xRoute calculateRoute not using Roundabout for turn

Posted: Fri Aug 02, 2019 12:22 pm
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

Re: xRoute calculateRoute not using Roundabout for turn

Posted: Mon Aug 05, 2019 1:59 pm
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

Re: xRoute calculateRoute not using Roundabout for turn

Posted: Mon Aug 05, 2019 2:09 pm
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

Re: xRoute calculateRoute not using Roundabout for turn

Posted: Tue Aug 13, 2019 1:03 pm
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

Re: xRoute calculateRoute not using Roundabout for turn

Posted: Mon Aug 26, 2019 11:45 am
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

Re: xRoute calculateRoute not using Roundabout for turn

Posted: Tue Aug 27, 2019 8:22 am
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

Re: xRoute calculateRoute not using Roundabout for turn

Posted: Fri Sep 13, 2019 11:08 am
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

Re: xRoute calculateRoute not using Roundabout for turn

Posted: Mon Sep 16, 2019 4:33 pm
by Bernd Welter
Hi guys,

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

Best regards,
Bernd