Solving No-Wait Flow Shop Scheduling Problem Based on Discrete Wolf Pack Algorithm

Aiming at the no-wait flow shop scheduling problem with the goal of minimizing the maximum makespan, a discrete wolf pack algorithm has been proposed. First, the methods for solving the no-wait flow shop scheduling problem and the application research of the wolf pack algorithm were summarized, and it was pointed out that there was lack of research on the application of the wolf pack algorithm to solve the no-wait flow shop scheduling problem. According to the analysis of characteristics of the nowait flow shop scheduling problem, the individual wolf was coded by a decimal integer; wolf searching behavior was realized through the exchange of different code bits in the individual wolf, and the continuous code segment of the head wolf was randomly selected to replace the corresponding code of the fierce wolf, by which the behaviors of wolves raiding and sieging were realized, and the population was updated according to the rule of “survival of the strong.” In particular, to fully explore the potential optimal solution in the solution space, loop operations were added to the wandering, summoning, and siege processes. Finally, based on a comparison with the leapfrog algorithm and the genetic algorithm, the effectiveness of the algorithm was verified.


Introduction
Production scheduling is a key link to ensure the efficient and orderly development of the manufacturing process. It is an important way to quickly respond to customer needs, improve corporate economic efficiency, and maintain market competitiveness. Research on scheduling issues has important theoretical and practical significance in the current intelligent manufacturing context. e no-wait flow shop scheduling problem (NWFSP) is a very important type of scheduling problem, which widely exists in food processing, chemical, metallurgy, and pharmaceutical industries, and is also a typical NP-hard problem [1]. Based on the inspiration of the marvelous group phenomenon in nature, researchers have now proposed many effective swarm intelligence optimization algorithms to solve this problem, such as genetic algorithm [2], particle swarm algorithm [3], ant colony algorithm [4], etc. e development of swarm intelligence optimization algorithms is in the ascendant, providing many options for solving complex optimization problems. e wolf pack algorithm (WPA) is a group intelligence optimization algorithm obtained by simulating the hunting activities of the wolf pack. It has the advantages of strong global search ability, good generalization ability, and easy operation. It has significant effect on processing multipeak and high-dimensional complex functions, especially, WPA is suitable for solving various complex combinatorial optimization problems, such as TSP and knapsack problem. [5]. However, currently, there are few research reports on the application of the wolf pack algorithm to the NWFSP. To this end, this paper combines the implementation process of the wolf pack algorithm and the feature analysis of NWFSP and proposes an improved discrete wolf pack algorithm and proves its effectiveness through a practical example and comparison with the leapfrog algorithm (LFA) and the genetic algorithm (GA). e remainder of this paper is organized as follows. In Section 2, a state-of-the-art about method for solving the nowait flow shop scheduling problem and wolf pack algorithm is provided. In Section 3, the mathematical model of the no-wait flow shop scheduling problem is described. In Section 4, the proposed improved discrete wolf pack algorithm and the corresponding algorithm process are illustrated in detail. In Section 5, a case study and comparison with particle swarm algorithm and genetic algorithm are carried out to verify the effectiveness of the proposed algorithm. Finally, the conclusion and future research directions are pointed out in Section 6.

Research Status
Focusing on the research of discrete wolf pack algorithm for solving no-wait flow shop scheduling problem, this section focuses on the literature review from two aspects: the method for solving the no-wait flow shop scheduling problem and the application of wolf pack algorithm.

Research on Methods for Solving No-Wait Flow Shop Scheduling Problem.
e no-wait flow shop scheduling model is mainly aimed at the production processes that cannot be interrupted, such as steel rolling, food production, and so on. is model has a wide range of applications and is difficult to solve. It has attracted the attention and in-depth research of many experts and scholars, such as Song et al. [6] proposed a neighborhood iterative search algorithm for NWFSP, which reduced the time complexity of the solution process and enhanced the ability to find the global optimal solution. Zhang and Yu [7] aimed at the NWFSP with makespan minimization and proposed a discrete fruit fly optimization algorithm based on the dominant population. Orhan and Abdullah [8] aimed at the non-wait flow shop scheduling problem with makespan minimization as the criterion, and proposed a new hybrid ant colony algorithm based on crossover and mutation mechanism, and the performance of the algorithm was compared with adaptive learning methods and genetic heuristic algorithms; Zhao et al. [9] used hybrid biogeographic optimization algorithm and variable neighborhood search algorithm comprehensively to solve NWFSP. Allahverdi [10] carried out a systematic review of no-wait flow scheduling problems.

