A comparative study of meta-heuristics for identical parallel machines

This paper considers the scheduling problem of minimizing the weighted number of early and tardy jobs on identical parallel machines, Pm||∑wj(Uj + Vj). This problem is known to be NP complete and finding an optimal solution is unlikely. Six meta-heuristics including hybrids are proposed for solving the problem. The meta-heuristics considered are genetic algorithm, particle swarm optimization and simulated annealing with their hybrids. A comparative study that involves computational experiments and statistical analysis are presented evaluating these algorithms. The results of the research are very promising.


INTRODUCTION
Scheduling Just-In-Time (JIT) jobs is of great importance in both manufacturing and service industries. Production wastages are reduced and profitability is improved when JIT is applied. Its application cuts across medical, machine environment, distribution network and other environments. In this paper, we consider the comparative study of various heuristics for scheduling weighted jobs on identical parallel machines. The objective is to minimize the weighted number of early and tardy jobs on identical parallel machines.
During the past few decades, a considerable amount of work has been done on scheduling on multiple machines to minimize the number of tardy jobs (Adamu and Adewunmi, 2012b) and on single machine (Adamu and Adewunmi, 2012c). Garey and Johnson (1979) have shown our problem to be NP-complete and finding an optimal solution appears unlikely. Using the three-field notation of Graham et al. (1979), the problem is represented as Pm||∑w j (U j + V j ). Scheduling to minimize the (weighted) number of tardy jobs have been considered by Ho and Chang (1995), Süer et al. (1993), Süer (1997), Süer et al. (1997), Van der Akker (1999), Chen and Powell (1999), Liu and Wu (2003), and M' Hallah and Bulfin (2005). Sevaux and Thomin (2001) addressed the NP-hard problem to minimize the weighted number of late jobs with release time (P|r j |∑w j U j ). They presented several approaches for the problem including two MILP formulations for exact resolution and various heuristics and meta-heuristics to solve large size instances. They compared their results to that of Baptiste et al. (2000) which performed averagely better. Baptiste et al. (2000) used a constraint based method to explore the solution space and give good results on small problems (n < 50). Dauzère-Pérès and Sevaux (1999) determined conditions that must be satisfied by at least one optimal sequence for the problem of minimizing the weighted number of late jobs on a single machine. Sevaux and Sörensen (2005) proposed a variable neighbourhood search (VNS) algorithm in which a tabu search algorithm is embedded as a local search operator. The approach was compared to an exact method by Baptiste et al. (2000). Li (1995) addressed the P|agreeable due dates |∑U j problem. Where the due dates and release times are assumed to be agreeable. A heuristic algorithm is presented and a dynamic programming lower bounding procedure developed. Hiraishi et al. (2003) addressed the non preemptive scheduling of n jobs that are completed exactly at their due dates. They showed this problem is polynomially solvable even if positive set-up is allowed. Sung and Vlach (2001) showed that when the number of machines is fixed, the weighted problem considered by Hirashi et al. (2003) is solvable in polynomial time (exponential in the number of machines) no matter whether the parallel machines are identical, uniform or unrelated. However, when the number of machines is part of the input, the unrelated parallel machine case of the problem becomes strongly NP-hard. Lann and Mosheiov (2003) provided a simple greedy O(n log n) algorithm to solve the problem of Hiraishi et al. (2003) greatly improving in the time complexity. Čepek and Sung (2005) considered the same problem of Hiraishi et al. (2003) where they corrected the greedy algorithm of Lann and Mosheiov (2003) that was wrong and presented a new quadratic time algorithm which solved the problem. Adamu and Abass (2010) proposed four greedy heuristics for the Pm||∑w j (U j + V j ) problem and extensive computational experiments performed. Janiak et al. (2009) studied the problem of scheduling n jobs on m identical parallel machines, in which for each job a distinct due window is given and the processing time is unit time to minimize the weighted number of early and tardy jobs. They gave an O(n 5 ) complexity for solving the problem (Pm|p j = 1 |∑w j (U j + V j ). They also consider a special case with agreeable earliness and tardiness weights where they gave on O(n 3 ) complexity (Pm|p j = 1, r j , agreeable ET weights|∑w j (U j + V j )). Adamu and Adewunmi (2012a) compared the heuristics of Adamu and Abass (2010) with some metaheuristics.

