An improved sheep flock heredity algorithm for job shop scheduling and flow shop scheduling problems

Article history: Received 10 March 2010 Received in revised form June, 23, 2011 Accepted 24 June 2011 Available online 24 June 2011 Job Shop Scheduling Problem (JSSP) and Flow Shop Scheduling Problem (FSSP) are strong NP-complete combinatorial optimization problems among class of typical production scheduling problems. An improved Sheep Flock Heredity Algorithm (ISFHA) is proposed in this paper to find a schedule of operations that can minimize makespan. In ISFHA, the pairwise mutation operation is replaced by a single point mutation process with a probabilistic property which guarantees the feasibility of the solutions in the local search domain. A Robust-Replace (R-R) heuristic is introduced in place of chromosomal crossover to enhance the global search and to improve the convergence. The R-R heuristic is found to enhance the exploring potential of the algorithm and enrich the diversity of neighborhoods. Experimental results reveal the effectiveness of the proposed algorithm, whose optimization performance is markedly superior to that of genetic algorithms and is comparable to the best results reported in the literature. © 2011 Growing Science Ltd. All rights reserved


Introduction
Scheduling theory deals with formulation and study of various scheduling models.It also includes development of associated solution techniques (Wiers, 1997).Some widely studied classical models comprise single machine, parallel machine, flowshop scheduling and job shop scheduling models (Baker, 1974;Chandrasekaran et al., 2005;Fink & Vob, 2003).The objective of JSSP and FSSP is to find a permutation schedule that minimizes the maximum completion time of a sequence.The FSSP constitutes k jobs in an m-machine flow-shop, where every job has m operations and every machine has k jobs.Every job executes its operations on every machine in the order of (M 1 , M 2 , ..., M m ).For n × m JSSP, the fundamental set of possible schedules is (n!) m .The difficulty in the scheduling problems lies in finding the best possible schedule from a number of schedules.The computational time for algorithms searching possible solution space to identify a best possible schedule increases exponentially with problem size.Hence, JSSP and FSSP belong to the set of problems classified as NP-complete problems (Baker, 1974;French, 1982;Giffler & Thompson, 1960;Garey et al., 1976).
During the last decade, many evolutionary algorithms have been widely applied in the area of production scheduling, especially JSSP and FSSP.A computational method for JSSP was proposed, anchored in the principles of artificial immune system (Chandrasekaran et al., 2005).The objective considered was to find the optimal makespan values.A hybrid simulated annealing algorithm based on a novel immune mechanism was proposed for the JSSP (Zhang & Wu, 2010).Here, the immune procedure was combined with a simulated annealing algorithm with the objective of minimizing total weighted tardiness.A new hybrid swarm intelligence algorithm was presented (Lin et al., 2010).The algorithm consists of particle swarm optimization (PSO), simulated annealing (SA) technique and multi-type individual enhancement scheme.A genetic algorithm based approach was presented in which a hormone modulation mechanism was applied (Wang & Tang, 2011).In this approach, the hormone modulation was applied to improve the performance of the algorithm.An efficient evolutionary approach based on the classical SFHA (CSFHA) was applied to compute optimal schedules for the JSSP (Vikram & Chandramouli, 2011).
A new hybrid PSO model named HPSO that combines random-key (RK) encoding scheme, individual enhancement (IE) scheme, and PSO was presented and used to solve the FSSP (Kuo et al., 2009).A hybrid alternate two phases PSO algorithm called ATPPSO was proposed to solve the FSSP with the objective of minimizing makespan, which combines the PSO with genetic operators and annealing strategy (Zhang et al., 2010).A discrete firefly meta-heuristic with local search was built for makespan minimization in permutation FSSP (Sayadi et al., 2010).A hybrid modified global-best harmony search (hmgHS) algorithm for solving the blocking permutation flow shop scheduling problem with the makespan criterion was proposed with objective of minimizing makespan (Wang et al., 2011).The problem of scheduling jobs in a no-wait flowshop problem with sequence-dependent setup times with the objective of minimizing makespan was addressed (Araújo & Nagano, 2011), where a new constructive heuristic named Gap-heuristic (GAPH) based on a structural property was proposed.
Generally, an evolutionary algorithm exhibits parallelism, and contains certain redundancy of past solutions.It is not easy to regulate an evolutionary algorithm's convergence, so it often suffers from premature convergence (Leung et al., 1997;Yang & Donglas, 1998;Rudolph, 1994), and it is also difficult to choose suitable parameters for it (Grefenstette, 1988).It is still important to enhance the performance of such evolutionary algorithms.In this paper, an improved SFHA is proposed for the JSSP and FSSP to enhance the exploring potential of the evolutionary algorithm and to enrich the diversity of the search domain.The improvement in both the local search procedure and the global search procedure helps in increasing the overall efficiency of the algorithm without any compromise on the computational time and convergence.The local search procedure is enhanced by introducing a single point mutation process in place of pairwise mutation process, whereas the global search procedure is augmented by the introduction of a new R-R heuristic.In this way, the scheduling problems are solved efficiently.