Research on Wolf Pack Algorithm.
Wolves are a highly social species with a strict hierarchy and strong domain awareness. Wolves are usually led by the head wolves with absolute superiority. ey kill the prey through a clear division of labor and cooperation among members and distribute food according to the "survival of the strong" rule. Liu et al. [11] simulated the intelligent hunting behavior of wolves, abstracted the three behaviors of searching for prey, besieging prey, and updating wolves, and proposed the wolf colony algorithm (WCA) in 2011 to solve the optimization problem. e main processes included assigning artificial wolves from wolves to search prey within the range of prey activities. Once the prey was found, other artificial wolves will be notified of the position of the prey by howling, and other artificial wolves will approach the prey to encircle. e WCA mainly included five steps: initialization, selection of wolves to detect prey, treating the optimal position of some artificial wolf as the position of the prey, updating the wolf pack according to the "survival of the strong" rule, and judging whether the termination condition was met.
Based on the analysis of the characteristics of wolf pack cooperative hunting and prey distribution, Wu et al. [5] abstracted 3 kinds of artificial wolves (head wolf, searching wolf, fierce wolf ), 3 kinds of intelligent behaviors (wandering, summoning, siege), and 2 kinds of intelligent rules (wolf generation rule "winner is king" and wolf pack update mechanism "survival of the strong"), and proposed the wolf pack algorithm (WPA) with different optimization strategy compared with WCA in 2013. e convergence of the algorithm was proved based on Markov chain theory, and the comparison with other algorithms verified that the algorithm had better global convergence and computational robustness. Based on WPA, Hui et al. [12] proposed an improved wolf pack algorithm in 2017 by the introduction of the concept of siege radius and optimization of step length and design the position update formula of fierce wolves. Based on the research of grey wolf hunting behavior [13], Mirjalili et al. [14] proposed a new meta-inspiration algorithm-grey wolf algorithm (GWA) in 2014, which simulated the leadership hierarchy and the hunting mechanism of grey wolf groups in nature, abstracted 4 grey wolf levels and 3 main steps of hunting, namely searching, encircling, and attacking prey, and finally compared with particle swarm optimization and some meta-heuristic algorithms such as gravity search, differential evolution, evolution planning and evolution strategy to verify the effectiveness of the algorithm. e wolf pack algorithm has good performance in global search and local development capabilities. Since its proposal, it has continuously attracted the attention of scholars and has been quickly applied to engineering practice. Yi et al. [15] proposed a hierarchic wolf pack algorithm to solve the problem of optimal placement of sensors; Wu et al. used the wolf pack algorithm to solve the binary knapsack problem [16], the traveling salesman problem [17], and unconstrained global optimization problem [18]. Fang and Tang [19] used an improved wolf pack algorithm to solve the three-dimensional routing optimization problem for AVE/RS composite operation. Liu et al. [20] used the wolf pack algorithm to plan the UAV track with a known starting point and endpoint. Wang and Jiao [21] proposed an improved wolf pack algorithm to solve the optimal scheduling problem of hydropower stations and reservoirs. Xie and Zhang [22] proposed a discrete wolf pack algorithm according to the characteristics of the permutation flow shop scheduling problem.
It was found from the research review that compared with some other algorithms such as particle swarm algorithm, dynamic programming algorithm, et al., the wolf pack algorithm had shown stronger optimization ability and faster convergence speed in the process of solving a combinatorial optimization problem. However, aiming at the typical combinatorial optimization problem, the no-wait flow shop scheduling problem, the application research of the wolf pack algorithm was relatively lacking. To this end, an improved discrete wolf pack algorithm was proposed in this paper to solve the no-wait flow shop scheduling problem. 2 Scientific Programming

Mathematical Model of NWFSP
e no-wait flow shop scheduling problem can be described as follows [3].
Given: (1) m machines and n workpieces. (2) e processing sequence of the workpieces on the machines is the same. (3) e processing time of each workpiece on each machine. (4) All workpieces can be processed at zero time. Constraints: (1) A workpiece can only be processed on one machine at a certain time. (2) A machine can only process one workpiece at a certain time. (3) e transportation time of the workpiece and the start-up time of the machine is included in processing time. (4) All processes of the same workpiece must be processed continuously, that is, once each workpiece starts to be processed, each process must be performed continuously, and there is no waiting time between two adjacent processes. Goal: To determine a scheduling plan that minimizes the maximum makespan. Based on the literature [23], assuming that the processing time of the workpiece i on the machine k is p i,k , according to the continuous production requirement, the difference between the start time of two adjacent workpieces i − 1 and i (start processing time interval) d i-1,i shall meet the following requirement, as shown in (1): e maximum makespan is calculated as: According to the analysis, the calculation complexity of the maximum makespan is O(mn 2 ).

