sequence of early jobs on each machine (a linked-list), and due to Remark 1, late jobs are ..... Technical Report 99/8, Ecole des Mines, Nantes, France, 1999.
MIC’2001 - 4th Metaheuristics International Conference
411
Heuristics and Metaheuristics for Parallel Machine Scheduling: a Computational Evaluation Marc Sevaux∗
Philippe Thomin∗
∗
University of Valenciennes – LAMIH/SP F-59313 Valenciennes cedex 9 - France Email: {msevaux, pthomin}@univ-valenciennes.fr
1
Introduction
A parallel machine scheduling problem where the objective is to minimize the number of late jobs is often used as a performance indicator for similar objectives. This problem, noted P m|rj | wj Uj in the standard classification is N P-hard [5]. The problem can be described as follows. A set of n jobs has to be scheduled on parallel machines. Each job j cannot start before its release date rj and is either completed before its due date dj or is late. The processing time of the job j is denoted by pj and the weight by wj . The objective function minimizes the sum of the weights of the late jobs. The following remark is then very important for the rest of the paper. Remark 1: Late jobs can be scheduled arbitrarily after the jobs on time, it is then not necessary to find a starting time for the late jobs. Parallel machines When the jobs are available at time zero, and the weights are all equal to one, the problem consists in minimizing the number of late jobs (noted P m| | Uj ) and remains N P-hard [5]. Ho and Chang [6] have proposed various heuristics to solve this problem but without garanties on optimality except for a set of ten-job and two-machine problems. Liu et al. [7] have developped a hybrid genetic algorithm but their computational experiment report is restricted to only 9 test problems. Single machine When the jobs with release dates and weights are to be sequenced on a single machine (noted 1|rj | wj Uj ), the problem is also N P-hard but well studied today. First lower bounds and heuristics were suggested by Dauz`ere-P´er`es [3]. An approach developped by Baptiste et al. [2] uses constraint propagation techniques and is able to solve optimaly instances up to 120 jobs. Same performance is reached by Dauz`ere-P´er`es and Sevaux [4] with a Lagrangean relaxation algorithm based on an efficient mixed-integer linear programming formulation. To solve larger instances, Sevaux and Dauz`ere-P´er`es [9] have developped a genetic local search algorithm that performs well. Competitive method When jobs have to be scheduled on parallel machines and suject to release times and weights (i.e., the problem we want to solve), Baptiste et al. [1] proposed a constraint-based approach that solves the problem up to 50 jobs on 6 machines. Due to the structure of their technique, if no solution is found in a reasonable amount of time, the quality of the solution is very poor. They are currently improving their methods and better results should appear soon. Contents of this paper To solve this problem, we first develop a heuristic based on the wstp rule (weighted shortest processing time order of the jobs) followed by a “best” insertion procedure (described in Section 2). Section 3 presents the neighborhood proposed and Section 4 describes descent heuristics, a simulated annealing and tabu search procedure. Extensive computational experiments are developed in Section 5 to mesure the quality and the efficiency of each method. Porto, Portugal, July 16-20, 2001
412
2
MIC’2001 - 4th Metaheuristics International Conference
Best insertion procedure
Data structure For this problem, we use a specific data structure that allow to handle a class of equivalent solutions instead of a unique solution. Each job is represented by the four numbers (rj , pj , dj , wj ). Instead of assigning a job to a machine at a specific date, we use the partial ordered sequence of early jobs on each machine (a linked-list), and due to Remark 1, late jobs are not sequenced but kept in a late job unordered linked-list. That type of data structure allows jobs to be easily inserted or removed at a negligible cost. Insertion and removal operations will be used in the following as a basis for other operations. Floating jobs By using linked-lists, we do not need to compute the starting time of each job. We will call in the sequel this structure floating jobs since jobs can move in a temporal window. This type of floating jobs can handle identical solutions since early jobs in the same order on a machine can start at many different dates. Moreover the idle period between two consecutive jobs can be efficiently used: starting and ending times of a job is defined either by its own data (rj , pj , dj ) or by its predecessors or successors. Insertion Removing a job causes no problem and when we insert a job between two early jobs, we must ensure that this job will not overlap adjacent jobs i.e., scheduled on time. A maximum interval [tmin , tmax ] is computed at the insertion point. For the job j, if max(rj , tmin ) + pj ≤ min(dj , tmax ) holds it can be inserted and will be on time on this machine. To insert a job at the first (resp. the last) position in a list, the value of tmin (resp. tmax ) will be 0 (resp. +∞). Otherwise, this maximum interval is obtained by computing the earliest ending time (eeti ) of the imediate predecessor i of j and the latest starting time (lstk ) of the imediate successor k of j. We obtain these two bounds with a recursive computation ending either at the begining or the end of the list or when two consecutive jobs do not overlap (dp ≤ rs ). If pred(j) is the immediate predecessor of j and succ(j) the immediate successor of j, we can define formaly eetj by eetj = max(rj , eetpred(j) ) + pj and lstj by lstj = min(dj , lstsucc(j) ) − pj . Best insertion With the previous definitions we are able to check if a job can be inserted between two other jobs (or before the first or after the last job) on a machine. For a job whose current status is late or not yet sequenced, the best insertion means that all the candidates insertion points are listed and the job is inserted at the point where the remaining idle time is minimum. This type of insertion tends to fill up completly an empty space between two jobs by pushing and pulling adjacent jobs at their maximum limits.
3
Neighborhood
Due to Remark 1, late jobs are handled separately from early jobs. With the insertion procedure, we know that, on each machine, only on time jobs are listed. Thus an obvious neighborhood consist in exchanging late jobs with early jobs. Parameters Removing a job from a machine is always feasible, it simply consists in removing this job on the machine and adding it to the list of the late jobs. One late job can be exchanged with 0 to l early jobs and the maximum value for l is defined by lmax = pmax /pmin where pmax and pmin are respectively the largest and smallest processing time among all jobs. Method Neighborhood for a single late job is computed by examining all possible insertion points on each machine. This can be done for each job in the late list and acceptable points are kept into a list ordered by increasing values of objective function modifications. A complete neighborhood can be computed in O(n2 ). Porto, Portugal, July 16-20, 2001
MIC’2001 - 4th Metaheuristics International Conference
4
413
Heuristics and metaheuristics
Several heuristics and metaheuristics are used to solve the problem. Simple descent heuristics are not studied since the computation time for a deepest descent heuristics is always less than 0.1 second. Once a constructive insertion and the neighborhood are defined, few work is needed to develop descent heuristics, a multistart descent, a simulated annealing and a tabu search procedure.
4.1
Heuristics
Using the best insertion method on specific sorts of the late jobs list gives simple heuristics and first results of our problem. Three heuristics are implemented based on three orders: 1. natural order (as jobs are read on the input file), 2. weighted shortest processing time (increasing order of wi /pi ) and 3. random shuffle (the list is shuffled randomly). The three heuristics will be respectively named BNO (Best insertion + Natural Order), BWS (Best insertion + WSPT rule) and BRS (Best insertion + Random Shuflle).
4.2
Descent heuristics
Deepest descent Starting from an initial solution and using the neighborhood described in Section 3, a simple deepest descent is applied. Since neighborhood allows to exchange one late job with 0 to l early jobs, it is possible to start with all jobs late. Hence a formal comparison between initial solution and no initial solution will be done. Four runs of the DS (descent heuristic) will be done, one starting from an empty solution (denoted by EMP) and three starting from each of three initial heuristic solutions. Multistart descent Starting from a random ordered list can be done many times. Since the computation time is negligible, 1000 runs are performed for each instance. With this technique, we hope that 1000 local optima can be reached including the global optimum. This method will be called MD.
4.3
Simulated annealing
For a complete and detailed description of simulated annealing we refer the reader to Reeves’ book [8]. Since the neighborhood itself leads to good results (see descent heursitcs results) we developp a simple simulated annealing procedure. The simulated annealing procedure is stopped after 10000 iterations without improvement. Initial temperature The initial temperature has been chosen after some test runs and 20 is a temperature satisfying for problems with 10 to 100 jobs. Each 100 iterations the temperature is decreased by 5%. Reheating For some problems, after many iterations, only few neighbors (compare to the total number of neighbors) can improve the current solution. Since the temperature is already low, the probability that an improving neighbor is chosen is too small. In some case, it happens that no improving neighbors can be found. Hence if we find 100 consecutive iterations with no improving neighbors, the temperature is increased at half level of the previous initial temperature (10 for the first reheating, 5 the second, etc.). All these parameters can be easily changed.
4.4
Tabu search
For a good introduction the tabu search see [8]. A basic tabu search procedure is developped but a cycle detection and dynamic tabu tenure is handled. Identical stopping conditions are used. Porto, Portugal, July 16-20, 2001
414
MIC’2001 - 4th Metaheuristics International Conference
Tabu criteria Tabu criteria is one of the most difficult point to set before running tests. Many tabu criteria have been studied here starting from the complete schedule (each position of each job on each machine) to the simple value of the weighted number of late jobs. For the first criteria, many equivalent solution (by exchanging machine) can be found and tenure should be too highly increased to avoid cycles. On the other side, the simple weighted number of late jobs value is too restrictive, not enough different values can befound and rapidly, everything becomes tabu. Between these two criteria, we choose the pair ( wj Uj , pj Uj ), sum of weights and sum of the processing times of the late jobs and excluding any information on early jobs. Cycle detection and dynamic tenure The tabu tenure is critical for each instance. On one hand, if the tenure is too small, cycle can occurs during the search and the optimal solution could not be found. On the other hand if the tabu tenure is too large, some point can be reached where everything is tabu and the procedure stop because no neighbors can be chosen. To avoid cycle and blocking during the search the tabu tenure is adjusted dynamically. Each time a blocking state is detected the tabu tenure is decreased by one. Cycle detection is more complicated since an history greater the the tabu tenure has to be recorded. Memory space for this hsitory is rather small since only a pair of integer has to be recorded at each iteration. If a cycle is detected, the tenure is increased to the length of the cycle and the forthcomming move is set tabu to escape directly from this cycle.
5
Computational experiments
Thanks to Baptiste et al. [1], we have been able to test all these methods on a large set of instances where part of optimal solutions were known. Their method uses contraint propagation techniques to find optimal solutions. They have set the time limit to 600s and unfortunately, when they cannot find the optimal solution, the quality of the best solution found so far is very poor. With this time limit they are not able to find any solution with stricly more that 50 jobs. Other optimal solutions and lower bounds are given by a mixed integer programming model using a classical time index formulation. Descent EMP BWS BNO BRS A (%) 45 49 44 45 B (%) 33 35 31 32 C (%) 21.5 19.6 20.3 20.3 D (s) 0.02 < .01 < .01 < .01 E (s) 0.12 0.02 0.05 0.05 A: Optimum hits, B: First positions, C:
MD 78 63 3.9 4.58 41.1 Gap to
Simulated Annealing Tabu Search EMP BWS BNO BRS EMP BWS BNO BRS 70 70 71 70 89 88 88 88 55 54 56 55 79 76 80 79 6.72 6.59 6.03 5.98 1.94 2.00 1.89 1.95 9.10 7.68 9.01 8.87 10.63 9.42 10.17 10.16 60.3 53.2 64.9 63.3 101.9 112.0 93.7 107.5 the optimum, D: Average CPU time, E: Maximum CPU time.
Table 1: Global results. Table 1 shows the global results for the procedures described in this paper. Descent method, simulated annealing and tabu search procedures are ran one time without initial solution and with the three heuristics. MD denotes the multistart descent procedure. The best procedure is given by the tabu search method preceeded by the BNO heuristic. This method reaches 88% the optimal solution, gives the best results among all methods for 80% instances and the smallest average gap to the optimal solution (1.89%). Moreover the CPU time is rather small (10.17s on average and less 100s at the maximum). The most surprising result is the multistart descent method that is always better than simulated annealing on every criteria. Table 2 draws results when the number of jobs increases. The second set of columns gives the number of instances for which the tabu search gives better (resp. equal or worst) results compared to Baptiste et al.’s results. Of course the number of optimal solutions found decreases but also the total number of optimal solution known decreases (only 146 / 270 instances for n = 50). The maximum CPU time of the tabu search method is always less than the average value of the competitors. For n = 50, Baptiste et al. need 308s on average to compute a solution whereas the tabu search is performed in less that 17s on average. For more that 50 jobs (the last two columns) only CPU times are given. These CPU Porto, Portugal, July 16-20, 2001
MIC’2001 - 4th Metaheuristics International Conference
415
times are very encouraging for tackling large size instances. Values of n 10 20 30 40 50
Comp. to BJ solutions Better Equal Worst 0 270 0 0 256 14 27 210 33 68 150 52 110 102 58
Comp. to Optimum Found (%) Gap (%) 100 < .01 95.2 0.87 87.8 1.71 75.9 4.63 69.2 3.95
CPU time (s) Av. Max 0.73 3.12 2.09 10.03 4.46 16.76 9.27 41.65 16.81 89.85
Values of n 60 70 80 90 100
CPU time (s) Av. Max 27.7 93.7 39.1 166.1 56.8 269.2 77.0 241.7 106.5 416.1
Table 2: Results of BNO + Tabu Search.
6
Conclusion
To solve the N P-hard problem P m|rj | wj Uj , we have developped a set of heuristics and metaheuristics based on a powerful data structure for the objective function. After numerical experiments, we know that an initial solution is not necessary to reach the best solution, but tends to speed up the procedure. Since the CPU times are very promising for instances with 100 jobs, we will focus our future work on finding good lower bounds. Two MIP formulations can be used through a linear relaxation of the model but the quality of the bounds is often poor. Time-indexed formulation gives good results for this problem but only when the horizon is very limited. This problem will be fixed by developping a column generation technique to find either optimal solutions or lower bounds.
References [1] P. Baptiste, A. Jouglet, C. Le Pape, and W. Nuijten. A constraint-based approach to minimze the weighted number of late jobs on parallel machines. Technical Report 2000/228, UMR, CNRS 6599, Heudiasyc, France, 2000. [2] P. Baptiste, C. Le Pape, and L. P´eridy. Global constraints for partial CSPs: A case study of resource and due-date constraints. In Proc. 4-th Int Conf Principles and Practices Const. Program., Pisa, Italy, 1998. [3] S. Dauz`ere-P´er`es. Minimizing late jobs in the general one machine scheduling problem. European J. Oper. Res., 81:134–142, 1995. [4] S. Dauz`ere-P´er`es and M. Sevaux. Using lagrangean relaxation to minimize the (weighted) number of late jobs on a single machine. Technical Report 99/8, Ecole des Mines, Nantes, France, 1999. [5] M.R. Garey and D.S. Johnson. Computers and intractability: a guide to the theory of N Pcompleteness. Freeman, San Francisco, CA, USA, 1979. [6] J.C. Ho and Y.L. Chang. Minimizing the number of tardy jobs for m parallel machines. European J. Oper. Res., 84:343–355, 1995. [7] M. Liu, C. Wu, and X. Jiang. Genetic algorithm method for minimizing the number of tardy jobs in indentical parallel machine scheduling problem. Chinese J. Electr., 7(2):188–192, 1998. [8] C.R. Reeves, editor. Modern heuristic techniques for combinatorial problems. John Wiley & Sons, inc., New York, NY, USA, 1993. [9] M. Sevaux and S. Dauz`ere-P´er`es. Genetic algorithms to minimize the weighted number of late jobs on a single machine. Technical Report 2000/51, UMR CNRS 8530, Lamih/SP, France, 2000.
Porto, Portugal, July 16-20, 2001