Introduction
The Sheep Flock Heredity Algorithm was initially designed and was applied to scheduling problems (Nara et al., 1999).The algorithm was based on the natural evolution of sheep in a flock.The chromosomes represent machine schedules.

Algorithm Description
Normally, sheep in each flock are living within their own flock under the control of shepherds.Therefore, the genetic inheritance only occurs within the flock.Some special characteristics in one flock develop only within the flock by heredity, and the sheep with high fitness characteristics to their environment breed in the flock.Assume there are two flocks occasionally mixed with the other flocks.The characteristics of the sheep in neighboring flocks can be inherent to the sheep in this flock.In the field, the flock of the sheep, which has better characteristics to the field environment, breeds most.
The natural evolution phenomenon of flocks can be corresponded to the genetic operations of this type of string.For this kind of string, we can define two kinds of operations.(i) Normal genetic operations between strings.(ii) Genetic operations between sub-strings within one string.In SFHA, special string structure and hierarchical genetic operations (crossover and mutation) are introduced.They are (i) sub-chromosome level genetic operation and (ii) chromosome (global) level genetic operation.This hierarchical operation is referred to as "multi-stage-genetic operation".

Introduction
Based on the mechanics of natural selection and genetics, evolutionary algorithms such as genetic algorithms combine the concept of survival of the fittest among solutions with a structured yet randomized information exchange and offspring creation.These algorithms are naturally parallel and exhibit implicit parallelism, which do not evaluate and improve a single solution but analyze and modify a set of solutions simultaneously (Goldberg, 1989).The possibility of the solution being trapped in a local optimum is considerably reduced by the ability of the algorithm to operate on many solutions simultaneously and gather information from all current solutions to direct the search.
Moreover, these evolutionary algorithms can retain useful redundant information about what is learned from previous searches by their representation of individuals in the population.Critical components of past good solutions can be captured, which can be combined via crossover to form high quality solutions.Unfortunately, they may lose solutions and substructures because of disruptive effects of genetic operators, and it is not easy to regulate the algorithm's convergence so that a pure SFHA may easily produce premature and poor results.To enhance the performance of genetic searches and improve convergence, an improved SFHA (ISFHA) is proposed.In contrast to the classical SFHA (CSFHA), the ISFHA has superior features.First, the pairwise mutation process is replaced by a single mutation process.In a CSFHA, the pairwise mutation process performs a limited local search and introduces some diversity, but it is hard to control its behavior whereas in an ISFHA, the mutation rate of the single point mutation is much easier to control thereby enhancing the local search behavior.
A new robust-replace (R-R) heuristic is introduced to enrich the neighbor search templates so that a more powerful exploring ability and a larger exploring region can be attained.This heuristic helps in improving the solution search of the algorithm in the global domain.Thus, by the introduction of these two processes into the algorithm, the limited local search of mutation is enhanced as well as a constant search of solution between local and global search domains is established.Such a procedure can also be executed in a parallel mode to reduce serial search time.In addition, since the ISFHA retains the generality of SFHA, it can be implemented easily and applied to any combinatorial or functional optimization problems.If necessary, ISFHA can be converted easily to CSFHA or GA by adjusting the framework.

Processes in ISFHA
The ISFHA consists of the following processes.

Sub chromosomal level crossover
In sub chromosomal level crossover, the entire chromosome is split into sub chromosomes of equal length.These sub chromosomes are moved randomly within the chromosome to new positions, thus forming a new chromosome.

