Solution approach
3.6 Scheduling tours in a distribution pattern
3.6.1 Scheduling regular distribution patterns
In a regular schedule, the tour to Sihas to be made kitimes in a minimal period of time, such that the time between consecutive iterations of the same tour is constant. Below, an insertion heuristic is presented for scheduling the tours in a distribution pattern within a minimal time span, the so-called `schedule time' Tsched. In this heuristic, tours are inserted one by one, and the schedule is `stretched' if necessary (by increasing Tsched) to make sure that dierent tours do not have to be made at the same time. The parameters ailand bilare introduced to represent the time at which the l'th iteration of tour i starts in the cycle: Til= ailTsched+ bil, (i = 1::n; l = 1::ki).
The suggested heuristic is a best-t insertion heuristic. The order in which the dierent tours are added to the schedule is crucial for the performance of the heuristic. An obvious rule is to insert the tours in decreasing order of frequen-cies, and to take the longer tour rst in case of a tie. However, as illustrated in an example below, this obvious rule is not very ecient. Therefore, the rule is extended such that no two tours with the same frequency are added to the schedule consecutively.
1. Initially, Tschedis set to Tmin and the schedule is empty.
2. The tour i with the highest frequency (and with the longest travel time in case of a tie) is assigned to the start of the schedule, such that Til =
l 1ki Tschedor ail=l 1ki , bil= 0 (l =1::ki).
3. If all tours have been added to the schedule, the procedure stops here and a feasible schedule is found. Else, determine the next tour to be added to the schedule. This is the tour with the highest frequency that is dierent from the frequency of the previously added tour (and with the longest travel time in case of a tie). The selected tour i has to be made ki times within a cycle of Tsched hours, such that the rst iteration has to be started at time Tschedki TDi at the latest.
4. For all gaps in the schedule before Tschedki TDi.
a. Write the timing t of the start of the gap as aTsched+ b.
b. Schedule the rst start of the selected tour i at t: Ti1= aTsched+b, or ai1 = a, bi1 = b. The other iterations then start at: Til =
aTsched+ b +l 1ki Tsched
mod Tsched, or ail =
a +l 1ki
mod 1, bil= b (l =2::ki).
c. Check the schedule for overlaps. If there is no overlap, this timing for the newly added tour i is immediately accepted and the procedure returns to Step 3. If there is an overlap between the l'th itera-tion of the newly added tour i, which covers the interval [ailTsched+ bil; ailTsched+bil+TDi] and the m'th iteration of a previously added tour j, covering interval [ajmTsched+ bjm; ajmTsched+ bjm+ TDj], then Tsched has to be increased to make sure that one of these in-tervals is nished before the other begins.
if ail< ajm, we must have ailTsched+ bil+ TDi ajmTsched+ bjm, or Tsched bil+TDajmiailbjm.
if ajm< ail, we must have ajmTsched+ bjm+ TDj ailTsched+ bil, or Tsched bjma+TDil ajmj bil.
The t for which Tschedis minimal after the selected tour has been inserted and overlaps have been avoided, is eventually selected, mak-ing this a best-t insertion heuristic.
5. If Tschedis not greater than the maximal cycle time Tmax, return to Step 3. Else, the procedure stops here without nding a feasible solution.
In the illustrative example of Chapter 2, schedules of some proposed distribu-tion patterns were given without further explanadistribu-tion. To illustrate the inserdistribu-tion heuristic suggested here, we show how the presented schedules are constructed.
Illustrative example: the distribution pattern with adjusted frequen-cies
The 4-tour distribution pattern with frequencies (3; 3; 1; 2) is a good example to illustrate the selection rule for the next tour to be inserted:
\the tour with the highest frequency that is dierent from the frequency of the previously added tour (and with the longest travel time in case of a tie)"
In this example, there are two tours with a frequency of 3, namely the tours to customers 1 and 2. First, the schedule is constructed assuming the obvious rule of always inserting the tour with the highest frequency.
The initial schedule time is given by the minimal cycle time of 46 hours, and the rst tour that is inserted to the schedule is the tour to customer 1 (because
3.6 Scheduling tours in a distribution pattern 63
it is longer than the tour to customer 2). This tour then starts at times 0, Tsched=3 and 2Tsched=3.
- t(h)
1 1 1
0 15.33 30.67 46
The second tour inserted into the schedule is the tour to customer 2, which also has frequency 3. The only gap in the schedule before Tsched=3 4 is found at time t= 6 hours. This gives the following start times for the second tour:
6, Tsched3 + 6 and 2Tsched3 + 6. There are no overlaps, so Tscheddoes not have to be increased.
- t(h)
1 2 1 2 1 2
0 15.33 30.67 46
The third tour to be inserted is the tour to customer 4, with frequency 2.
This tour can be inserted into two gaps: the gap at t = 10, and the gap at t =Tsched3 + 10. However, because of the symmetry, it will result in the same schedule, so the gap t= 10 is selected. The start times of the tour are then 10 and Tsched2 + 10.
- t(h)
1 2 1 2 1 2
4 4
0 15.33 30.67 46
However, the second iteration of this tour overlaps with the third iteration of the rst tour, such that the schedule time has to be increased: Tsched2 +14 2Tsched3 , or Tsched 84. The new schedule time is thus 84 hours. As this is not bigger than the maximal cycle time, the procedure continues.
- t(h)
1 2 4 1 2 4 1 2
0 28 56 84
Finally, the tour to customer 3 is inserted. The rst gap, at t = 14 is large enough to contain this tour, so that gives the starting time of the tour to customer 3. The schedule is then nished, having a makespan of 84 hours.
- t(h)
1 2 4 3 1 2 4 1 2
0 28 56 84
Now, the schedule is constructed with the actual selection rule, in which no two tours with the same frequency can be added consecutively.
The initial schedule time is still 46 hours and the rst tour that is inserted to the schedule is still the tour to customer 1, with starting times 0, Tsched=3 and 2Tsched=3. However, the second tour to be inserted is now the tour to customer 4, with frequency 2. This tour can be inserted into two gaps: the gap at t= 6, and the gap at t= Tsched3 + 6. Because of the symmetry, this is the same, so the gap t= 6 is selected. The start times of the tour are then 6 andTsched2 +6.
- t(h)
1 1 1
4 4
0 15.33 30.67 46
The second iteration of this tour overlaps with the third iteration of the rst tour, such that the schedule time has to be increased: Tsched2 + 10 2Tsched3 , or Tsched 60. The new schedule time is thus 60 hours. This is not bigger than the maximal cycle time, so the procedure continues.
- t(h)
1 4 1 4 1
0 20 40 60
Next, the tour to customer 2 is inserted. The only available gap before Tsched3 4 is at t = 10, so the starting times of this tour are: 10, Tsched3 + 10 and
2Tsched
3 + 10.
- t(h)
1 4 2 1 2 4 1 2
0 20 40 60
Finally, the tour to customer 3 is inserted. The largest gap is found at t= 14, but it is not large enough to contain this tour, so that the schedule time has to be extended once more: 22 Tsched3 . This gives the nal schedule time of 66 hours, which is much smaller than the schedule time of 84 hours found above.
- t(h)
1 4 2 3 1 2 4 1 2
0 22 44 66
When inserting tours with the same frequency one after the other, they are
`attached' to each other in the schedule, such that they cover big blocks, making it harder to put tours with other frequencies in between. In our example, the rst two tours cover three blocks of 10 hours, making it necessary to increase the schedule time a lot when inserting a tour with frequency 2. With the adjusted
3.6 Scheduling tours in a distribution pattern 65
selection rule, this blocking is avoided by rst inserting the tour with the lower frequency. The tours to customers 1 and 2 are then no longer attached to each other, but some free time is left in between them, such that the resulting schedule time is much smaller.
The optimal distribution pattern
The optimal solution for our illustrative example consists of a distribution pattern with three tours. The schedule is constructed as follows. The rst tour to be inserted, is the tour to customers 2 and 4. It has the same frequency (3) as the tour to customer 1, but its travel time is longer (7 hours vs. 6).
The schedule time is initially set to the minimal cycle time of 47 hours. The rst tour is thus repeated every 47=3 = 15:67 hours, at times 0, Tsched=3 and 2Tsched=3.
- t(h)
2/4 2/4 2/4
0 15.67 31.33 47
Then, the tour to customer 3, is inserted because the tour to customer 1 also has frequency 3. This tour is started at time t= 7, giving no overlap.
- t(h)
2/4 3 2/4 2/4
0 15.67 31.33 47
Finally, the tour to customer 3 is inserted. The only available gap is the small one at time t= 15. The starting times of this tour are then 15, Tsched=3 + 15 and 2Tsched=3 + 15. To avoid the overlaps, Tschedhas to be increased such that 21 Tsched3 . The nal schedule time is therefore 63 hours.
- t(h)
1 1 1
2/4 3 2/4 2/4
- t(h)
1 1 1
2/4 3 2/4 2/4
0 15.67 31.33 47
0 21 42 63