A three-stage hybrid algorithm for solving flexible job-shop scheduling problem

By employing a three-stage hybrid algorithm and a variable neighborhood breadth search algorithm, the local optimum trapping problem in the flexible job shop scheduling problem in existing technologies is solved, thereby improving the solution accuracy and efficiency.

CN116483030BActive Publication Date: 2026-03-17NINGBO UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-30
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing intelligent algorithms are prone to getting stuck in local optima when solving the flexible workshop scheduling problem, and there is room for improvement in the accuracy of the solution.

Method used

A three-stage hybrid algorithm is adopted, including a hybrid strategy of global selection, local selection and random selection. It combines variable neighborhood breadth search algorithm, greedy decoding, roulette wheel algorithm, path reconnection king and random mutation operation to generate the initial population through a two-layer encoding method, and updates elite individuals and vigilant individuals during the iteration process.

Benefits of technology

It improves the accuracy of solving the flexible job shop scheduling problem, reduces the possibility of getting trapped in local optima, and achieves more efficient scheduling optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116483030B_ABST
    Figure CN116483030B_ABST
Patent Text Reader

Abstract

The application discloses a three-stage hybrid algorithm for solving a flexible job shop scheduling method, and solves a flexible job shop scheduling problem with the minimum maximum completion time as the target through a three-stage hybrid algorithm. In the search process, three stages are divided, and a population is divided into common individuals, elite individuals and alert individuals. In the first stage, a variable neighborhood breadth search algorithm is proposed to extensively search a solution space of process selection coding and update machine selection coding through a simplified Nopt1 neighborhood. When facing a small-scale scheduling problem, fast convergence to a global optimal effect can be realized. In the second stage, an adaptive elite individual number updating formula is proposed, and a crossover mutation operation is used to help the algorithm better exploit the elite individuals obtained in the previous stage. In the last stage, the alert individuals are updated to increase the ability of individuals in the population to escape from a local optimum. The method has the advantages of not being easily trapped in a local solution and high solution precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for solving flexible job shop scheduling, and more particularly to a method for solving flexible job shop scheduling using a three-stage hybrid algorithm. Background Technology

[0002] Efficient production scheduling optimization techniques are of great significance for modern industry and manufacturing to enhance their competitiveness. The Flexible Job Shop Scheduling Problem (FJSP), as an extension of the classic job shop scheduling problem, has extremely wide applications in modern manufacturing. Its fundamental goal is to optimize the scheduling solution as much as possible under limited resources, thereby improving the production line's efficiency. In FJSP, each job has a predetermined production process, consisting of multiple sequential operations. Each operation can be processed by multiple machines, with varying processing times. Therefore, the scheduling problem can be further decomposed into two sub-problems: operation sequencing and machine selection. How to arrange all operations in the optimal way and select suitable processing machines is a key challenge that FJSP needs to address.

[0003] Currently, intelligent algorithms such as genetic algorithms, particle swarm optimization, and various hybrid algorithms have become the main methods for solving the Flexible Job Shop (FJSP) problem. Compared with traditional manual scheduling and precise algorithms, intelligent and hybrid algorithms have advantages such as higher accuracy and wider applicability in solving the FJSP problem. However, as the scale of the FJSP problem continues to grow, methods such as the Global-local Neighborhood Search Algorithm (GLNSA), Li Xinyu's Effective hybrid algorithm (HA), and the Variable Neighborhood Descent Hybrid Genetic Algorithm (VND-hGA) are prone to getting trapped in local optima due to their inherent search performance and search strategies, resulting in significant room for improvement in solution accuracy. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a method for solving flexible job shop scheduling using a three-stage hybrid algorithm that is less prone to getting stuck in local conditions and has higher solution accuracy during the solution process.

[0005] The technical solution adopted by this invention to solve the above-mentioned technical problems is as follows: a method for solving flexible job shop scheduling using a three-stage hybrid algorithm, comprising the following steps:

[0006] Step 1: Minimize the maximum completion time as the optimization objective of the flexible job shop scheduling problem; let N be the total number of jobs, M be the total number of machines capable of handling these N jobs, Q be the total number of operations for the N jobs, and J be the total number of operations for the i-th job. i Let i = 1, 2, ..., N, and let the j-th step of the i-th job be denoted as O. ij j = 1, 2, ..., J i Set the machine numbers of the M machines to 1, 2, 3, ..., M, and the job numbers of the N jobs to 1, 2, 3, ..., N; This will allow the processing of process O... ij The total number of all machines is denoted as L. ij L ij ≤M, will be able to process process O ij The set of machine numbers for all machines is called process O. ij The optional set of machines will be used for process O ij The set of available machines is denoted as M. ij M ij ={M ij1 M ij2 , ...M ijLij}, where M ij1 M ij2 ,……,M ijLij These represent the processes that can be processed, O, respectively. ij The machine number;

[0007] Step 2: Generate an initial population containing K scheduling solutions, i.e., the 0th generation population, using a hybrid strategy of global selection, local selection, and random selection, and employing a two-layer encoding method of process sorting sequence and machine selection sequence; where K is any integer greater than or equal to 50 and divisible by 10, and each scheduling solution includes a process sorting sequence and a machine selection sequence; in the two-layer encoding method, the length of the process sorting sequence is set to Q, each gene in the process sorting sequence represents a process, and the value of each gene is a job number; the length of the machine selection sequence is set to Q, and in each scheduling solution, there exists J in its process sorting sequence. i The job number of the i-th job, J i The job number of the i-th job, from left to right, represents the first to the J-th steps of the i-th job. i In each of the N jobs' Q-level processes, each gene corresponds to a process in its machine selection sequence, and the value of each gene is a machine number. In each process's optional machine set, at least one machine number can be found in the machine selection sequence.

[0008] Step 3: Set the maximum number of iterations as T, where T is a positive integer greater than or equal to 50; set the iteration variable t, initialize t, and let t = 1, t = 1, 2, ……, T;

[0009] Step 4: Conduct the t-th iteration. The specific process is as follows:

[0010] S4.1: Update each scheduling solution in the (t - 1)-th generation population respectively to obtain the t-th generation population. Set k = 1, 2, …, K. The specific process of updating the k-th scheduling solution in the (t - 1)-th generation population is as follows:

[0011] Perform decoding operations on each scheduling solution in the (t - 1)-th generation population respectively through the greedy decoding method to obtain the optimization objective value of each scheduling solution;

[0012] Take the k-th scheduling solution in the (t - 1)-th generation population as the input solution of the variable neighborhood breadth search algorithm. First, use the variable neighborhood breadth search algorithm to operate on the input solution to obtain the intermediate scheduling solution corresponding to the k-th scheduling in the (t - 1)-th generation population, and then perform the simplified Nopt1 operation on the obtained intermediate scheduling solution at this time to obtain the k-th scheduling solution in the t-th generation population; among them, the variable neighborhood breadth search algorithm is obtained by making the following improvements to the variable neighborhood search algorithm: First, cancel the step of initializing the optimization objective threshold as the optimization objective value of the input solution in the variable neighborhood search algorithm, and now initialize the optimization objective threshold as infinity; Second, cancel the step of continuously updating the input solution in the variable neighborhood search algorithm, and now make the input solution remain unchanged throughout the search process;

