Page 1 of 1

KeepInMind: OpeningIntervalConstraint

Posted: Wed Jan 21, 2015 1:27 pm
by Bernd Welter
Hello together,

these days I was evaluating some scenarios of xTour and I ran into an interesting effect I wasn't aware of until then... though I was already working with xTours OpeningIntervalConstraint quite often I was focused on the "with START_OF_SERVICE it is sufficient to begin a visit at a given time even if it exceeds the CUSTOMERs availability".

The scenario I was playing with works with a service that is so long that it has to be splitted. At first I assumed the servers response is buggy but after checking further parameters I saw that it is valid but caused by a specific default setting:
If you do not mention the OpeningIntervalConstraint explicitly the default is START_OF_SERVICE. Normally I set this parameter so I wasn't aware of the default behaviour.

Well let's have a look at the plot (reduced to a sufficient setting):
  • The vehicle is available MON to FRI between 07:00 and 17:00 (10 hours each day).
  • The stop to be visited is open MON to FRIDAY between 09:00 and 18:00 (9 hours each day)
  • So the common interval is 09:00 to 17:00 each day (8 hours each day)
  • I want to place 16 hours of service (splitteable).
What I expected to happen: two days of service with each part in the common 09:00 - 17:00.
What happened instead: the service at the second day end at 15:00 in the afternoon.
Visualization of the two possible result structures
Visualization of the two possible result structures
First impression: That's a bug
But: it isn't a bug... it happens like this because the default value for OpeningIntervalConstraint is START_OF_SERVICE:
Once we started a service in the common interval (Monday 09:00) we no longer take care of the customers opening times. This also happens when a service is splitted over several intervals and this is why the service is continued tuesday morning 07:00 when the next WORKING interval starts. The second partial service is therefore 07:00-15:00 and this is definetly ok.

If the splitteable service is not 16 hours but 24 hours we get
MON 09:00 - 17:00 / TUE 07:00 - 17:00 / WED 07:00 - 13:00 = 8+10+6 hours in START_OF_SERVICE mode
MON 09:00 - 17:00 / TUE 09:00 - 17:00 / WED 09:00 - 17:00 = 8+8+8 hours in COMPLETE_SERVICE mode

Conclusion:
I recommend to set the Constraint explicitly to avoid such an irritation.

Best regards from Germany,

Bernd