How to create fixed appointments with xTour 2

This forum deals with any kind of trip optimization whether it is automatic planning or manual dispatching, refering to transport orders or service planning.
Post Reply
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

How to create fixed appointments with xTour 2

Post by Bernd Welter »

Hi there,

these days I've been asked for how to model fixed appointments in the tour optimization (xTour2). As this is not obvious let me just summarize what is needed to ensure that a given order with a strict time window is considered properly in a way that the order appears in the output tour of the proper vehicle.

I start with some info about the API:
  • I recommend to take a closer look at the classes InputPlan and FixationType
  • xTour2 treats all opening intervals as "begin of service" (used to be parametrizeable in xTour1)
  • orders that are not part of an input tour may appear "unscheduled" in the output
  • if an input tour is not valid we won't add or remove orders from it
Let's assume the following example:
  • you have a fixed appointment at Location XY
  • it starts at 11:00, lasts for 30 minutes and therefore ends at 11:30
So here's what you have to do
  • at the level of the abstract class Site set the opening intervals array to a corresponding type and value, e.g. GDFTimeDomain = "[(y2016M2h10)]". This also works fine with StartDurationInterval and StartEndInterval.
  • for the corresponding VisitOrder set the serviceTime property to 30 minutes (aka 1800.0)
  • create an inputPlan which contains an input tour with the fixed orders and set the FixationType of the Vehicle to VEHICLE_ORDERS This is quite important because otherwise it is not guaranteed that the input plan order remains scheduled!

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:
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: How to create fixed appointments with xTour 2

Post by Bernd Welter »

Here is just a comparison of two requests schedulung a 30min appointment.
One of them successfully schedules the appointment on the fixed time of 08:00 to 08:30. The other one shows a typical mistake: the length of the operating interval is set to the same value as the service period which allows the service to shift the appointment.
Attachments
CORRECT - interval length is 0<br />&quot;openingIntervals&quot;:<br />   [<br />    {&quot;$type&quot;:&quot;GDFTimeDomain&quot;,&quot;timeDomain&quot;:&quot;[(y2022M09d09h08m00s00){s0}]&quot;}<br />   ],
CORRECT - interval length is 0
"openingIntervals":
[
{"$type":"GDFTimeDomain","timeDomain":"[(y2022M09d09h08m00s00){s0}]"}
],
MISLEADING because of the interval length<br /><br />&quot;openingIntervals&quot;:<br />   [<br />    {<br />     &quot;$type&quot;:&quot;GDFTimeDomain&quot;,&quot;timeDomain&quot;:&quot;[(y2022M09d09h08m00s00){s1800}]&quot;}<br />   ],
MISLEADING because of the interval length

"openingIntervals":
[
{
"$type":"GDFTimeDomain","timeDomain":"[(y2022M09d09h08m00s00){s1800}]"}
],
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