PROBLEM FORMULATION
A set of independent jobs N = {1,2, . . . , n} has to be processed on m parallel identical machines, which are simultaneously available from time zero, each having an interval rather than a point in time, called due window of the job. The left end and the right end of the window are respectively called the earliest due date (that is, the instant at which a job becomes available for delivery), and the latest due date (that is, the instant by which processing or delivery of a job must be completed). There is no penalty when a job is completed within the due window, but for earliness or tardiness, penalty is incurred when a job is completed before the earliest due date or after the latest due date. Each job jє N has a processing time p j , earliest due date a j , latest due date d j and a weight w j . it is assumed that there is no preemptions and only one job is allowed to be processed on a given machine at any given time. For any schedule S, let t ij and C ij (S) = t ij +p j represent the actual start time on a given machine and completion time of job j on machine i, respectively. Job j is said to be early if C ij (S) < a j , tardy if C ij (S) > d j and on-time if a j ≤ C ij (S) ≤ d j . For any job j, the weighted number of early and tardy jobs (Liu and Wu, 2003) and that int is the operation of making an integer. Obviously, Therefore, the scheduling problem of minimizing the weighted number of tardy jobs on identical parallel machines can be formulated as G.

Greedy heuristic
Adamu and Abass (2010) have proposed four greedy heuristics which attempt to provide near optimal solutions to the parallel machine scheduling problem. In this paper the fourth heuristic (DO2) would be use. It entails sorting the jobs according to their latest due date (that is, latest due time -processing time) and ties broken by the highest weighted processing time is used (that is, weight / processing time).
Results of these greedy heuristics are encouraging; however it will be further investigated whether using meta-heuristics and their hybrids can achieve better results.

Genetic algorithm
Genetic algorithms (GAs) are one of the best known meta-heuristics for solving optimization problems. GAs are loosely based on evolution in nature and use strategies such as survival of the fittest, genetic crossover and mutation. Since GAs usually have a high performance and also use a population based technique, it was decided to investigate their comparative performance with the greedy heuristics.

Problem representation
Deciding on a suitable representation is one of the most important aspects of a GA. It was decided that each job would be fixed to a gene in the chromosomeimplying that the chromosome has length n (where n is the number of jobs). Each gene would also have a machine number (the number of the machine to which the job will be assigned) and an order (a value between 1 and n representing the order in which jobs assigned to the same machine will be executed). Genetic operators would then need to be applied to both the machine number and the order.

Algorithm
A basic pseudo code of the genetic algorithm found in Adamu and Adewunmi (2012a) was used.

Fitness function
The fitness function calculates the sum of the weights of jobs which could not be assigned onto any of the machines so that they would finish within the earliest due and latest due dates. For each machine, jobs which are assigned to it are placed in a priority queue (which bases priority on their respective order). Each job is then removed from the queue and placed on the machine. If the job was to finish early, then it would be scheduled to begin later (at earliest due date -processing time) in order to avoid the earliness penalty. However, if the job was to finish past the end time, then it would not be scheduled at all and instead would have its weight added to the total penalty (fitness). One final, important aspect to note is that a lower fitness function implies a better performance.

Genetic operators
Genetic algorithms have a large number of operators available to them as well as different implementations of the operators which may be useful in different situations. In the initial version of the GA, the following operators were used: 1-point crossover for machines, conventional mutation for machines (that is, choose a random machine between 0 and m-1 inclusive), swap mutation for the execution order (since naturally this is permutation based) and tournament selection. However, since there are no guarantees that these operators allowed for the best performance, further experimentation with variations of these operators was performed. More details will be given subsequently.

