How to create fixed appointments with xTour 2
Posted: Mon Jun 15, 2020 8:47 am
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:
Best regards,
Bernd
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
- you have a fixed appointment at Location XY
- it starts at 11:00, lasts for 30 minutes and therefore ends at 11:30
- 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