Abstract
Optimizing flexible routing in flexible manufacturing systems is one of the aspects that increase the efficiency of flexible manufacturing systems especially in dynamic environment systems. This article presents a multistage approach to solve flexible routing problem in flexible manufacturing systems. Multistage approach includes three stages; the first stage is a production simulation system to find the fitness of the flexible manufacturing systems corresponding to different products’ routes’ groups. The second stage proposes an artificial neural network approach to predict the products’ routes’ group in flexible manufacturing systems. The last stage combines genetic algorithms and artificial neural network to optimize proper routes for all product types in flexible manufacturing systems. Multistage approach proposed in this study aims to reduce the computational time required to obtain and optimize the flexible routes in flexible manufacturing systems. The results of this study show that the artificial neural network can be used efficiently to predict the flexible routes in flexible manufacturing systems and it reduces the computational time for routes’ optimization required with production simulation system. This characteristic improves the flexibility of flexible manufacturing systems since it can be adapted frequently against any change in production ratios.
Introduction
Flexible manufacturing systems (FMS) are widely used for mass production processes in high-volume industries. The increase in the varieties of product types increases the need for optimizing the flexible routing in FMS especially in dynamic environment systems. The operations in FMS can be utilized three times more than the conventional systems. 1 Optimization of the flexible routing is one of the aspects that can increase the utilization of the operations in FMS.
Many research studied the scheduling problem in FMS and its response to change in demand requirements. Increasing the response to the change and reducing the inventories can be achieved by increasing the flexibility of product varieties in FMS. 2 Not only the flexibility problem but also many other decision-making problems related to FMS still need more focus and efforts from researchers and practitioners. 3 Furthermore, the flexibility in FMS for specific objectives is considered in most of the current literature. 4 Also, Tuncel 5 used Petri nets to model and analyze the shop-floor scheduling problem of FMSs. In FMS, even for simple breakdowns, scheduling problems are complex when an uncertain arrival of jobs and other dynamic uncertainties are considered. 6 FMS are extensively studied via many techniques and methods, and one of the popular and efficient one is genetic algorithm (GA).7–10 Due to the lack of algorithms to measure unreliable systems, most of the researcher considered the reliable system when optimizing the FMS.11,12 Different methods to evaluate a production system are available in a number of books and the review articles,2,13–21 among others.
Many rules have been developed to solve flexible routing problems. For example, Mahdavi et al. 1 used a fuzzy rule–based approach to investigate flexible routing in FMS. The study found appropriate route due to jobs which should be operated on the available machines in production line. Also, Chan 22 resented a framework based on a Taguchi experimental design to study the effects of different levels of routing flexibility on the FMS performance. Furthermore, Das and Caprihan 23 introduced a novel fuzzy-logic approach for measuring manufacturing flexibility of the whole system. Moreover, Wahab and Stoyan 24 proposed a dynamic approach to measure machine and routing flexibilities of the manufacturing systems. A linear program formulation for maximum throughput routing and scheduling problem was presented in Cogill and Hindi. 25 Flexibility situation for a hypothetical FMS was studied in Bilge et al. 26 In addition, the influence of route flexibility degree, open rate of operations, and production-type coefficient on make-span was discussed in Witkowski et al. 27 A new routing rules that are suitable for the situations in which sequence-dependent setup times exist in dynamic flexible job shop scheduling problem were developed by Shalaby et al. 28 Also, Wong et al. 29 introduced a joint production scheduling approach that considered multiple resources and preventive maintenance tasks. However, despite the many existing research studies for the flexible routing optimization, no previous study solved this kind of problem using the prediction model applied in this work. Moreover, the amalgamation of simulation, prediction, and optimization algorithm gives a sense of uniqueness to this approach.
In this article, a multistage approach (MSA) is proposed to solve flexible routing problem in FMS in less computational time. MSA applies through three stages. In the first stage, a production simulation system (PSS) is proposed. PSS generates a number of route groups for all product types in FMS and the fitness corresponding to each group is estimated. In the second stage, an artificial neural network (ANN) approach is applied to predict routes in FMS. The results of PSS are feed into the ANN and are used to train and validate the ANN. Then, the well-trained ANN can be applied promptly to predict the flexible routes in FMS. Finally, in the last stage, the well-known meta-heuristic technique GA is combined with an ANN to find the optimal or near-optimal routes for all product types in FMS. The PSS will run many simulations to generate a number of solutions of the products’ routes’ group in FMS.
The results of this study show that the MSA including the three-stage algorithm can be used as an efficient methodology to solve the flexible routing problem in FMS. The time required by ANN approach to predict the routes is very less when compared with the computational time required by the PSS. The advantage of the ANN prediction approach is the ability to decide proper routes in short time span. The MSA is applied to numerical application examples to demonstrate the applicability of the proposed approach to solve the FMS flexible routing problem efficaciously. The major benefit of using this approach is that it will provide efficient and accurate results in a lesser time period.
FMS model
The FMS considered in this article consists of

