Genetic Algorithm Combined with Gradient Information for Flexible Job-shop Scheduling Problem with Different Varieties and Small Batches

To solve the Flexible Job-shop Scheduling Problem (FJSP) with different varieties and small batches, a modified meta-heuristic algorithm based on Genetic Algorithm (GA) is proposed in which gene encoding is divided into process encoding and machine encoding, and according to the encoding mode, the machine gene fragment is connected with the process gene fragment and can be changed with the alteration of process genes. In order to get the global optimal solutions, the crossover and mutation operation of the process gene fragment and machine gene fragment are carried out respectively. In the initialization operation, the machines with shorter manufacturing time are more likely to be chosen to accelerate the convergence speed and then the tournament selection strategy is applied due to the minimum optimization objective. Meanwhile, a judgment condition of the crossover point quantity is introduced to speed up the population evolution and as an important interaction bridge between the current machine and alternative machines in the incidence matrix, a novel mutation operation of machine genes is proposed to achieve the replacement of manufacturing machines. The benchmark test shows the correctness of proposed algorithm and the case simulation proves the proposed algorithm has better performance compared with existing algorithms.


Introduction
With the transformation from manufacturing industry into service industry, the production process under the intelligent manufacturing environment should satisfy the customization and individuation demands of the customer, which has brought the requirement of scheduling problem with different varieties and small batches [1][2].Compared with traditional Job-shop Scheduling Problem (JSP), it is much harder to achieve the global optimal solutions of FJSP because there exist some redundancies of the manufacturing resources, which causes the rapid increase of search space with the expansion of the problem scale [3][4][5][6].
As a kind of Non-deterministic Polynomial-hard (NP-hard) problems, there are mainly two directions of solution methods: exact methods and approximate methods [7].The exact methods such as mathematical programming [8], branch and bound algorithm [9][10] can obtain the final theoretical optimal solutions of FJSP with small scale.For the large-scale FJSP, this kind of exact methods is not suitable because the expansion of problem scale brings exponential explosion, which takes much more time cost using such enumeration algorithms [11].
To solve this kind of large-scale scheduling problems with lower time cost, corresponding to the exact methods, the approximate algorithms such as GA [12][13][14], Particle Swarm Optimization (PSO) [15][16][17][18], Binary Differential Evolution Harmony Search [19] and Simulated Anneal algorithm [20] have been integrated.These meta-heuristic algorithms maybe cannot get the theoretical global optimal solutions of large-scale FJSP, but the obtained solutions can meet the actual production requirement.In these meta-heuristic algorithms, GA is adapted to solve such highly discrete problem like FJSP very well since the encoding and decoding mode of GA can reflect the discrete solutions.But in the evolutionary process of GA, the new-generated populations may not satisfy the constraint requirement owing to the gradient information loss between the father population and child population.To improve the controllability of evolutionary process and ensure the convergence speed, a GA-based algorithm is proposed with high solving efficiency and optimization performance.

Mathematical model
FJSP with different varieties and small batches can be described as follows: In order to produce N kinds of products with job sum J , the i thworkpiece of k th assortment should be processed according to the process order kj O on the selected machine, in which matrix O J between J and process order O as well as the time matrix T can be obtained.Based on these two matrixes, the optimization model can be established.
The whole production process with different varieties and small batches ends once the last process on a concrete machine is finished, so the minimum value of max make span is utilized as the optimization objective to dispatch the manufacturing resources.So the fitness function in optimization model can be summarized in following Eq.(1): , M is the sum number of alternative machines.Problem constraints are as follows: -The next process of any job can start only the current process is finished; -One machine can only process one workpiece at the same time; -Once the process starts it cannot be suspended until it is finished; -One workpiece can only be processed on one machine at the same time; -The workpieces of same kind have the same process order; -The situation of machine fault is out of consideration.

GA-based algorithm design
Fig. 1 depicts the computation framework of proposed algorithm based on GA.Different from traditional GA, the encoding genes are divided into process gene fragment and machine gene fragment which have close relationship with each other, and the following evolutionary operations are all based on these two kinds of genes.The specific operations are described in detail in the following sections.

Population initialization
Aiming at solving double decision-making problems of the job processes and machines under production demand of different varieties and small batches, the chromosome is composed of two kinds of gene fragments: the process genes and machine genes.The first process gene fragment means the process order on the alternative machines according to the manufacturing procedures of the given job.The latter machine gene fragment means the machine number in the alternative machine sets of the corresponding process order.In order to maintain the consistency with the solutions, decimal coding is applied to compose the population chromosome.
(1) For the process genes, a gene fragment composed of J genes is initialized, and the value of each gene means the process order of the i thwork piece.
(2) For the machine gene, an initialization strategy is applied to accelerate the algorithm convergence speed because the machines with shorter manufacturing time are more likely to been chosen.The max time difference of every non-empty positions in the time matrix T is calculated and sorted in ascending order.The machine genes of the first partare initialized randomly within the range of corresponding positions in the incidence matrix O J , and for the latter part, the machines with minimum manufacturing time are chosen as the machine genes.

Tournament selection and elite reservation
The classic roulette selection is not suitable because the optimization objective is to minimize the max make span of a given job and some information of chromosome may lose in the transmission operation.Therefore, tournament selection strategy is utilized to select the superior offspring.At a time two individuals are chosen randomly from the parent generation, and the individual with a smaller fitness function is put into the mating pool.
In order to ensure the superior offspring can continue the genetic procedure instead of elimination, an elite reservation strategy using generation gap mechanism is proposed.For every evolutionary iteration, the mating pool consists of parent chromosomes selected by tournament strategy with quantity G P u , in which G means the generation gap coefficient, and P means the population quantity.Fig. 2 shows the important role of tournament selection and elite reservation in the pretreatment phase of the evolutionary process.From Fig. 2, the parent chromosomes with the proportion of 1 G are selected to be the offspring directly.

