Flexible job-shop scheduling based on genetic algorithm and simulation validation

. This paper selects flexible job-shop scheduling problem as the research object, and Constructs mathematical model aimed at minimizing the maximum makespan. Taking the transmission reverse gear production line of a transmission corporation as an example, genetic algorithm is applied for flexible job- shop scheduling problem to get the specific optimal scheduling results with MATLAB. DELMIA/QUEST based on 3D discrete event simulation is applied to construct the physical model of the production workshop. On the basis of the optimal scheduling results, the logical link of the physical model for the production workshop is established, besides, importing the appropriate process parameters to make virtual simulation on the production workshop. Finally, through analyzing the simulated results, it shows that the scheduling results are effective and reasonable. applied for flexible job-shop scheduling problem to get the optimal scheduling results with MATLAB. Finally, simulation is made on the production workshop with the three-dimensional discrete-event simulation software DELMIA / QUEST. The simulation results show genetic algorithm in solving job shop scheduling problem is very effective and has a high application value.


Introduction
Flexible manufacturing system is a complex artificial system, which has the characteristics of complexity, randomness, multi-objective, multi constraint and so on. Production scheduling is a research hotspot of the manufacturing system. Because of its effective application in practical engineering, related research and control methods have been widely concerned, and have made great research achievements. Flexible Job shop scheduling problem is a typical NP hard problem, which is a class with multi-objective, multi variable and multi constrained combinatorial optimization problem. This problem is difficult to solve with exact algorithms within the available time, so, many scholars introduce and put forward a variety of heuristic algorithm to solve the flexible job shop scheduling problem. Among them, genetic algorithm has been widely used and developed for its good robustness and stability.
Many scholars made the research on the job shop scheduling problem based on genetic algorithm, Lei [1] proposed a effective collaborative evolutionary genetic algorithm and get the optimal solution to deal with the work order and machine assignment fusion. Toledo et al. [2] raised multi population genetic algorithm with migration strategy. When the algorithm continued to perform repeatedly, the objective function value did not changed, excellent population migration strategy would be started and performed until the algorithm satisfied the stop criterion. Teekeng et al. [3] put forward a kind of improved genetic algorithm which introduced a new mutation operator to help maintain the diversity of population and avoid premature convergence of the algorithm, and applied it to solve the flexible job shop scheduling problem successfully, Jalilvand-Nejad et al. [4] established the mixed integer programming model of circular flexible job shop scheduling, and solved the model based on the genetic algorithm to resolve the circular flexible job shop scheduling problem. Liu et al. [5] proposed crossbar collaborative multi-group genetic algorithm. It was difficult to obtain the optimal solution in multi-objective fuzzy flexible job shop scheduling by using common genetic algorithms. To solve this problem, based on the consideration of due date obeyed fuzzy time window distribution, a multi-objective fuzzy flexible job shop scheduling model was presented. It was aimed at maximizing customer satisfaction and minimizing completion time. Zhou et al. [6] created a dual clutch transmission scheduling model with DELMIA, and analyzed the collision and Gantt chart based on genetic algorithm to shorten the design period and reduce the design cost.
On the basis of previous studies, this paper constructs the mathematical model of flexible job shop scheduling problem. Taking the transmission reverse gear production line of a transmission corporation as an example, genetic algorithm is applied for flexible job-shop scheduling problem to obtain the optimal scheduling results. Finally, simulated model is made with DELMIA/QUEST to testify the scheduling results.
Research on flexible job shop scheduling is the processing of n work-pieces to be processed' processing, each workpiece contains one or a plurality of processes, each process can be processed in a plurality of different processing machines, the processing time varies with the choice of processing machine. Under the premise of aiming at meeting process constraints and machine availability, the optimal processing machines are chosen for each process, and the optimal processing sequence and the start working time of the every process in every machine is decided, so that the processing time of a job is the shortest, the specific variables are defined as follows: N={1,2, ... ,i, ... j, ... n}Represents a set of artifacts, where n is the total number of artifacts. M={1,2, ... ,k, ... h, ... m}Represents a set of artifacts, where m is the total number of machines. jk Work-piece number (jk=1,2,3,…,n). ie machine number (ie=1,2,3,…,m). hi the total number of working procedures for the part i. l the serial number of working procedures for the part i (i=1,2,3,…,h).
Oih the procedure h of the part i. tik the processing time of the part i on the machine k. Cik the makespan of the part i on the machine k.