FMS model.
In the FMS model, it is assumed that the products enter and leave the FMS through load/unload station, and the loading and unloading time and the moving time of the pallet onto or from the AGV are defined. Also, one operation can be performed in each machine tool of FMS at a time. Tool changing time is included in processing time and all processes and setup times for all product types in all machine tools are known. Each machine is capable of performing different operations, but only one part can be processed at a time. Each machine stops randomly
Problem definition
The objective of this research is to find an optimal or near-optimal route for all part types produced in the FMS to maximize its throughput. A three-stage algorithm of MSA is utilized to find the efficient routes that achieve the maximum throughput of the FMS. The problem can be described mathematically in the following.
Stage 1
Stage 2
Stage 3
Methodology
The flow chart to apply the three-stage algorithm design is given in Figure 2. The three stages of MSA are described in the following sections.

Flow chart of routes’ searching algorithm.
Stage 1: building the PSS
In this stage, the PSS with preferred production conditions is built. PSS simulates several hours of production and finds the production throughput (fitness) of the production system. PSS is used to generate many groups of routes’ solutions and their corresponding fitness. The detailed algorithm of this stage is carried out using the following steps:
Step 1: read the FMS model characteristics
Step 2: randomly select one possible route for each product types
Step 3: find the throughput of an FMS based on the selected routes
Step 4: repeat Steps 3 and 4 to generate the required data to learn ANN
Stage 2: prediction of the flexible routing
To reduce the computational time for the routes’ determination required by the PSS, an ANN is proposed and applied. The ANN is simulated neurons’ interconnection with weights. It has the ability to learn association between data; in other words, it has an ability to learn the relationships between the inputs and outputs (cf. Figure 3) and to generalize those relationships to previously unseen data. The ANN transfers a known input pattern to an output pattern by adjusting the association weight. In this stage, the ANN is trained to predict the routes of all product types in an FMS. The algorithm of this stage is carried out using the following steps:
Step 1: construct the ANN structure
Step 2: train the ANN with some of the routes resulted by PSS in Stage 1
Step 3: validate the ANN by the rest of the routes

ANN flow chart.
Stage 3: optimization of the flexible routing
In this stage, the routes of all product types operating in the FMS are optimized by combining GA and ANN with the preferred production ratios of the parts. GA 31 is one of the well-known heuristic optimization methods. It finds the optimal solution based on natural selection and genetics principle.31,32 GA begins with an initial population including arbitrarily selected solutions known as individual. After determining the fitness of all individuals in the initial population, the next population can be generated by applying GA operations. The three basic operations of GA are selection, combination, and mutation. The application of the three basics operators results in new offspring better than their parents. The algorithm stops when the optimum offspring that represents the solution to the problem is obtained. Figure 4 shows the GA’s outline. GA has been applied to many optimization problems and provides efficient results.33–37

GA outline.
In this study, GA based on the routes predicted by ANN is repeated to find the optimal solution. The detailed algorithm of this stage including the GA and ANN is carried out using the following steps:
Step 1: generate the initial population
where
Step 2: run the ANN to
Step 3: calculate
Step 4: calculate
Step 5: apply the GA operation Step 5.1: encode the product routes using matrix encoding method.
38
Each row in the matrix represents one product type route, and the number of items in each row depends on the number of operations of the product that follow that route. Equation (4) illustrates an example of the individual’s encoding
Step 5.2: apply elitist strategy to select Step 5.3: select two individuals Step 5.4: repeat Step 5.3 to generate Step 5.5: select an individual Step 5.6: repeat Step 5.5 to generate
Step 6: repeat Steps 2–5 to reach the maximum fitness value and set the individual of this fitness as the optimal flexible routes.

Crossover operations.

