Ant colony optimization for Cuckoo Search algorithm for permutation flow shop scheduling problem

ABSTRACT A Cuckoo Search (CS) algorithm based on ant colony algorithm is proposed for scheduling problem in permutation flow shop scheduling problem (PFSP). When the raised CS algorithm obtains the position of the bird nest to be updated, it is used as a set of initial solution of the ant colony optimization algorithm (ACO), and ACO algorithm search optimization is performed in a very small range. After that, the solution obtained by the ACO search is taken as a new candidate solution, compared with the candidate bird nest according to the fitness degree. When the candidate solution of the ACO search optimization is better than the one generated by the Lévy flight, the latter is replaced. Finally, the CS algorithm is selected, changing the new bird nest position according to the abandonment probability. The updated position tends to be more optimal, which improves the quality of the solution as well as the convergence speed and accuracy of the algorithm. Comparing the performance of the proposed algorithm with the standard Cuckoo one, by testing function, the optimized performance was verified. Finally, the Car benchmark test served as test data, and the performance in the PFSP was compared. The effectiveness and superiority in the algorithm in solving problem were confirmed.


Introduction
The permutation flow shop scheduling problem (PFSP), based on constraint of the scheduling problem, further increases the constrained scheduling problem that all workpieces have the same processing order in any machine, which effectively enhances the enterprises' efficiency (Fernandez-Viagas & Framinan, 2017). Although the process constraint of PFPS is relatively simple, it has confirmed in flexible manufacturing industry that PFSP enjoys more than three machines participating in the production process, which is a typical NP-complete problem, and there is no overall optimization algorithm with polynomial computational complexity (Garey, Johnson, & Sethi, 1976). The methods solved PFSP mainly include the algorithms of exactness, heuristic and intelligence (Xiangbo, Yunlong, & Dingyi, 2017). The first one has much computational complexity and is only suitable for small-scale problems. Then, the second one can construct a solution in short time according to the characteristics of the problem, but it is difficult to guarantee solution's quality. Finally, with the development of computational intelligence, the third one to address PFSP is widely studied, including genetic algorithm (Abedinnia, Glock, & Brill, 2016), particle swarm optimization (PSO; Wanab, 2013), CONTACT Lieping Zhang zlp_gx_gl@163.com differential evolution (Coelho, Ayala, & Mariani, 2014), Cuckoo (Xu, Ye, & School, 2015) and various hybrid algorithms (Zobolas, Tarantilis, & Ioannou, 2009). The Cuckoo Search (CS) belongs to an emerging heuristic algorithm put forward by Professor Xin She Yang and Professor S. Deb (2010) of Cambridge University in 2009. It aims at handling the problem of actually complex optimization by simulating the Lévy flight patterns of brooding behaviour of cuckoos, albatrosses and fruit flies. Due to its simple model, less adjustable parameters and fast convergence speed, CS algorithm has been widely used in various development fields such as artificial intelligence, industrial scheduling, commercial optimization and neural network in recent years (Shehab, Khader, & Al-Betar, 2017). In the iterative process of the standard CS algorithm, the exploration process of Cuckoo's Optimization and the update formula of new bird nest position are implemented by Lévy random flight strategy. The random jump property of Lévy flight can increase the global search ability allowing for algorithm. Lévy flight is applied to the location update strategy of migration operator to obtain a new bird nest position, which can get rid of the local optimal solution and prevent the algorithm search process from being too premature. At the same time, the random update of bird nest position can also advance the algorithm's population diversity. However, on the other hand, because of the overall position, the update position cannot step towards the optimal way as the iterative algorithm progresses, which will cause the algorithm's optimization process to converge slowly, especially in the vicinity of the optimal solution. The search efficiency will be very low, which may make the population oscillate back and forth in the vicinity of the optimal solution, jump and cannot converge, and even lost phenomenon. Luus and other scholars pointed out that an algorithm cannot achieve the best results between the search ranges and results. Generally, the local search algorithm can be mixed to effectively promote the capability of the algorithm (Luus & Jaakola, 2010). Based on these factors, many scholars have raised various improvements for the CS algorithm. For example, Amirhossein et al. came up with the PSO algorithm to boost the all performance of the Cuckoo algorithm. Hybrid algorithm of PSO and CS (Ghodrati & Lotfi, 2012) and Jiang, Qi, Meiling, and Zhang (2014) put forward a separate local search strategy in the optimization process before entering the next iteration. Nie, Liu, Wei, and Yang (2013) worked out a concept of introducing elite individuals, local search strategy for elite individuals and the aging mechanism of leaders. Besides, Yin, Qiu, and Gao (2018) proposed a meta-heuristic algorithm based on GA and CS algorithm to solve the problem of gene expression data cluster. Chen, Yu, Zhou, and Meng (2018) presented the CS algorithm combined with Broyden Fletcher-Goldfarb-Shanno (BFGS) algorithm (CS-BFGS) to identify time-dependent boundary conditions for 2-D transient heat conduction problems in functional gradient materials. And Binh, Hanh, Quan, and Dey (2016) came up with ways to shorten the computation time and stability of NP problem by two nature-based algorithms, namely Improved Cuckoo Search and Chaotic Flower Pollination algorithm. Moreover, Faris, Sheta, and Öznergiz (2016) presented a new hybrid approach on the basis of multigene genetic programming and CS algorithms for developing three rigorous models for roll force, torque and slab temperature in the hot rolling industrial process at the Ereg˜li Iron and Steel Factory in Turkey.
The ant colony optimization algorithm (ACO) is a kind of swarm intelligence optimization algorithm put forward by Italian learner M. Dorigo and others to observe the foraging behaviour of ants in nature (He, Chen, & Zhao, 2006). The ACO has many advantages, such as strong robustness, good local optimization, global search performance, parallel computing and easy to combine with other optimization methods (Sóbester & Forrester, 2010). Cao, Zhang, Guan, and Zhou (2018) proposed a quantum-inspired ACO algorithm that integrates ACO and quantum computing to predict the links in networks. Patil and Kadwane (2018) raised ACO built on hybrid algorithm for selective harmonic elimination in single phase of seven levels in multilevel inverter with reduced switches. The time depended vehicle routing problem with time windows is considered. A multi-type ant system algorithm hybridized with ant colony system and max-min ant system algorithms is brought forward (Deng, Zhu, Li, & Zheng, 2018). Chebli, Elakkary, and Sefiani (2018) used a multi-criterion ACO based on Pareto optimality to give the conflict character of closed-loop system performance parameters.
Aiming at the shortcomings of standard CS algorithm, this paper proposes a CS based on ACO. The algorithm utilizes ACO algorithm to optimize the position update strategy of CS, making the candidate solution evolve towards the optimal one with the iteration, so as to address the problems of slow convergence speed and low convergence precision caused by the random position update of CS algorithm. On this basis, the algorithm is applied to settle the optimization design problem of PFSP, and the effectiveness of the proposed algorithm is verified by Car benchmark class.

