Вы находитесь на странице: 1из 6

Proceedings of the IEEE International Conference on Automation and Logistics Qingdao, China September 2008

Dynamic Scheduling of Flexible Job Shop Based on Genetic Algorithm


Tianbiao Yu, Jing Zhou, Junhua Fang, Yadong Gong, Wanshan Wang
School of Mechanical Engineering & Automation, Northeastern University, Shenyang, 110004, China tbyu@me.neu.edu.cn
Abstract - Using genetic algorithm to resolve dynamic production scheduling problem of flexible job shop is presented. A math model and objective function for dynamic scheduling of flexible job shop is set up by analysis problem of flexible job shop scheduling and restrictive condition is research. A genetic operator that can meet the need of production scheduling of flexible job shop is designed based on working procedure coding. Coding, crossover, mutation, fitness calculation, controls parameter selection and stop condition is studied. Based on those simulation is carry out and the result of it show correctness and validity of arithmetic. Index Terms - Flexible job shop, Production scheduling, Genetic algorithm, Simulation

of flexibility dynamic task scheduling genetic algorithm. It also confirms the effectiveness of the algorithm through specific example [9-10]. II. ANALYSIS OF SCHEDULING MODEL IN FLEXIBLE JOB SHOP

Viewing from the point of engineering systems methodology, modeling is based on the work of selecting targets, restrictive conditions and research environment and so on. Therefore, before modeling job shop scheduling, we must give a clear description about the job shop scheduling problem, ensuring the characters, goals, constraints and the input and output of the issues. A. Description of the Issues 1) Static Scheduling Hypothesis, a processing system include m machines and n workpieces, each workpiece needs one or more working procedures, the order for processing of workpiece is pre-determined, each working procedure can be processed in different machines and the processing time is changed, according to the varies performance of machines. The goal of scheduling is to choose the most appropriate machine for each working procedure, and to identify the best order for processing of workpiece and the start time for each workpiece process, allowing the system to achieve some optimal performances. 2) Dynamic Scheduling On the basis of static scheduling, dynamic scheduling is able to meet the insertion of new tasks, the response aiming at the unexpected events of workshop (for example, machine faults) and so on. Assuming that N workpieces need to be processed on M machines, each workpiece Ji needs ni working procedures, ni working procedures are on the order of restraint, each working procedure of workpiece can be processed by multiple processes of M machines. Mij means the collection of the useable machines about working procedure j of workpiece J i , M ij { ,2,..., M} , O ijk means the 1 working procedure j of the workpiece I can use machine M k , Pijk means the required time of tworking procedure j of workpiece i processed on machine k, 1 i N 1 j ni 1 k M . Flexible job-shop scheduling problem can be described by two-dimension form. In the form, the figure means Pijk , - means the working procedure O ij cant be processed on the machine M k , the figures in the same row compose the collection. Table 1 describes one 34 flexible job shop scheduling problem.

I.

INTRODUCTION

The production scheduling is the work of organizing and executing the production schedule plan. Production scheduling based on the production schedule program, and which is mainly realized through production scheduling. The traditional production scheduling takes each working procedure being processed by certain machines, which is based on determined processing plan to schedule [1-4]. With the rise in the level of intellectualization, multifunction and production management system of processing equipment, the traditional production scheduling pattern has been unable to satisfy the advanced production operation pattern which pursues highly effective, nimble and should deal with the dynamic changeable market demand. Flexible dynamic production scheduling is precisely one kind of brand-new production scheduling pattern which arises at the historic moment under this background. Compared with the traditional production scheduling, the working procedure arrangement has more flexibility in flexible production scheduling, and each working procedure can be carried on by many machines. Workshop production scheduling is a problem of typical complex, multi-objective optimization, and flexible production scheduling is more complex compare with traditional scheduling problem. At present, the research emphasis of production scheduling is how to seek for the optimal solution of flexible dynamic production scheduling by effective algorithm [5-7]. Genetic algorithm is one kind of global optimal self-adaptive probability search algorithms, which profits from the biological natural selection and the genetic evolution mechanism. It has stronger search ability than other methods. Without ergodicing the whole solution space, genetic algorithm can obtain one optimal or near-optimal solution, which can solve the combination explosion problem in combinatorial optimization well. Flexible dynamic task scheduling mathematical model is built, and emphasis is placed on the implementation method

