MIC'2001 - 4th Metaheuristics International Conference. 551. Neighbourhood Constraint for a Tabu Search. Algorithm to Schedule Jobs on Unrelated Parallel.
MIC’2001 - 4th Metaheuristics International Conference
551
Neighbourhood Constraint for a Tabu Search Algorithm to Schedule Jobs on Unrelated Parallel Machines Felipe M. M¨ uller∗
Mauro M. Camozzato∗
Olinto C. B. Ara´ ujo∗
∗
Universidade Federal de Santa Maria - CT - PPGEP 97105-900 - Santa Maria - RS - Brazil Email: { felipe, marafiga, olinto }@inf.ufsm.br
1
Introduction and problem formulation
This work deals with the problem of scheduling n independent jobs on m unrelated parallel machines with the objective of minimizing the makespan (the total elapsed time from the start of execution until all jobs have been completed). Preemption is not allowed. This way a job, once assigned to a particular machine, may not be removed until it has finished its execution. All the machines start working on the jobs simultaneously. This problem, according with classification described in [4], can be represented as scheduling problem R || Cmax . The R || Cmax is known to be NP-hard [2, 4], and therefore, very unlikely to find an optimal solution in polinomial time. The most usual representation of solutions to scheduling problems in applications of local search is the natural representation [1], that is to say, a set of m lists, where each list contains the jobs assigned to one particular machine. Basically there are three neighbourhoods for the natural representation: reassign, swap and k-reassign. The reassign is defined by the move that remove a job from one machine and reassign it to another, the swap is defined by the move that remove two jobs from different machines by inverting their machine assignments, and k-reassign remove k jobs and reassign them to different machines. In this work we considered the reassign and swap neighbourhoods. Neighbourhood sizes are n(m − 1) for reassign and (n/m)2 m(m − 1)/2 for swap (maximum possible, when the jobs are evenly divided among the machines). The size of the neighbourhoods can be reduced if it be considered an exclusion mechanism, where some job belonging to the most heavily loaded machine. Thus, for reassign the size becomes nM (m − 1) and for swap (n/m)2 (m − 1) (maximum), where nM designate the number of jobs assigned in the most heavily loaded machine. These neighbourhoods are denominated critical reassign and critical swap [1]. In this work we propose a composite tabu search-based algorithm in connection with a powerful neighbourhood scheme that use a interval structure [5, 6]. This neighbourhood is more restricted than the critical neighbourhood, getting a shorter computation time with equivalent results. The main characteristic of this method is that it does not perform a pre-classification of the jobs due to the structure of each machine that is divided in k intervals based on the lower and upper processing times limits. The use of interval structure avoid data sorting. The tabu search-based algorithm, using the structures of intervals and the critical neighbourhood, is compared with exact solutions in order to evaluate the quality of the solutions obtained. In the next section the tabu search-based algorithm is described, in the section 3 the computational results are showed and some comments are made on the study in the section 4. Porto, Portugal, July 16-20, 2001
552
2
MIC’2001 - 4th Metaheuristics International Conference
Tabu Search Algorithm
Defining the problem formally, let J = {1, 2, ...n} the set of jobs which must be assigned to the machine set I = {1, 2, ...m}. Let tij , (i, j) ∈ IxJ, the time that the i-th machine takes to complete the j-th job. Also let X = {xij }, (i, j) ∈ I x J, a decision variable set, where xij = 1 if the i-th machine is assigned for the j-th job, and xij = 0, otherwise. The mathematical linear model is the following: min Z = c s.t.
n
tij xij ≤ c,
(1) ∀i ∈I
(2)
j=1 m
xij = 1,
∀j ∈J
(3)
(i, j) ∈ IxJ
(4)
i=1
xij = 0 or 1,
where c ∈ Z+ , being Z+ the set of the positive integer numbers. Tabu search (TS) is a metaheuristic that guides a local search procedure to explore the solution space beyond local optimality [3]. The TS-based algorithm proposed is composed of three phases: Phase 1 - An initial solution is constructed by assigning all jobs to the m processors. It is executed q1 times, where q1 is a parameter of the algorithm. The best found solution is maintained. Phase 2 - A local search heuristic controlled by a TS scheme, using reassign neighbourhood with interval structure, is used to achieve improved solutions in terms of makespan. It stops when the best found solution does not improve after q2 executions, where q2 is a parameter of the algorithm. The best found solution is maintained. Phase 3 - A local search heuristic, using swap neighbourhood with interval structure, is used to achieve improved solutions in terms of makespan. It is executed while it improves the solution given by the phase 2. In all the phases the structures of intervals are used. The phase 2 and 3 are repeated until a stopping criteria to be satisfied. The phase 2 works as a diversification mechanism and the phase 3 works making a refinement of the solutions found in the phase 2. In the phase 1 (construction phase), for each machine are identified the lower bound (pi ) and the upper bound (pi ) of the times of processing, i = 1, .., m. The intervals [pi , pi ] are divided in r approximately equal intervals, where r is a parameter of the algorithm. Let R = {1, ..., r} be the set of index intervals and Pik , i ∈ I, k ∈ R, the designation of the mxr intervals. Each job, according its processing time, is associated to m intervals Pik , i = 1, ..., m, k ∈ R. The allocation of jobs in the phase 1 runs into the following steps: Step 1: Initializes the index of the intervals of each machine, s1 = s2 = ... = sm = 1, and xij = 0, i = 1, ...m, j = 1, ...n. Step 2: For each machine, i = 1, ..., m, randomly select an unassigned job of the interval Pisi . If there is no such job Pisi , i = 1, ..m, set si = si + 1, before selecting the job. Step 3: Let J = {j1 , ..., jm } the set of selected jobs for allocation in the step 2. Find the job ji0 , and make xi0 ji = 1. If all the jobs were allocated stop, i0 ∈ I, that satisfies min j∈J tij xij + tiji i∈I 0 else go step 2.
In the phase 2 and phase 3 are considered neighbourhoods with structures of intervals. Initially are identified the lower bound (p ) and the upper bound (p ) of the sum of two distinctive times of processing Porto, Portugal, July 16-20, 2001
MIC’2001 - 4th Metaheuristics International Conference
553
max of a job, that is to say, p = i1 ,i2min ∈I;j0 ∈J (ti1 j0 + ti2 j0 ) and p = i1 ,i2 ∈I;j0 ∈J (ti1 j0 + ti2 j0 ) where i1 = i2 . The interval [p , p ] is divided in r approximately equal intervals, where r is a parameter of the algorithm. Let R = {1, ..., r } be the set of index intervals and Pk , k ∈ R , the designation of the r intervals. Each assigned job is associated to m − 1 intervals Pk , k ∈ R , according with the sum (ti0 j0 + tij0 ), i ∈ I \ {i0 }, where i0 corresponds to the machine in which the job is currently allocated.
The phase 2 use the reassign neighbourhood with interval structure. Let M , M ∈ I, the most heavily loaded machine (makespan) and H = I \ {M } the set of the other machines. Let also Ci the time of execution of all the jobs assigned in the i-th machine, i = 1, ..., m. In this phase, to minimize the makespan is necessary to find a job that satisfies the inequality following: | tMjM + thi jhi |< 2 (CM − Chi ) , hi ∈ H
(5)
Let Pk 0 , k0 ∈ R , such that 2 (CM − Chi ) ∈ Pk 0 , hi ∈ H. To find a job that satisfies the inequality (5), we can research the intervals Pk , k = k0 , k0 − 1, ..., 1. If Pk 0 ∪ Pk 0 −1 ∪ ... ∪ P1 = {}, then are researched the intervals with index k = k0 + 1, ..., r . Following a standard TS implementation, after a move (reassign) is performed, the reverse action is prohibited for the next θ iterations. The parameter θ is a random variable uniformly distributed in the interval [θ , θ ]. As in most TS implementations, if the selected move is tabu but it yields a better makespan than the incumbent, override the tabu status and perform the move. In the phase 3 is used the swap neighbourhood with interval structure. In this phase, to minimize the makespan is necessary to find a job that satisfies the inequality following: (6) tMjM + thi jM − tMjhi + thi jhi < 2 (CM − Chi ) , hi ∈ H To find a job that satisfies the inequality (6), we can research pairs of jobs belonging to two located intervals the approximately 2 (CM − Chi ), hi ∈ H , units of distance. The use of structures of intervals decrease the size of the neighbourhoods a lot. Is important to observe that making r = 1 we obtain the critical reassign and swap neighbourhood.
3
Computational Results
The instances used in the computational experiments were randomly generated following several discrete distributions. In this work will be shown results from instances were the processing times are randomly generate using a discrete uniform distribution in the interval [1,1000]. The number of jobs was fixed at 10, 25, 50, 100, 500 and 1000. The number of machines was fixed at 2, 3, 5, 10, 15 and 25. We considered 10 replications for each combination of number of jobs and machines whose linear model has less than 4000 variables. The optimal solutions of the instances were found using the Hyper Lingo/PC version 4.0 mathematical package, with 5 hours of limit of time. The results are the average of the tested problems which one the optimal solution has been found. The TS-based algorithm was coded in C language and run on a K6-II 550 MHz machine. The number of intervals r in the Phase 1 was defined as max(10, m/10) and q1 = 10. In the Phase 2, the number of intervals r was defined according with √ the Table 1 and q2 = (n/m) ∗ 10. The stopping criteria was based in the number of iterations (60 ∗ n) with no improvement in the incumbent solution. The Table 2 shows the average relative percentage deviations to the optimal solution and CPU time in seconds. In the third column (TS-SI), it is used the reassign and swap neighbourhood with structures of intervals where the number of intervals r is according with the Table 1. In the fourty column (TS-CN), it is used the critical reassign and swap neighbourhood (r = 1). The fifth and sixty column show the average CPU times to execute ten replications for each configuration. The number in parentheses Porto, Portugal, July 16-20, 2001
554
MIC’2001 - 4th Metaheuristics International Conference n/m (1, 10) [10, 50) [50, 100) [100, 200) [200, 1000)
r 2 5 10 15 20
Table 1: Recommended values of r
Machines 2
3
5
10
jobs 10 25 50 100 500 1000 10 25 50 100 500 1000 10 25 50 100 500 (6) 25 50 (9) 100(7)
TS-SI (%) 0.000 0.084 0.199 0.200 0.062 0.033 0.000 0.000 0.493 0.615 0.308 0.139 0.000 0.535 0.940 0.798 0.699 0.000 0.329 2.516
TS-CN (%) 0.000 0.084 0.121 0.122 0.051 0.032 0.000 0.000 0.455 0.513 0.271 0.125 0.000 0.047 0.750 0.875 0.597 0.000 0.329 2.699
TSI (s) 0.023 0.247 0.383 0.485 17.456 40.100 0.130 0.332 0.477 1.097 24.114 115.063 0.206 0.463 0.807 1.916 23.606 0.758 1.728 4.073
TCN (s) 0.023 0.310 0.690 0.696 74.565 524.747 0.133 0.381 0.908 2.747 92.208 674.071 0.207 0.541 1.215 3.640 103.011 0.804 1.956 5.864
Table 2: Average relative percentage deviations from the optimal solution and CPU time
means the instances number solved optimaly by Hyper Lingo/PC version 4.0 mathematical package with 5 hours of limit time, when this number is different of ten. The deviation percentage is defined in the following way:
dp = 100 ∗
TS ∗ − Cmax Cmax ∗ Cmax
(7)
∗ TS were Cmax is the global optimum and Cmax is the best solution value found by the tabu search-based algorithm (TS-SI or TS-CN).
According to the Table 2, it is possible to observe that the time gain through the use of the neighbourhoods with structures of intervals justify its use. The rate between the TCN /TSI processing times is 319, 78% on the average, while the medium difference among the deviations of the found solutions is of 0,053%. The largest difference among the deviations TS-SI and TS-CN of the solutions occurred when m = 5 and n = 25, however the TS-SI found the optimal solution for 8 of 10 instances. Porto, Portugal, July 16-20, 2001
MIC’2001 - 4th Metaheuristics International Conference
4
555
Conclusions
In this paper we have introduced a new neighbourhood structure for the R || Cmax problem. Although our algorithm is based in reassign and swap neighbourhood already used by other heuristics for this problem the approach is innovative. In terms of computation time, the new tabu search algorithm clearly outperforms the heuristic which use the critical reassign and swap neighbourhood, whereas the results are very similar.
5
Acknowledgments
The authors would like to thank the anonymous referees for the useful comments that improved the readability of this paper. The first author acknowledges Conselho Nacional de Desenvolvimento Cient´ifico e Tecnol´ogico -CNPq, Brazil, for partial financial support.
References [1] E. J. Anderson, C. A. Glass, C. N Potts. Machine scheduling, in: E. Aarts, J. K. Lenstra,eds, Local search in Combinatorial Optimization. John Wiley & Sons, 1997. [2] K. R. Baker. Introduction to Sequencing and Scheduling. John Wiley & Sons, 1974. [3] F. Glover, M. Laguna. Tabu search. Kluwer Academic Publishers, Boston, 1997. [4] E.L. Lawler, J. K. Lenstra, A. H .G. Rinnooy Kan and D. B. Shmoys. Sequencing and scheduling: algorithms and complexity. Center for Mathematics and Computer Science,Report BS-R8909, Amsterdam, 1989. [5] F. M. M¨ uller, S. J. Limberger. An interchange heuristic to schedule jobs on uniform processors. CARS& FOF’98 - 14th International Conference on CAD/CAM, Robotics & Factories of the Future, Coimbatore - ´ India, 1998. [6] F. M. M¨ uller, P. M. Fran¸ca, M. Gendreau, G. Laporte. A composite heuristic for the identical parallel machine scheduling problem with minimum makespan objective. Computers & Operations Research. Pergamon Press, Vol. 21 (2), pp. 205-210, 1994.
Porto, Portugal, July 16-20, 2001