Improved Discrete Wolf Pack Algorithm
e wolf pack algorithm realized the whole process simulation of the searching of prey and environmental information detection by individual wolves, the sharing and interaction of information between artificial wolves, and the whole process of artificial wolf capturing prey based on individual behavior decisions of their own responsibilities. Wolf pack algorithm [5] consists of three intelligent behaviors of wandering, summoning, and besieging, and the "winner is king" rule of wolf competition, and the "survival of the strong" wolf pack update mechanism. Based on the discrete wolf pack algorithm for solving the TSP problem proposed by Wu et al. [17], in view of the characteristics of NWFSP, this section introduces the population initialization, intelligent behaviors, and rule description of the improved discrete wolf pack algorithm in detail.

Coding Rules and Population
Initialization. NWFSP is a typical discrete combinatorial optimization problem. According to the characteristics of the problem, the decimal encoding method is adopted, that is, each workpiece is represented by a decimal integer, and all the workpieces are processed on the machine according to the predetermined process.
e processing sequence of all the workpieces constitutes a decimal sequence X i � (x i1 , x i2 , . . ., x ij , . . ., x in ), which is used to represent the position of the i th artificial wolf in the wolf pack algorithm, where n represents the total number of workpieces to be processed, and x ij represents the coding number of the j th processed workpiece in the sequence X i. Taking the scheduling problem of 7 workpieces (coded from 1 to 7) as an example, the decimal sequence X i � {4, 6, 3, 2, 5, 1, 7} indicates that the processing order of the 7 workpieces is workpiece 4 ⟶ workpiece 6 ⟶ workpiece 3 ⟶ workpiece 2 ⟶ workpiece 5 ⟶ workpiece 1 ⟶ workpiece 7.
Determining the population size to be N, and using the random generation method to get the initial population X � {X 1 , X 2 , . . ., X i , . . ., X N }, where 1 ≦ i ≦ N.

Intelligent Behavior and Rules.
Based on the analysis of the characteristics of wolf pack cooperative hunting activities, the wolf pack algorithm abstracts the 3 intelligent behaviors of wolf pack wandering, summoning, and besieging, combined with the solution goal of NWFSP (that is, minimizing the maximum makespan), and elaborates the corresponding behavior rules in detail.

Selection of Head Wolf.
e artificial wolf with the optimal objective function value (that is, the shortest makespan) in the initial population is selected as the head wolf; in the iteration process, after each iteration, the objective function value of the current head wolf is compared with the objective function values of other artificial wolves, If there is an artificial wolf whose objective function value is better than that of the head wolf, that artificial wolf is used to replace the head wolf; if the optimal objective function value corresponds to multiple artificial wolves, one of them is randomly selected as the head wolf.

Wandering
Behavior. All artificial wolves in the wolf pack except the head wolf are regarded as detecting wolves to search for prey in the solution space. Assume that Y 0 i and Y lead respectively represent the prey odour concentration perceived by the wolf i and the head wolf in the initial population. e maximum number of wanderings are set as K. During the first wandering process, let the wolf i take one step forward in h directions respectively (the step length at this time is called the wandering step length step a ), and record the position in the p th direction and the perceived prey odour concentration Y if Y p i < Y 0 i < Y lead , the coordinates of detecting wolf i remain unchanged. Specifically, the detecting wolf i takes one step forward in the p-th direction (p � 1, 2, . . ., h), that is, randomly interchange two selected workpieces x ij and x ik in the code Xi � {x i1 , x i2 , . . ., x im } of the detecting wolf i. Or randomly select a workpiece from the code Xi � {x i1 , x i2 , . . ., x im } of the detecting wolf i, and then insert the workpiece after other workpieces from left to right. Repeat the abovementioned wandering behavior until the maximum number of wanderings is reached, and then proceed to the summoning phase of the head wolf.

Summoning Behavior.
All artificial wolves in the pack except the head wolf are regarded as fierce wolves. When the head wolf howls to summon the fierce wolves, the fierce wolves quickly rush towards the current position of the head wolf with a large step length. Referring to related literature [11], the summoning behavior is designed as follows.
Randomly select a piece of continuous code x ls , x l(s+1) , . . . , x le with the starting point x ls and the ending point x le in the head wolf, respectively, where the number of code digits is the raiding step length step b , replace a segment of continuous code x is , x i(s+1) , . . . , x ie in the corresponding position of the fierce wolf i.
is operation reflects the leadership of the head wolf (the optimal individual) to the wolf pack. If the elements of these two continuous codes are the same, the codes in other positions in the fierce wolf i will not be changed, which reflects the differentiation of the wolf pack individual. e element in x is , x i(s+1) , . . . , x ie that does not belong to x ls , x l(s+1) , . . . , x le are randomly placed in the rest of the fierce wolf i. e specific operation is as follows: Suppose the code of head wolf is After updating the code of the fierce wolf i, recalculate its fitness value. If Y i > Y lead , the fierce wolf i will replace the head wolf. After reaching the set number of raids, the process enters the siege behavior.