Mathematical description of PFSP
The basic process of PFSP can be described as follows (Wanliang & Qidi, 2007): n components are processed on m sets of equipment. Each component needs to go through K process steps. The time, spent by component i to complete this process on device j, is fixed, assuming that it is t ij (i = 1, 2, . . . , n). The problem to be solved in scheduling is to give an optimal sequence of process elements for the component process flow, so that the whole process takes the shortest time. In PFSP, it is impossible to have only one rather than many components to process and it is not unique. In other words, it needs to be processed separately by different equipment. Each process demands to be processed on different equipment, and the processing time spent on different equipment is also different. It can be seen that taking different component processing sequences on the device for the same production process leads to different results, and they are so different.
General PFSP satisfies the following specific conditions: (1) pipelined processing of n components on M device; (2) all components in the processing sequence are the same; (3) the sequence of components processed by each device is the same; (4) the preparation and processing time of all components consumed on all devices is known in advance; and (5) all equipment can only process one component when machining. The goal of solving PFSP is to find the optimal scheduling scheme under the five specific conditions mentioned above, even if is the shortest during the whole process.
If the criterion of scheduling is the maximum completion time, this PFSP problem can be described by the triple method of scheduling, that is, F m |prmu|C max . Among them, F m refers to the flow shop scheduling model with m equipment; and prmu, referring to the processing sequence of each component on any equipment, is consistent; C max indicates that the maximum time of the entire production process; let t jk,i be the processing time that component j k spends in device i (the reserve time of each component is stipulated to be included in the processing time); C jk,i is the completion time of component j k on device i; and π ∈ { |(j 1 , j 1 , . . . , j n )} is the processing order of components; while represents the total set of sequential sequence of all components. For the component processing, the following constraints are set: the process of component processing cannot be interrupted or abandoned; each equipment is unique; and each component is unique. By setting all components to be processed in the order of device 1 ∼ m, the following formulae can be used to calculate the completion time of each component on each device (Yanfeng, 2012). That is: According to them, Formulae (1)-(3) are the recursive equations for calculating the completion time; Formula (4) is the maximum completion time of the batch of jobs; Formula (5) is the optimal scheduling scheme for minimizing the maximum completion time; while n and m respectively indicate the number of components and devices. The scheduling process is shown in Figure 1.