Particle swarm optimization (PSO)
Particle swarm optimization was chosen to attempt to solve the parallel machine scheduling problem. It is a population based technique derived from the flocking behaviour of birds which relies on both the particle's best position found so far as well as the entire population's best position to get out of local optimums and to find the global optimum. PSO is appropriate to use for parallel machine scheduling because not much is known about the solution landscape and so PSO may be useful to get out local optimums to find the global optimum.

Problem representation
The PSO algorithm requires that a representation of the solution (or encoding of the solution) is chosen. Each particle will be instances of the chosen representation. A complication is that PSO works in Adamu and Adewunmi 209 the continuous space whereas the scheduling problem is a discrete problem. Thus, a method is needed to convert from the continuous space to the discrete space. The representation is as follows: (i) Each particle contains a number between 0 (inclusive) and the number of machines (exclusive). This number represents the machine on which the particle is scheduled and is simply truncated to convert to the discrete space. (ii) Each particle contains a number between 0 (inclusive) and 1 (exclusive). This number represents the order of scheduling relative to the other particles on the same machine where a lower number indicates that that job will be scheduled before the jobs with higher numbers.

Algorithm
A basic pseudo code of the PSO found in Adamu and Adewunmi (2012a) was used.

Fitness function
Finally, a method is needed to convert the encoding into a valid schedule (this is performed when calculating the fitness). This is performed by separating the jobs into groups based on the machine to which they are assigned. Within a group, the jobs are sorted by their order parameter and organized into a queue. The schedule for a particular machine is then formed by removing jobs from the queue and scheduling them as early as possible without breaking the earliness constraint. The weights of jobs that cannot be scheduled are totaled as the fitness of the solution (which would ideally be as small as possible).

Simulated annealing
Simulated annealing (SA) was chosen as a meta-heuristic which could solve the parallel machine scheduling problem. Simulated annealing is based on real-life annealing, where the heating of metals allows for atoms to move from their initial position and the cooling allows for the atoms to settle in new optimal positions. SA is not a population based heuristicthus only one solution is kept at any one stage. Since SA should result in less operations being performed with respect to a population based technique, execution times may be quicker. It is this reason why SA was chosen for investigation.
It should also be noted that simulated annealing will in all likelihood achieve better results than a simple hill-climbing technique. This is because SA can take downward steps (that is, accept worse solutions) in order to obtain greater exploration. Thus, it is less likely to become stuck in a local minimum (a very real problem given the complex solution space).

Problem representation
The representation is remarkably similar to that used in the GA. A solution consists of n elements (where n is the number of jobs). Each element has a specific job as well as the machine onto which it will be assigned and the order of assignment. Perhaps the major difference between them is that the GA has a population of solutions (chromosomes) whereas SA focuses on a single solution.

Algorithm
A basic algorithm used in the SA [found in Adamu and Adewunmi (2012a)] technique:

Fitness function
Since, the solution is represented in virtually the exact same manner as a chromosome in the GA and a particle in PSO, the fitness function is calculated in the same manner. That is, jobs pertaining to a particular machine are placed in a priority queue before being assigned onto the machine. Those which cannot be assigned contribute towards the penalty.

Operators
Although, simulated annealing does not really have operators (in the sense of a GA having genetic operators), the SA algorithm does has to select a neighbor. The particular neighbor selection strategy that is used updates only a single element of the solution. The element is given a new randomly chosen machine and a new order (done by swapping with the order of another randomly chosen element). By allowing for a high level of randomness when selecting the neighbor, it will be ensured that good exploration will be achieved and that a local best is not found too early.

