Page 1 of 1

How to create fixed appointments with xTour 2

Posted: Mon Jun 15, 2020 8:47 am
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

Re: How to create fixed appointments with xTour 2

Posted: Mon Oct 10, 2022 7:41 am
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.