[0013] S5: Perform decoding operations on each scheduling solution in the t-th generation population respectively through the greedy decoding method to obtain the optimization objective value corresponding to each scheduling solution in the t-th generation population; sort the k scheduling solutions in the t-th generation population in ascending order according to the optimization objective values of the k scheduling solutions in the t-th generation population; first, use formula (1) to calculate the number PD of elite individuals in the t-th generation population t , and then take the first PD t scheduling solutions in the t-th generation population after ascending sorting as the elite individuals in the t-th generation population, and the remaining scheduling solutions as the ordinary individuals in the t-th generation population. Denote the number of ordinary individuals as PT t ;

[0014] [[ID=2⑥]]

[0015] In formula (1), P1 is set as a real number between 0 and 1, P2 is set as a real number between 0 and 1, and P1 < P2; ceil() is the ceiling function, COS is the cosine function, and π is the pi;

[0016] S6. Set the t.2 generation population to be equal to the updated t.1 generation population. At this time, the t.2 generation population contains individuals with PD. t Elite individuals and PT t An ordinary individual;

[0017] S7, For PT in the t.2 generation population t Each ordinary individual is updated to obtain the PT value in the t.2 generation population. t The updated individual corresponding to each ordinary individual is represented by the PD of the t.2 generation population. t The elite individuals and the PT in the t.2 generation population t The updated individual population corresponding to each ordinary individual consists of K individuals in the t.3 generation, where pt = 1, 2, ..., PT. t The specific process of performing an update operation on the pt-th ordinary individual in the t.2-th generation population to obtain its corresponding updated individual is as follows:

[0018] S7.1. Use a random function to randomly generate a real number r between 0 and 1. cpt ;

[0019] If r cpt ≥0.4, at the same time Then, the PD of the t.2 generation population is obtained through the roulette wheel algorithm. t One elite individual is selected from the 1 elite individuals and crossovered with the pt-th ordinary individual in the t.2-th generation population to obtain the crossover individual of the pt-th ordinary individual in the t.2-th generation population. The crossover operation is as follows: the process order sequence of the selected elite individual is crossovered with the process order sequence of the pt-th ordinary individual to obtain the process order sequence of the crossover individual; the machine selection sequence of the selected elite individual is crossovered with the machine selection sequence of the pt-th ordinary individual to obtain the machine selection sequence of the crossover individual.

[0020] If r cpt ≥0.4, at the same time Then the PD of the t.2 generation population t An elite individual or the first generation of the t.2 population From the 10 ordinary individuals, one individual is randomly selected and crossovered with the pt-th ordinary individual of the t.2-th generation population to obtain the crossover individual of the pt-th ordinary individual of the t.2-th generation population. The crossover operation is as follows: the process order sequence of the selected individual is POX crossovered with the process order sequence of the pt-th ordinary individual to obtain the process order sequence of the crossover individual; the machine selection sequence of the selected individual is uniformly crossovered with the machine selection sequence of the pt-th ordinary individual to obtain the machine selection sequence of the crossover individual.

[0021] If rcpt If the value is less than 0.4, then no operation is performed on the pt-th ordinary individual in the t.2-th generation population, and the pt-th ordinary individual in the t.2-th generation population is its crossover individual;

[0022] S7.2. Use a random function to randomly generate a real number r between 0 and 1. mpt ;

[0023] If r mpt If the result is ≤0.1, then a neighborhood search mutation operation is performed on the process ordering sequence of the crossover individual of the pt-th ordinary individual in the t.2-th generation population to obtain the process ordering sequence of the updated individual of the pt-th ordinary individual in the t.2-th generation population. Then, a random mutation operation is performed on the machine selection sequence of the crossover individual of the pt-th ordinary individual in the t.2-th generation population to obtain the machine selection sequence of the updated individual of the pt-th ordinary individual in the t.2-th generation population. The random mutation operation is performed by randomly selecting x from the machine selection sequence. 1t For each selected gene, a random machine number other than the gene's value is chosen from the set of available machines containing that gene's value to replace the gene's value. 1t It is an integer greater than or equal to 1 and less than or equal to Q;

[0024] If r mpt If the value is greater than 0.1, then no operation will be performed on the crossover individual of the ptth ordinary individual in the t.2th generation population, and the crossover individual of the ptth ordinary individual in the t.2th generation population will be directly used as the updated individual of the ptth ordinary individual in the t.2th generation population.

[0025] S8. Perform a screening operation on the t.3 generation population to mark the A-class and B-class vigilance individuals in the t.3 generation population. The specific screening operation process is as follows:

[0026] S8.1. Using a greedy decoding method, perform decoding operations on each individual in the t.3 generation population to obtain the optimization objective value corresponding to each individual in the t.3 generation population; randomly select 10% of the individuals in the t.3 generation population; then sort the K individuals in the t.3 generation population in ascending order according to the optimization objective value of each individual in the t.3 generation population to obtain the sorted t.3 generation population; select the last 10% of the individuals from the sorted t.3 generation population; determine whether there are any duplicate individuals among the 10% of individuals selected twice. If so, keep one duplicate individual and delete the others. The remaining individuals after deleting the duplicate individuals from the 10% of individuals selected twice are used as the vigilance individuals of the t.3 generation population. The number of vigilance individuals in the t.3 generation population is recorded as PS. t In the t.3 generation population, all individuals other than vigilant individuals are non-vigilant individuals.

[0027] S8.2, Set ps = 1, 2, ..., PS t If the optimization objective value of the ps-th vigilant individual in the t.3 generation population is higher than the minimum optimization objective value among the K individuals in the t.3 generation population, then it is classified as a vigilant individual of type A; otherwise, it is classified as a vigilant individual of type B.

[0028] After completing step S8.2, all A-class and B-class vigilant individuals in the t.3 generation population are obtained; the total number of A-class vigilant individuals in the t.3 generation population is denoted as PS. At The total number of vigilant individuals of type B in the t.2 generation population is denoted as PS. Bt ;

[0029] S9, PS of the t.3 generation population At Each Class A vigilant individual is updated individually to obtain the PS of the t.3 generation population. At The updated individuals of the A-class vigilant individuals, and the PS of the t.3 generation population. Bt Each Class B vigilant individual is updated individually to obtain the PS of the t.3 generation population. Bt The updated individual for each of the B-class vigilance individuals is defined as the candidate scheduling solution set St, which is initially an empty set, with psa = 1, 2, ..., PS. At The specific process of updating the psa-th A-class vigilant individual in the t.3 generation population to obtain the updated individual is as follows:

[0030] S9.1. Use a random function to randomly generate a real number rs between 0 and 1. psa ;

[0031] S9.1.1 For the psa-th A-class vigilant individual in the t.3 generation population, set a candidate scheduling solution S psa This is equal to the psa-th vigilant individual in the t.3 generation population;

[0032] S9.1.2, regarding S psa Perform an update operation to obtain S psa The routing update solution, specifically the update operation is as follows:

[0033] First, for S psa The process sequence is sorted and then reverse-learned to obtain S. psa The reverse solution of the process sorting sequence is then used to generate S through Path Relinking. psa The process sequence and S psa The set of routing solutions between the reverse solutions of the process sorting sequence is used to randomly select a routing solution from the set to update S. psa The process sequence;

[0034] If rs psa ≤0.2, for S psa The machine selects a sequence for random mutation and updates S. psa The machine selection sequence;

[0035] If rs psa >0.2, for S psa The machine selects the sequence and does not perform any operation;

[0036] At this time S psa Update complete. psa That is S psa The route update solution;

[0037] S9.1.3, S psa The route update solution is added as a candidate scheduling solution to the candidate solution set St;

[0038] After performing the S9.1 operation on each Class A vigilant individual in the t.3 generation population, we obtain the result containing PS. At The set of candidate scheduling solutions St;

[0039] S9.2. Use a greedy decoding method to decode each scheduling solution in the candidate scheduling solution set St to obtain the optimization objective value corresponding to each scheduling solution;

[0040] S9.3. Define a scheduling solution set SDt. Sort the A-type vigilant individuals of the t.3 generation population and all candidate scheduling solutions of the candidate scheduling solution set St in ascending order according to the optimization objective value and add them to the scheduling solution set SDt.

[0041] S10. Perform a two-level neighborhood search operation on each B-class vigilant individual in the t.3 generation population to obtain the updated individual for each B-class vigilant individual in the t.3 generation population;

[0042] S11, retrieve the first PS from the scheduling solution set SDt. At The scheduling solution, the PS of the t.3 generation population Bt The updated individuals of the B-class vigilant individuals and all non-vigilant individuals of the t.3 generation population constitute the t-generation population;

[0043] S12. Determine if the current value of t is equal to T. If it is not equal to T, update the value of t by adding 1 to the current value of t, and then return to step 4 for the next iteration. If it is equal to T, the scheduling solution with the smallest optimization objective value in the Tth generation population is the solution result.

[0044] The specific process in S4.1 where the variable neighborhood breadth-first search algorithm is used to process the input solution to obtain the intermediate scheduling solution corresponding to the k-th scheduling of the (t-1)-th generation population is as follows:

[0045] Step A1: Set the threshold constant Let G be the maximum number of iterations for the variable neighborhood, where G is any integer between 10 and 20, and let F be the optimization target threshold. min F min The initial value is infinity. The current input solution is denoted as X. The variable neighborhood set of the variable neighborhood breadth search algorithm is set as {N(1), N(2), N(3), N(4)}, where N(S) is the neighborhood structure in the variable neighborhood set, and S = 1, 2, 3, 4.

[0046] The neighborhood structure N(1) is used to perform the following operation: select any two genes with different values ​​in the process sorting sequence of X and swap the positions of the two selected genes;

[0047] The neighborhood structure N(2) is used to perform the following operation: select two genes with different values ​​in the process sorting sequence of X, and insert the gene with the later position in the selected gene in front of the gene with the earlier position.

[0048] The neighborhood structure N(3) is used to perform the following operation: randomly select X 2t There are 10 different jobs, which are X's process sequence. 2t For each of the three different assignments, randomly find a gene whose value equals the assignment number of that assignment. Then, randomly shuffle the found X... 2t The position of each gene in the process sequencing sequence, where x 2t It is an integer greater than or equal to 1 and less than or equal to Q;

[0049] The neighborhood structure N(4) is used to perform the following operations: perform Path Relinking operation on the process order sequence of X and the process order sequence of another scheduling solution randomly selected from the population of X, other than X, to obtain a set of routing scheduling solutions. Select any routing scheduling solution from the set of routing scheduling solutions to replace the process order sequence of X.

[0050] Step A2: Set the number of iterations for the variable neighborhood to g, initialize g by setting g = 1; set the variable n, initialize n by setting n = 1;

[0051] Step A3: Perform the g-th iteration, specifically as follows:

[0052] A3.1. Define X'; let X' = X;

[0053] A3.2. Perform operations on X' to obtain the updated solution of X', denoted as X'". The specific process is as follows:

[0054] A3.2.1 Perform neighborhood structure N(n) operations on X' to obtain the process sorting sequence of X”;

[0055] A3.2.2. A real number rg between 0 and 1 is randomly generated using a random function;

[0056] A3.2.3 If rg≤0.1, then perform a random mutation operation on the machine selection sequence of X' to obtain the machine selection sequence of X”; if rg>0.1, then do not perform any operation on X', and directly use the machine selection sequence of X' as the machine selection sequence of X”.

[0057] A3.2.4. Use a greedy decoding method to decode the currently obtained X” to obtain its optimized target value F(X”);

[0058] A3.2.5 Determine whether F(X”) is less than F min The current value, if F(X”) is less than F min Given the current value of F, let X”' = X”, F min =F(X”), and first update the current value of n by adding 1 to the current value of n, then determine whether the current value of n is less than or equal to If the current value of n is less than or equal to Then return to step A3.2.1 to continue processing. If the current value of n is not less than or equal to... Then determine if the current value of g is equal to G. If not, update the current value of g by adding 1 to the current value of g, and set n=1 before returning to step A3.2.1 to continue processing. If g=G, then use X”' as the intermediate scheduling solution corresponding to the k-th scheduling of the (t-1)-th generation population, and end the variable neighborhood breadth search operation; if F(X”) is not less than F min If the current value is found, then let n = 1 and return to step A3.2.1.

[0059] Compared with existing technologies, the advantages of this invention lie in its use of a three-stage hybrid algorithm to solve the flexible shop floor scheduling problem with the objective of minimizing the maximum completion time. The search process is divided into three stages, with the population consisting of ordinary individuals, elite individuals, and vigilant individuals. In the first stage, a variable neighborhood breadth-first search algorithm is proposed to broadly search the solution space of the process selection code and to update the machine selection code by simplifying the Nopt1 neighborhood. This stage can achieve rapid convergence to the global optimum even for smaller-scale scheduling problems. In the second stage, this invention proposes an adaptive formula for updating the number of elite individuals and uses crossover and mutation operations to better utilize the elite individuals obtained in the previous stage. In the final stage, this invention updates the vigilant individuals to increase the ability of individuals in the population to escape local optima. Therefore, this invention is less prone to getting trapped in local optima during the solution process and achieves higher solution accuracy. Experiments have demonstrated that this invention has better solution performance than existing advanced algorithms and possesses excellent practicality and scalability, making it well-suited for practical shop floor scheduling. Attached Figure Description