978-1-4244-2503-7/08/$20.00 2008 IEEE


2014

TABLE I DESCRIPTION OF FLEXIBLE JOB SHOP SCHEDULING PROBLEM Workpiece Procedure ProcedureO11 Workpiece J1 ProcedureO12 ProcedureO13 Workpiece J2 ProcedureO21 ProcedureO22 ProcedureO31 Workpiece J3 ProcedureO32 ProcedureO33 Machine M1 5 4 4 5 Machine M2 2 5 4 5 4 6 Machine M3 5 5 5 4 Machine M4 2 4 5 6 6 4 7

B. Model Input and Output To determine input and output is the key of setting up model, Fig. 1 shows the input and output for the shop scheduling model; production orders which provide the information of workpiece that need to process in a certain planning period, including the start time and completion time, quantity, etc. The process working procedures of the workpieces and their order relations are provided by technology line file and the machine need for processing working procedures and corresponding information such as processing time are provided by resource list. The input parameters were resolved by the genetic algorithm with the model, and finally get the Gantt chart of shop scheduling. Gantt charts can be directly expressed the order processing, as well as start time and end time about the required resource of the orders. It is a good tool for showing the shop scheduling result. C. Objective Function and Restrictive Condition Usually flexible job shop scheduling system is the dynamic scheduling system; its object makes minimum of the total processing time. That is optimization of the targets for the completion of the minimum of time.
E i j = Sij + Tij

procedure j (i m, j n,Sij 0) ,
E ij

end time for the workpiece i was processed in

procedure j (i m, j n) . Objective function: min{max{Ein }}, i = 1,2, , n

(2)

The restrictive conditions for the problem of task shop scheduling as follows: a) Each working procedure must be in the process after the completion of a pre-processing of this workpiece. b) Each Machine can process one work piece at sometime. III. STEPS FOR SOLVING FLEXIBLE JOB SHOP SCHEDULING WITH GENETIC ALGORITHM Chart of solving flexible scheduling by genetic algorithm as shown in Fig. 2. The process of solving is: a) Analysis of issues; identify restrictive conditions and set up model. b) Design the chromosome of the issues; generate viable initial solution at random, that is initial viable scheduling. c) According to the objective function of the job shop model to definite the fitness of the scheduling problem, and estimate the fitness value of individual. d) Selecting next generation population according to a certain strategy. e) Making crossover-operation for the individual which unmatched in population with the crossover rate Pc, to generate a new individual. f) According to mutation rate Pm, select individual at random, generate a new individual with mutation-operation. g) Computing the fitness value of the new individual, the individuals both father and offspring take part in competition. h) To determine whether the Genetic -operation has reached the stop condition, if yes, stop the Genetic-operation, the optimal individual is the best solution of the problem, or turn to d).

i 1,2,..., m; j 1,2,..., n

(1)

Among them: m number of workpieces, n number of procedures,


Tij

time for the workpiece i was processed in

procedure j (i m, j n) ,
S ij

start time for the workpiece i was processed in


Bill of equipments

Bill of materials (BOM)

Process files

Scheduling model

Gantt chart of schedule

Production order form

Genetic algorithm

Fig. 1 Input and output model of Flexible Job Shop Scheduling

2015

Phase of construction and extraction for plant model

Description of scheduling problem

Selection of decision variable and restrict condition

Construction of optimal model

Individual performance (Scheduling program)

Objective function Fitness function

Coding methods

Decoding methods

Selection of switching rule for fitness

Punishment rules

Genotypes

Fitness

Weight assign

Design of genetic operator

Selection operating parameter

Time object Cost object

Phase of program design and solving

Genetic algorithm

Fig. 2 Chart of solving flexible scheduling by genetic algorithm

