Increase the penalty of entering a prohibited road

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
VeeTennis
Posts: 11
Joined: Tue Mar 14, 2023 7:53 am

Increase the penalty of entering a prohibited road

Post by VeeTennis »

Hello,

We have had an interesting case where a vehicle was guided through a prohibited pedestrian area.

Our guess is that the issue appeared due to the timed vehicle length restriction. As there was no way for PTV to calculate the route on a non-restricted area (the length restriction is on the starting point, end point and the surrounding area), the algorithm looked for the shortest route across the prohibited area, therefore, a route through the prohibited pedestrian area was calculated.

Is it possible to somehow increase the penalty of entering a prohibited road, so that the algorithm would calculate an alternative path which would go through the length restriction, rather than the prohibited road?

A reference screenshot is attached.

Request body:

Code: Select all

{
   "waypoints":[
      {
         "$type":"OffRoadWaypoint",
         "location":{
            "offRoadCoordinate":{
               "y":"45.496174363",
               "x":"9.2396971959"
            }
         }
      },
      {
         "$type":"OffRoadWaypoint",
         "location":{
            "offRoadCoordinate":{
               "y":45.49395975417229,
               "x":9.279456214560605
            }
         }
      }
   ],
   "routeOptions":{
      "timeConsideration":{
         "$type":"SnapshotTimeConsideration",
         "referenceTime":"2023-10-02T09:00:00.000Z"
      },
      "geographicRestrictions":{
         "prohibitedCountries":[
            "BY",
            "RU"
         ],
         "searchSpaceBounds":{
            "restrictionMode":"AUTOMATIC"
         }
      },
      "currency":"EUR"
   },
   "resultFields":{
      "polyline":true,
      "encodedPath":false,
      "eventTypes":[
         "ROUTE_VIOLATION_EVENT"
      ],
      "toll":{
         "enabled":true
      },
      "legs":{
         "enabled":true,
         "tollSummary":true
      },
      "report":true,
      "tourReport":true,
      "waypoints":true,
      "segments":{
         "enabled":true,
         "polyline":true,
         "descriptors":true,
         "roadAttributes":true,
         "featureThemeIds":[
            "PTV_TruckAttributes"
         ]
      }
   },
   "requestProfile":{
      "featureLayerProfile":{
         "themes":[
            {
               "id":"PTV_TruckAttributes",
               "enabled":true
            }
         ]
      },
      "routingProfile":{
         "searchSpace":{
            "heuristicAggressiveness":0
         },
         "linking":{
            "maximumDistanceToSegment":50000,
            "minimumNetworkClass":0,
            "maximumNetworkClass":7
         },
         "course":{
            "distanceTimeWeighting":"0",
            "combinedTransport":{
               "boatPenalty":2501,
               "railPenalty":2501
            }
         }
      },
      "vehicleProfile":{
         "engine":{
            "emissionStandardEU":"EURO_6",
            "lowEmissionZoneTypes":"DE_GREEN"
         },
         "legalCondition":{
            "isDelivery":true,
            "isEmergency":false
         },
         "dimensions":{
            "height":500,
            "length":1300,
            "width":null
         },
         "weight":{
            "emptyWeight":0,
            "loadWeight":414404,
            "totalPermittedWeight":414404
         },
         "load":{
            "loadType":"GOODS",
            "tunnelRestrictionCode":"NONE",
            "hazardousGoodsTypes":"NONE"
         }
      }
   }
}
And resulting road violations:

Code: Select all

[
   {
      "$type":"RouteViolationEvent",
      "eventType":"ROUTE_VIOLATION_EVENT",
      "startsAt":"2023-10-02T09:00:03.120Z",
      "coordinate":{
         "x":9.2398659757,
         "y":45.496196493
      },
      "distanceFromStart":13,
      "travelTimeFromStart":3.12,
      "violationType":"FEATURE",
      "violatedFeature":{
         "themeId":"PTV_TruckAttributes",
         "attributes":[
            {
               "key":"maxHeight",
               "value":"445"
            }
         ]
      },
      "accessType":"PASS"
   },
   {
      "$type":"RouteViolationEvent",
      "eventType":"ROUTE_VIOLATION_EVENT",
      "startsAt":"2023-10-02T09:00:03.120Z",
      "coordinate":{
         "x":9.2398659757,
         "y":45.496196493
      },
      "distanceFromStart":13,
      "travelTimeFromStart":3.12,
      "violationType":"FEATURE",
      "violatedFeature":{
         "themeId":"PTV_TruckAttributes",
         "attributes":[
            {
               "key":"maxLength",
               "value":"1200"
            },
            {
               "key":"hasTrailer",
               "value":"0"
            }
         ]
      },
      "accessType":"PASS"
   },
   {
      "$type":"RouteViolationEvent",
      "eventType":"ROUTE_VIOLATION_EVENT",
      "startsAt":"2023-10-02T09:00:22.390Z",
      "coordinate":{
         "x":9.240058081,
         "y":45.495367461
      },
      "distanceFromStart":104,
      "travelTimeFromStart":22.39,
      "violationType":"PROHIBITED",
      "accessType":"ENTER",
      "relatedEventIndex":3
   },
   {
      "$type":"RouteViolationEvent",
      "eventType":"ROUTE_VIOLATION_EVENT",
      "startsAt":"2023-10-02T09:08:02.390Z",
      "coordinate":{
         "x":9.2460702841,
         "y":45.491638088
      },
      "distanceFromStart":1254,
      "travelTimeFromStart":482.39,
      "violationType":"PROHIBITED",
      "accessType":"EXIT",
      "relatedEventIndex":2
   },
   {
      "$type":"RouteViolationEvent",
      "eventType":"ROUTE_VIOLATION_EVENT",
      "startsAt":"2023-10-02T09:08:02.390Z",
      "coordinate":{
         "x":9.2460702841,
         "y":45.491638088
      },
      "distanceFromStart":1254,
      "travelTimeFromStart":482.39,
      "violationType":"FEATURE",
      "violatedFeature":{
         "themeId":"PTV_TruckAttributes",
         "attributes":[
            {
               "key":"maxLength",
               "value":"1200"
            },
            {
               "key":"hasTrailer",
               "value":"0"
            }
         ]
      },
      "accessType":"ENTER",
      "relatedEventIndex":5
   },
   {
      "$type":"RouteViolationEvent",
      "eventType":"ROUTE_VIOLATION_EVENT",
      "startsAt":"2023-10-02T09:08:40.200Z",
      "coordinate":{
         "x":9.2476706547,
         "y":45.491304555
      },
      "distanceFromStart":1433,
      "travelTimeFromStart":520.2,
      "violationType":"FEATURE",
      "violatedFeature":{
         "themeId":"PTV_TruckAttributes",
         "attributes":[
            {
               "key":"maxLength",
               "value":"1200"
            },
            {
               "key":"hasTrailer",
               "value":"0"
            }
         ]
      },
      "accessType":"EXIT",
      "relatedEventIndex":4
   }
]
Attachments
image (26).png
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Increase the penalty of entering a prohibited road

Post by Bernd Welter »

Hi Vytennis,

can we look into this together?

I'd like to check this via a teams session... Please book a slot through the booking portal

Bernd
Attachments
Screenshot 2023-10-02 170432.png
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