Sub chromosomal level mutation
The mutation consists of two steps, inverse mutation and single point mutation.

(a) Inverse mutation
In a sequence, two random positions are selected.The portion of the sequence between these two positions is inverted to get a new mutated sequence.

(b) Single point mutation
A random position is selected in the sequence and moved to another random position in the sequence.As the mutation occurs with respect to a single point, the process is called single point mutation.

Robust-Replace heuristic
Each schedule (chromosome) has a makespan value that refers to the amount of robustness of that chromosome.The robustness of each schedule is calculated from the robust factor.The robust factor is defined as given in Eq. (1).
Robust Factor = 1 / makespan (1) From this relation, a lower makespan value gives a higher robust factor value.The average robust factor is calculated for the population.The schedules with robust factor values less than the average robust factor value are replaced by new schedules.This mechanism allows finding new schedules that correspond to new search regions in the total search space.

Chromosomal level mutation
The chromosome level mutation is performed among all the chromosomes in the population through inverse mutation and single point mutation.

Steps in ISFHA
Begin: Initialize the population.

Stage 1:
Select the parent.

Sub chromosome level crossover:
Set sub chromosome level crossover probability

Flow chart of ISFHA
The flow chart of ISFHA is given in Fig. 1.

Problem description
In this work, the problems considered for optimization are job shop scheduling and flow shop scheduling problems.The objective is to minimize makespan, which is the maximum completion time of all operations.

Problem Description
A job shop consists of n jobs and m machines.Each job must go through m machines to complete its sequence of operations.Each operation uses one of m machines to complete a job's work.In general, one job being processed on one machine is considered as one operation noted O ji (means j th job being processed on i th machine, 1 The objective of JSSP is to find an appropriate schedule of all machines that can minimize the makespan.

Assumptions
In a JSSP instance, a set of n jobs are waiting to be processed on a set of m machines under the following basic assumptions: • Machine breakdown does not occur, which means all the machines are continuously available throughout the production stage.• Pre-emption of operations is not allowed, which means the processing of an operation cannot be interrupted once started.• The transportation time to deliver relevant jobs between different machines is neglected.
• The setup time for the machines to switch between different jobs is neglected.
• Each machine can process only one job at a time.
• Each job can be processed by only one machine at a time.
• The sequence of operations of every job should be predefined.

Problem Formulation
A mathematical model based on the above said JSSP is built.For the model built, the notations are (2) - The objective function in Eq. ( 2) is to minimize makespan i.e the completion time of the last operation.The constraint of precedence relationship is defined by Eq. (3).Eq. ( 4) indicates that one machine can process at most one operation at a time.Eq. ( 5) indicates that the finish time must be positive.

Problem Description
The objective of the FSSP is to find an appropriate permutation schedule for jobs that minimizes the maximum completion time.Every job has m operations.The flow-shop has m machines.Every operation of any job must follow the same machine sequence M 1 , M 2 ,. .., M m .That is, the r th operation of job i is performed by machine M r with fixed processing time T (r, i), 1 ≤ r ≤ m, and 1 ≤ i ≤ k.

Assumptions
The FSSP is considered under the following basic assumptions: • Every machine can execute only an operation at the same time.
• All machines execute jobs in the order of the pre-defined permutation schedule.
• Machine breakdown does not occur, which means all the machines are continuously available throughout the production stage.• Pre-emption of operations is not allowed, which means the processing of an operation cannot be interrupted once started.

Problem Formulation
The equation of computing the maximum completion time of the permutation schedule is given as follows: In Eq. ( 9), T (r, i) means the execution time of the r th operation of the i th job on machine M r , C (r, i) means the maximum completion time of the ith job on machine Mr, 1 ≤ r ≤ m, and 1 ≤ i ≤ k.If m is equal to the total number of machines, and k is equal to the total number of jobs, then C (m, k) means makespan.

Implementation of ISFHA
The algorithm consists of the following steps: 1. Generation of initial population 2. Sub chromosomal level crossover 3. Sub chromosomal level mutation (inverse and single point mutation) 4. Robust-Replace heuristic 5. Chromosomal level mutation