Siege Behavior.
After the raid process, the distance between the wolves and the prey is relatively close, and the head wolf will command the fierce wolves to besiege the prey. e design of the siege behavior is similar to the summoning behavior. In order to ensure that the wolves perform a fine search near the prey, the siege step length step c should not be greater than the raiding step length step b at this time, and the siege behavior ends when the set number of siege is reached.

Population Update.
In order to prevent the population from entering the local optimum, the population is updated after each iteration. e specific operation is as follows: arrange the population from large to small according to the fitness value, remove the last R artificial wolves in the population, and then randomly generate R artificial wolves to join the population for the next iteration.

Algorithm Flow.
e specific process of the improved discrete wolf pack algorithm is shown in Figure 1 and described in detail as follows.
Step 1: Parameter initialization. Set the population size of the wolf pack N, the maximum number of wandering times T max , the maximum number of iterations of the algorithm k max , the range of the search direction h, and the number of updates of the wolf pack R.
Step 2: Initialize the spatial position of the wolf pack, calculate its objective function value, and select the artificial wolf with the optimal fitness value as the head wolf X lead .
Step 3: Wolf pack detecting. If the function value of the detecting wolf is greater than the head wolf, it will replace the head wolf and initiate a summoning behavior. Otherwise, the detecting wolves will continue to wander until the maximum number of wanderings is reached, the head wolf will summon the other wolves.
Step 4: Wolf pack raiding. e fierce wolves rush towards the prey. If the prey odour concentration of some fierce wolf is greater than that of the head wolf, this fierce wolf will replace the head wolf, and the fierce wolves will rush to the range close to the prey, and proceed to the next step.
Step 5: Wolf pack siege. If the prey odour concentration of some fierce wolf is greater than that of the head wolf, this fierce wolf will replace the head wolf.
Step 6: Population renewal. Update the position of the head wolf according to the "winner is king" rule, update the wolf pack according to the "survival of the strong" mechanism, and then enter the next iteration process.
Step 7: Determine whether the accuracy requirement is met or the maximum number of iterations is reached. If the algorithm termination condition is met, the optimal solution is output, that is, the position of the head wolf or the position of the prey; otherwise, go to Step 3 to continue.

Performance Verification
In order to verify the feasibility of the improved discrete wolf pack algorithm (IDWPA) designed in this paper in solving the NWFSP problem, this paper uses 5 sets of calculation examples to compare the algorithm with LFA and GA [24]. e termination condition of the algorithm is reaching the number of iterations. e initialization parameters of IDWPA are set as follows: the population size of the wolf pack N � 20, the maximum number of wandering times T max � 10, the maximum number of iterations of the algorithm k max � 100, the range of the search direction h � 5, and the number of updates of the wolf pack R � 4. Table 1 shows the optimal solution and the average solution with three different algorithms. Compared with LFA and GA, IDWPA designed in this paper reduces the makespan of the NWFSP problem and improves the average equipment utilization rate.
It can be seen from the population evolution iterative process that the improved discrete wolf pack algorithm is easier to jump out of the local optimum and has a faster convergence rate when solving the NWFSP problem. Furthermore, the scheduling result is more accurate, and the utilization rate of the machine is improved to a certain extent, so the production efficiency of the enterprise can be improved to a certain extent.

Conclusions
Aiming at the no-wait flow shop scheduling problem, an improved discrete wolf pack algorithm was proposed. First of all, this paper summarized the method of solving the problem of no-waiting flow shop scheduling and the research on the application of the wolf pack algorithm and points out the research gap of using the wolf pack algorithm to solve NWFSP. en, the decimal integer coding method was adopted; the wandering behavior of wolf detecting was realized through the exchange of single code bits, the raiding and siege behaviors were realized by replacing the continuous code segment. e population was updated according to the rule of "survival of the strong," and the summoning and siege links were added with cyclic operations. Finally, a comparison with the leapfrog algorithm and genetic algorithm was performed to verify the effectiveness of the proposed algorithm.

Data Availability
e data used to support the findings of this study are included in the article.

Conflicts of Interest
All the authors do not have any possible conflicts of interest.