Standard Cuckoo algorithm
The standard CS algorithm is inspired by the behaviour of cuckoo breeding. It simulates the process of CS for bird nest and laying eggs in nature by introducing the Lévy flight mechanism of birds, which belongs to the global intelligent optimization algorithm. Yang and Deb proposed three ideal states of the algorithm (Johnzén, 2014): (1) The cuckoo only has one egg in each generation's reproduction process, and randomly chooses a bird nest to hatch. (2) Before finding a better bird nest, the current best bird nest will be used as the next generation's host to enter the next breeding.
(3) The total number of bird nests available for each generation is constant, and it is probable that the eggs laid by cuckoo are found by the host as P a . If the bird's eggs are perceived by the host who will give up them or the entire bird nest and find a suitable location to build other new bird nest.
Among them, P a means that host eggs maybe not their children, P a ∈ [0, 1], to which most of the researchers set it as 0.25 (Naik, Nath, Wunnava, Sahany, & Panda, 2015).
Standard CS algorithm realizes that the search of cuckoo bird nest is simulated by three basic processes: candidate population generation, selection and random migration. In terms of the above three ideal states, the cuckoo flight finding route and position in the algorithm generate candidate populations by the following formula: In the (6), X t+1 i and X t i respectively refer the position vectors of the bird nest of i(i = 1,2, . . . , n, n is the bird nest number) in the t + 1 and t generation ( d is the dimension of each bird nest; and j represents any j dimension, j = 1,2, . . . , d; as k serves as algorithm algebra; t = 1,2, . . . t c , t c are algebras for convergence of algorithms); α represents step length factor, which is used to control the range of random search, a constant greater than zero, and it can take different values for different situations; ⊕ is the pointto-point multiplication; L(β) indicates the random search route of Lévy flight; α ⊕ L(β) refers to the flight step of Lévy flight, representing the flying distance from all bird nests (feasible solutions) of generation i to i + 1 by Lévy random distribution.
The relationship between the random optimization circuit and time t of Lévy flight obeys the Lévy probability distribution as shown in formula (7), where β is a power co-efficiency and μ is a random number with normal distribution. Formula (7) shows that the optimal path of CS algorithm is composed of frequent short jumps and occasional long jumps. This optimization method can make the algorithm obtain greater search space and more easily jump out of the local optimum.
In order to practice the CS algorithm, the literature Cuckoo Search (CS) via Lévy Flights method is used to simulate the flight path of Levy(β) flight. That is the step length, as shown in the following formula:

Improvement and implementation of standard CS algorithm
The proposed algorithm uses ACO algorithm to optimize the position updating strategy of CS algorithm, and improves the quality of candidate solutions generated by Lévy flight through the local search ability of ACO algorithm, so that the candidate solutions can evolve in the direction of optimal solution with iteration. When the CS algorithm finds that the optimal solution is every iterated, in other words, when Lévy flight is to obtain the bird nest position to be updated, it is introduced as a set of initial solutions into the ACO search algorithm as well as the initial one of the ACO algorithm. The ACO algorithm is searched within an very small range, and the solution obtained from this search is regarded as a new candidate solution. According to the fitness comparison with the candidate bird nest generated by Lévy flight, the preferred operator is executed again. When the candidate solution of ACO search is better than the one generated by Lévy flight, it is replaced. Then the CS algorithm is used to choose the optimal operator and the position is substituted in light of the abandonment probability P a . By selecting the candidate solution, the quality of the solution is improved, and the updated position tends to be closer to the optimal solution. Thus, the search performance of the algorithm gets improved, and the convergence speed and precision of the CS algorithm are also improved.
For ensuring the searching performance of ACOCS algorithm after fusion, it is important to prevent the searching process of ACO algorithm from being too long and improve the quality of Lévy flight candidate solution effectively. This paper proposes Formula (9) as the searching radius of ACO algorithm in the range of feasible solution. At the same time, the solution set of CS algorithm is taken as the initial solution of ACO algorithm, and the optimization process is carried out in the search area with the radius d t of the initial solution as the centre.
In (9), d i refers to the search radius of ACO algorithm in generation i; n worst indicates to the current worst bird nest location; while n best is the current best one. In line with the idea of improvement, the specific implementation process of the algorithm can be described as Figure 2.