IV. GENETIC ALGORITHM DESIGN A. Coding Information as follows is acquired from the Table 1 of process information: before each working procedure is determined, the Machine which is used for processing it, cant confirm. Given this situation, the using of genotype chromosome based on working procedure. Give each work piece a decimal number. For example, the number of first work piece is 1: and then attach two decimal codes after labeling of work piece. To represent working procedure, just as102, that is represent the NO.2 working procedure of work piece 1. In the codes of chromosome, all of the working procedure of the same work piece is given a same label, which is code of work piece. Confirm the order of working procedure according to the order of them appear in given chromosome, just as shown in Table 2. Put these chromosomes into the list of Machine and it will meet the restrictive condition that is each working procedure must be in the process after the completion of a pre-processing of this work piece. But these chromosomes do not contain machine information processing each working procedure that is these chromosomes not determine the Machine for processing each working procedure, and not meet the requirement of scheduling of flexible job shop. With the orders from left to right, assign machine must meet the requirement of technology file. That is assign processing machine for each working procedure stochastically, with the premise of meeting the requirement of technology file. It is assigned with random, but indicate by experiments, it can guarantee a certain rate that assign a working procedure to various Machine for processing, but it is on the basis of a certain

level of initial population. Assigning tasks to all different machines by this way, and it meet the restrictive condition that each Machine can process one work piece at sometime naturally. Very easy to know that the arbitrary arrangement of chromosome can produce viable scheduling and such coding necessarily contain optimal scheduling. A viable machine selection result was got from Table 1 and Table 2, just as shown in Table 3.
TABLE. CHROMOSOME 2 1 3 201 102 301

Chromosome Procedure

1 101

2 202

3 302

1 103

3 303

Chromosome Procedure Machine

TABLE. MACHINE SELECTION RESULT 1 2 1 3 2 101 2 201 2 102 4 301 1 202 1

3 302 3

1 103 3

3 303 1

B. Crossover Crossover-operation is a key step of Genetic Algorithm; it can be generate better offspring from its fathers good gene through information exchange. However, crossover-operation is the most difficult problem for the issues of scheduling. Taking into account the practical significance of chromosome performance, using a randomized crossover-operation, to father-generation generate an offspring, it is easy to produce unreasonable performance of the chromosomes. In response to this phenomenon, there are four methods, that is refusal strategy, repair strategy, improve genetic operator strategy and punishment strategy. The full require of refusal strategy is strict; generally, it is very difficult to meet. In this page, this

2016

strategy also does not have operable; Similarly, if repair strategy is used, the repair process will be more complicated than the original problem; after crossover-operation, the unfeasible answers has a large proportion, therefore, a punishment strategy is not feasible solution may be. In this paper, an improved method of single point crossover is used, and the problem of unfeasible answers which generate from crossover is resolved well, as shown in Fig. 3. The steps of crossover as follows: a) Select two fathers chromosomes, A and B; the intersection point is selected at random. b) Daughter chromosome string A1 remain unchanged before the intersection point of fathers chromosome A, all genes after the intersection point was rearranged according with the order of their fathers chromosome B, get A. c) Daughter chromosome string B1 remain unchanged before the intersection point of fathers chromosome A, all genes after the intersection point was rearranged with the order of their fathers chromosome B, get B. d) Select two best chromosome in A, B, A, B, and then put them into the next population.
A 1 101 3 B 301 1 101 1 101 3 301 1 B 301 2 201 1 101 2 201 2 201 1 101 1 101 1 102 1 102 1 102 1 102 1 102 3 102 3 301 3 302 3 301 3 301 3 302 3 302 2 202 2 201 3 302 2 202 2 201 2 201 3 302 3 303 3 303 3 302 3 303 3 303 1 103 2 202 2 202 1 103 2 202 2 202 3 303 1 103 1 103 3 303 1 103 1 103

D. Computing for Fitness and Select Operation Methods of fitness distribution which are based on the sort are used. First, sort the objective function value in descending order, and then return a column vector, which contains corresponding individual fitness value and within the specified pressure difference. The first position of numerical list of sorting objective function was setting by the individual with smallest fitness, and the last position of it was setting with the individual of the largest fitness. Taking into account a population with 10 individuals, the current Objective-Value is:

ObjV=[1 2 3 4 5 10 9 8 7 6]T Using linear sorting and selecting pressure difference is 2 to calculate fitness:

2.0000 1.7778 1.5556 1.3333 1.1111 0 0.2222 0.4444 0.6667 0.8889