Date generation
The program was written in Java using Eclipse. It actually consists of a number of programs, each one implementing a different type of solution. The output of each of these programs gives the final fitness after the algorithm has been performed and the time in milliseconds that the algorithm took to run.
The heuristics were tested on problems generated with 100, 200, 300 and 400 jobs similar to Adamu and Abass (2010), Ho and Chang (1995), Baptiste et al. (2000), and M'Hallah and Bulfin (2005). The number of machines was set at levels of 2, 5, 10, 15 and 20. For each job j, an integer processing time p j was randomly generated in the interval (1, 99). Two parameters, k1 and k2 (levels of Traffic Congestion Ratio) were taken from the set {1, 5, 10, 20}. For the data to depend on the number of jobs n, the integer earliest due date (a j ) was randomly generated in the interval (0, n / (m * k1)), and the integer latest due date (d j ) was randomly generated in the interval (a j + p j , a j + p j + (2 * n * p) / (m * k2)).
For each combination of n, k1 and k2, 10 instances were generated, that is, for each value of n, 160 instances were generated with a weight randomly chosen in interval (1, 10) for 8000 problems of 50 replications. The meta-heuristics were implemented on a Pentium Dual 1.86 GHz, 782 MHz, and 1.99 GB of Ram. The following meta-heuristics were analyzed GA, PSO, SA, GA Hybrid, PSO Hybrid, PSOGA Hybrid and SA Hybrid.

Improvements
Genetic algorithms are different from many other metaheuristics in that they have different genetic operators which can be tried and testedrather than simply changing parameters. The original GA which was tested used 1-point crossover, random mutation for machines, swap mutation for order and tournament selection. It was decided to try other combinations of operators in order to see if performance could be increased. For this reason, roulette-wheel selection, uniform crossover and insert mutation (for order) were all programmed. A user would then be able to choose any combination of operators to use for their own GA. More information on the optimal combination of genetic operators will be mentioned subsequently in the parameters.

Greedy hybrids
Once the meta-heuristics (GA, PSO and SA) had been programmed, it was thought that improvements on them could potentially be made if they somehow included aspects or features from the greedy heuristic used by Adamu and Abass (2010). It was clear from the works of Adamu and Abass (2010) that the key to the greedy heuristics was in the order in which jobs were assigned to machines. So the mechanisms of ordering in DO2 needed to be incorporated in the meta-heuristics (GA, PSO, SA).
To implement the hybridization in the 3 meta-heuristics, the order field was removed from Gene, Dimension and Element respectively. Also, any code in Chromosome, Particle and Solution which dealt with the order (for example, swap mutation in Chromosome) was removed.

Parameters
For each solutions strategy, there are a number of different parameters that affect the performance of the algorithm such as population size, mutation rate, initial temperature, etc. These parameters needed to be experimentally determined and so the algorithms were run manually on a subset of all the testing data in order to determine the optimal parameters. This involved experimenting with the full range of each parameter and recording and tabulating the results achieved. The combination of parameters that gave the best performance was selected as the optimal parameters. The optimal parameters for the genetic algorithm are: Further to the above parameters, the genetic algorithm hybrid achieved best results when hybridized with the DO2 greedy heuristic. The optimal parameters for particle swarm optimization are: (i) A population size of 50. (ii) A w (momentum value) of 0.3. (iii) A c1 of 2. (iv) A c2 of 2.
(v) The number of iterations of the algorithm was set at 2000.
Further to the above parameters, the particle swarm optimization hybrid achieved best results when hybridized with the DO2 greedy heuristic.
The optimal parameters for simulated annealing are: (I) An initial temperature of 25. (ii) A final temperature of 0.01. (iii) A geometrical decreasing factor (beta) of 0.999.
Further to the above parameters, the simulated annealing hybrid achieved best results when hybridized with the DO2 greedy heuristic.