Setting up simulation environment and parameter
The simulation test environment of this paper contains: Windows 10 operating system, Inter Core CPU T6400 2.10 GHz, 2.00 GB memory, MATLAB 2014b simulation software. The test algorithm is standard CS algorithm and the ACOCS algorithm put forward in this paper. The initial number of birds is N = 25, the initial set abandonment probability is P a = 0.25, and the step factor is α = 1. The end condition of the algorithm is the number of searches T max = 3000 or the precision of the optimal solution reaches the error limitation. Test with six common test functions is shown in Table 1, and the basic features of the six common test functions are shown in Table 2.

Improved algorithm simulation and result analysis
The minimum, maximum, average and variance of dimension 5 and 15 optimization results were used as −15 ≤ x i ≤ 30, i = 1, 2, ..., n x* = (0,···,0) f (x*) = 0 Griewank −600 ≤ x i ≤ 600, i = 1, 2, ..., n x* = (0,···,0) f (x*) = 0 Rastrigrin −10 ≤ x i ≤ 10, i = 1, 2, ..., n x* = (1,···,1) f (x*) = 0 Rosenbrock −5.12 ≤ x i ≤ 5.12, i = 1, 2, L, n x* = (0,···,0) f (x*) = 0 Schwefel −5.12 ≤ x i ≤ 5.12, i = 1, 2, ..., n x* = (0,···,0) f (x*) = 0 Sphere −10 ≤ x i ≤ 10, i = 1,2, ...,n x* = (0,···,0) f (x*) = 0 performance evaluation indexes to compare the performance of CS and ACOCS. The simulation results are shown in Table 3. The performance indicators in the table are the average values of the algorithm running 30 times separately. Seen from Table 3, all the optimization data of ACOCS algorithm are better than those of CS algorithm whether the dimension is 5 or 15. At the same time, it can be seen that both CS algorithm and ACOCS algorithm can completely converge at the end of the number of times when the dimension N = 5, but the convergence speed of ACOCS algorithm is faster than CS. algorithm, and the quality of the optimal solution is better than CS algorithm. When the dimension N = 15, the CS algorithm can completely converge except when the Griewank and Schwefel test functions were used, the other four test functions cannot achieve fully convergence, and each function of ACOCS algorithm can totally converge. Therefore, compared with CS algorithm, ACOCS algorithm can find that the optimal solution is faster and its quality is better. Especially for complicated functions, ACOCS search performance is significantly better than CS.

Solution algorithm coding
As the solution space of PFSP belongs to the discrete distribution, CS algorithm is generally used in continuous optimization problems. In order to use the improved CS algorithm to solve the PFSP and obtain the optimal scheduling scheme in the production process, a reasonable coding method is needed to represent the scheduling problem, that is, the sequential combination of shop scheduling. In view of the characteristics of PFSP, this paper selects random key coding method with ascending order principle (Tasgetirena, Sevkli, & Gencyilmaz, 2007). Unifying the cuckoo's continuous position vector X i = [x i,1 , x i,2 , . . . , x i,n ] in the search for bird nest and the components' processing procedure π = (j 1 , j 2 , . . . , j n ) on all equipment in the production process, some certain dimension vector of each bird nest position represents a process in the component processing. The nest position is made up of n-dimension vector representing the processing order of a group of components in all devices. Such a position directly manifests a group of scheduling methods. In accordance with this encoding method, the corresponding scheduling solution can be calculated by counting the fitness of bird nest. Meanwhile, the coding method based on this multidimensional vector procedure is compatible with CS algorithm structure, which can avoid modifying the evolution operator of CS algorithm because of the coding method of scheduling problem.

