A flexible job shop scheduling method based on improved grey wolf algorithm

By improving the Grey Wolf algorithm and combining it with chaotic mapping, opposition learning, and the Levy flight strategy, a domain search algorithm was designed. This solved the problems of slow convergence speed and easy getting trapped in local optima in the flexible job shop scheduling problem, and improved the accuracy of the scheduling results.

CN116090773BActive Publication Date: 2026-02-10HANGZHOU DIANZI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310058666.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-19
Publication Date
2026-02-10
Estimated Expiration
2043-01-19

AI Technical Summary

Technical Problem

The traditional Grey Wolf algorithm is prone to getting stuck in local optima in the flexible job shop scheduling problem, with slow convergence speed and linearly decreasing convergence factor affecting algorithm performance.

Method used

An extended GLR method based on chaotic mapping and opposition learning is used to initialize the population. The Levy flight strategy is combined for global search, and a neighborhood search algorithm is designed for local search, thus improving the Grey Wolf algorithm.

Benefits of technology

The algorithm's global and local search capabilities have been improved, solving the problems of slow convergence speed and easy getting trapped in local optima, and improving the accuracy of scheduling results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116090773B_ABST
    Figure CN116090773B_ABST
Patent Text Reader

Abstract

The application discloses a flexible job shop scheduling method based on an improved grey wolf algorithm, first constructs a flexible job shop scheduling problem model, and encodes workshop equipment and processes, creates external archives and sets parameters of the grey wolf algorithm. Secondly, an initial population is generated by combining a chaotic mapping and an extended GLR method of opposite learning, all individuals in the population are evaluated, decision layer individuals are determined, and the external archives are updated. Finally, it is judged whether the algorithm termination condition is met, if yes, the algorithm ends, flexible job shop equipment coding and corresponding process coding sorting are obtained, otherwise, it is judged whether the absolute value of a coefficient vector A calculated by a convergence factor is greater than or equal to 1, the position is updated until the algorithm ends. The application improves the performance on the flexible job shop, and solves the problems of slow convergence speed and easy falling into local optimum of the traditional swarm intelligence optimization algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of flexible job shop scheduling technology, and specifically to a flexible job shop scheduling method based on an improved gray wolf algorithm. Background Technology

[0002] The Flexible Job-shop Scheduling Problem (FJSP) is an evolution of the Job-shop Scheduling Problem (JSP). While the Job-shop Scheduling Problem requires consideration of process ordering, the FJSP not only considers process ordering but also the selection of processing machines for different processes. In recent years, swarm optimization algorithms have been widely developed and applied in solving the FJSP. However, traditional swarm optimization algorithms suffer from slow convergence speeds and a tendency to get trapped in local optima.

[0003] Like most swarm intelligence optimization algorithms, the Grey Wolf Algorithm is prone to getting stuck in local optima in the later stages of iteration. At this point, coordinating the algorithm's local search becomes particularly crucial. Although the Grey Wolf Algorithm has been applied in some fields and has performed well, its application in the field of workshop scheduling is still relatively limited, and some problems still exist in practical applications: the iterative optimization process of the Grey Wolf Algorithm is closely related to the positions of the first three best individuals in each iteration. Therefore, as the iteration continues, the probability of getting stuck in local optima gradually increases, which requires finding a suitable and excellent method to escape local optima.

[0004] Furthermore, like other swarm intelligence optimization algorithms, the Grey Wolf algorithm has its own convergence factor 'a', which controls whether the algorithm performs a local search or a global search when seeking the optimal value. However, because the convergence factor of the Grey Wolf algorithm decreases linearly, although it simplifies the algorithm's complexity to some extent, it also has a significant impact on the algorithm's performance. Summary of the Invention

[0005] To address the problems existing in the above-mentioned technologies, this invention provides a flexible job shop scheduling method based on an improved gray wolf algorithm, which solves the problems of slow algorithm convergence speed and easy getting trapped in local optima, and improves the accuracy of scheduling results.

[0006] A flexible job shop scheduling method based on an improved gray wolf algorithm is implemented according to the following steps:

[0007] Step 1: Construct a model of the flexible job shop scheduling problem: including a description of the flexible job shop scheduling problem and model assumptions.

