Multi-target flexible job shop scheduling method based on differential bacteria optimization algorithm

Through a multi-objective flexible job shop scheduling method based on a differential bacterial optimization algorithm, combined with adaptive differential evolution and bacterial foraging optimization algorithms, the multi-objective scheduling problems in the existing technology are solved, production efficiency and machine load balance are improved, and premature maturity is avoided and the problem of long calculation time.

CN118760085APending Publication Date: 2024-10-11HEFEI UNIV OF TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410914319.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

Existing flexible job shop scheduling methods are difficult to obtain optimal scheduling solutions when considering multiple objectives, resulting in unbalanced machine loads and low production efficiency.

Method used

A multi-objective flexible job shop scheduling method based on differential bacterial optimization algorithm is adopted. By constructing a multi-objective optimization model, combined with adaptive differential evolution algorithm and bacterial foraging optimization algorithm, the scheduling plan of workpieces and machines is optimized to ensure the minimum and maximum completion time and machine Load balancing.

Benefits of technology

It achieves high-quality scheduling solutions within a reasonable time, improves workshop production efficiency, reduces machine losses and calculation time, and avoids local optimal solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118760085A_ABST
    Figure CN118760085A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-objective flexible job shop scheduling method based on a differential bacteria optimization method, which comprises the following steps of: 1, constructing a production model of processing time and machine load, 2, generating an initial scheme by using a greedy algorithm, and 3, solving the model by using the differential bacteria optimization method to obtain an optimal production scheme. According to the method, the problem of multi-target flexible job shop scheduling based on the minimum and maximum completion time and the minimum machine load can be solved, and a production scheme with the minimum total consumed time and the minimum machine load is obtained, so that the productivity can be improved, and the working time of the machine can be shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of workshop production scheduling, and in particular relates to a multi-objective flexible job shop scheduling method, which is used for scheduling and management of workshop production plans. Background Art

[0002] With the continuous iteration and upgrading of manufacturing technology, Flexible Job-Shop Scheduling (FJSP) has become the main scheduling method for workpiece sorting in industrial factories. In order to pursue the minimum and maximum completion time, Flexible Job-Shop Scheduling often does not take into account the load of the machine. Long-term operation of the machine may cause machine failure, thus affecting the overall operation progress and ultimately leading to failure to deliver normally. Therefore, in the actual production process, multiple goals such as completion time and machine load are often considered.

[0003] There are many solutions to the FJSP problem. Common solutions include genetic algorithms and differential evolution algorithms in evolutionary algorithms, heuristic algorithms including ant colony algorithms and particle swarm algorithms, and bacterial foraging algorithms in bionic optimization algorithms. A single algorithm cannot solve the multi-objective FJSP problem well because its search performance and convergence are not ideal. In the actual workshop production process, there are often many combinations of processes and machines. Using only a single heuristic algorithm or evolutionary algorithm is often prone to falling into local optimality or the calculation time is too long. It is difficult to obtain the optimal scheduling solution when considering multiple objectives. Summary of the invention

[0004] The present invention aims to solve the deficiencies of the above-mentioned prior art and proposes a multi-objective flexible job shop scheduling method based on differential bacteria optimization algorithm, in order to obtain a high-quality flexible job shop scheduling solution, which is conducive to improving production efficiency and reducing machine loss.

[0005] In order to achieve the above-mentioned purpose, the present invention adopts the following technical scheme:

[0006] The multi-objective flexible job shop scheduling method based on differential bacteria optimization algorithm of the present invention is characterized in that it includes the following steps:

[0007] Step 1: Get the original data, including:

[0008] Number of workpieces n, i-th workpiece J i , i∈n, number of machines m, kth machine M k , k∈m, the i-th workpiece J i The number of processes is A i , the i-th workpiece J i The g-th process Oig , g∈A i , Boolean variable O igk , when O igk =1, indicating the gth process O ig On the kth device M k Otherwise, O igk =0, process O igk Processing time igk , O igk The start time is ST igk 、Process O igk Completion time ET igk , maximum completion time C max , the processing load E of all machines;

[0009] Step 2: Construct a shop scheduling model based on the objective function and constraints;

[0010] Step 2.1: Use equation (1) and equation (2) to construct the first objective function f1 and the second objective function f:

[0011] f1=minC max (1)

[0012]

[0013] Step 2.2: Use equations (3) to (6) to construct constraints:

[0014]

[0015] ET i(g-1)k ≤ST igk (4)

[0016] ST igk +O igk ×t igk =ET igk (5)

[0017]

[0018] In formula (4), ET i(g-1)k represents the i-th workpiece J i On the kth device M k The g-1th process O i(g-1)k completion time;

[0019] Step 3: Define the total number of global iterations as S, the current number of global iterations as s, and initialize s = 0;

[0020] Let the sth generation population SP s The size is N SP ;

[0021] According to the original data, a two-stage coding method is used to encode the sth generation population SP s Initialize each individual in:

[0022] Let the sth generation population SP s Each individual in is a scheduling plan consisting of a process code and a machine code;