[0060] Figure 1 This is a flowchart of the three-stage hybrid algorithm for solving the flexible job shop scheduling method of the present invention. Detailed Implementation

[0061] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.

[0062] Example 1: As Figure 1 As shown, a three-stage hybrid algorithm for solving flexible job shop scheduling includes the following steps:

[0063] Step 1: Minimize the maximum completion time as the optimization objective of the flexible job shop scheduling problem; let N be the total number of jobs, M be the total number of machines capable of handling these N jobs, Q be the total number of operations for the N jobs, and J be the total number of operations for the i-th job. i Let i = 1, 2, ..., N, and let the j-th step of the i-th job be denoted as O. ij j = 1, 2, ..., J i Set the machine numbers of the M machines to 1, 2, 3, ..., M, and the job numbers of the N jobs to 1, 2, 3, ..., N; This will allow the processing of process O... ij The total number of all machines is denoted as L. ij L ij ≤M, will be able to process process O ij The set of machine numbers for all machines is called process O. ij The optional set of machines will be used for process O ij The set of available machines is denoted as M. ij Mij ={M ij1 M ij2 , ...M ijLij}, where M ij1 M ij2 ,……,M ijLij These represent the processes that can be processed, O, respectively. ij The machine number;

[0064] Step 2: Generate an initial population containing K scheduling solutions, i.e., the 0th generation population, using a hybrid strategy of global selection, local selection, and random selection, and employing a two-layer encoding method of process sorting sequence and machine selection sequence; where K is any integer greater than or equal to 50 and divisible by 10, and each scheduling solution includes a process sorting sequence and a machine selection sequence; in the two-layer encoding method, the length of the process sorting sequence is set to Q, each gene in the process sorting sequence represents a process, and the value of each gene is a job number; the length of the machine selection sequence is set to Q, and in each scheduling solution, there exists J in its process sorting sequence. i The job number of the i-th job, J i The job number of the i-th job, from left to right, represents the first to the J-th steps of the i-th job. i In each of the N jobs' Q-level processes, each gene corresponds to a process in its machine selection sequence, and the value of each gene is a machine number. In each process's optional machine set, at least one machine number can be found in the machine selection sequence.

[0065] Step 3: Set the maximum number of iterations to T, where T is a positive integer greater than or equal to 50; set the iteration variable t and initialize t, letting t = 1, t = 1, 2, ..., T;

[0066] Step 4: Perform the t-th iteration, the specific process is as follows:

[0067] S4.1 Update each scheduling solution in the (t-1)th generation population to obtain the t.1th generation population. Let k = 1, 2, ..., K. The specific process of updating the kth scheduling solution in the (t-1)th generation population is as follows:

[0068] The optimization objective value of each scheduling solution is obtained by performing a decoding operation on each scheduling solution of the (t-1)th generation population using a greedy decoding method.

[0069] Take the k-th scheduling solution of the (t-1)-th generation population as the input solution of the variable neighborhood breadth search algorithm. First, use the variable neighborhood breadth search algorithm to operate on the input solution to obtain the intermediate scheduling solution corresponding to the k-th scheduling of the (t-1)-th generation population. Then, perform the simplified Nopt1 operation on the obtained intermediate scheduling solution to get the k-th scheduling solution of the t.1-th generation population; where the simplified Nopt1 operation is the Simplified Nopt1 neighborhood disclosed in the literature "Escamilla Serna NJ, Seck-Tuoh-Mora JC, Medina-Marin J, Hernandez-Romero N, Barragan-Vite I, Corona Armenta JR. A global-local neighborhood search algorithm and tabu search for flexible job shop scheduling problem. PeerJ Comput Sci. 2021 May 27;7:e574.doi:10.7717 / peerj-cs.574.PMID:34141895;PMCID:PMC8176541." The variable neighborhood breadth search algorithm is obtained by improving the variable neighborhood search algorithm as follows: First, cancel the step of initializing the optimization objective threshold to the optimization objective value of the input solution in the variable neighborhood search algorithm, and now initialize the optimization objective threshold to infinity; Second, cancel the step of continuously updating the input solution in the variable neighborhood search algorithm, and now make the input solution remain unchanged throughout the search process;

[0070] [[ID=,3]]S5. Use the greedy decoding method to perform decoding operations on each scheduling solution of the t.1-th generation population respectively to obtain the optimization objective value corresponding to each scheduling solution of the t.1-th generation population; sort the k scheduling solutions of the t.1-th generation population in ascending order according to the optimization objective values from small to large; first use formula (1) to calculate the number PD of elite individuals in the t.1-th generation population t , and then take the first PD t scheduling solutions after the ascending order sorting as the elite individuals of the t.1-th generation population, and the remaining scheduling solutions as the ordinary individuals of the t.1-th generation population. Denote the number of ordinary individuals as PT t ;

[0071]

[0072] In formula (1), P1 is set as a real number between 0 and 1, P2 is set as a real number between 0 and 1, and P1 < P2; ceil() is the ceiling function, COS is the cosine function, and π is the pi;

[0073] S6. Set the t.2 generation population to be equal to the updated t.1 generation population. At this time, the t.2 generation population contains individuals with PD. t Elite individuals and PT t An ordinary individual;

[0074] S7, For PT in the t.2 generation population t Each ordinary individual is updated to obtain the PT value in the t.2 generation population. t The updated individual corresponding to each ordinary individual is represented by the PD of the t.2 generation population. t The elite individuals and the PT in the t.2 generation population t The updated individual population corresponding to each ordinary individual consists of K individuals in the t.3 generation, where pt = 1, 2, ..., PT. t The specific process of performing an update operation on the pt-th ordinary individual in the t.2-th generation population to obtain its corresponding updated individual is as follows:

[0075] S7.1. Use a random function to randomly generate a real number r between 0 and 1. cpt ;

[0076] If r cpt ≥0.4, at the same time Then, the PD of the t.2 generation population is obtained through the roulette wheel algorithm. t One elite individual is selected from the 1 elite individuals and crossovered with the pt-th ordinary individual in the t.2-th generation population to obtain the crossover individual of the pt-th ordinary individual in the t.2-th generation population. The crossover operation is as follows: the process order sequence of the selected elite individual is crossovered with the process order sequence of the pt-th ordinary individual to obtain the process order sequence of the crossover individual; the machine selection sequence of the selected elite individual is crossovered with the machine selection sequence of the pt-th ordinary individual to obtain the machine selection sequence of the crossover individual.

