Abstract
Optimizing flexible routing in flexible manufacturing systems ameliorates the efficiency of flexible manufacturing systems. In the present competitive market, accuracy in the planning stage plays an important role. Therefore, in this article, a production simulator system based on genetic algorithms is utilized to find the near-optimal flexible routing for flexible manufacturing systems. A combination of production simulator system and genetic algorithms is introduced to find the appropriate order of a set of operations for jobs that need to be operated on available machine tools in flexible manufacturing systems. In order to augment genetic algorithms, a matrix encoding method is incorporated. The proposed simulation is applied to numerical case studies of flexible routing for flexible manufacturing systems problem. The purpose of case studies is to demonstrate the successful applicability of the proposed method for flexible routing for flexible manufacturing systems problem.
Introduction
Presently, most of the production systems are meant for high volume and mass production. However, nowadays, market is customer driven, and there is an increase in demand for customized products. This results in increase in production system complexity, and industries are looking for systems such as flexible manufacturing systems (FMS). In today’s competitive market, production costs play a vital role. Hence, industries are trying to make the production systems planning optimal or near optimal.
Conventionally, the product variety has been produced in a job shop or small batch operation. In comparison to FMS, conventional production systems including job shop result in low productivity and high production cost in mass production environment. 1 FMS realize high-volume mass production with parts variety efficiently. Typically, FMS can reach up to 80% utilization, which is three times higher than the utilization of traditional machines that can operate with as low as 20% utilization. 2 In order to make FMS more efficient, it should be optimized. Production scheduling is still one of the vital factors that can improve the productivity of FMS. It is a very complicated system and has many unpredictable conditions, especially in dynamic environments. These characteristics of FMS can be augmented by heuristic-based approaches by optimizing its scheduling.
Much research had been conducted concerned with the scheduling of FMS.3,4 The use and importance of FMS is increasing due to customized product demand. FMS offer flexibility in product variety that results in reduced inventories and faster responses to changes in demand requirements. 5 Still, there are many issues related to decision making in FMS. 6 The current literatures have considered flexibility of FMS for specific objective. 7 In FMS, considering the uncertain arrival of jobs and other dynamic uncertainties leads to complex scheduling problems even for simple breakdowns. 3 To study and optimize a FMS, several techniques and methods were introduced such as genetic algorithm (GA).8–13 Due to the difficulty and complexity in scheduling, finding a near-optimal solution in a reasonable time is very hard for conventional search–based methods. 14 The scheduling problem is considered as non-deterministic polynomial-time (NP)-hard problem, and GA is considered as an effective and popular meta-heuristics method to solve such kind of problems. 15
The majority of research work related to the FMS optimization considered reliable systems because there are few algorithms to measure unreliable systems.16,17 Further information related to production system evaluation can be acquired from a number of books18–24 and review papers,25,26 among others.
Recently, many rules have been developed to solve flexible routing (FR) problems. Threshold-based routing results in lesser waiting time until processing is greater than a certain threshold value for the system. 27 In Cogill and Hindi, 28 the study presented a linear program formulation for maximum throughput routing and scheduling problem. Flexibility situation for a hypothetical FMS was studied in Bilge et al. 29 In addition, the influence of route flexibility degree, open rate of operations, and production type coefficient on makespan was discussed in Witkowski et al. 30 In addition, new routing rules were developed that are suitable for the situations in which sequence-dependent setup times exist in dynamic flexible job shop scheduling problem. 31
Most of the existing research works dealing with routing flexibility have considered the push-type production systems. Although extensive studies have been presented to solve the problems faced by the manufacturing systems in design and operation phases. There are many FMS issues that need more focus from the researchers, such as task scheduling, control of the operations, especially in a dynamic environment including routing of parts and automated guided vehicle (AGV). 32
This study considered one-by-one parts input method 33 to feed the production system with the different types of parts. This method ensures a required production ratio at any instant in production. To the best of author’s knowledge, there has been no any previous work considering one-by-one parts input method in FR problem.
This study considers a production system with dynamic nature. The sequence of high varieties part types is included in the scheduling problem with any production ratio. Furthermore, the production system flexibly is increased since the production ratio can be changed at any instant during the production.
In this article, a production simulator system (PSS) is developed to find the optimal or near-optimal routing in FMS. In the FMS, different product types are processed simultaneously with different processing time on each machine tool. The developed PSS utilizes GA to optimize the flexible routing for flexible manufacturing systems (FR-FMS). The proposed simulation is applied to numerical application examples to demonstrate the successful applicability of the combination of PSS and GA to solve FR-FMS problem. The notations used in this article are listed below.
Modeling of FMS and the model assumptions
FMS is an important manufacturing system with the capability of operating efficiently in mass production with part variety. FMS consists of k different types of machine tools (computer numerical control (CNC) machining centers). Machine tools have finite local buffer capacity and uniform part delivery and holding pallets. All machine tools are capable of processing a required operation (Oij) on any part type, with different machining time (PTijk). In addition, the products enter and leave the FMS through load\unload station and handling system. The part travels between the FMS components by a number of AGVs with one pallet at a time. A typical structure of an FMS is shown in Figure 1. The FMS in this study considered a number of assumptions. These assumptions are summarized below.