[0008] Step 2: Encode the workshop equipment and the required processing steps using a two-stage encoding based on natural numbers, combining step and equipment codes; create an empty external file A0 to store the current population status, with a size of N'; set the parameters for the Grey Wolf Algorithm: initial population size N, current iteration count t, maximum iteration count t max .

[0009] Step 3: Generate an initial population of size N using an extended GLR (global, local, stochastic) method that combines chaotic mapping and oppositional learning.

[0010] Step 4: Merge the current population with the external archive, calculate the fitness values ​​of individuals in the merged population to evaluate all individuals in the population, determine the decision-making level individuals α, β, and γ, and update the external archive.

[0011] Step 5: Determine if the Gray Wolf Algorithm termination condition is met: t = t max If yes, proceed to step eight; otherwise, proceed to step six.

[0012] Step Six: Determine if the absolute value of the coefficient vector A calculated from the convergence factor is greater than or equal to 1. If yes, perform a global search and update the position using Levy fly. If no, update the position according to the position update method of the Grey Wolf algorithm.

[0013] Step 7: During the optimization phase of the Gray Wolf algorithm, individuals in the population update their positions based on the current best individual. Local searching of relatively good individuals can significantly improve the algorithm's accuracy and convergence speed. Therefore, a combination of three neighborhood search algorithms is used for local searching. A new generation of Gray Wolf population is then generated, and the process proceeds to Step 4 for the next iteration.

[0014] Step 8: The Grey Wolf Algorithm ends, outputting the optimal solution that meets the conditions. This optimal solution is then decoded to obtain the equipment codes and corresponding process code sorting for the flexible workshop.

[0015] Compared with the prior art, the present invention, employing the above technical solution, has the following technical effects:

[0016] This invention improves the Gray Wolf algorithm and applies it to solving the flexible job shop scheduling problem. It initializes the population by combining chaotic mapping and an extended GLR method based on opposition learning, ensuring both population diversity and quality. A Levy strategy is employed to enhance the algorithm's ability to escape local optima and improve its global search capability. Finally, a neighborhood search algorithm is designed to further improve the algorithm's local search ability. These improvements enhance the Gray Wolf algorithm's performance in flexible job shops and address the problems of slow convergence and susceptibility to local optima inherent in traditional swarm intelligence optimization algorithms. Attached Figure Description

[0017] Figure 1 It refers to the encoding method;

[0018] Figure 2 This is the algorithm flowchart in this invention;

[0019] Figure 3 This is the convergence curve obtained by solving FJSP using the traditional Grey Wolf algorithm in MK02;

[0020] Figure 4 This is the convergence curve obtained by solving FJSP using the improved Grey Wolf algorithm in MK02;

[0021] Figure 5 It is an improved gray wolf algorithm for solving the Gantt chart of FJSP in MK02. Detailed Implementation

[0022] The present invention will now be described in detail with reference to the accompanying pictures and specific embodiments.

[0023] This invention relates to a flexible job shop scheduling method based on an improved gray wolf algorithm, which is implemented according to the following steps:

[0024] 1. Construct a model for the flexible job shop scheduling problem: including a description of the flexible job shop scheduling problem and model assumptions.

[0025] The flexible workshop scheduling problem is described as follows:

[0026] The Flexible Job Shop Problem (FJSP) is essentially an extension of the traditional job shop problem. Specifically, it can be described as follows: There are m machines with n workpieces to be processed, each workpiece being processed by J... i The process consists of multiple steps, each of which can be performed on different equipment and takes different amounts of time, greatly increasing the complexity. Therefore, finding the optimal solution is urgently needed.

[0027] The model is specifically assumed to satisfy the following conditions:

[0028] (1) The same equipment can only process one process at a time.

[0029] (2) The same workpiece can only be processed on one machine at the same time.

[0030] (3) All workpieces can be processed at time 0.

[0031] (4) The processes of different workpieces are independent of each other, while the processes of the same workpiece are subject to sequential constraints.

[0032] (5) Each workpiece must not be interrupted during the processing.

[0033] (6) Ignore equipment preparation time and workpiece transfer time.