Generation of initial population
A set of initial sequences are randomly generated according to the problem size and the initial makespan values are calculated.Encoding a schedule to a search solution is a key issue for ISFHA, which should be well considered because of the constraints of scheduling problems, especially for JSSP (Cheng et al., 1996).

Sub chromosomal level crossover
The initial chromosomes are modified by sub chromosomal crossover.The entire string length is split into sub chromosomes of equal length and these sub chromosomes are moved randomly to form a new chromosome.If the makespan corresponding to this new chromosome is less than the makespan of the parent chromosome, the parent chromosome is replaced by the new chromosome.Otherwise, the parent chromosome is retained.

Inverse mutation
In a sequence, two positions i and j are randomly selected.The portion of the sequence between these two positions is inverted to get a new mutated sequence.The new sequence represents the sequence of operations after mutation.If the makespan of the mutated sequence is less than the makespan of the original sequence, the old sequence is replaced by the new sequence.

Robust-replace heuristic
Consider an instance of implementation with ten random sequences and their corresponding makespan and robust factors as given in Table 1.The robust factor for each of the schedules is calculated using the formula given in Eq. ( 1).
The average value of the robust factor for the set of ten sequences is calculated.The sequences having robust factor values below the average are selected and replaced by new schedules.The retained schedules are given in Table 2.

Chromosomal level mutation
The two mutation processes are carried out among the chromosomes in the population while the sub chromosomal level mutation is restricted within a single chromosome.The mutation process includes inverse mutation and single point mutation as given in Sec.5.3.

Selection of parameters
The ISFHA has the following parameters to be defined.
(1) Size of population (S) (2) No. of generations for which the algorithm is applied (N) (3) Length of sub chromosome (L s ) (4) Probability of sub chromosomal level crossover (P c ) (5) Probability of inverse mutation (P i ) (6) Probability of single point mutation (P s ) An analysis is performed by assigning a set of values to each of the above parameters.The performance of the algorithm under each set of parameters is examined to arrive at an appropriate set of parameters that will provide most favorable solutions to the problems considered.

Population size and number of generations
First, the influences of population size and generation number on the near-optimal solutions were observed using an initial set of experiments.Table 3 shows the result obtained on this experiment.
From the table, we learn that S = 10 and N = 1000 offered the best results for this experiment.
Although a larger population size and generation number can definitely result in better performance, overall it is still reasonable to expect that those two parameters can be set to higher values to get positive results for later larger experiments.

Sub chromosomal crossover parameters
The two parameters, which decide the sub chromosomal level crossover operations are the length of the sub chromosome and the probability of sub chromosomal crossover taking place.The length of the sub chromosome decides on the quality of local search taking place.Probability of the sub chromosomal crossover is kept low so that not too many unfit sequences are produced.

Mutation probabilities
Mutation serves as a limited local search and maintains diversity in the population, but it is difficult to control its behavior and to choose a mutation rate.Both the mutation process acts on the current population simultaneously so that they can explore a wide range of the solution space to obtain high efficiency and good quality.
From Table 4, it shows that small mutation probabilities will produce better results than larger ones.
Because the purpose of mutation is to prevent the pre-maturing of genetic algorithms, higher mutation probabilities may produce a greater percentage of ''unfit" offspring, even when heuristics are used to improve their likelihood of survival.Since the scheduling problem has many restrictions, a high mutation rate would indeed produce a high proportion of such ''doomed" offspring (Beyer et al., 2002;Rees & Koehler, 2006).
In the experiments reported herein, mutation probabilities between 0.001 and 0.005 produced the best results.Accordingly, the default inverse mutation probability was taken to be 0.001 and single mutation probability was taken to be 0.005 for the remainder of the work.For single point mutation, the probability is slightly higher than inverse mutation since the mutation is self induced.

Results of parameter analysis
Table 5 shows the results of the overall analysis done on the parameters.Twenty instances are taken from the OR-Library (Beasley, 1990) as benchmarks to test the proposed algorithm.In the 20 instances, FT06 and FT10 were designed by Fisher and Thompson (Fisher and Thompson, 1963) and instances LA21-LA38 were designed by Lawrence (Lawrence, 1984).The schedules for each problem are generated using ISFHA.The results obtained by ISFHA are compared with the Best Known Solution, GA (Goncalves et al., 2005), Modified PSO (Lin et al., 2010) and CSFHA (Vikram & Chandramouli, 2011).The coding for the optimization of scheduling has been developed using MATLAB.The Percentage Relative Deviation (PRD) from the Best Known Solution is given by Eq. ( 10).
Percentage relative deviation = Optimal Solution Best Known Solution 100 Best Known Solution − × (10)