[0023] All processes of all workpieces are randomly arranged to form the process code, and the value corresponding to each code in the process code represents the serial number of the corresponding workpiece, and the number of occurrences of each code corresponds to the processing process number of the workpiece with the corresponding serial number. According to the process code, the machine serial number used for the processing process of the corresponding workpiece is selected in sequence to form the machine code;

[0024] Step 4: Use the adaptive differential evolution algorithm to train the sth generation population SP s Perform mutation and crossover operations to obtain the s-th generation temporary population

[0025] Step 5: Use the bacterial foraging optimization algorithm to optimize SP s Perform chemotaxis, replication, and migration operations to obtain the sth generation of bacterial colonies

[0026] Step 6: and After the merger, the combined population is screened according to the probability of roulette until N SP Individuals, thus obtaining the s+1 generation population SP s+1 ;

[0027] Step 7: Assign s+1 to s and determine whether s≤S is true. If so, return to step 4 and execute sequentially. Otherwise, the Sth generation population SP is obtained. S , and calculate SP S The fitness of all individuals in the process is calculated, and the individual with the largest fitness is retained as the final job shop scheduling solution.

[0028] The multi-objective flexible job shop scheduling method based on differential bacteria optimization algorithm described in the present invention is also characterized in that step 4 includes the following steps:

[0029] Step 4.1: Initialize the parameters of differential evolution:

[0030] Define the total number of iterations of differential evolution as L, the current number of iterations of differential evolution as l, and initialize l = 0;

[0031] The first temporary population of the sth generation undergoing the lth differential evolution is defined as And initialize

[0032] Define the mutation factor of the first differential evolution Among them, randN() represents a random value in the normal distribution. Represents the mean of the probability set of effective mutation individuals in the lth differential evolution;

[0033] Define the crossover factor for the first differential evolution in, represents the mean of the probability set of effective crossover individuals in the lth differential evolution, and and Initialize;

[0034] Step 4.2: Calculate using formula (7) The fitness of the rth individual in

[0035]

[0036] In formula (7), represents the weight factor, represents the maximum completion time of the rth individual in the sth generation undergoing the lth differential evolution, represents the total machine load of the rth individual of the sth generation undergoing the lth differential evolution;

[0037] Step 4.3: Define variable w and initialize w=1;

[0038] Step 4.4: From The first individual is randomly selected for the wth time and the second individual And use formula (8) to generate the wth mutant individual of the sth generation undergoing the lth differential evolution

[0039]

[0040] In formula (8), represents the wth random number of the sth generation undergoing the lth differential evolution, G() represents the priority crossover POX operation, when When Join the mutation probability set of the lth differential evolution middle;

[0041] Step 4.5: From The third individual is randomly selected for the wth time And use formula (9) to generate the wth crossover individual of the sth generation undergoing the lth differential evolution and join the second temporary population middle:

[0042]

[0043] In formula (9), represents the wth random number of the sth generation undergoing the lth differential evolution. When Add to the crossover probability set of the lth differential evolution middle;

[0044] Step 4.6: After assigning w+1 to w, return to step 4.4 and execute sequentially until w>N SP So far, the second temporary population of the sth generation undergoing the lth differential evolution is obtained.

[0045] Step 4.7: Update using equation (10) Get the mean mutation probability of the l+1th differential evolution

[0046]

[0047] In formula (10), mean() represents the averaging operation; δ represents a fixed value, and δ∈(0,1);

[0048] Step 4.8: Update using equation (11) Get the mean crossover probability of the l+1th differential evolution

[0049]

[0050] Step 4.9: and Merge and keep N in the merged population according to the roulette algorithm SP individuals, thus obtaining the first temporary population of the sth generation undergoing the l+1th differential evolution

[0051] Step 4.10: After assigning l+1 to l, return to step 4.2 and execute sequentially until l>L, thus obtaining the sth generation population that has undergone the Lth differential evolution, and record it as the sth generation temporary population

[0052] The step 5 includes the following steps:

[0053] Step 5.1: Initialize the parameters of bacterial foraging;

[0054] Step 5.1.1: Determine the size of the bacterial population as N SP , the maximum number of swimming times is N swim The total number of chemotaxis is Nch , the total number of copies is N re , the total number of migrations is N ed ;

[0055] The bacterial population after the sth generation undergoing the αth chemotaxis, the βth replication, and the ρth migration is defined as And initialize

[0056] Step 5.1.2: Initialize the current migration number ρ = 1;

[0057] Step 5.1.3: Initialize the current number of replications β = 1;

[0058] Step 5.1.4: Initialize the current chemotaxis number α=1;

[0059] Step 5.1.5: Definition The fitness of the hth bacterium after the αth chemotaxis, βth replication, and ρth migration

[0060]

[0061] In formula (12), express The maximum completion time of the hth bacterium after the αth chemotaxis, βth replication, and ρth migration, express The total load of the machine after the hth bacterium undergoes the αth chemotaxis, βth replication, and ρth migration;

[0062] Step 5.2: The chemotaxis operation is performed in the sth generation and the N ch The bacterial colony after the chemotaxis, β-th replication, and ρ-th migration