Solving algorithm implementation process
Based on the mathematical model of PFSP and the proposed coding method, the implementation process of PFSP based on ACOCS algorithm is as follows: Step 1: Setting parameters and population initialization; setting the population size popnum, step factor α, discovery probability P a , the maximum number of iterations N max , and then initialize the population according to the attributes of the problem.
Step 2: The cuckoo randomly picks the bird nest location X i (i = 1, 2, . . . , m), and computes the fitness of each bird nest (scheduling scheme) on the basis of the given encoding method to the order of component processing to find the best bird nest location X * .
Step 3: Candidate population is generated based on step size. In Formula (6), if the offspring exceeds the constraint range of the problem, the invalid solution should be handle properly.
Step 4: Adopting one-to-one selection strategy, selecting the fitness individuals from the parent and offspring as the parents of the next generation.
Step 5: Executing the random migration operator. From the updated population of step 5, a certain number of inferior h bodies are selected to prepare mutations in line with probability Pa.
Step 6: Lévy flight is used to randomly determine the candidate bird nest location for the ill-fitted bird nest location in Step 5.
Step 7: The candidate bird nest location is searched locally by ACO algorithm, which is chose according to the fitness, in which the bird nest is retained as the new candidate bird nest location.
Step 8: Choosing the best choice operator again. For the individuals who perform mutation operations, compared the fitness of the mutated individuals with that of the bird nest individuals is to update. If the mutated individuals have higher fitness after mutation, they will be concluded in the population. Otherwise, the individuals before mutation will be retained and step 3 will be jumped.
Step 9: Turning to step 10 when the maximum number of searches is reached, otherwise turning to step 3 for the next round of search.
Step 10: Algorithm outputs the best solution and its scheduling plan.

Scheduling simulation experiment and result analysis
To achieve the abundant benchmark data of PFSP, this paper will use 8 operators Car1,Car2, ...,Car8 of Car benchmark instance class as experimental data to test. The common evaluation indexes in Car benchmark class are BRE (best relative error), ARE (average relative error), WRE (worst relative error), SR (success rate) and RE (relative error), which are expressed as the following formulae (Carlier, 1978): Among these formulas, C max is the minimum maximum completion time of the scheme found by the algorithm; and C * is the lower bound of the problem.
The parameters of the two algorithms for comparison are the initial discovery probability P a of the standard CS algorithm is 0.25, i.e. the probability of the bird's bird nest being abandoned is 0.75; the step factor is α = 1; The initial discovery probability P a of the ACOCS algorithm refers to 0.25; the population number of each algorithm is set as popnum = 15; the maximum number of iterations T max = 1000; P is the type of Car; C * is the corresponding problem. In the minimum completion time, n is the number of components involved in the process, and m is the number of devices. Each algorithm repeats 30 times to optimize. The simulation results are shown in Table 4.
With regard to the experimental results in Table 4, ACOCS algorithm can find the best solution each time in the Car benchmark class of the two algorithms, and the search process is faster than CS algorithm, reflecting that ACOCS algorithm has good global search performance. Besides, according to ARE and BRE data, ACOCS algorithm is also higher than CS algorithm in the quality of the solution. It can be seen that the efficiency of CS algorithm is effectively improved after local search of candidate solutions of CS algorithm through ACO algorithm.

Conclusion
Aiming at addressing the problem of the quality of candidate solutions produced by the randomness of CS algorithm location update strategy, a CS algorithm based on ACO optimization is proposed, which utilizes ACO algorithm with strong local search ability to re-optimize the new candidate solution before CS algorithm generating its replacement evolution, so that the candidate solution moves towards optimal solution. The simulation results of six test functions show that the quality of candidate solutions generated by this algorithm is higher than that of CS algorithm, which can enhance the convergence speed and accuracy of CS algorithm. From this, the ACOCS algorithm is applied to the PFSP solution. The ascending order random key coding method is used to realize the PFSP solution coding while the Car benchmark class is used to test the PFSP solution. The test data show that the scheduling performance of the ACOCS algorithm is better than that of the standard CS algorithm. The number of parameters of CS algorithm is relatively small. In this paper, the selection of appropriate parameters is based on empirical values. How to formulate appropriate parameters and selection methods to expand the application scope of the algorithm to reduce its limitations on specific problems is what we need to further study.

Disclosure statement
No potential conflict of interest was reported by the authors.