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