FMS model.
FMS model assumptions
Large finite products variety can be produced by the FMS.
Handling of parts and materials in the FMS is performed in single units (on unit-load pallets).
The products enter and leave the FMS through load\unload station.
The time required to load and unload a part on\from the pallet is assumed 3 min. It needs 1 min to move the pallet onto or from the AGV.
Each part is transferred on the unit-load pallet while in the system.
The layout of the FMS components is well defined; the components are fixed, and the distance between each pair of components is known.
Buffer allocations are included in the system.
One operation can be performed by each machine tool of FMS at a time.
Tool change times are included in the processing times.
All necessary components are available and fit in the system to execute any work order.
Processing time and setup time for each part type in each machine tool is known.
Some randomly selected machines can be considered as out of order.
Each machine is capable of performing different operations, but only one part can be processed at a time.
Once any operation started, it cannot be interrupted or divided.
Each machine tool stops N times an hour, and N < 5 and selected randomly.
Each machine tool stops for a quality check after every P parts.
It takes 1 min to travel between two neighbor machine tools in vertical and horizontal directions.
Problem definition
The FMS considered in this article can produce l different part types; each type requires Os operations. Each operation can be processed by any machine tool (
The problem can be described mathematically as follows:
Given:
A set of machine tools M = {M1, M2, …, MK}, and a set of jobs J = {J1, J2, …, JK}. Each job, J, consists of ni operations, and each operation,
Determine: optimal or near-optimal route for each part type.
So that, TH (R1, R2, …, Rl) is maximum.
GAs for the FMS optimal design
GA is a heuristic optimization method which is based on principles of natural selection and genetics.34,35 GA begins with an initial population which includes a number of randomly generated solutions to the search problem.
The set of solutions in the population are called individuals. Each of the individuals represents one of the possible solutions for the optimization problem. The fitness is measured for all individuals of the initial population. The next population is generated by selecting a number of individuals of higher fitness from the current population and by applying GA operations including crossover and mutation. This iteration will repeat until the fitness value is optimized. The best overall solution becomes the candidate solution to the problem. Figure 2 shows the flow chart of the GA. The characteristics of the GA are described below.

The GA outline.
Matrix encoding method
The first step of GA is to determine the chromosome encoding method.
The conventional GA individual is generally encoded in a linear gene arrangement. Thus, the encoding of the individual can be expressed as a single vector. In case of FR-FMS, it is difficult to use the conventional linear genes encoding method to express the complex arrangements of the route for all part types. This is because there are many parts types and each part type has a different route. Thus, the expression of routes can be defined by matrix, where the rows of the matrix represent the product types (first row for the first type and so on), and the columns represent the elements in the route of each part type (namely, the operations). This matrix distribution required a matrix expression to be defined.
In this research, a matrix encoding method (MEM) is proposed to express genes in individual. MEM is suitable to FR-FMS problems because the adopted encoding method expresses the genes in chromosome as M × N matrix, where M is the number of the part types (part variety) and N is the number of operations required to produce each type. MEM expresses the individuals according to the number of part types and the number of operations required to produce each type. The individual using MEM is defined as follows
Where
The expression matrix is not limited, and it can be defined with any number of rows and columns. Thus, any FMS structure and with any part varieties can be dealt with this approach.
Initial population and selection of the next generations
The first group generation, POP(0), is selected randomly. Each group contains N individuals, each individual contains l vectors, and each vector contains O elements. Based on current population, GA generates the next generation by applying the following algorithm:
Algorithm 1
Generation of new population
Step 1: Calculate
Step 2: Select
Step 3: For each individual
Calculate the probability of selecting PR(i) as follows
Step 4: Calculate accumulation
Step 5: Calculate period
and
Step 6: Carry out crossover operation on the
Step 7: Define new endpoints of the two selected periods by a constant value n as follows: set
Step 8: Select an individual
Step 9: Reduce the endpoint of the selected period by a constant value n as follows: set
Step 10: Repeat Steps 6 to 9 to generate N − s individuals of the new population based on Cr and Mr.
Step 11: Repeat Step 1 to Step 10.
Step 12: Repeat step 11 to reach the optimum fitness value and set the individual of this fitness as the optimal individual.
Crossover by MEM
The MEM crossover is different from conventional crossover because the genes in individuals are arranged in matrix form. The main difference between MEM and conventional crossover is that the MEM is applied using crossover line instead of the crossover point as in conventional crossover. The crossover line is suitable for MEM because the MEM individual consists of multi-vectors, and each vector has one crossover point. In MEM, crossover line passes through crossover points located in all vectors, as shown in Figure 3. The MEM crossover is carried out using the following steps.

MEM crossover operation.
Algorithm 2
Crossover for MEM
Step 1: Select two numbers between 0 and A(NI)as follows
and
Step 2: Find
Step 3: Select l number of crossover points, CPi,
Step 4: Exchange the genes after crossover line between the two individuals.
Mutation by MEM
The mutation of the proposed MEM is different because the gene expression adopts the matrix arrangement. Thus, the swap mutation applied to one vector in conventional method will now be applied to all rows of the MEM matrix. The functional characteristic of the mutation is to change the value of one gene for each row in individual. Mutation operation for the MEM is applied as follows:
Algorithm 3
Mutation for MEM
Step 1: Select one number between 0 and A(NI)as follows
Step 2: Find
Step 3: Select two genes in each of the individual vectors as follows
Step 4: Swap the location of the two genes in each vector.
Figure 4 shows the mutation graphically.

Swap mutation.
Fitness calculation
In order to evaluate the production system at a given routes, the number of parts that can be produced by a given time is calculated. To calculate the number of parts, the total time, Tp, which the product p spends during its trip through the FMS from the moment it leaves the load/unload station until it returns back to load/unload station is needed. The time required to produce a part of type p when it travels through route Rp can be calculated as follows
Based on equation (5), PSS calculates the throughput of the production system during the given production time.
PSS
To find the route of each part type that maximizes the throughput of the FMS, PSS and GA combination is proposed. The PSS structure is shown in Figure 5. PSS searches the route by repeating the cycle including the discrete simulation and applying the GA in each run of the simulation. The characteristics of the FMS model are entered into the PSS. Based on this input, the simulator gives the optimal or near-optimal route for given input. The PSS algorithm is applied using following steps:

Production simulator system.
Algorithm 4
PSS algorithm
Step 1: Generate randomly the initial population with N individuals.
Step 1: Generate POP(0) as follows:
Select
Step 2: Read all characteristics of the desired FMS.
Step 3: Calculate
Step 4: Select
Step 5: Calculate PRi,
Step 6: Carry out GA operations.
Step 7: If (Cr × NI + Mr × NI) = NI − s, then, continue to Step 8, if not, return to Step 6.
Step 8: Regard the generated individuals as the next-generation population.
Step 9: Repeat until fitness reaches its maximum value.
Case studies
Simulation examples
To show the efficacy of the proposed PSS, four different simulations have been performed. Each simulation is run to produce a specific number of products.
In each of the simulations, the number of machines, which are out of order, is changed. Three different numbers of machines, which are out of order, are used in each simulation condition. The route for each part type is decided for each of the given simulation conditions. In all simulations, the processing times and the setup times are randomly generated as follows: production times between 4 and 10 min, and setup times between 2 and 4 min.
Simulation 1: FMS with four machine tools
In this simulation run, the FMS has four machine tools and is capable of producing four different types of products with the following production ratios: P1:P2:P3:P4 = 8:5:3:1. Each of the four types requires four operations. The number of machines, which are out of order, used in the simulation is as follows:
Simulation 1—type 1 (S1T1): No machine is out of order.
Simulation 1—type 2 (S1T2): One machine is out of order and selected randomly.
Simulation 1—type 3 (S1T3): Two machines are out of order and selected randomly.
Simulation 2: FMS with six machine tools
In this simulation run, the FMS has six machine tools and is capable of producing six different types of products with the following production ratios: P1:P2:P3:P4:P5:P6 = 8:6:4:3:2:1. Each type of products requires four operations. The number of machines, which are out of order, used in the simulation is as follows:
Simulation 2—type 1 (S2T1): No machines are out of order and selected randomly.
Simulation 2—type 2 (S2T2): One machine is out of order and selected randomly.
Simulation 2—type 3 (S2T3): Three machines are out of order and selected randomly.
Simulation 3: FMS with 10 machine tools
For this simulation run, the FMS has 10 machine tools, and it is capable of producing eight different types of products with the following production ratios: P1:P2:P3:P4:P5:P6:P7:P8 = 8:7:6:5:4:3:2:1. Each type of products requires four operations. The numbers of machines, which are out of order, used in simulation are as follows:
Simulation 3—type 1 (S3T1): One machine is out of order and selected randomly.
Simulation 3—type 2 (S3T2): Three machines are out of order and selected randomly.
Simulation 3—type 3 (S3T3): Five machines are out of order and selected randomly.
Simulation 4: FMS with 16 machine tools
For simulation run 4, the FMS has 16 machine tools, and it is capable of producing 10 different types of products with the following production ratios: P1:P2:P3:P4:P5:P6:P7:P8:P9:P10 = 80:70:60:65:50:40:30:20:10:5. Each type of products requires four operations. The number of machines, which are out of order, used in the simulation run 4, is as follows:
Simulation 4—type 1 (S4T1): Two machines are out of order and selected randomly.
Simulation 4—type 2 (S4T2): Four machines are out of order and selected randomly.
Simulation 3—type 3 (S4T3): Six machines are out of order and selected randomly.
GA parameters
For the simulation of the route generation, the following GA parameters are selected based on the experience and after running several trials of the simulator.
Population size of 100, probability of crossover of 0.9, and probability of mutation of 0.05 are used. These parameters are applied to all simulation types. All simulations are run until 500 generations.
Simulations results
Based on the PSS results, the routes of all products type are optimized. The routes and the maximum fitness for the different types of simulations are given in Tables 1–4.
Results of Simulation 1.
Results of Simulation 2.
Results of Simulation 3.
Results of Simulation 4.
The fitness curve for the different simulation types are given in Figure 6(a)–(d).

(a) S1 fitness curves, (b) S2 fitness curves, (c) S3 fitness curves, and (d) S4 fitness curves.
Based on the results presented, it can be observed that there is always an increase in the fitness as the number of functional machines decreases. For example, in simulation run 3, the numbers of functional machines in the simulation type 1, type 2, and type 3 are 8, 6, and 4, respectively.
The maximum fitness values corresponding to the three simulation types are 7.3423E3, 9.1260E3, and 1.1253E4, respectively. Regarding the numbers of part types, the result shows that the increases in the part variety will result in more iteration to reach the optimum solution.
Conclusion
In this article, a PSS for flexible route optimization in FMS is presented. A FMS production simulator based on GA was developed. The FMS with following characteristics were studied: 4–16 machine tools with 4–10 part types. Unique genetic operations were applied. An MEM was introduced as a gene encoding method to express genes in individuals. Case studies based on numerical simulations for different productions cases showed that the proposed PSS and GA combination was efficient to optimize the flexible route of FMS. Moreover, the example shows that the optimum solution can be achieved by few numbers of iterations, thus saving time and computational power.
Footnotes
Appendix 1
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This project was financially supported by King Saud University, Vice Deanship of Research Chairs.