Mathematical model of flexible job shop scheduling problem
The maximum makespan is the most basic index to measure the scheduling scheme. In some degree, it reflects the production efficiency of the plant, aiming at minimizing the maximum make-span. Constructed objective functions are described as: In addition, the FJSP optimization process needs to satisfy the following constraints: (1) Work-piece occupancy constraints: to ensure that every process of the work-piece can only be processed on a machine at the same time.
(2) Process sequence constraints: to ensure that the processing sequence of every work piece to meet the requirements set in advance.
(3) Process time constraints : to ensure that the makespan of every process and the processing time is greater than or equal to zero. 0 ,

Model solution for scheduling problem
The production workshop of the auto transmission reverse gear of some automobile transmission company in Jiang Xi province is set as an example. In the reverse gear production workshop, it produces a total of six parts which are machined in the 12 machines, and every work-piece contains 8 processes, process can choose machine table, processing schedule is shown in Table 1, table 2 .Genetic algorithm has the ability of doing the global parallel search, and focuses the main target on the high performance, so that it can improve the search efficiency and not easily fall into local minimum, thus, the approximate optimal solution of the model is solved by genetic algorithm in this paper.

Model solution based on genetic algorithm
Genetic algorithm is applied to solve flexible job-shop scheduling problem as shown in figure 1.Among them, the population initialization module initializes the initial solution of the population composition; the fitness value calculation module calculates the fitness value of chromosomes; the roulette wheel method is applied to select excellent individuals in the selection operation; it gets excellent individual by integer crossing method in the crossover operation; it gets excellent individual by integer variation method in the mutation operation [7][8][9][10][11][12][13][14][15][16]. Step1: Setting parameters: input to the known data of the production workshop. In addition, maximum number of iterations, the size of the population, the crossover probability and mutation probability are also set.
Step2: Generating the initial population: initial population is randomly generated in the process of time operation, and there is no any rules, so the generation of initial population relies on computing ability and computational complexity of computer, the concrete production method is that the solution of the scheduling problem is expressed in the form of chromosomes with the chromosome coding, good coding style can generate feasible solutions more easily in subsequent genetic algorithm operation and improve execution efficiency. FJSP contains two problems of machine GCMM matecconf/201 47 selection and process scheduling, integer coded MSOS combined with block coding is adopted to encode for the two sub problems. MSOS embraces machines selection, MS and operations sequencing, OS, the coding process is described in detail by taking the top three steps of the part 2 and the part 3 as an example. In the process of the machine selection coding, the process O22 of the part 2 have two machines to choose from, 1 indicates choosing the first machine, that is to say, it can be processed on the machine M1, and the rest can be done in the same manner. Process scheduling is to make use of the number of woke piece to encode directly, Emergence order of the work piece number represents the sequential processing between processes of the work piece. The coding process is shown in figure 2.
Step3: Crossover operation: crossover operator is the main method of generating new individuals, which determines the global search ability of genetic algorithm. The function of crossover operation is to give the original good genes to the next generation, and to generate new individuals with better genes. Usually the genetic operator we use is Point crossover, which is to cross as the probability of cross. Step4: Evaluation and Selection: evaluation and Selection is to choose the individuals with high fitness from the obtained fitness, and to eliminate the individuals with low fitness, namely, the better individuals continue to survive, which achieves survival of the fittest, to ensure that excellent genes can be passed on to the next generation.
Step5: Analyzing the termination conditions: Given that the genetic algorithm is a kind of repeated cycle selection, crossover and mutation algorithms, thus, when using genetic algorithms to calculate, termination conditions must be set. When setting the parameters, the final number of iterations should be set in accordance with the complexity of the problem to terminate the operation.

Model solution result
Writing the running code to solve the scheduling model with MATLAB, the basic parameter of algorithm is set to: population size pop is 50, maximum iteration parameters Ite for 50, crossover probability for 0.8, the mutation probability for 0.01, he shortest time of running program to a job done is 43s, the search process is shown in Figure 3. Figure 4 is the scheduling Gantt chart the optimal solution.

Simulation and verification of job shop scheduling based on DELMIA/QUEST
According to the actual situation of production system, simulation of production system is to establish a descriptive model of workshop with the computer software, simulation is made on the established model, which can not only evaluate the performance of the system, but also assist decision-making, besides, the optimization will be made. In the job shop scheduling problem, simulation verification of the scheduling schemes can predict the performance of the system under different scheduling strategies, and determine the reasonable and efficient production planning and scheduling scheme, consequently, the capacity of the production system will be made full use of, which improves the efficiency of the economy. Simulation of the production system is the simulation based on discrete event system, the process of simulation is shown in Figure 5. DELMIA/QUEST is a kind of simulation software, which is developed by the French Dassault company, and applied to the analysis of the process flow and workshop layout of discrete event. Because of its simple and easy-to-use visual interface and outstanding data analysis ability, it makes it become the preferred solution for the simulation and analysis of production process [17]. Generally, modeling and simulation with DELIMA/QUEST can be divided into four steps: the introduction of production line process layout, physical modeling and logical modeling, process design, result and analysis.