Results and Discussion
The results in the Table 6 demonstrate the PRD from the Best Known Solution obtained using GA, Modified PSO, CSFHA and ISFHA for 20 instances: FT06 and FT10 and LA21-LA38.For all the problem instances, the ISFHA performs exceedingly well.It can be seen from Table 6 that the ISFHA produces an overall average PRD (APRD) value equal to 0.11%, which is substantially lower than that of GA (0.71%), MPSO (0.31%) and CSFHA (0.27%).For all the problem sizes, the proposed ISFHA generates the lowest PRD values.
The ISFHA outperforms the existing CSFHA, GA and MPSO in terms of the overall APRD for the job shop problems with makespan criterion.Fig. 2 shows the difference in convergence of CSFHA and ISFHA for problem LA22.Fig. 2 clearly shows ISFHA achieves a better solution faster than CSFHA for JSSP.

Fig. 2.
Convergence graph of CSFHA and ISFHA for JSSP 6.2 Flow Shop Scheduling

Experimental Setup
To test the performance of the proposed algorithm, an extensive experimental evaluation and comparison with other recent existing methods are provided based on the well-known flow shop benchmark set of Taillard (1990), which is composed of 12 groups of the given problems with the size ranging from 20 jobs and 5 machines to 500 jobs and 20 machines, and each group consists of 10 instances.For each instance the algorithm is run with five independent replications, and in each replication the PRD is calculated as given in Eq. (9).

Results and Discussion
The results of the PRD obtained from ISFHA are compared with results obtained from Hybrid Genetic Algorithm (HGA) (Wang et al., 2006), hybrid alternate two phases PSO (Changsheng Zhang et al., 2010), hybrid modified global-best harmony search algorithm (I-Hong Kuo et al., 2009) and CSFHA applied for the flow shop scheduling problem.The results are shown in Table 7.It can be seen from Table 7 that the ISFHA produces an overall APRD value equal to 0.28%, which is substantially lower than that of HGA (3.88%), ATPPSO (1.93%), hmGHS (0.34%) and CSFHA (0.31%).For 11 out of 12 problem sizes, the proposed ISFHA generates the lowest PRD values.The ISFHA outperforms the existing HGA, ATPPSO, hmGHS algorithms and CSFHA in terms of the overall APRD for the flow shop problems with makespan criterion.Fig. 3 shows the difference in convergence of CSFHA and ISFHA for problem TA001.Fig. 3 clearly shows ISFHA achieves a better solution faster than CSFHA for FSSP.

Conclusion
In this paper, a new improved sheep flock heredity algorithm named ISFHA is proposed to solve extensive scheduling problems that include job shop scheduling and flow shop scheduling.
One of the main contributions is to prove that ISFHA can reach the favorable solution area in the search space quickly with smaller population size and faster convergence than CSFHA.Another contribution is to prove that the superiority of solution for the scheduling problems found by the ISFHA.It is found to be better than those obtained by GA, PSO and its variations, hybrid harmony search algorithm and CSFHA as evident from Table 6 and Table 7.The last contribution is to prove that both the local searching ability and global searching ability of the ISFHA are enhanced by means of single point mutation and R-R heuristic.
The future research includes application of ISFHA to combinatorial optimization problems.The algorithm can be used for single or multiple objectives case considering different criteria like mean flow time, total tardiness, and maximum tardiness.Furthermore, it is possible that the proposed algorithm can be applied to the scheduling problems in various manufacturing systems such as cellular manufacturing and flexible manufacturing.This algorithm can also be applied to optimize multi machine environment and the dynamic JSSP.Another development can be made by combining this algorithm with other available search algorithms to provide good results.
A random operation is selected in the sequence and moved to another random position in the sequence.If the makespan of the resulting sequence is less than that of the previous one, it replaces the previous sequence.

Table 3
Analysis of N and S

Table 4
Analysis of P i and P s