[0077] If r cpt ≥0.4, at the same time Then the PD of the t.2 generation population t An elite individual or the first generation of the t.2 population From the 10 ordinary individuals, one individual is randomly selected and crossovered with the pt-th ordinary individual of the t.2-th generation population to obtain the crossover individual of the pt-th ordinary individual of the t.2-th generation population. The crossover operation is as follows: the process order sequence of the selected individual is POX crossovered with the process order sequence of the pt-th ordinary individual to obtain the process order sequence of the crossover individual; the machine selection sequence of the selected individual is uniformly crossovered with the machine selection sequence of the pt-th ordinary individual to obtain the machine selection sequence of the crossover individual.

[0078] If r cpt If the value is less than 0.4, then no operation is performed on the pt-th ordinary individual in the t.2-th generation population, and the pt-th ordinary individual in the t.2-th generation population is its crossover individual;

[0079] S7.2. Use a random function to randomly generate a real number r between 0 and 1. mpt ;

[0080] If r mpt If the result is ≤0.1, then a neighborhood search mutation operation is performed on the process ordering sequence of the crossover individual of the pt-th ordinary individual in the t.2-th generation population to obtain the process ordering sequence of the updated individual of the pt-th ordinary individual in the t.2-th generation population. Then, a random mutation operation is performed on the machine selection sequence of the crossover individual of the pt-th ordinary individual in the t.2-th generation population to obtain the machine selection sequence of the updated individual of the pt-th ordinary individual in the t.2-th generation population. The random mutation operation is performed by randomly selecting x from the machine selection sequence. 1t For each selected gene, a random machine number other than the gene's value is chosen from the set of available machines containing that gene's value to replace the gene's value. 1t It is an integer greater than or equal to 1 and less than or equal to Q;

[0081] If r mpt If the value is greater than 0.1, then no operation will be performed on the crossover individual of the ptth ordinary individual in the t.2th generation population, and the crossover individual of the ptth ordinary individual in the t.2th generation population will be directly used as the updated individual of the ptth ordinary individual in the t.2th generation population.

[0082] S8. Perform a screening operation on the t.3 generation population to mark the A-class and B-class vigilance individuals in the t.3 generation population. The specific screening operation process is as follows:

[0083] S8.1. Using a greedy decoding method, perform decoding operations on each individual in the t.3 generation population to obtain the optimization objective value corresponding to each individual in the t.3 generation population; randomly select 10% of the individuals in the t.3 generation population; then sort the K individuals in the t.3 generation population in ascending order according to the optimization objective value of each individual in the t.3 generation population to obtain the sorted t.3 generation population; select the last 10% of the individuals from the sorted t.3 generation population; determine whether there are any duplicate individuals among the 10% of individuals selected twice. If so, keep one duplicate individual and delete the others. The remaining individuals after deleting the duplicate individuals from the 10% of individuals selected twice are used as the vigilance individuals of the t.3 generation population. The number of vigilance individuals in the t.3 generation population is recorded as PS. t In the t.3 generation population, all individuals other than vigilant individuals are non-vigilant individuals.

[0084] S8.2, Set ps = 1, 2, ..., PS t If the optimization objective value of the ps-th vigilant individual in the t.3 generation population is higher than the minimum optimization objective value among the K individuals in the t.3 generation population, then it is classified as a vigilant individual of type A; otherwise, it is classified as a vigilant individual of type B.

[0085] After completing step S8.2, all A-class and B-class vigilant individuals in the t.3 generation population are obtained; the total number of A-class vigilant individuals in the t.3 generation population is denoted as PS. At The total number of vigilant individuals of type B in the t.2 generation population is denoted as PS. Bt ;

[0086] S9, PS of the t.3 generation population At Each Class A vigilant individual is updated individually to obtain the PS of the t.3 generation population. At The updated individuals of the A-class vigilant individuals, and the PS of the t.3 generation population. Bt Each Class B vigilant individual is updated individually to obtain the PS of the t.3 generation population. Bt The updated individual for each of the B-class vigilance individuals is defined as the candidate scheduling solution set St, which is initially an empty set, with psa = 1, 2, ..., PS. At The specific process of updating the psa-th A-class vigilant individual in the t.3 generation population to obtain the updated individual is as follows:

[0087] S9.1. Use a random function to randomly generate a real number rs between 0 and 1. psa ;

[0088] S9.1.1 For the psa-th A-class vigilant individual in the t.3 generation population, set a candidate scheduling solution S psa This is equal to the psa-th vigilant individual in the t.3 generation population;

[0089] S9.1.2, regarding S psa Perform an update operation to obtain S psa The routing update solution, specifically the update operation is as follows:

[0090] First, for S psa The process sequence is sorted and then reverse-learned to obtain S. psa The reverse solution of the process sorting sequence is then used to generate S through Path Relinking. psa The process sequence and S psa The set of routing solutions between the reverse solutions of the process sorting sequence is used to randomly select a routing solution from the set to update S. psa The process sequence;

[0091] If rs psa ≤0.2, for S psa The machine selects a sequence for random mutation and updates S. psa The machine selection sequence;

[0092] If rs psa >0.2, for S psa The machine selects the sequence and does not perform any operation;

[0093] At this time S psa Update complete. psa That is S psa The route update solution;

[0094] S9.1.3, S psa The route update solution is added as a candidate scheduling solution to the candidate solution set St;

[0095] After performing the S9.1 operation on each Class A vigilant individual in the t.3 generation population, we obtain the result containing PS. At The set of candidate scheduling solutions St;

[0096] S9.2. Use a greedy decoding method to decode each scheduling solution in the candidate scheduling solution set St to obtain the optimization objective value corresponding to each scheduling solution;

[0097] S9.3. Define a scheduling solution set SDt. Sort the A-type vigilant individuals of the t.3 generation population and all candidate scheduling solutions of the candidate scheduling solution set St in ascending order according to the optimization objective value and add them to the scheduling solution set SDt.

[0098] S10. Perform a two-level neighborhood search operation on each B-class vigilant individual in the t.3 generation population to obtain the updated individual of each B-class vigilant individual in the t.3 generation population; the two-level neighborhood search operation is described in the literature "Zhao Shikui. Two-level neighborhood search hybrid algorithm for solving the flexible job shop scheduling problem [J]. Journal of Mechanical Engineering, 2015, 51(14):175-184."

[0099] S11, retrieve the first PS from the scheduling solution set SDt. At The scheduling solution, the PS of the t.3 generation population Bt The updated individuals of the B-class vigilant individuals and all non-vigilant individuals of the t.3 generation population constitute the t-generation population;

[0100] S12. Determine if the current value of t is equal to T. If it is not equal to T, update the value of t by adding 1 to the current value of t, and then return to step 4 for the next iteration. If it is equal to T, the scheduling solution with the smallest optimization objective value in the Tth generation population is the solution result.

[0101] Example 2: This example is basically the same as Example 1, except that in this example, the specific process of using the variable neighborhood breadth-first search algorithm in S4.1 to obtain the intermediate scheduling solution corresponding to the k-th scheduling of the (t-1)-th generation population is as follows:

[0102] Step A1: Set the threshold constant Let G be the maximum number of iterations for the variable neighborhood, where G is any integer between 10 and 20, and let F be the optimization target threshold. min F min The initial value is infinity. The current input solution is denoted as X. The variable neighborhood set of the variable neighborhood breadth search algorithm is set as {N(1), N(2), N(3), N(4)}, where N(S) is the neighborhood structure in the variable neighborhood set, and S = 1, 2, 3, 4.

[0103] The neighborhood structure N(1) is used to perform the following operation: select any two genes with different values ​​in the process sorting sequence of X and swap the positions of the two selected genes;

[0104] The neighborhood structure N(2) is used to perform the following operation: select two genes with different values ​​in the process sorting sequence of X, and insert the gene with the later position in the selected gene in front of the gene with the earlier position.

[0105] The neighborhood structure N(3) is used to perform the following operation: randomly select X 2t There are 10 different jobs, which are X's process sequence. 2t For each of the three different assignments, randomly find a gene whose value equals the assignment number of that assignment. Then, randomly shuffle the found X... 2t The position of each gene in the process sequencing sequence, where x 2t It is an integer greater than or equal to 1 and less than or equal to Q;

[0106] The neighborhood structure N(4) is used to perform the following operations: perform Path Relinking operation on the process order sequence of X and the process order sequence of another scheduling solution randomly selected from the population of X, other than X, to obtain a set of routing scheduling solutions. Select any routing scheduling solution from the set of routing scheduling solutions to replace the process order sequence of X.

[0107] Step A2: Set the number of iterations for the variable neighborhood to g, initialize g by setting g = 1; set the variable n, initialize n by setting n = 1;

[0108] Step A3: Perform the g-th iteration, specifically as follows:

[0109] A3.1. Define X'; let X' = X;

[0110] A3.2. Perform operations on X' to obtain the updated solution of X', denoted as X'". The specific process is as follows:

[0111] A3.2.1 Perform neighborhood structure N(n) operations on X' to obtain the process sorting sequence of X”;

[0112] A3.2.2. A real number rg between 0 and 1 is randomly generated using a random function;

[0113] A3.2.3 If rg≤0.1, then perform a random mutation operation on the machine selection sequence of X' to obtain the machine selection sequence of X”; if rg>0.1, then do not perform any operation on X', and directly use the machine selection sequence of X' as the machine selection sequence of X”.

[0114] A3.2.4. Use a greedy decoding method to decode the currently obtained X” to obtain its optimized target value F(X”);

[0115] A3.2.5 Determine whether F(X”) is less than F min The current value, if F(X”) is less than F min Given the current value of F, let X”' = X”, F min =F(X”), and first update the current value of n by adding 1 to the current value of n, then determine whether the current value of n is less than or equal to If the current value of n is less than or equal to Then return to step A3.2.1 to continue processing. If the current value of n is not less than or equal to... Then determine if the current value of g is equal to G. If not, update the current value of g by adding 1 to the current value of g, and set n=1 before returning to step A3.2.1 to continue processing. If g=G, then use X”' as the intermediate scheduling solution corresponding to the k-th scheduling of the (t-1)-th generation population, and end the variable neighborhood breadth search operation; if F(X”) is not less than F min If the current value is found, then let n = 1 and return to step A3.2.1.