[0063] Step 5.3: Perform the copy operation to obtain the sth generation experience N ch Secondary chemotaxis, N re The bacterial population after replication and migration

[0064] Step 5.4: Perform migration operation and obtain the sth generation experience N ch Secondary chemotaxis, N re Replication, N ed The bacterial population after migration

[0065] The step 5.2 includes the following steps:

[0066] Step 5.2.1: Initialize h = 1;

[0067] Step 5.2.2: Initialize the number of swimming steps p = 0;

[0068] Step 5.2.3: The hth bacterium in the pool swims according to formula (13), and the bacterial colony is obtained. The position of the hth bacterium after the α+1th chemotaxis, βth replication, and ρth migration

[0069]

[0070] In formula (13), express The position of the hth bacterium after the αth chemotaxis, βth replication, and ρth migration, is the step length of the hth bacterium after the αth chemotaxis, express The unit direction vector of the hth bacterium when it undergoes the α+1th chemotaxis, βth replication, and ρth migration; and:

[0071]

[0072] In formula (15), express The random direction vector when the hth bacterium undergoes the α+1th chemotaxis, the βth replication, and the ρth migration; Step max Indicates the maximum chemotaxis step length, Step min represents the minimum chemotactic step length;

[0073] Step 5.2.4: Calculate according to formula (12) Fitness like Then Assign to Otherwise, let p = N swim ;

[0074] Step 5.2.5: Assign p+1 to p and check if p≤N swim Is it true? If so, return to step 5.2.3 to execute. Otherwise, it means that the hth bacterium has completed the swimming operation, and execute step 5.2.6;

[0075] Step 5.2.6: Assign h+1 to h and check if h≤N SP Is it true? If so, return to step 5.2.2 to execute; otherwise, it means All bacteria in the culture medium have completed the swimming operation and proceed to step 5.2.7;

[0076] Step 5.2.7: Assign α+1 to α and determine whether α≤N ch Is it true? If so, return to step 5.2.1 to execute; otherwise, it means When all bacteria have completed chemotaxis, proceed to step 5.3.

[0077] The step 5.3 includes the following steps:

[0078] Step 5.3.1: Calculate using formula (10) The fitness of all bacteria in the sample is sorted in descending order to select the one with the maximum fitness. The corresponding elite bacteria and ranked The N behind SP / 2 bacteria;

[0079] Step 5.3.2: Utilizing preferential crossover POX to elite bacteria Part of the process code and N SP / 2 bacteria's partial process codes are cross-operated, and then the elite bacteria Partial machine encoding and crossover N SP / 2 bacteria's partial machine code is mutated to obtain N after crossover mutation SP / 2 bacteria and The remaining N SP / 2 bacteria make up the sth generation of bacterial colonies after undergoing the αth chemotaxis, β+1th replication, and ρth migration

[0080] Step 5.3.3: Assign β+1 to β and determine whether β≤N re Is it true? If so, return to step 5.2 to execute. Otherwise, it means Complete the replication procedure for all bacteria in the culture medium and proceed to step 5.4.

[0081] The step 5.4 includes the following steps:

[0082] Step 5.4.1: All bacteria in the s generation are sorted in descending order according to their fitness, and the sorted s generation experiences N ch Secondary chemotaxis, N re The bacterial population after replication and migration

[0083] Step 5.4.2: Let h = 1;

[0084] Step 5.4.3: Calculate according to formula (16) The hth bacterium undergoes N ch Secondary chemotaxis, Nre The migration probability ped after replication and ρ-th migration h :

[0085]

[0086] Step 5.4.4: Randomly generate the hth migration probability P h , judge P h ≤ped h Is it true? If so, the hth bacterium undergoes migration operation, otherwise, the hth bacterium is retained;

[0087] Step 5.4.5: Assign h+1 to h and check if h≤N SP Is it true? If so, return to step 5.4.3 and execute sequentially. Otherwise, it means Complete a migration judgment for all bacteria in the test and proceed to step 5.4.6;

[0088] Step 5.4.6: Assign ρ+1 to ρ and determine whether ρ≤N ed Is it true? If so, return to step 5.2 to execute sequentially. Otherwise, it means that And assign it to And proceed to step 6.

[0089] The electronic device of the present invention includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the multi-objective flexible job shop scheduling method, and the processor is configured to execute the program stored in the memory.

[0090] The present invention provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and the computer program executes the steps of the multi-objective flexible job shop scheduling method when the computer program is executed by a processor.

[0091] Compared with the prior art, the present invention has the following beneficial effects:

[0092] 1. According to the actual production situation of the production workshop, the present invention sets up multiple constraints, establishes a multi-objective optimization model for the completion time and machine load required for workshop production, and uses the differential bacteria algorithm to solve the multi-objective optimization model to obtain an optimal production plan with the shortest time consumption and the smallest total machine load, thereby improving the production efficiency of the workshop and reducing the loss of workshop machines.

