routing to a blockedTruck segment

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
hegedus.tibor
Posts: 13
Joined: Fri Jan 15, 2021 2:02 pm

routing to a blockedTruck segment

Post by hegedus.tibor »

Hi,

we have some use cases where the destination waypoint coordinates linked to a segment, that is: isBlockedCar=True and isBlockedTruck=True

In this situation we get the error message:

Code: Select all

{
  "errorMessage": "cannot calculate route (concerning leg 1)",
  "errorKey": "2500",
  "exceptionType": "com.ptvag.xserver.xroute.XRouteException"
}
My question is if there is any request parameter, that allows routing to this type of segment?
For us it's not really feasible to move the coordinates till it is routable when this occurs.

We already tried a few settings like:
- Setting profile to "delivery" is not helping.
- Setting <SegmentBlockingViolations enabled="true" cost="100000" />
- Setting destination waypoint linkType to NEXT_NODE is not helping
- Setting destination waypoint linkType to NEXT_MAIN_NODE works, but we wonder if there are main nodes with these segment attributes, which will not work
- Lowering EmergencyVehicles segmentMalus to "2500" also works, but we wouldn't use that if possible

We are using xRouteServer 1.28.1 with PTV_Europe_City_Map_Premium_2021_1H, but 2019 map gave similar result.

An example calculateRoute request:

Code: Select all

{
  "waypoints": [
    {
      "$type": "WaypointDesc",
      "linkType": "NEXT_SEGMENT",
      "fuzzyRadius": 0,
      "coords": [
        {
          "$type": "Point",
          "point": {
            "$type": "PlainPoint",
            "x": 7.754641,
            "y": 47.517905
          }
        }
      ]
    },
    {
      "$type": "WaypointDesc",
      "linkType": "NEXT_SEGMENT",
      "fuzzyRadius": 0,
      "coords": [
        {
          "$type": "Point",
          "point": {
            "$type": "PlainPoint",
            "x": 7.779298,
            "y": 47.468936
          }
        }
      ]
    }
  ],
  "options": [ ],
  "exceptionPaths": null,
  "details": {

    "polygon": true,
    "detailLevel": "BORDERS"

  },
  "callerContext": {
    "properties": [
      {
        "key": "ResponseGeometry",
        "value": "PLAIN"
      },
      {
        "key": "Profile",
        "value": "delivery"
      }
    ]
  }
}
Best regards,
Tibor
User avatar
Bernd Welter
Site Admin
Posts: 2580
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: routing to a blockedTruck segment

Post by Bernd Welter »

Hi Tibor,
please add this to your caller context properties:
{
"key": "CoordFormat",
"value": "OG_GEODECIMAL"
},
You simply didn't tell the service to transfrom the coordinates from OG_GEODECIMAL (what you provided) into our internal format. Works fine afterwards ;-)

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:
hegedus.tibor
Posts: 13
Joined: Fri Jan 15, 2021 2:02 pm

Re: routing to a blockedTruck segment

Post by hegedus.tibor »

Hello Bernd!

Of course we use OG_GEODECIMAL coordFormat!
Sorry it was left out from the example. But again in my understanding the implicit coordFormat OG_SRID should be equivalent to OG_GEODECIMAL.
And I got the same results inserting the coordFormat block or not.

Br,
Tibor
hegedus.tibor
Posts: 13
Joined: Fri Jan 15, 2021 2:02 pm

Re: routing to a blockedTruck segment

Post by hegedus.tibor »

Hello Bernd!

So do you have any other suggestion how should we route to this coordinate (and sections similar to this)?

Code: Select all

            "x": 7.779298,
            "y": 47.468936
Br,
Tibor
User avatar
Bernd Welter
Site Admin
Posts: 2580
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: routing to a blockedTruck segment

Post by Bernd Welter »

Hi Tibor,

I discussed yoiurr case with my colleague Joost and he drew my attention to this old blog post which describes what to do to get rid of the issues. The situation occurs sometimes near delivery zones especially in HERE maps.

http://devblog.ptvgroup.com/2014/01/10/ ... -vehicles/

