Optima mode, Time Window & TimeWindowDepot

 

In some languages it may not be possible to pass datetime as null, in that case please set datetime to "0001-01-01T00:00:00".  Our system will treat any date less than (or equal to) Jan012012 as a null date.

For best result use DispatchMode Optima.

There are three variables that can affect time window dispatching mode:

CanArriveEarly
TimeConstraintArrival
TimeConstraintDeparture

Depending on how these variables are used we can set different time windows:

Option 1: CanArriveEarly == true

Window start time is always start of the day which is 12am. When CanArriveEarly is true, two things can affect closing time. 

If TimeConstraintArrival is null then time window is from  12AM---11:59pm

if TimeConstraintArrival is valid time like 4pm then time window is from 12AM--4pm

When CanArriveEarly is true, departure time is ignored.

Option 2: CanArriveEarly == false

When CanArrive is false then start/end times are solely determined by TimeConstraintArrival and TimeConstraintDeparture. In this case, there can also be different scenarios.  If both variables are null (Jan012012) then entire day is available (12am --- 11:59pm) and stop is treated like it has no time window.

If arrival time is not null but departure is null then departure time will be same as arrival time.  So if you need to be at a location at precisely 10AM then set TimeConstraintArrival to 10AM and set TimeConstraintDeparture to either 10AM or null.  Either way, system will try to arrive at the location at 10AM and no later than 10AM.

In case if you need to create a time window then set arrival time to a valid time and departure time to a valid time that is later than arrival time.  For example, if you need a time window of 10am to 5pm then set TimeConstraintArrival to 10am and TimeConstraintDeparture to 5pm.  System will try to reach the stop somewhere between 10am and 5pm.

Option 3: Two Time Windows

TimeConstraintArrival2
TimeConstraintDeparture2

There is also a possiblity of using two time windows.  Suppose due to traffic restrictions in downtown Brussels, a delivery truck can only visit between the hours of 4am-7am OR 9pm-11pm.  This would consitute two time windows:

TimeContraintArrival = 4am

TimeContraintDeparture = 7am

TimeContraintArrival2 = 9pm

TimeContraintDeparture2 = 11pm

Note that there will still be only one visit per route.  However, TrackRoad will try to select best possible window;  either between 4am and 7am or 9pm and 11pm.

TimeWindowDepot mode follows exact same logic as TimeWindow.  TimeWindowDepot uses first vehicle information to assume all vehicles start from a central(depot) location.  In this case there are no geographically dispersed vehicles and it is assumed all vehicles start/finish are at same location.

It is possible to block off a time window for breaks, park or rest.  Use LocationType Break to block off a time window.

NOTE: The multiple pickup and delivery (chaining) while using the <Delivery> tag only supports one time window of TimeConstraintArrival and TimeConstraintDeparture. Also, the <Delivery> timeconstraint cannot be less than the parent constraint.  See  Multiple Pickup and Delivery  for more information.