[0116] To verify the effectiveness of the three-stage hybrid algorithm for solving flexible job shop scheduling problems in this invention, the method (SFS-HA) was compared with the VNSGA algorithm disclosed in reference 1 (Guo-Hui Zhang, Ling-Jie Zhang, Xiao-Hui Song, Yong-Cheng Wang, and Zhou Chi. 2019. A variable neighborhood search based genetic algorithm for flexible job shop scheduling problem. Cluster Computing 22, 5 (2019), 11561–11572.), the MA2 algorithm disclosed in reference 2 (Yuan Yuan and XuHua. 2015. Multiobjective Flexible Job Shop Scheduling Using MemeticAlgorithms. IEEE Transactions on Automation Science and Engineering 12, 1 (2015), 336–353.), and the algorithm disclosed in reference 3 (Nayeli Jazmin Escamilla Serna, Juan Carlos. Seck-Tuoh-Mora, Joselito Medina Marin, Norberto Hernandez-Romero, Irving Barragan-Vite, and Jose Ramon Corona Armenta. 2021. A global-local neighborhood search algorithm and tabu search for flexible job shop scheduling problem. PeerJComputer Science 3(2021), 3–20.) Public GLNSA algorithm, Document 4 (Zhi-Feng Liu, Jun-LongWang, Cai-Xia Zhang, Hong-Yan Chu, and Zhang Lu. 2021.This paper compares five advanced algorithms: the VND-hGA algorithm disclosed in *A hybrid genetic-particle swarm algorithm based on multilevel neighborhood structure for flexible jobshop scheduling problem. Computers & Operations Research 2 (2021), 105431.*, and the e-GA algorithm disclosed in reference 5 (Zhi-Feng Liu, Jun-Long Wang, Cai-Xia Zhang, Hong-Yan Chu, and Zhang Lu. 2021. A hybrid genetic-particle swarm algorithm based on multilevel neighborhood structure for flexible job shop scheduling problem. Computers & Operations Research 2 (2021), 105431.). Specifically, for different problem sizes, the maximum number of iterations for the three-stage hybrid algorithm of this invention to solve flexible job shop scheduling ranges from 50 to 100, and the population size ranges from 50 to 300. Specific experimental comparison data are shown in Table 1.

[0117] Table 1

[0118]

[0119]

[0120] In Table 1, n*m represents the problem size of the example, and C(max) represents the minimum optimization target value in 10 runs. From the experimental data in Table 1, it is easy to see that in the comparison of C(max) values, the SFS-HA algorithm proposed in this invention achieved the best results among the compared algorithms in 9 out of 10 examples, demonstrating superior performance. The three-stage hybrid algorithm of this invention for solving flexible job shop scheduling has better solution performance than existing advanced algorithms and possesses excellent practicality and scalability, making it well-suited for practical job shop scheduling applications.

Claims

1. A method for solving flexible job-shop scheduling problem by a three-stage hybrid algorithm, characterized in that The method comprises the following steps: Step 1, taking the minimum maximum completion time as the optimization goal of the flexible job shop scheduling problem; taking the total number of jobs as N, the total number of machines capable of processing the N jobs as M, the total number of processes of the N jobs as Q, the total number of processes of the i-th job as J i , i = 1, 2, …, N, the j-th process of the i-th job as O ij , j = 1, 2, …, J i ; setting the machine numbers of the M machines as 1, 2, 3, …, M in turn, and the job numbers of the N jobs as 1, 2, 3, …, N in turn; taking the total number of all machines capable of processing the process O ij as L ij , L ij ≤ M, the set of machine numbers of all machines capable of processing the process O ij as the selectable machine set of the process O ij , and taking the selectable machine set of the process O ij as M ij , M ij = {M ij1 , M ij2 , …, M ijLij}, where M ij1 , M ij2 , …, M ijLij respectively represent the machine numbers capable of processing the process O ij ; Step 2, generating an initial population, i.e., the 0th generation population, containing K scheduling solutions by a hybrid strategy of global selection, local selection and random selection and using a double-layer encoding mode of process sequencing sequence and machine selection sequence; wherein K is an integer greater than or equal to 50 and divisible by 10, each scheduling solution includes a process sequencing sequence and a machine selection sequence; in the double-layer encoding mode, the length of the process sequencing sequence is set as Q, each gene of the process sequencing sequence represents a process, and the value of each gene is a job number; the length of the machine selection sequence is set as Q, and in each scheduling solution, the job numbers of the J i i i th job in the process sequencing sequence from left to right represent the 1st process to the J i th process of the i th job, and in the machine selection sequence, each gene corresponds to a process, and the value of each gene is a machine number, and in the Q processes of the N jobs, at least one machine number in the selectable machine set of each process can be found in the machine selection sequence. Step 3, setting the maximum number of iterations as T, T is a positive integer greater than or equal to 50; setting an iteration variable t, initializing t, t = 1, t = 1, 2,..., T; Step 4, performing the tth iteration, the specific process is as follows: S4.1, updating each scheduling solution in the t-1th generation population respectively to obtain the t.1th generation population, setting k = 1, 2,..., K, and the specific process of updating the kth scheduling solution in the t-1th generation population is as follows: Each scheduling solution in the t-1th generation population is decoded by a greedy decoding method to obtain the optimization target value of each scheduling solution; The kth scheduling solution in the t-1th generation population is taken as an input solution of the variable neighborhood breadth search algorithm, and the variable neighborhood breadth search algorithm is used to operate the input solution to obtain an intermediate scheduling solution corresponding to the kth scheduling of the t-1th generation population, and then the intermediate scheduling solution obtained at this time is subjected to a simplification Nopt1 operation to obtain the kth scheduling solution of the t.1th generation population; wherein, the variable neighborhood breadth search algorithm is obtained by improving the variable neighborhood search algorithm as follows: one, canceling the step of initializing the optimization target threshold value to the optimization target value of the input solution in the variable neighborhood search algorithm, and now initializing the optimization target threshold value to infinity; two, canceling the step of continuously updating the input solution in the variable neighborhood search algorithm, and now keeping the input solution unchanged in the whole search process; S5, decode each scheduling solution of the t.1 generation population using a greedy decoding method to obtain an optimization target value corresponding to each scheduling solution of the t.1 generation population; sort the k scheduling solutions of the t.1 generation population in ascending order according to the optimization target values of the k scheduling solutions of the t.1 generation population; and calculate the number PD of elite individuals in the t.1 generation population using formula (1) t , and then take the first PD t scheduling solutions in the ascendingly sorted t.1 generation population as the elite individuals of the t.1 generation population, and take the remaining scheduling solutions as the common individuals of the t.1 generation population, and record the number of the common individuals as PT t ; In formula (1), P1 is set as a real number between 0 and 1, P2 is set as a real number between 0 and 1, and P1 < P2 is satisfied; ceil() is a rounding up symbol, COS is a cosine function, and π is a circular constant; S6, set the t.2 generation population equal to the updated t.1 generation population, at this time the t.2 generation population has PD t elite individuals and PT t ordinary individuals; S7, PT in the t.2th generation population is updated by each of the PT common individuals t S8, the t.3th generation population including K individuals is formed by the K individuals corresponding to the K common individuals in the t.2th generation population t S9, the t.3th generation population is updated by each of the PT common individuals in the t.2th generation population t S10, the t.4th generation population including K individuals is formed by the K individuals corresponding to the K common individuals in the t.3th generation population t S11, the t.4th generation population is updated by each of the PT common individuals in the t.3th generation population t wherein the specific process of updating the individual corresponding to the pt common individual in the t.2th generation population is as follows: S7.1, randomly generate a real number r between 0 and 1 using a random function cpt ; If r cpt ≥ 0.4, while then select an elite individual from the PD t of the t.2th generation population by roulette algorithm, and perform crossover operation between the selected elite individual and the ptth common individual in the t.2th generation population to obtain a crossover individual of the ptth common individual in the t.2th generation population, wherein the crossover operation is specifically as follows: performing POX crossover operation between the process sequence of the selected elite individual and the process sequence of the ptth common individual to obtain the process sequence of the crossover individual, and performing uniform crossover operation between the machine selection sequence of the selected elite individual and the machine selection sequence of the ptth common individual to obtain the machine selection sequence of the crossover individual. If r cpt ≥ 0.4, while PD t from the t.2th generation population is randomly selected from the elite individuals or the first The selected individual and the ptth ordinary individual of the t.2th generation population are crossed to obtain the crossed individual of the ptth ordinary individual of the t.2th generation population, and the crossing operation is specifically: the process sorting sequence of the selected individual and the process sorting sequence of the ptth ordinary individual are subjected to POX crossing operation to obtain the process sorting sequence of the crossed individual, and the machine selection sequence of the selected individual and the machine selection sequence of the ptth ordinary individual are subjected to uniform crossing operation to obtain the machine selection sequence of the crossed individual. If r cpt If r < 0.4, no operation is performed on the ptth ordinary individual in the t.2th generation population, and the ptth ordinary individual in the t.2th generation population is the crossover individual of the ptth ordinary individual. S7.2, randomly generate a real number r between 0 and 1 using a random function mpt ; If r mpt ≤ 0.1, the procedure ordering sequence of the cross individual of the ptth ordinary individual of the t.2th generation population is subjected to a field search mutation operation to obtain the procedure ordering sequence of the updated individual of the ptth ordinary individual in the t.2th generation population, and the machine selection sequence of the cross individual of the ptth ordinary individual of the t.2th generation population is subjected to a random mutation operation to obtain the machine selection sequence of the updated individual of the ptth ordinary individual in the t.2th generation population, wherein the random mutation operation is as follows: x 1t genes in the machine selection sequence are randomly selected, and for each selected gene, one machine number other than the value of the gene is randomly selected from the set of selectable machines in which the value of the gene is located to replace the value of the gene, x 1t is an integer greater than or equal to 1 and less than or equal to Q. If r mpt > 0.1, no operation is performed on the crossover individual of the ptth ordinary individual of the t.2th generation population, and the crossover individual of the ptth ordinary individual of the t.2th generation population is directly taken as the update individual of the ptth ordinary individual of the t.2th generation population. S8, screening the t.3th generation population to mark the A type alert individuals and the B type alert individuals in the t.3th generation population, and the specific screening operation process is as follows: S8.1, decode each individual of the t.3th generation population using a greedy decoding method to obtain an optimization target value corresponding to each individual of the t.3th generation population; randomly select 10% of the individuals in the t.3th generation population; then sort the K individuals in the t.3th generation population in ascending order according to the optimization target values of the individuals in the t.3th generation population to obtain a sorted t.3th generation population, and select the last 10% of the individuals from the sorted t.3th generation population; determine whether there are individuals that have been repeatedly selected in the 10% of the individuals selected twice, if there are, retain one of the repeated individuals and delete the other individuals, delete the 10% of the individuals selected twice after removing the repeated individuals, and use the remaining individuals as the alert individuals of the t.3th generation population; the number of the alert individuals in the t.3th generation population is denoted as PS t ; the individuals in the t.3th generation population other than the alert individuals are non-alert individuals; S8.2, set ps = 1, 2, …, PS t If the optimization target value of the ps-th guard individual of the t.3th generation population is higher than the minimum value of the optimization target values of the K individuals of the t.3th generation population, the ps-th guard individual is classified as a guard individual of type A, otherwise, the ps-th guard individual is classified as a guard individual of type B. After the operation according to step S8.2 is completed, all the A-type and B-type alert individuals of the t.3th generation population are obtained; the total number of the A-type alert individuals in the t.3th generation population is denoted as PS At , and the total number of the B-type alert individuals in the t.2th generation population is denoted as PS Bt . S9, update the PS of the t.3th generation population At At Bt Bt At , update the PS of the t.3th generation population​​​​ S9.1, randomly generate a real number rs between 0 and 1 using a random function psa ; S9.1.

1. Set the candidate schedule solution S for the psath A-class guard individual of the t.3th generation population psa equal to the psath guard individual of the t.3th generation population; S9.1.2, to S psa S9.1.2, to S psa S9.1.2, to S First, for S psa The process sequence is sorted and then reverse-learned to obtain S. psa The reverse solution of the process sorting sequence is then used to generate S through the PathRelinking operation. psa The process sequence and S psa The set of routing solutions between the reverse solutions of the process sorting sequence is used to randomly select a routing solution from the set to update S. psa The process sequence; if rs psa ≤ 0.2, select a random variation of the machine selection sequence S psa ; otherwise, update the machine selection sequence S psa . if rs psa > 0.2, for S psa the machine selection sequence does not perform any operation; This is S psa Update is complete, S psa That is S psa Routing Update resolution; S9.1.3, add the routing update solution of S psa as a candidate solution to the candidate solution set St; After the S9.1 operation is performed on each A-class alert individual in the t.3 generation population, a candidate scheduling solution set St containing PS At candidate scheduling solutions is obtained. S9.2, decoding each scheduling solution of the candidate scheduling solution set St using a greedy decoding method to obtain the optimization target value corresponding to each scheduling solution; S9.3, setting a scheduling solution set SDt, and sorting the A type alert individuals of the t.3th generation population and all candidate scheduling solutions of the candidate scheduling solution set St together according to the ascending order of the optimization target value and adding them to the scheduling solution set SDt; S10, performing two-level neighborhood search operation on each B type alert individual of the t.3th generation population to obtain the updated individual of each B type alert individual of the t.3th generation population; S11, take the first PS of the dispatch solution set SDt At the PS of the first t.3 generation population Bt The updated individual of the first t.3 generation population and all non-alert individuals of the first t.3 generation population constitute the first t generation population; S12, judging whether the current value of t is equal to T, if not, updating the value of t by 1, and then returning to step 4 for the next iteration, if yes, the scheduling solution with the minimum optimization target value in the Tth generation population is the solution result; The specific process of using the variable neighborhood breadth search algorithm to operate the input solution to obtain the intermediate scheduling solution corresponding to the kth scheduling of the t-1th generation population in S4.1 is as follows: Step A1, setting threshold constant Set the maximum number of iterations of variable neighborhood to G, G is an arbitrary integer between 10 and 20, and the optimization target threshold is F min , F min The initial value is infinite, the current input solution is recorded as X, the variable neighborhood set {N(1), N(2), N(3), N(4)} of the variable neighborhood breadth-first search algorithm is set, N(S) is the neighborhood structure in the variable neighborhood set, and S = 1, 2, 3, 4; The neighborhood structure N(1) is used to perform the following operation: selecting two different genes in the process sequence of X, and interchanging the positions of the two selected genes; The neighborhood structure N(2) is used to insert the gene in the later position in the selected genes in front of the gene in the earlier position in the process ordering sequence of X; The neighborhood structure N(3) is used to perform the following operation: randomly select X 2t There are 10 different jobs, which are X's process sequence. 2t For each of the three different assignments, randomly find a gene whose value equals the assignment number of that assignment. Then, randomly shuffle the found X... 2t The position of each gene in the process sequencing sequence, where x 2t It is an integer greater than or equal to 1 and less than or equal to Q; The neighborhood structure N(4) is used to perform the Path Relinking operation on the process ordering sequence of X and the process ordering sequence of another scheduling solution randomly selected from the population in which X is located except X, to obtain a set of routing scheduling solutions, and replace the process ordering sequence of X with a routing scheduling solution randomly selected from the set of routing scheduling solutions; Step A2, set the number of variable neighborhood iterations to g, initialize g, let g = 1; set the variable n, initialize n, let n = 1; Step A3, perform the gth iteration, specifically: A3.1, set X'; let X' = X; A3.2, perform the operation on X' to obtain the updated solution of X', denoted as X", the specific process is: A3.2.1, perform the neighborhood structure N(n) operation on X' to obtain the process ordering sequence of X"; A3.2.2, randomly generate a real number rg between 0 and 1 using a random function; A3.2.3, if rg≤0.1, perform a random mutation operation on the machine selection sequence of X' to obtain the machine selection sequence of X"; if rg>0.1, do not perform any operation on X', directly take the machine selection sequence of X' as the machine selection sequence of X"; A3.2.4, decode the current obtained X" using the greedy decoding method to obtain its optimization target value F(X"); A3.2.5, judging whether F(X") is less than F min of the current value, if F(X") is less than F min of the current value, then let X'"=X", F min =F(X"), and first update the current value of n with the sum of the current value of n plus 1, and then judge whether the current value of n is less than or equal to If the current value of n is less than or equal to , return to step A3.2.1 to continue processing, if the current value of n is not less than or equal to , judge whether g is equal to G, if not, update the current value of g with the sum of the current value of g plus 1, and let n=1, then return to step A3.2.1 to continue processing, if g=G, take X'" as the kth scheduling corresponding intermediate scheduling solution of the t-1th generation population, and end the variable neighborhood breadth search operation; if F(X") is not less than F min of the current value, let n=1, and return to step A3.2.1.

Citation Information

Patent Citations

  • Flexible job shop scheduling method based on improved sparrow search algorithm

    CN114862008A

  • Multi-target flexible job shop scheduling method based on improved variable neighborhood genetic algorithm

    CN115796510A