Crossover operation of process genes
The Improved Precedence Operation Crossover (IPOX) developed by Zhang CY [21] is applied to achieve the crossover operation of process genes.More detail information can be found in reference [21] and will not be described here.From the population initialization process, we can see the process genes and machine genes have a very close connection between each other and the loci of the machine genes should follow the change of the process genes, so after the crossover operation of the process genes, the corresponding machine genes must execute the gene loci based on the change of the process genes.

Crossover operation of machine genes
Different from single-point crossover, a multi-point crossover strategy is introduced to achieve the crossover operation of machine genes and to accelerate the evolutionary speed, the quantity of crossover points is related with the difference degree between machine gene fragments in different parent individuals directly.When the machine genes at the same gene locus of process gene fragment are different, the corresponding genes should be interchanged if the judgment condition 0,1 0.5 rand ! is satisfied.
Fig. 3 shows a simple crossover executionexample of a concrete machine gene fragment.There are three gene loci with different genes: locus 1, 3 and 6.The genes at loci 1 and 6 are interchanged with each other between the two parent chromosomes to achieve the crossover operation because the random condition is qualified but the genes at locus 3 of both parent chromosomes should remain without any change.

Mutation operation of process genes
The genetic procedure depends much on the gradient evolutionary information because the arbitrary change between two elements may generate invalid child individuals which cannot satisfy the constraint conditions.Therefore, the double mutation operation should be limited under a certain condition.Supposing double selected gene loci are 1 L and 2 L , the genes of these double loci can be interchanged only if the genes are different and there is no same gene as that of 1  L or 2 L in the gene fragment between these two gene loci.This limitation can avoid destroying the process order of any workpiece so that the validity of child populations is guaranteed.
Fig. 4 shows a simple mutation example of the process genes.The genes at loci 3 and 6 cannot be interchanged because there exists a same process number 3 between these two loci, and the genes at loci 2 and 4 can carry out the mutation operation because the mutation condition is satisfied.

Mutation operation of machine genes
The mutation operation of machine genes is very important because this operation builds up the interchange relationship between the current machine with the alternative machines prepared in the incidence matrix O J .For a randomly selected machine gene in the gene fragment, a random machine in the alternative machine set of corresponding position in O J is picked out to replace the current machine gene.
Fig. 5 depicts a mutation example of machine genes.The gene at locus 3 is randomly selected to carry out the mutation operation and then the machine with number 2 is picked out from the alternative machine set in the incidence matrix O J .The child chromosome is generated as shown from the parent generation finally.

Self-adaptive strategy
Compared with the crossover operation of the gene fragments between the parent chromosomes, the mutation operations of process genes and machine genes are miniature, so a self-adaptive mechanism is introduced to adjust the mutation times.Hereon, self-adaptive operator

Experiments and discussion
The simulation experiments are carried out on Windows 7 platform with the hardware parameters as follows: CPU Intel E8400 3.00GHz, RAM 2GB.The programming environment is MatLab R2013a.According to the implement procedure in Fig. 1, the parameters are assigned as follows: population size

Benchmark test
The global optimal solutions of scheduling case with different batch scales are as shown in Table 1, and the detail parameters of benchmark test can be found in reference [22].In this case, there are four kinds of product demands with different batch sizes, and the theoretical solutions as follows.The benchmark test shows that the proposed algorithm can also obtain the global results, which proves the correctness of proposed algorithm.Additionally, the optimized makespan of case 4 in reference [22] is 33, but the result obtained by proposed algorithm 32, which shows the priority of proposed algorithm applied in the scheduling optimization problems.The concrete scheduling scheme can be seen in Fig. 6.

Case study
For the case of FJSP with different varieties and small batches presented by Fu WP, the final optimized solution is 121 [23], but the solution got by the proposed algorithm is 113, which shows the superiority clearly.The convergence procedure is as shown in Fig. 7.It can be seen that the fitness function value converges from 181 to 113 eventually, which is a new lower bound compared with the result in reference [23].Meanwhile, the proposed algorithm can obtain the solution which can satisfy the industrial scheduling requirements with an acceptable computation cost with 86 evolutionary times.The corresponding Gantt diagram in Fig. 8 shows the scheduling of manufacturing machines according to the job requirements with different varieties and small batches.The global optimal solution of this case has not been found until now, and the results with different scheduling schemes got by proposed algorithm are the minimum solutions for the moment.The next research step focuses on finding out the theoretical global solution or updating a new lower bound again.

Conclusions
A modified scheduling algorithm based on GA is proposed to solve the FJSP with different varieties and small batches.The initialization operation associated with time matrix is introduced to accelerate the convergence speed and the generation gap coefficient is applied to guarantee the survival rate of superior offspring.To maintain the population diversity and avoid falling into local optimal solutions, IPOX and multi-point random crossover operation are utilized to achieve the crossover of chromosomes, and double swap mutation operation of the process genes and random swap mutation operation of the machine genes are introduced to realize the variation evolution.The benchmark test shows the correctness of proposed algorithm and the case simulation proves the proposed algorithm has better performance compared with existing algorithms.The benchmark tests and simulation results show the proposed algorithm can obtain the global solutions and update the new lower bound of FJSP with different varieties and small batches got by existing algorithms.

Figure 1 .Figure 2 .
Figure 1.Tournament selection and elite reservation is utilized to control the mutation procedure, in which floor means the floor

Figure 6 .
Figure 6.Gantt diagram of optimized scheduling result

Figure 7 .
Figure 7. Fitness function with respect to evolutionary process.

Figure 8 .
Figure 8. Gantt diagram of optimized scheduling result

Table 1 .
Test results of proposed algorithm