If this doesn't fit - return to me 1:1. I managed to deal with the routing successful on the HERE data (https://xroute-tln-eu-n.cloud.ptvgroup. ... /ws/XRoute) after making these adaptions.

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:
hegedus.tibor
Posts: 13
Joined: Fri Jan 15, 2021 2:02 pm

Re: routing to a blockedTruck segment

Post by hegedus.tibor »

Hi Bernd!

I already found the post you mentioned (http://devblog.ptvgroup.com/2014/01/10/ ... -vehicles/), but first, it didn’t solve our issue.

Now I tried again and it really made routing possible, but not when copying all relevant part of the profile. After further investigation I found, that the route is found, if I set

Code: Select all

<LegalCondition isAuthorized="true" isDelivery="true" />
But also set

Code: Select all

<DeliveryVehicles segmentMalus="2501" />

If delivery vehicles malus is less, then it is not working.

Could you please explain this behavior?

Setting isEmergency=true also works, but as I wrote in my first post we try to avoid that setting. (I found in a few forum posts as well that switching on emergency is not advised.)

I attached my routing/not routing profiles.

Br,
Tibor
Attachments
not_working_profile.xml
(4.72 KiB) Downloaded 235 times
working_profile.xml
(4.74 KiB) Downloaded 228 times
User avatar
Bernd Welter
Site Admin
Posts: 2580
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: routing to a blockedTruck segment

Post by Bernd Welter »

Hello

I forwarded this task to DEV, but we may also need map version and engine version...

Please provide it through the ticket I just created for you,

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

Re: routing to a blockedTruck segment

Post by Bernd Welter »

Hello Hegedus,

Here’s Frank’s feedback to the topic:

The situation matches the conditions of the blog post. What is confusing is that you parametrize
  • isDelivery=true
  • deliveryVehicles SegmentMalus=2501 (same applies for Emergency)
This doesn’t make sense because you allow the engine to use segments with “freeForDeliverys” flag but then you block them immediately through the malus of 2501.
Nexogen.PNG
Nexogen.PNG (3.69 KiB) Viewed 6092 times
  • The segment C-D is generally blocked for cars and trucks but has the attributes “free for delivery” and “free for emergency”
  • All other roads in this area are generally allowed for cars and trucks
  • At D we have banned turns which have only the attribute “free for emergency”
    • coming from B it is forbidden to continue to C
    • coming from E it is forbidden to continue to C
  • • Linking the destination waypoint X at the Ikea depot we have a different behavior depending on the parameters isDelivery and isEmergency (and DeliveryVehicles / segmentMalus)
    • isEmergency=false
      • isDelivery=true (and DeliveryVehicles/segmentMalus < 2501)
        • X is linked at C because C-D is free for delivery
        • This is problematic because we cannot reach C because of the banned turns. Normally such banned turns should have the attribute “freeForAuthorized”
        • The result is “route not found”
        • The only way to ignore the banned turns is by setting also isEmergency=true (and EmergencyVehicles/segmentMalus < 2501)
      • isDelivery=false (or isDelivery=true and DeliveryVehicles/segmentMalus = 2501)
        • X is linked at the second nearest road at A because C-D is not allowed for non-delivery vehicles
        • The routing is successful and reaches X through A
    • isEmergency=true (and EmergencyVehicles/segmentMalus < 2501) and isDelivery=true (and DeliveryVehicles / segmentMalus < 2501)
      • X is linked at C
      • The routing is successful because the normally banned turn E->D->C is now allowed because of isEmergency=true
        • X is now reached through C
Here are the two approaches that enable a successful routing:
  • Approach #1 : Set isEmergency=true and reduce the distance to X. In this case it may look like it is wrong. If you crosscheck this via Google Maps it looks “wrong”
  • Approach #2 : set both isDelivery and isEmergency to FALSE and keep the malus values lower 2501. This will create a route via the ordinary road which is a bit further away from X. On a generic level this will prevent you from entering zones which are restricted to “freeForDelivery”.
I hope this answers the question.

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:
hegedus.tibor
Posts: 13
Joined: Fri Jan 15, 2021 2:02 pm

Re: routing to a blockedTruck segment

Post by hegedus.tibor »

Thank you for the detailed explanation Bernd!

We will go with isDelivery=false, isEmergency=false.
First tests show it will work in our scenarios.

Best regards,
Tibor
Post Reply