[0093] 2. The present invention uses a greedy algorithm to adopt corresponding initialization scheduling schemes for the two optimization goals of minimum maximum completion time and minimum total machine load, so that a better initial scheduling scheme can be obtained, the calculation time of the method can be reduced, and the efficiency of obtaining the optimal scheduling scheme can be improved.

[0094] 3. The present invention uses a method that combines an adaptive differential evolution algorithm and an adaptive bacterial foraging optimization algorithm. The differential evolution algorithm can increase the search range of the scheduling scheme, and the bacterial foraging optimization algorithm can quickly optimize the scheduling scheme to be optimized to prevent the algorithm from being premature, thereby finding the global optimal scheduling scheme. BRIEF DESCRIPTION OF THE DRAWINGS

[0095] Figure 1 A flow chart of the overall method of the present invention;

[0096] Figure 2 is a flow chart of the differential evolution method of the present invention;

[0097] Figure 3 Flow chart of the bacterial foraging optimization method of the present invention. DETAILED DESCRIPTION

[0098] In this embodiment, a multi-objective flexible job shop scheduling method based on a differential bacterial optimization algorithm is a method that combines the species diversity of the differential evolution algorithm and the local rapid convergence of the bacterial foraging optimization algorithm. It can obtain high-quality solutions to the multi-objective flexible job shop scheduling problem within a reasonable time, thereby improving the scheduling problem solving effect. Specifically, Figure 1 As shown, the method comprises the following steps:

[0099] Step 1: Get the original data, including:

[0100] Number of workpieces n, i-th workpiece J i , i∈n, number of machines m, kth machine M k , k∈m, the i-th workpiece J i The number of processes is A i , the i-th workpiece J i The g-th process O ig , g∈A i , Boolean variable O igk , when O igk =1, indicating the gth process O ig On the kth device M k Otherwise, O igk =0, process O igk Processing time igk , O igk The start time is ST igk 、Process O igk Completion time ET igk , maximum completion time C max , processing load E of all machines.

[0101] Step 2: Construct a shop scheduling model based on the objective function and constraints;

[0102] Step 2.1: Use equation (1) and equation (2) to construct the first objective function f1 and the second objective function f:

[0103] f1=minC max (1)

[0104]

[0105] Step 2.2: Use equations (3) to (6) to construct constraints:

[0106]

[0107] ET i(g-1)k ≤ST igk (4)

[0108] ST igk +O igk ×t igk =ET igk (5)

[0109]

[0110] In formula (4), ET i(g-1)k represents the i-th workpiece J i On the kth device M k The g-1th process O i(g-1)k completion time.

[0111] Step 3: Define the total number of global iterations as S, the current number of global iterations as s, and initialize s = 0;

[0112] Let the sth generation population SP s The size is N SP ;

[0113] According to the original data, a two-stage coding method is used to encode the sth generation population SP s Initialize each individual in:

[0114] Let the sth generation population SP s Each individual in is a scheduling plan consisting of a process code and a machine code;

[0115] All the processes of all the workpieces are randomly arranged to form a process code, and the value corresponding to each code in the process code represents the serial number of the corresponding workpiece. The number of times each code appears corresponds to the processing process number of the corresponding serial number workpiece.

[0116] According to the process code, the machine serial number used in the processing process of the corresponding workpiece is selected in sequence to form the machine code.

[0117] In this embodiment, the strategy used in machine selection is as follows:

[0118] When the population individual ratio is 0.4:0.4:0.2, the machine number is selected according to the three strategies, indicating that the g-th process of the i-th workpiece is processed on the k-th machine. The selection of the machine number is as follows:

[0119] The shortest global completion time strategy: When selecting machines according to the process sequence, the machine selected for each process must ensure that it has the minimum completion time of the current solution. If the machine processing time is the same, a random machine is selected;

[0120] Global machine load minimum strategy: When selecting machines according to the process sequence, the machine selected for each process is the machine that can process the current process in the shortest time. If the machine processing time is the same, a random machine is selected;

[0121] Random strategy: When selecting a machine according to the process sequence, a machine is randomly selected from the machines that can process the workpiece.

[0122] Among the three strategies mentioned above, the global shortest completion time strategy and the global minimum machine load strategy corresponding to the two optimization objectives are selected to obtain a better scheduling solution, and the random strategy is selected to increase population diversity.

[0123] Step 4: Use Figure 2 The adaptive differential evolution algorithm is shown in Figure 2 for the sth generation population SP s Perform mutation and crossover operations to obtain the s-th generation temporary population

[0124] Step 4.1: Initialize the parameters of differential evolution:

[0125] Define the total number of iterations of differential evolution as L, the current number of iterations of differential evolution as l, and initialize l = 0;

[0126] The first temporary population of the sth generation undergoing the lth differential evolution is defined as And initialize

[0127] Define the mutation factor of the first differential evolution Among them, randN() represents a random value in the normal distribution. Represents the mean of the probability set of effective mutation individuals in the lth differential evolution;

[0128] Define the crossover factor for the first differential evolution in, represents the mean of the probability set of effective crossover individuals in the lth differential evolution, and and Initialize;

