Route Violated in LegReport and other doubts

This forum deals with any kind of trip optimization based on xTour1, xTour2 and the Developer APIs "RouteOptimization" and "SequenceOptimization". No matter whether it is automatic planning or manual dispatching, refering to transport orders or service planning.
Attention: this does not refer to PTV Optiflow SaaS and PTV Developer RouteOptimization Optiflow.
Post Reply
IAH
Posts: 17
Joined: Thu Nov 30, 2023 4:05 pm

Route Violated in LegReport and other doubts

Post by IAH »

Hello,

I have doubts related to violations. When I receive a RouteViolation in LegReport (so, the leg is violated):
1) What is the reason of this violation? What is the meaning?
2) I would expect that in TourEvent-TourViolations a violation reason appear for the leg reported in the Leg but it is not like this

I attach response of this case above.

Besides I have other doubt related to input plan:
3) Can an input plan be set from scratch? I mean without taking it from a response of a TourResponse.

Thank you so much in advance!
Attachments
ResponseWithLegsViolated.txt
ResponseWithLegsViolated
(21.06 KiB) Downloaded 195 times
Ignacio Alecha
Joost
Posts: 310
Joined: Fri Apr 25, 2014 1:46 pm

Re: Route Violated in LegReport and other doubts

Post by Joost »

A route violation means that the route is not possible to be driven by the vehicle. The dima can't hold route violation details and therefor they are not available for xTour to give back. If you want to know the details you need to recalculate the violated leg with xRoute. Hint: route violation often happen nearby locations.

About the input plan, yes you can build it up from scratch. You can use this for letting a planner make some manually planning in advance for the big bulk. That being said: always verify a manually build input plan by doing an optimization with CalculationMode set to EVALUATE . If there are TourViolations in the input plan it will mean that each tour with violations will remain as is and that might not be what the planner is intending.
Joost Claessen
Senior Technical Consultant
PTV Benelux
IAH
Posts: 17
Joined: Thu Nov 30, 2023 4:05 pm

Re: Route Violated in LegReport and other doubts

Post by IAH »

Thank you for your quick answer.

You said "route cannot be given to the vehicle", but then how the times of the legs are calculated if the leg is violated (in the example also the flag of direct distance is false)?

Does it mean that there is an area where driver has to walk?

Thank you in advance
Ignacio Alecha
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Route Violated in LegReport and other doubts

Post by Bernd Welter »

Hi Ignacio,

a distance matrix can be seen as a storage of some KPIs of undeerlying AB-routes with equal routing options:
  • The primary key of the storage is the combination of the route locations of start and destination.
  • The stored data contains
    • traveltime
    • distance
    • violation state
    • direct distance state
    • toll (optional)
    Each row represents a relation and contains data about travelTimes, distance, estimatedByDirectDistance and violated.
    Each row represents a relation and contains data about travelTimes, distance, estimatedByDirectDistance and violated.
  • It does NOT contain details such as
    • Cause of a violation
    • Event lists
    • Toll details
That being said a tour optimization algorithm needs to read from a dima multiple (often millions of) times to assemble temporary structures which are then evaluated:
  • What is the complete time scheme? Does it violate opening times or operating times?
  • What distances apply? Does a vehicle's tour exceed maximum values?
  • With the routing there's also the option to define some "flexibility" when it comes to "are violations allowed"?
    • ignoreRouteViolations
    • ignoreReachabilityViolations
    So if you enforce newly built tours to be "clean" (without violations) then some locations which can't be reached without violations will remain unscheduled (orders flagged as unplannable)
What you should also consider is the potential combinations of the relation properties "violated" and "estimatedByDirectDistance" as not every combination can occur:
violatedestimatedByDirectDistancedescription, possible?
falsefalsebest routing based "condition"
truefalserouting based but kind of "suspicious"
falsetruesuccessful routing wasn't possible (e.g. because violations have been disabled), therefore workaround based on airline applies
truetrueimpossible
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:
IAH
Posts: 17
Joined: Thu Nov 30, 2023 4:05 pm

Re: Route Violated in LegReport and other doubts

Post by IAH »

Hi Bernd,

Thank you so much for your continuous support. You really brought light on all those doubts.

I'll keep bothering you in other posts ;)

Thank you!
Ignacio Alecha
Post Reply