The selection process completed by the two level selection function, SUS is the junior selection function; the senior selection function is SELECT. Junior selection function can be called by senior selection function. SUS generate a number which need to equal to the space code in [0, SUM(FitnV)] , through the accumulation of the fitness vector FitnV and forms which has completed ergodic sample at random. For only generate one random number, others which is used are from points equal space. Selected individual index is determined by comparing the generated number and vector accumulation. The rate for one individual is selected is:

FitnV =

A B

Fig. 3 Crossover

C. Mutation Randomly selected two genes and exchange their positions, then re-coding in accordance with the method of code. The approach of exchanging the positions of the two Genes has avoided the issue of illegal solution, and this is a simple and effective method. The steps as follows: a) Randomly selected two Genes in chromosomes. b) Exchanging the positions of the two genes. c) Re-coding. Specific process of mutation is shown in Fig. 4.

F(x i ) =

f(x i )
Nind

f(x i )
i=1

1 A 101 1 A 101

2 201 3 301

1 102 1 102

Among them, Nind is the population size; f (xi) is the fitness for individual xi. The best individuals are selected form father-population (Chrom) . And then return the selected individuals to the new population (SelCh) . The program for generating new population (SelCh) is:

301 202 302 3 2 2

103 303 1 103 3 303

SelCh = SELECT ('SUS'ChromFitnV)


Consider the population (Chrom) with individuals, the fitness of it is FitnV : eight

302 201 202

Fig.4 Mutation

2017

1 11 2 12 3 13 4 Chrom = 5 6 7 14 15 16 17

21 22 23 24 25 26 27 28

1.50 1.35 1.21 1.07 FitnV = 0.92 0.78 0.64 0.5

Code 101 102 103 104 105 201 202 203 204 301 302 303 304 305 306 401 402 403 404 405 501 502 503 504 505 506 507 601 602 603 701 702 703 704 705 801 802 803

TABLE TIME TABLE OF 8 JOBS AND 38 PROCESSING M2 M3 M4 M5 M6 M1 2.5 2.5 1 1 2 4 3 4 1 2 2 3.5 2 1.8 3.6 2 3 2 2 1.5 2 2 3 1 3 2 2 2 2 2 1 1 4 2 3 1 1 2.5 3 3 2 4 1.8 3 2 2 2.5 2 2 1 2 4 5 3 3 1 1 2 2 3.5 2 2 5 3 2 2 4 4

M7 2 3 1 4 1 -

8 18

Selecting eight individuals with SUS, SelCh Will be:


7 1 6 1 5 2 3 4 17 11 16 11 15 12 13 14 27 21 26 21 25 22 23 24

S e lC h =

E. Select Control Parameters and Stop Condition Selecting mutation rate is the difficult issue for selecting parameters, for the mutation operator design in this genetic algorithm is particular. The process of design is random, that means not generate a new chromosome individual in each mutation. The experiments proved that the capacity of jumping out of the local optimal is stronger, and the optimal values will not instability. To find a formal, clear convergence criterion is difficult for genetic algorithm is a random search algorithm. If a number of the previous generation of fitness may remain unchanged before finding the best optimal individuals, there are some problems on the stop conditions of the application procedures. Commonly used method is the genetic algorithm stop to use the performance, which is about pre-set generation and according to the definition of the problem on testing population optimal individuals. A new search initial condition will be started or the genetic algorithm restart, if there is no acceptable answer. Set the maximum genetic algebra was used for stop conditions, and the population size and genetic algebra also are the key parameters to influence the algorithm, after repeated experiments; it can be found a better solution with a population has 20 individuals, and evolved 25 generations.

EXAMPLES FOR CALCULATION Hypothesis, the time table of 8 jobs and 38 processing was shown in Table 4. The optimal solution and average solution on population are acquired with genetic algorithm, and the change process is shown in Fig. 5.

The corresponding Scheduling matrix is:

M1 M2 M3

101 102 502 103 303 104 305 503 202 704 0 0 0 0 401 301 302 105 705 204 0

M = M4 = 201 802 304 203 306 0 0 M5 501 402 601 505 404 405 0 M6 M7 701 702 403 602 803 507 0 801 703 504 506 603 0 0

The Time matrix of begin to process is:

2018