[0129] Using adaptive mutation factor and adaptive crossover factor can quickly converge to obtain a better scheduling solution during the initial solution. As the number of iterations increases, the mutation factor and crossover factor will gradually become smaller, and searching in a small range of space can ensure the stability of the population while not skipping the global optimal position.

[0130] Step 4.2: Calculate using formula (7) The fitness of the rth individual in :

[0131]

[0132] In formula (7), represents the weight factor, represents the maximum completion time of the rth individual in the sth generation undergoing the lth differential evolution, Represents the total machine load of the rth individual of the sth generation undergoing the lth differential evolution.

[0133] Step 4.3: Define variable w and initialize w=1;

[0134] Step 4.4: From The first individual is randomly selected for the wth time and the second individual And use formula (8) to generate the wth mutant individual of the sth generation undergoing the lth differential evolution

[0135]

[0136] In formula (8), represents the wth random number of the sth generation undergoing the lth differential evolution, G() represents the priority crossover POX operation, when When Join the mutation probability set of the lth differential evolution In the figure, G(·) indicates the priority crossover POX operation.

[0137] Step 4.5: From The third individual is randomly selected for the wth time And use formula (9) to generate the wth crossover individual of the sth generation undergoing the lth differential evolution And join the second temporary population middle:

[0138]

[0139] In formula (9), represents the wth random number of the sth generation undergoing the lth differential evolution. When Add to the crossover probability set of the lth differential evolution middle;

[0140] Step 4.6: After assigning w+1 to w, return to step 4.4 and execute sequentially until w>N SP So far, the second temporary population of the sth generation undergoing the lth differential evolution is obtained.

[0141] Step 4.7: Update using equation (10) Get the mean mutation probability of the l+1th differential evolution

[0142]

[0143] In formula (10), mean() represents the averaging operation; δ represents a fixed value, and δ∈(0,1);

[0144] Step 4.8: Update using equation (11) Get the mean crossover probability of the l+1th differential evolution

[0145]

[0146] Step 4.9: and Merge and keep N in the merged population according to the roulette algorithm SP individuals, thus obtaining the first temporary population of the sth generation undergoing the l+1th differential evolution

[0147] Step 4.10: After assigning l+1 to l, return to step 4.2 and execute sequentially until l>L, thus obtaining the sth generation population that has undergone the Lth differential evolution, and record it as the sth generation temporary population

[0148] Step 5: Use Figure 3 The bacterial foraging optimization algorithm shown in the figure is used for SP s Perform chemotaxis, replication, and migration operations to obtain the sth generation of bacterial colonies

[0149] Step 5.1: Initialize the parameters of bacterial foraging;

[0150] Step 5.1.1: Determine the size of the bacterial population as N SP , the maximum number of swimming times is N swim The total number of chemotaxis is N ch , the total number of copies is Nre , the total number of migrations is N ed ;

[0151] The bacterial population after the sth generation undergoing the αth chemotaxis, the βth replication, and the ρth migration is defined as And initialize

[0152] Step 5.1.2: Initialize the current migration number ρ = 1;

[0153] Step 5.1.3: Initialize the current number of replications β = 1;

[0154] Step 5.1.4: Initialize the current chemotaxis number α=1;

[0155] Step 5.1.5: Definition The fitness of the hth bacterium after the αth chemotaxis, βth replication, and ρth migration

[0156]

[0157] In formula (12), express The maximum completion time of the hth bacterium after the αth chemotaxis, βth replication, and ρth migration, express The total load of the machine after the hth bacterium undergoes the αth chemotaxis, βth replication, and ρth migration.

[0158] Step 5.2: The chemotaxis operation is performed in the sth generation and the N ch The bacterial colony after the chemotaxis, β-th replication, and ρ-th migration

[0159] Step 5.2.1: Initialize h = 1;

[0160] Step 5.2.2: Initialize the number of swimming steps p = 0;

[0161] Step 5.2.3: The hth bacterium in the pool swims according to formula (13), and the bacterial colony is obtained. The position of the hth bacterium after the α+1th chemotaxis, βth replication, and ρth migration

[0162]

[0163] In formula (13), express The position of the hth bacterium after the αth chemotaxis, βth replication, and ρth migration, is the step length of the hth bacterium after the αth chemotaxis, express The unit direction vector of the hth bacterium when it undergoes the α+1th chemotaxis, βth replication, and ρth migration; and:

[0164]

[0165] In formula (15), express The random direction vector when the hth bacterium undergoes the α+1th chemotaxis, the βth replication, and the ρth migration; Step max Indicates the maximum chemotaxis step length, Step min Represents the minimum chemotaxis step size; in the above chemotaxis process, an adaptive step size is used, which can quickly approach the global optimal or local optimal scheduling plan at the beginning of chemotaxis, and when the number of chemotaxis increases, the step size is reduced, the optimization range is narrowed, and the optimal scheduling plan is found.

[0166] Step 5.2.4: Calculate according to formula (12) Fitness like Then Assign to Otherwise, let p = N swim ;

[0167] Step 5.2.5: Assign p+1 to p and check if p≤N swim Is it true? If so, return to step 5.2.3 to execute. Otherwise, it means that the hth bacterium has completed the swimming operation, and execute step 5.2.6;