DISCUSSION
In this part of the work, the results of the algorithms are shown, including the hybridizations. In the four columns shown in Table 1, each cell consists of two numbers. The top number is the weight of the schedule that is produced, averaged over 50 runs. The bottom number is the average time in milliseconds that the algorithm takes to complete.
Also included are four charts each for the performance of the meta-heuristics in relation to the penalty ( Figure 1) and time ( Figure 2) for N= 100, 200, 300 and 400. Figure  1 compares the relative performance (penalty) of each of the 6 algorithms compared to the number of machines used. Again, four charts are given to show the computational times of the meta-heuristics for various values of N. It should be clear from both the Table 1 and the charts that the Simulated Annealing Hybrid (SAH) out performed the other meta-heuristics in almost all points and the over all lowest time averagely less than a second. It was observed the various hybrids performed better than their meta-heuristic without it. It further proves the effectiveness of hybridization on the meta-heuristics.
The Genetic algorithm (GA) performed worst compared to other meta-heuristics in all of the categories considered for all N jobs and M machines. The GA time is averagely 2.8 s, far slower than the SAHnotably because it keeps track of a population of individual solutions. Results show it to be in the region of 2.8 times slower compared to SAH.
The genetic algorithm which is hybridized with DO2 (GAH) achieves better results (Table 1 and Figure 1) compared to the simple genetic algorithm (GA) on all of the test cases. In all cases considered, the GAH outperform the ordinary GA and as the value of N Adamu and Adewunmi 211 increases the performance rate of GAH over GA widens.
For larger values of N the performance of GAH is almost equivalent if not better than SAH. GAH takes on average about 2.77 s. GAH would be ideal for larger values of N where an optimal solution is not readily feasible. The particle swarm optimization (PSO) and the hybrid PSO (PSOH) produce lower weight compared to the GA. Furthermore, they are far slower than all the metaheuristics considered (over 14.4 times slower for PSO and 10.5 for PSOH in relation to SAH). This is understandable since PSO is a population-based algorithm so there is a lot of work being done at each step. Hybridizing particle swarm optimization with the DO2 greedy heuristic produces results which are better than PSO for all cases. The PSOH is also about 1.37 times faster than PSO.
The results for simulated annealing (SA) are far better on the average than those GA, PSO and PSOH both in performance of penalty and time (Tables 1 and 2 and Figures 1 and 2). On average, SA takes 1 s to run. However, it is about 2.8, 2.77, 14.4 and 10.5 times quicker than the GA, GAH, PSO and PSOH respectively (Table 5).
Hybridizing simulated annealing with the DO2 greedy heuristic (SAH) produces results that are slightly better than the SA solution for all cases considered. It produces the overall best results among the meta-heuristics in terms of performance in relation to penalty and time. The average timing is a little less than a second.
Further statistical analysis are carried out for both the penalty and timing of the various algorithms. Test of homogeneity of variances, ANOVA test, multiple comparisons test and homogeneous subsets are considered. Tables 2 to 4 are for the penalty performance and time performance. For the penalty performance, it is discovered that the variances of the penalties are not significantly different. Table 2 presents the ANOVA table  for penalties. The means of the meta-heuristics are significantly different from one another, that is, they do not have equal means. Due to equality of their variances, subsets of homogeneous groups are displayed in Table 3 using Scheffe's method. Four groups are obtained: group 1-SAH, GAH and SA, group 2-GAH, SA and PSOH, group 3 -PSOH and PSO, and group 4 -GA. These groups are arranged in decreasing order of their effectiveness. The worst among them is the GA. Similarly, for the time performance, Table 4 shows the ANOVA table for the test of equality of the mean time of the meta-heuristics which are also significantly different.
This implies that timings for the various algorithms are not the same. PSO and PSOH have the highest time of 14. 4 and 10.5 s respectively. While the lowest of about 1 s for both SA and SAH.

Conclusion
This paper presents results on scheduling on identical parallel machines with the objective of minimizing the weighted number of early and tardy jobs. Six meta-heuristics including hybridization are proposed for solving the problem. Extensive computational experiments are performed to analyze these meta-heuristics. It was observed that the simulated annealing hybrid gives the best result both in performance and timing while the genetic algorithm was the worst among them in performance. Further research will focus on comparing these results with optimal solutions and considering other machine environment like     uniform and unrelated machines.