Production workshop simulation model
Process flow is a series of procedures from the initial raw materials to the final product in the process of production and processing, which is also the basis of the simulation of the production workshop. In practical engineering applications, the process layout is usually drawn with CAD software. Because Quest does not support common DWG format under CAD, at first, we need to transform DWG format of the process flow layout into the DXF format that Quest can identify, then directly importing. Quest provides a powerful modeling function, where the modeling is the establishment of the simulation model, rather than the CAD model. The Quest model can be divided into two parts: the physical model and the logical model, CAD model is used to establish the real physical model, and the logical model controls simulation running.
The virtual physical model of production resources, including source, buffer, machine, sink, conveyor, automated guided vehicle (automated guided vehicles, namely AGV) and labor, Quest comes with a number of commonly used machinery and equipment, such as horizontal lathe, vertical drilling machine, fork-lift, it is convenient for modeling by defining the basic parameters. For initial models that quest does not have, CAD module is applied to set up the 3D geometry model of the equipment, importing the appropriate equipment parameter, ,according to the location of equipment in the system and the relationship between device and equipment, then modeling . Figure 6 is the modeling view for the human body model. The modeling view of the initial model of punch is shown as Fig. 7. Logical model will be made for the established virtual physical model, establishing the relationships of links. Link (connection) is used to link the other elements in the Quest model. The overall flow of production system process is decided by establishing links and parts can only move between elements of link relations, once the link is established, so is the logical relation. The man-machine physical model and logical connection of a production line is shown in Figure 8, most of the elements have one input and one output link at least, in other words, the parts along the input link from a process into this element, and moves to a process along with the output link when the production and processing is finished. Thus each element has an input and output link, but the sources element and the reception element are two exceptions. This depends on their own properties, the function of sources is to create elements, and sinks is to destruct parts. In Quest, selection and scheduling for the physical model is completed by controlling logical link. In fact, these links are a simulation program written by structured programming language (SCL). Quest provides a number of normative process and logic, in general, these normative process and logic are able to satisfy the demands of users. However, in some special production environment, the standard structured language cannot completely define the required process. Using SCL provided by the Quest to change or rewrite for the existing standard program, the logical link can be achieved in the special environment. This function enables the user to control the simulation model in any degree of their needs, and to use its two development function to achieve the simulation goal.
In order to make the simulation model more accurately reflect the running status of the actual production system, ensure the authenticity of the simulation results. The process parameters which are closely related to the production line are given to the established physical model, including the production rhythm, the transmission speed, the controlled logic and so on [18][19][20].
Simulation of the established model could dynamically display the utilization rate of the production equipment and human resources utilization in the form of pie chart and bar chart in the process of simulating. At the end of the simulation, the system will automatically generate a statistical table for the analysis of the entire model.

Simulation verification
Virtual simulation is made on the assembly workshop of the reverse gear. According to the previous scheduling results, this paper constructs a logical connection, running the simulation model. The scene view of the production operation simulation is shown in figure 9. In the process of simulation, we can clearly observe the entire process of production and assembly, at the same time, the simulation result can clearly reflect the utilization rate of equipment in the production and operation, and makes a true reflection of production transportation path, line, frequency and the operation process in the process of production and assembly, which can verify whether the results of job shop scheduling is reasonable. Through the simulation analysis, combined with the observations and the related report output, we can find that the equipment utilization rate is high in the process of simulation, and the cross roundabout phenomenon between production line rarely occurs, and the cost of the whole process is low. The simulation results show that the job shop scheduling scheme obtained by genetic algorithm is reasonable. Fig.9 The physical model and logical connection of a production line

Conclusion
This paper constructs mathematical model of the job-shop scheduling problem aimed at minimizing the maximum makespan, and explains the meaning of each parameter in the mathematical model. Taking the transmission reverse gear production line of a transmission corporation as an example, genetic algorithm is applied for flexible job-shop scheduling problem to get the optimal scheduling results with MATLAB. Finally, simulation is made on the production workshop with the three-dimensional discrete-event simulation software DELMIA / QUEST. The simulation results show genetic algorithm in solving job shop scheduling problem is very effective and has a high application value.