[0168] Step 5.2.6: Assign h+1 to h and check if h≤N SP Is it true? If so, return to step 5.2.2 to execute; otherwise, it means All bacteria in the culture medium have completed the swimming operation and proceed to step 5.2.7;

[0169] Step 5.2.7: Assign α+1 to α and determine whether α≤N ch Is it true? If so, return to step 5.2.1 to execute; otherwise, it means When all bacteria have completed chemotaxis, proceed to step 5.3.

[0170] Step 5.3: Perform the copy operation to obtain the sth generation experience N ch Secondary chemotaxis, N re The bacterial population after replication and migration

[0171] Step 5.3.1: Calculate bacterial population using formula (10) The fitness of all bacteria is sorted from large to small, and the one with the largest fitness is selected Corresponding elite bacteria And N behind SP / 2 bacteria.

[0172] Step 5.3.2: Utilizing preferential crossover POX to elite bacteria Part of the process code and N SP / 2 bacteria's partial process codes are cross-operated, and then the elite bacteria Partial machine encoding and crossover N SP / 2 bacteria's partial machine code is mutated to obtain N after crossover mutation SP / 2 bacteria and The remaining N SP / 2 bacteria make up the sth generation of bacterial colonies after undergoing the αth chemotaxis, β+1th replication, and ρth migration

[0173] Step 5.3.3: Assign β+1 to β and determine whether β≤N re Is it true? If so, return to step 5.2 to execute. Otherwise, it means Complete the replication procedure for all bacteria in the culture medium and proceed to step 5.4.

[0174] Step 5.4: Perform migration operation and obtain the sth generation experience N ch Secondary chemotaxis, N re Replication, N ed The bacterial community after migration

[0175] Step 5.4.1: Transfer the bacterial colony All bacteria in the are sorted from large to small according to fitness;

[0176] Step 5.4.2: Let h = 1;

[0177] Step 5.4.3: Calculate according to formula (16) The hth bacterium undergoes N ch Secondary chemotaxis, N re The migration probability ped after replication and ρ-th migration h :

[0178]

[0179] Step 5.4.4: Randomly generate the hth migration probability P h , judge P h ≤pedh Is it true? If so, the hth bacterium undergoes migration operation, otherwise, the hth bacterium is retained.

[0180] Step 5.4.5: Assign h+1 to h and check if h≤N SP Is it true? If so, return to step 5.4.3 and execute sequentially. Otherwise, it means Complete a migration judgment for all bacteria in the test and proceed to step 5.4.6;

[0181] Step 5.4.6: Assign ρ+1 to ρ and determine whether ρ≤N ed Is it true? If so, return to step 5.2 to execute sequentially. Otherwise, it means that And assign it to And proceed to step 6.

[0182] Step 6: and After the merger, the combined population is screened according to the probability of roulette until N SP Individuals, thus obtaining the s+1 generation population SP s+1 The advantage of merging and screening two populations is that it combines the richness of the differential evolution algorithm population and the strong local search ability of the bacterial foraging algorithm, while retaining the optimization ability of the two algorithms for the scheduling scheme. There are many ways to combine the methods, such as updating the population in turn with the two algorithms, or using the differential evolution algorithm to migrate when the bacterial foraging optimization algorithm migrates. Both methods can achieve the purpose of combining the advantages of the two algorithms, but they do not retain the optimization ability of the two algorithms themselves. Therefore, in the present invention, two methods are selected to optimize the same population, and then the optimized population is merged.

[0183] Step 7: Assign s+1 to s and determine whether s≤S is true. If so, return to step 4 and execute sequentially. Otherwise, the Sth generation population SP is obtained. S , and calculate SP S The fitness of all individuals in the process is calculated, and the individual with the largest fitness is retained as the final job shop scheduling solution.

[0184] In this embodiment, an electronic device includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the above method, and the processor is configured to execute the program stored in the memory.

[0185] In this embodiment, a computer-readable storage medium stores a computer program on the computer-readable storage medium, and the computer program executes the steps of the above method when executed by a processor.

Claims