Mutation operation.
Case studies
To show the efficacy of the proposed methodology, the three-stage algorithm of the MSA is applied to two numerical examples.
Numerical Example 1:(3M,3P,3O)
In this example, an FMS with three machine tools is considered. The FMS has the capability of producing three different product types with the following production ratios, P1:P2:P3 = 4:2:1. Each of the product types requires three operations. The processing times and the setup times for each part on each machine are selected randomly between 3 and 7 min. The three-stage algorithm of MSA described in section “Problem definition” is applied to search the routes. The PSS is applied to find the throughput (fitness) of 500 randomly generate group routes for all product types. The neural network toolbox in MATLAB 7.0 is then used to build the ANN model. The three layers of neural network are developed with a sigmoid activation function between the layers given in equation (5)
The input layer consists of nine input neurons (three routes with three stations in each route). By trial and error around
Among the 500 groups and their corresponding fitness obtained from PSS, 70% of the data are used as the training group and 15% for both testing and validation. Then the ANN is applied to find the relationships between the inputs (routes) and the outputs (fitness). The GA parameters are selected based on the guidelines presented by Alajmi and Wright 30 and after some trial and error. The selected GA parameters are as follows: population size of 100 individuals, crossover rate of 0.8, and mutation rate of 0.05.
Numerical Example 2: (8M,4P,10O)
In this example, an FMS with eight machine tools is considered. The FMS has the capability of producing four different product types with the following production ratios, P1:P2:P3:P4 = 8:5:3:1. Each of these types requires 10 operations. The processing times and the setup times for each part on each machine are selected randomly for this example as follows. Production times are randomly generated between 4 and 10 min, and setup times between 2 and 4 min. Similar to the previous numerical example, the PSS is applied to find the throughput (fitness) of 500 randomly generated group routes for all product types. The neural network toolbox in MATLAB 7.0 is then used to build the ANN model. The input layer consists of 40 inputs neurons (four routes with 10 operations in each route). Eighteen neurons’ hidden layers are used which minimized the training error. The output is the throughput of the FMS. Then the ANN is applied to find the relationships between the inputs (routes) and the outputs (fitness). ANN used 15% of data for both testing and validation. The GA parameters are similar to those mentioned in Example 1.
Results and discussion
The production simulations have been performed for the two examples with the characteristics described above. The production simulations were simulated for several hours of production, and it finds the production throughput (fitness) corresponding to the flexible routes. Then, ANN is trained with the input, hidden, and output layers of 9, 7, and 1, respectively. The ANN parameters including learning rate, number of iteration, and MU are 0.01, 82 and 0.001, respectively. ANN finds the relationships between the inputs (routes) and the outputs (throughput) within few seconds. The regression analyses of ANN for the two examples are shown in Figures 7 and 8.

Regression analyses of ANN for Example 1.

Regression analyses of ANN for Example 2.
The comparison between some routes and its corresponding fitness for the ANN approach and the PSS for the above two examples are presented in Tables 1 and 2.
Comparison among the fitness predicted by ANN and those obtained from PSS.
PSS: production simulation system; ANN: artificial neural network.
Comparison among the fitness predicted by ANN and those obtained from PSS of Example 2.
PSS: production simulation system; ANN: artificial neural network.
The routes that achieve the best fitness optimized by the MSA are shown in Table 3.
Optimal routes and the best fitness for the two examples obtained by MSA.
To show the improvement that was achieved by the proposed system, the best fitness of 8344.8 and 23,798 achieved by GA in the two examples are compared with the fitness of the initial population of 3827.4 and 12,360. It is revealed that the improvements were 118% and 93% for Examples 1 and 2, respectively.
Conclusion
In this article, we presented an MSA to find proper routes for all product types in an FMS. The MSA unified different domains’ algorithm to solve accurately and efficiently, and in lesser time, the problem of flexible routing in an FMS. PSS generated a set of routes’ groups that were used to train ANN to predict the FMS efficiency based on each of the route group. The trained ANNs were then used instead of a simulation system to find fitness of the FMS at a given routes’ group. Finally, the ANN is combined with GA to find the optimal routes’ group. Unique genetic operations were applied for efficient usage of GA. By this way, a long simulation time required by the simulation can be eliminated. The numerical simulations for different production cases showed that the results of the simulation and the trained ANN approach are close to each other and prediction approach can be used efficiently instead of the simulation.
Footnotes
Appendix 1
Academic Editor: Jiacun Wang
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.