ST 0 2.5 5.0 1 ST2 6.0 8.0 10.0 ST3 0 1.0 3.0 ST= ST4 = 0 2.5 8.0 ST5 0 5.0 6.0 ST6 0 2.0 6.0 ST7 0 4.0 8.0

6.0 0 12.0 10.0 10.0 9.0 13.0

7.0 0 14.0 14.0 13.0 12.0 16.0

8.0 12.0 0 0 16.0 0 0 0 15.0 0 16.0 0 0 0

V.

CONCLUSIONS

Using genetic algorithm to resolve dynamic production scheduling problem of flexible job shop is presented. A math model and objective function for dynamic scheduling of flexible job shop is set up. A genetic operator that can meet the need of production scheduling of flexible job shop is designed based on working procedure coding. The result of simulation shows correctness and validity of arithmetic. ACKNOWLEDGMENTS The authors wish to thank the anonymous referees for their careful reading and constructive comments on the paper. This work was supported by the Doctor Research Funds of the Ministry of Education in china, No. 2060145017. REFERENCES
[1] H. Grflin, A. Klinkert, Feasible insertions in job shop scheduling, short cycles and stable sets, European Journal of Operational Research, Vol. 177, no. 2, 1, p. 763-785, 2007. [2] D.-Y. Sha, C.-Y. Shu, A hybrid particle swarm optimization for job shop scheduling problem, Computers & Industrial Engineering, Vol. 51, no. 4, p. 791-808, April 2006. [3] A. Periklis, Hierarchies for classes of priority algorithms for job scheduling, Theoretical Computer Science, Vol. 352, no.1-3, 7, p. 181-189, 2006. [4] H. Ohta, T. Nakatani, A heuristic job-shop scheduling algorithm to minimize the total holding cost of completed and in-process products subject to no tardy jobs, International Journal of Production Economics, Vol. 101, no. 1, p. 19-29, 2006 [5] C.-A. Soman, D.-P. Donk and G. Gaalman, Comparison of dynamic scheduling policies for hybrid make-to-order and make-to-stock production systems with stochastic demand,. International Journal of Production Economics, , Vol. 104, no. 2), p. 441-453, 2006 [6] A. Bosio, G. Righini, A dynamic programming algorithm for the single-machine scheduling problem with deteriorating processing times, Electronic Notes in Discrete Mathematics, Vol. 25, no. 1, p. 139-142, 2006. [7] Y.-R. Shiue, R.-S, Guh Learning-based multi-pass adaptive scheduling for a dynamic manufacturing cell environment, Robotics and Computer-Integrated Manufacturing, Vol. 22 no. 3, p. 203-216, 2006. [8] T.-W. Chen, B. Zhang and X.-W. Hao, Task scheduling in grid environment based on immune genetic algorithm, Journal of Northeastern University (Natural Science), Vol. 28, no. 3, p. 329-332, March 2007. [9] H.-W. Cui, T.-Z. Sui, B.-R. Wang and et al, Optimized job shop scheduling based on genetic algorithm for discretely concurrent production, Journal of Northeastern University (Natural Science), Vol. 25, no.11, p. 1095-1098, November 2004. [10] W.-C. Zhang, P.-E. Zhang and X.-D. Wu, Solution to flexible job shop scheduling problems with capacitated constraints based on ant colony & genetic algorithms, Computer Integrated Manufacturing Systems, Vol. 13, no. 2, p. 333-337, February 2007.

The Time matrix of end processing is:

8.0 10.0 13.0 0 0 0 1.0 3.0 5.0 14.0 16.0 18.0 ET= ET = 2.5 4.5 10.0 13.0 18.0 0 4 ET 5.0 6.0 9.0 13.0 15.0 19.0 5 ET 2.0 4.0 8.0 12.0 16.0 21.0 6 ET7 1.0 8.0 10.0 16.0 17.0 0

ET 1 ET 2 ET 3

2.5 5.0 6.0 7.0 8.0 12.0 14.0 0 0 0 0 0 0

Fig. 5 Anagenesis process of Genetic Algorithm

Gantt chart matching the result is shown in Fig. 6. It can be seen from this example, a better solution can be got to use genetic algorithm for the problem of flexible job shop on 8 jobs and 38 processing, the total process time is 21 units.

Fig. 6 Gantt chart matching the result

2019

Вам также может понравиться