1. A multi-objective flexible job shop scheduling method based on differential bacterial optimization algorithm, characterized in that: This includes: Step 1: Get the original data, including: Number of workpieces n, i-th workpiece J i , i∈n, number of machines m, kth machine M k , k∈m, the i-th workpiece J i The number of processes is A i , the i-th workpiece J i The g-th process O ig , g∈A i , Boolean variable O igk , when O igk =1, indicating the g-th process O ig On the kth device M k Otherwise, O igk =0, process O igk Processing time igk , O igk The start time is ST igk 、Process O igk Completion time ET igk , maximum completion time C max , the processing load E of all machines; Step 2: Construct a shop scheduling model based on the objective function and constraints; Step 2.1: Use equation (1) and equation (2) to construct the first objective function f1 and the second objective function f: f1=minC max (1) Step 2.2: Use equations (3) to (6) to construct constraints: AND i(g -1 )k ≤ST igk (4) ST igk +O igk ×t igk =ET igk (5) In formula (4), ET i(g-1)k represents the i-th workpiece J i On the kth device M k The g-1th process O i(g-1)k completion time; Step 3: Define the total number of global iterations as S, the current number of global iterations as s, and initialize s = 0; Let the sth generation population SP s The size is N SP ; According to the original data, a two-stage coding method is used to encode the sth generation population SP s Initialize each individual in: Let the sth generation population SP s Each individual in is a scheduling plan consisting of a process code and a machine code; All processes of all workpieces are randomly arranged to form the process code, and the value corresponding to each code in the process code represents the serial number of the corresponding workpiece, and the number of occurrences of each code corresponds to the processing process number of the workpiece with the corresponding serial number. According to the process code, the machine serial number used for the processing process of the corresponding workpiece is selected in sequence to form the machine code; Step 4: Use the adaptive differential evolution algorithm to train the sth generation population SP s Perform mutation and crossover operations to obtain the s-th generation temporary population Step 5: Use the bacterial foraging optimization algorithm to optimize SP s Perform chemotaxis, replication, and migration operations to obtain the sth generation of bacterial colonies Step 6: and After the merger, the combined population is screened according to the probability of roulette until N SP Individuals, thus obtaining the s+1 generation population SP s+1 ; Step 7: Assign s+1 to s and determine whether s≤S is true. If so, return to step 4 and execute sequentially. Otherwise, the Sth generation population SP is obtained. S , and calculate SP S The fitness of all individuals in the process is calculated, and the individual with the largest fitness is retained as the final job shop scheduling solution.

2. According to claim 1, a multi-objective flexible job shop scheduling method based on differential bacteria optimization algorithm is characterized in that: The step 4 includes the following steps: Step 4.1: Initialize the parameters of differential evolution: Define the total number of iterations of differential evolution as L, the current number of iterations of differential evolution as l, and initialize l = 0; The first temporary population of the sth generation undergoing the lth differential evolution is defined as And initialize Define the mutation factor of the first differential evolution Among them, randN() represents a random value in the normal distribution. Represents the mean of the probability set of effective mutation individuals in the lth differential evolution; Define the crossover factor for the first differential evolution in, represents the mean of the probability set of effective crossover individuals in the lth differential evolution, and and Initialize; Step 4.2: Calculate using formula (7) The fitness of the rth individual in In formula (7), represents the weight factor, represents the maximum completion time of the rth individual in the sth generation undergoing the lth differential evolution, represents the total machine load of the rth individual of the sth generation undergoing the lth differential evolution; Step 4.3: Define variable w and initialize w=1; Step 4.4: From The first individual is randomly selected for the wth time and the second individual And use formula (8) to generate the wth mutant individual of the sth generation undergoing the lth differential evolution In formula (8), represents the wth random number of the sth generation undergoing the lth differential evolution, G() represents the priority crossover POX operation, when When Join the mutation probability set of the lth differential evolution middle; Step 4.5: From The third individual is randomly selected for the wth time And use formula (9) to generate the wth crossover individual of the sth generation undergoing the lth differential evolution and join the second temporary population middle: In formula (9), represents the wth random number of the sth generation undergoing the lth differential evolution. When Add to the crossover probability set of the lth differential evolution middle; Step 4.6: After assigning w+1 to w, return to step 4.4 and execute sequentially until w>N SP So far, the second temporary population of the sth generation undergoing the lth differential evolution is obtained. Step 4.7: Update using equation (10) Get the mean mutation probability of the l+1th differential evolution In formula (10), mean() represents the averaging operation; δ represents a fixed value, and δ∈(0,1); Step 4.8: Update using equation (11) Get the mean crossover probability of the l+1th differential evolution Step 4.9: and Merge and keep N in the merged population according to the roulette algorithm SP individuals, thus obtaining the first temporary population of the sth generation undergoing the l+1th differential evolution Step 4.10: After assigning l+1 to l, return to step 4.2 and execute sequentially until l>L, thus obtaining the sth generation population that has undergone the Lth differential evolution, and record it as the sth generation temporary population 3. The multi-objective flexible job shop scheduling method based on differential bacteria optimization algorithm according to claim 2 is characterized in that: The step 5 includes the following steps: Step 5.1: Initialize the parameters of bacterial foraging; Step 5.1.1: Determine the size of the bacterial population as N SP , the maximum number of swimming times is N swim The total number of chemotaxis is N ch , the total number of copies is N re , the total number of migrations is N ed ; The bacterial population after the sth generation undergoing the αth chemotaxis, the βth replication, and the ρth migration is defined as And initialize Step 5.1.2: Initialize the current migration number ρ = 1; Step 5.1.3: Initialize the current number of replications β = 1; Step 5.1.4: Initialize the current chemotaxis number α=1; Step 5.1.5: Definition The fitness of the hth bacterium after the αth chemotaxis, βth replication, and ρth migration In formula (12), express The maximum completion time of the hth bacterium after the αth chemotaxis, βth replication, and ρth migration, express The total load of the machine after the hth bacterium undergoes the αth chemotaxis, βth replication, and ρth migration; Step 5.2: The chemotaxis operation is performed in the sth generation and the N ch The bacterial colony after the chemotaxis, β-th replication, and ρ-th migration Step 5.3: Perform the copy operation to obtain the sth generation experience N ch Secondary chemotaxis, N re The bacterial population after replication and migration Step 5.4: Perform migration operation and obtain the sth generation experience N ch Secondary chemotaxis, N re Replication, N ed The bacterial population after migration 4. The multi-objective flexible job shop scheduling method based on differential bacteria optimization algorithm according to claim 3 is characterized in that: The step 5.2 includes the following steps: Step 5.2.1: Initialize h = 1; Step 5.2.2: Initialize the number of swimming steps p = 0; Step 5.2.3: The hth bacterium in the pool swims according to formula (13), and the bacterial colony is obtained. The position of the hth bacterium after the α+1th chemotaxis, βth replication, and ρth migration In formula (13), express The position of the hth bacterium after the αth chemotaxis, βth replication, and ρth migration, is the step length of the hth bacterium after the αth chemotaxis, express The unit direction vector of the hth bacterium when it undergoes the α+1th chemotaxis, βth replication, and ρth migration; and: In formula (15), express The random direction vector when the hth bacterium undergoes the α+1th chemotaxis, the βth replication, and the ρth migration; Step max Indicates the maximum chemotaxis step length, Step min represents the minimum chemotactic step length; Step 5.2.4: Calculate according to formula (12) Fitness like Then Assign to Otherwise, let p = N swim ; Step 5.2.5: Assign p+1 to p and check if p≤N swim Is it true? If so, return to step 5.2.3 to execute. Otherwise, it means that the hth bacterium has completed the swimming operation, and execute step 5.2.6; Step 5.2.6: Assign h+1 to h and check if h≤N SP Is it true? If so, return to step 5.2.2 to execute; otherwise, it means All bacteria in the culture medium have completed the swimming operation and proceed to step 5.2.7; Step 5.2.7: Assign α+1 to α and determine whether α≤N ch Is it true? If so, return to step 5.2.1 to execute; otherwise, it means When all bacteria have completed chemotaxis, proceed to step 5.