[0034] The objective function is constructed as follows:

[0035] This invention uses the maximum completion time C max Let C be the minimum optimization objective. i For the i-th workpiece J i The objective function is as follows, where n represents the total number of workpieces.

[0036] minC max =min{max(C i (1≤i≤n)

[0037] 2. Encode the workshop equipment and required processing steps using a two-stage encoding based on natural numbers, using both process and equipment codes; create an empty external file A0 with a size of N'; set the algorithm parameters: initial population size N, current iteration count t, maximum iteration count t. max .

[0038] A two-segment coding method of equal length is adopted, meaning that each scheduling solution contains two segments of equal length, corresponding to the equipment selection scheme and the process coding and sequencing scheme, respectively. Taking 3 workpieces and 8 processes as an example, the coding method is as follows: Figure 1 As shown, the total number of operations is represented by the code length. J1, J2, and J3 are three workpieces. The operations for each workpiece are enclosed in curly braces. The workpiece number is represented by each element of OS. Oh,k is the k-th operation of the h-th workpiece. The device number selected for each operation is represented by MS.

[0039] 3. An initial population of size N is generated using an extended GLR (global, local, random) that combines chaotic mapping and opposition learning.

[0040] Initializing the population is crucial for evolutionary algorithms. Based on individuals generated using the GLR method, a strategy of Gaussian mapping and standard alternative learning with a 25% ratio is employed to generate the initial population. Specifically, the GLR method generates 50% of the individuals randomly, and then, considering working time and load balancing, uses a global selection method to generate the remaining 20%. In this method, a process is first randomly selected, and the processing time of all available machines is added to the processing time of that process. Then, the machine with the shortest processing time is selected as the processing machine for that process, and its processing time is updated. The local selection method generates the remaining 30%. In this method, a workpiece is first randomly selected, and machines are selected for all processes of that workpiece, following the global selection method. However, once all processes of a workpiece have selected their corresponding machines, the running times of all machines are reset to zero. Based on individuals generated using the GLR method, a strategy of Gaussian mapping and standard alternative learning with a 25% ratio is used to generate the initial population. The expressions for Gaussian mapping and standard alternative learning are shown in the following formula:

[0041]

[0042]

[0043] In the formula: X d This refers to individuals generated using the GLR method. Indicates the size after Gaussian mapping; [] indicates rounding; x' d Indicates the size after learning through opposition; and They represent The upper and lower limits of the value.

[0044] 4. Merge the current population with the external archive, calculate the fitness values ​​of individuals in the merged population to evaluate all individuals in the population, determine the decision-making level individuals α, β, and γ, and update the external archive; the specific process is as follows:

[0045] Step 4.1: Merge the current population with the external files. Based on the objective function of the flexible work workshop energy-saving scheduling problem model, calculate the fitness value of individuals in the population, expressed as:

[0046] Individuals are sorted according to their fitness values ​​from smallest to largest, and the top 3 individuals are selected as α, β and γ individuals, respectively, to form the decision-making layer of the population.

[0047] Step 4.2: Sort by fitness value and add the top N' individuals to the external archive in sequence to update the external archive.

[0048] 5. Determine if the algorithm termination condition has been met: t = t maxIf yes, proceed to step 8; otherwise, proceed to step 6.

[0049] 6. Determine if the absolute value of the coefficient vector A is greater than or equal to 1. If yes, perform a global search and update using the Levy algorithm. If no, update according to the position update method of the Grey Wolf algorithm. The specific process is as follows:

[0050] Let the coefficient vector A be defined, and the expression for A be as follows:

[0051] A = 2*a*ra

[0052] Where r is a random variable on [0,1], a is a convergence factor, and the population position is updated based on whether the absolute value of A is greater than or equal to 1. If true, a global search is performed using Levy fly updates. If false, the position update method of the Grey Wolf Algorithm is used normally, and the specific update formula is as follows:

[0053]

[0054] Among them, X i (t) represents the i-th solution in the t-th generation; ⊕ represents point-to-point multiplication; l represents the weight controlling the step size, l = 0.01*s*(X i (t)-X b ), X b This represents the current optimal solution; Levy(λ) denotes the path following a Levy distribution, and the specific expression required for Levy flight is as follows:

[0055]

[0056] u~N(0,σ 2 ),ν~N(0,1)

[0057]

[0058] In the formula: u and v are normal distributions, Γ represents the standard gamma function, and δ is generally taken as 1.5. Thresholding is a common practice to prevent getting trapped in local optima. The detailed method is as follows: In the initial state of the algorithm, a global optimum algebra g is set to be 0. During the algorithm's iteration, this global optimum algebra g is used to store the current optimal value algebra. When g reaches the threshold l, half of the inferior individuals are discarded, and an equal number of randomly generated individuals are used to replace them. The quality of the threshold greatly affects the algorithm. If the threshold is set too high, the algorithm will not converge quickly. Conversely, if the threshold is set too low, the algorithm will converge poorly, and the algorithm's complexity will also increase.

[0059] If the absolute value of A is less than 1, then the position update method of the Grey Wolf algorithm is used normally. However, since the convergence factor of the Grey Wolf algorithm decreases linearly, although it simplifies the complexity of the algorithm to some extent, it also has a significant impact on the performance of the algorithm. Therefore, the following convergence factor is used:

[0060] a = 2 - 2*(t / t) max ) 2

[0061] Where t represents the current iteration number, t max This indicates the maximum number of iterations.

[0062] 7. During the development phase, individuals in the population update their positions based on the current best individual. Local searching of relatively good individuals can significantly improve the algorithm's accuracy and convergence speed. Therefore, a combination of three neighborhood search algorithms is used for local searching. A new generation of gray wolf population is then generated, and the process proceeds to step four for the next iteration. The specific process is as follows:

[0063] The algorithm checks and updates the values ​​of individuals, then performs a local search. By progressively checking different neighborhoods, the search space is broadened and deepened, resulting in strong local search capabilities. A variable-neighborhood search is performed on the top three individuals with the highest fitness values. This method significantly increases the probability of finding the optimal solution compared to performing a single variable-neighborhood search on only the best individual. The variable-neighborhood search algorithm achieves its search objective by changing the neighborhood structure. Three variable-neighborhood structures are described below:

[0064] Domain structure N1: In the coding of the processes required for workpiece processing, a random selection method is adopted. Under the premise of ensuring that the selected processes are for different workpieces, the two positions are selected and interchanged.

[0065] Domain structure N2: In the coding of the steps required for workpiece processing, a random selection method is used to select two positions and insert the later position before the previous position.

[0066] Domain Structure N3: In the coding of the equipment that can be used for the corresponding process of workpiece processing, a random selection method is adopted to ensure that the process corresponding to the selected position can be processed by multiple equipment, and one of these selectable equipment is randomly selected to replace the position.

[0067] Based on these three domain structures, the steps of the variable domain search algorithm for processes and equipment are as follows:

[0068] 7.1 Set the initial parameters, setting the individual to be searched in the variable neighborhood search as the initial individual X; set the maximum number of iterations for the variable neighborhood search to n. maxThe current iteration number n is 5, the current iteration count n is 1, the current iteration's neighborhood structure p is set to 1, and p max Set it to 3.

[0069] 7.2 Determine whether n is not less than n max If true, output the current individual X; if false, proceed to step 7.3.

[0070] 7.3 Randomly select a domain structure and apply it to the initial individual X to generate a perturbed individual X′.

[0071] 7.4. Based on the perturbed individual X′, perform a variable neighborhood search again. The specific steps are as follows:

[0072] (1) Determine whether the termination condition p≥p has been met. max If satisfied, output the current solution X′.

[0073] (2) Based on X′, select the neighborhood structure corresponding to the number and p to obtain a new individual X″. If the fitness value f(X″)≤f(X′) at this time, then X′ is set to X″ and p is set to 1; if f(X″)=f(X′), then update the individual with a probability of 0.5 and p is set to 1; otherwise, the individual remains unchanged, p is set to p+1, and go to (1).

[0074] 7.5. Let X be X′ and n be n+1, then go to step 7.2.

[0075] 8. The algorithm terminates, outputting the optimal solution that meets the conditions. This optimal solution is then decoded to obtain the equipment codes and corresponding process code sorting for the flexible operations workshop. The specific process is as follows:

[0076] The algorithm terminates and outputs the optimal solution that meets the conditions. This optimal solution is used to obtain the equipment codes and corresponding process codes for the flexible operations workshop. Decoding is then performed, requiring separate decoding of the process codes and equipment codes. For equipment codes, the corresponding equipment sequence number for each process is searched from left to right to generate an equipment selection scheme. Similarly, process codes are read sequentially from left to right. Based on the process sequence information in the process codes and the allocation scheme in the equipment codes, the processes are arranged in a "slot-insertion" manner, finally generating a feasible scheduling scheme. The final algorithm flow is as follows: Figure 2 As shown.

[0077] Example:

[0078] The three improvements to the Grey Wolf algorithm of this invention were used respectively. The traditional Grey Wolf algorithm was used to simulate and solve 10 standard cases. The simulation environment was: Python 3.10 programming, on a computer with 16G memory and Windows 10 operating system.

[0079] The improved Grey Wolf algorithm was tested with a population size of 500, 300 iterations, a crossover probability of 0.9, and a mutation probability of 0.1. Calculations showed that the improved Grey Wolf algorithm achieved optimal values ​​for 10 examples (MK01, MK02, MK03, MK04, MK05, MK06, MK07, MK08, MK09, and MK10), while the traditional Grey Wolf algorithm achieved optimal values ​​for 0 examples and average values ​​for 0 examples. This means that in each example, the improved Grey Wolf algorithm achieved better optimal and average values ​​than the traditional Grey Wolf algorithm, demonstrating that the improved Grey Wolf algorithm has better overall performance in solving the flexible job shop scheduling problem.

[0080] Figure 3 and Figure 4 The figure shows the convergence curve of the improved gray wolf algorithm for solving FJSP in a single run of MK02. Compared with the convergence curve of the traditional gray wolf algorithm for solving FJSP in a single run of MK02, it can be seen that the improved gray wolf algorithm has a better solution effect under the same population size and the same number of iterations.

[0081] Figure 5 The improved Grey Wolf algorithm is used to solve the Gantt chart obtained by FJSP in a single run of MK02 (6 workpieces, 10 machines). The numbers in the frame represent the workpiece numbers being processed by the corresponding machine on the vertical axis, arranged in chronological order on the horizontal axis. The number of times the workpiece number appears indicates the number of operations for the workpiece being processed. This shows that the method is feasible.

[0082] In summary, this invention addresses the characteristics of the flexible job shop scheduling problem by improving the Grey Wolf algorithm in three aspects, proposing a flexible job shop scheduling method based on the improved Grey Wolf algorithm. This solves the problems of slow convergence speed and easy getting trapped in local optima, and improves the accuracy of scheduling results.

Claims

1. A flexible job shop scheduling method based on an improved gray wolf algorithm, characterized in that, Specifically, the following steps are included: Step 1: Construct a model of the flexible job shop scheduling problem, including a description of the flexible job shop scheduling problem and model assumptions; Step 2: Code the workshop equipment and the required processing steps; Create an empty external file A0 to store the current population status in the Gray Wolf algorithm, with a size of N'; Set the parameters for the Grey Wolf algorithm; Step 3: Generate an initial population of size N using an extended GLR method that combines chaotic mapping and oppositional learning; Step 4: Merge the current population with the external archive A0, calculate the fitness values ​​of individuals in the merged population, evaluate all individuals in the population, determine the decision-making level individuals α, β, and γ, and update the external archive. Step 5: Determine if the termination condition of the Grey Wolf Algorithm is met: The termination condition is whether the maximum number of iterations has been reached. If yes, proceed to step 8; otherwise, execute step 6. Step 6: Determine if the absolute value of the coefficient vector A calculated from the convergence factor is greater than or equal to 1. If it is, perform a global search and update the position using Levy flight; otherwise, update the position according to the position update method of the Grey Wolf algorithm. Step 7: During the optimization phase of the gray wolf algorithm, each individual in the population updates its position based on the current best individual. It uses a combination of three neighborhood search algorithms to perform a local search and generate a new generation of gray wolf population. Then, it proceeds to step 4 for the next iteration. Step 8: The Grey Wolf Algorithm ends, outputting the optimal solution that meets the conditions. This optimal solution is then decoded to obtain the flexible workshop equipment codes and the corresponding process code sorting.

2. The flexible job shop scheduling method based on the improved gray wolf algorithm according to claim 1, characterized in that, In step one, the specific description of the flexible job shop scheduling problem and the model assumptions are as follows: Flexible Workshop Scheduling Problem Description: There are m machines processing n workpieces, each workpiece is assigned to J... i The process consists of multiple steps, each processed on different equipment, and each process takes a different amount of time. The goal is to find the optimal arrangement of equipment and steps to minimize the completion time. The model makes the following assumptions: the model satisfies the following conditions: the same equipment can only process one operation at a time; the same workpiece can only be processed on one equipment at a time; all workpieces can be processed at time 0; the operations of different workpieces are independent of each other, and there are sequential constraints between the operations of the same workpiece; each workpiece cannot be interrupted during processing; equipment preparation time and workpiece transfer time are ignored.

3. A flexible job shop scheduling method based on an improved gray wolf algorithm according to claim 2, characterized in that, Step one also includes constructing the objective function, as follows: With the maximum completion time C max Let C be the minimum optimization objective. i For the i-th workpiece J i The completion time is determined by the objective function as follows: minC max = min{max(C i )}(1≤i≤n) Where n represents the total number of workpieces.

4. A flexible job shop scheduling method based on an improved gray wolf algorithm according to claim 3, characterized in that, In step two, a two-segment encoding method based on natural numbers, using process codes and equipment codes, is employed. The parameters of the gray wolf algorithm include the initial population size N, the current iteration number t, and the maximum iteration number t. max .

5. A flexible job shop scheduling method based on an improved gray wolf algorithm according to claim 4, characterized in that, The specific process of the extended GLR method described in step three is as follows: based on the individuals generated by the GLR method, an initial population is generated using a strategy of Gaussian mapping and standard opposition learning at a ratio of 25%.

6. A flexible job shop scheduling method based on an improved gray wolf algorithm according to claim 5 or 3, characterized in that, Step four involves the following steps: Step 4.1: Merge the current population with the external file A0, and calculate the fitness value of individuals in the population according to the objective function; Individuals are sorted according to their fitness values ​​from smallest to largest, and the top 3 individuals are selected as α, β and γ individuals, respectively, to form the decision-making layer of the population. Step 4.2: Sort by fitness value and add the top N' individuals to the external file in sequence to update the external file A0.

7. A flexible job shop scheduling method based on an improved gray wolf algorithm according to claim 6, characterized in that, In step seven, the three variable-neighborhood search algorithms achieve the search objective by changing the neighborhood structure. Specifically, the changes to the neighborhood structure include the following three types: Domain structure N1: In the coding of the processes required for workpiece processing, a random selection method is adopted. Under the premise of ensuring that the selected processes are for different workpieces, the two positions are selected and interchanged. Domain structure N2: In the coding of the processes required for workpiece processing, a random selection method is used to select two positions and insert the later position before the previous position; Domain Structure N3: In the coding of the equipment that can be used for the corresponding process of workpiece processing, a random selection method is adopted to ensure that the process corresponding to the selected position is processed by multiple equipment, and one of these selectable equipment is randomly selected to replace the position.

8. A flexible job shop scheduling method based on an improved gray wolf algorithm according to claim 7, characterized in that, In step eight, the decoding process is as follows: the process code and the equipment code are decoded separately. When decoding the equipment code, the equipment sequence number selected for the corresponding process is found from left to right to generate the equipment selection scheme. The process code is also read from left to right. Based on the process sequence information in the process code, the process is arranged in a "slotting" manner according to the allocation scheme in the equipment code, and finally a feasible scheduling scheme is generated.

Citation Information

Patent Citations

  • Fuch mapping-based hybrid improved grey wolf optimization algorithm

    CN110276437A

  • Multi-target flexible job-shop energy-saving scheduling method based on improved grey wolf algorithm

    CN114819355A