Page 1 of 1

Overnight location in planovernight

Posted: Thu Jan 11, 2024 11:31 am
by act_wi
Hey guys,

quick question:

We're using the request planovernight in xTour1:

If I am outside the home distance radius and it is planning an overnight stay,
I currently know how long he will be traveling, but not to "where".

Is there an option for this, or do I have to solve it with business logic after planning?

Example:

Last customer finishes at 15.30
End of work 17.00
Journey to the next customer on the following day 3h

Where is he after 1.5h at the end of work?

Thanks Andreas

Re: Overnight location in planovernight

Posted: Thu Jan 11, 2024 11:55 am
by Bernd Welter
Hello Andreas,

the quick response to the question "Where is he after 1.5h at the end of work?2 is probably "it is where it was right at the end of work because the vehicle won't move outside working intervals." But here's the response you were probably looking for: if you want to determine the position of a vehicle you have to look into the events and derive the info from them. Here's an example:
xTour1: event list of a vehicle
xTour1: event list of a vehicle
  • If the Event is a DRIVING event, then this means you move from the previous location ID to the succeeding location ID within the interval which is covered by the event itself. Now you can distinguish between
    • Simple approach: "you are on the way from location PRE to location SUCC.
    • The more challenging approach (post-process): perform an additional "1:1 routing" from PRE to SUCC and look for the vehicles precise position. This is more complicated and probably in most cases not required
  • In any other case you simply do not move: you are located at the position of the last "location ID".
Bernd
By the way: this kind of response is not restricted to the overnight case - the interpretation would be the same for a regular planBasicTours, e.g. with "toursMustFitIntoSingleInterval=false".