3.

5. The multi-objective flexible job shop scheduling method based on differential bacteria optimization algorithm according to claim 4 is characterized in that: The step 5.3 includes the following steps: Step 5.3.1: Calculate using formula (10) The fitness of all bacteria in the sample is sorted in descending order to select the one with the maximum fitness. The corresponding elite bacteria and ranked The N behind SP / 2 bacteria; Step 5.3.2: Utilizing preferential crossover POX to elite bacteria Part of the process code and N SP / 2 bacteria's partial process codes are cross-operated, and then the elite bacteria Partial machine encoding and crossover N SP / 2 bacteria's partial machine code is mutated to obtain N after crossover mutation SP / 2 bacteria and The remaining N SP / 2 bacteria make up the sth generation of bacterial colonies after undergoing the αth chemotaxis, β+1th replication, and ρth migration Step 5.3.3: Assign β+1 to β and determine whether β≤N re Is it true? If so, return to step 5.2 to execute. Otherwise, it means Complete the replication procedure for all bacteria in the culture medium and proceed to step 5.

4.

6. The multi-objective flexible job shop scheduling method based on differential bacteria optimization algorithm according to claim 5 is characterized in that: The step 5.4 includes the following steps: Step 5.4.1: All bacteria in the s generation are sorted in descending order according to their fitness, and the sorted s generation experiences N ch Secondary chemotaxis, N re The bacterial population after replication and migration Step 5.4.2: Let h = 1; Step 5.4.3: Calculate according to formula (16) The hth bacterium undergoes N ch Secondary chemotaxis, N re The migration probability ped after replication and ρ-th migration h : Step 5.4.4: Randomly generate the hth migration probability P h , judge P h ≤ped h Is it true? If so, the hth bacterium undergoes migration operation, otherwise, the hth bacterium is retained; Step 5.4.5: Assign h+1 to h and check if h≤N SP Is it true? If so, return to step 5.4.3 and execute sequentially. Otherwise, it means Complete a migration judgment for all bacteria in the test and proceed to step 5.4.6; Step 5.4.6: Assign ρ+1 to ρ and determine whether ρ≤N ed Is it true? If so, return to step 5.2 to execute sequentially. Otherwise, it means that And assign it to And proceed to step 6.

7. An electronic device, comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the multi-objective flexible job shop scheduling method described in any one of claims 1 to 6, and the processor is configured to execute the program stored in the memory.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the multi-objective flexible job shop scheduling method described in any one of claims 1 to 6 are executed.

Citation Information

Patent Citations

  • Site selection-distribution method and system based on bacterial foraging algorithm and ant colony algorithm

    CN111950768A

  • Method for solving multi-target flexible job shop scheduling based on artificial bee colony algorithm

    CN113569483A

  • Multi-target flexible job shop scheduling method

    CN117787600A

  • Flexible job shop scheduling method based on evolutionary multi-task optimization

    CN117875595A