Distributed flexible workshop scheduling method and system based on multi-target grey wolf algorithm
By using three-layer encoding and hybrid strategies to initialize the wolves in the multi-objective gray wolf algorithm, combining non-dominant sorting and simulated annealing algorithm, the problems of insufficient diversity of initial solution sets and premature convergence in the distributed flexible operation workshop scheduling problem are solved. , improves the quality of the performance of the algorithm.
Patent Information
- Application Number
- CN202411975484.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-02-07
AI Technical Summary
The multi-objective gray wolf algorithm may face the problems of insufficient diversity of initial solution sets, high computational complexity, and premature convergence to local optimal solutions in the distributed flexible operation workshop scheduling problem.
The three-layer encoding codec mechanism is adopted, combined with a hybrid strategy to initialize the wolf pack, determine the wolf pack leader through non-dominant sorting and crowding calculation, perform cross-mutation, wolf pack merger and update, set up destruction and repair operators and combine simulated annealing The algorithm expands the solution space.
The performance of the algorithm in distributed flexible work workshop scheduling problems is improved, the diversity of the initial solution set is enhanced, the quality of convergence speed and solution is improved, and premature convergence to the local optimal solution is avoided.
Smart Images

Figure CN119396103A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of workshop scheduling, and in particular to a distributed flexible workshop scheduling method and system based on a multi-objective grey wolf algorithm. Background Art
[0002] Distributed flexible job shop scheduling refers to an optimization problem of scheduling the tasks of a job shop in a distributed manufacturing environment consisting of multiple factories. This scheduling has important practical significance for modern manufacturing: it can not only improve production efficiency and reduce costs, but also help enterprises maintain competitiveness in global competition and promote green manufacturing and sustainable development. In the processing stage, distributed flexible job shop scheduling mainly focuses on how to allocate tasks among multiple factories or workshops and schedule jobs within each factory to optimize key indicators such as production efficiency and cost.
[0003] The Multi-Objective Grey Wolf Optimizer (MOGWO) is a heuristic search strategy based on natural swarm intelligence and evolutionary principles, designed to solve complex optimization problems with multiple conflicting objectives. Currently, the Multi-Objective Grey Wolf Optimizer is widely used to solve the distributed flexible job shop scheduling problem in the processing stage.
[0004] However, the multi-objective gray wolf algorithm may face the problem of insufficient diversity of the initial solution set when randomly initializing the population, which limits the algorithm's ability to fully explore the solution space. In addition, the distributed flexible job shop scheduling in the processing stage is a typical NP-hard problem with high computational complexity, and the multi-objective gray wolf algorithm is difficult to find the exact optimal solution in polynomial time. At the same time, the multi-objective gray wolf algorithm may converge to the local optimal solution too early during the evolution process, which further reduces the quality of the obtained solution. Summary of the invention
[0005] In order to solve the above problems, the present invention proposes a distributed flexible job shop scheduling method and system based on a multi-objective grey wolf algorithm, which adopts a three-layer coding encoding and decoding mechanism and is defined by process sequence, machine selection and factory selection; then the initial wolf pack is initialized with a hybrid strategy, and the position of the wolf pack leader is determined by non-dominated sorting and congestion calculation; then the non-dominated elite solution set is obtained through crossover mutation, wolf pack merging and updating, and the destruction and repair operators are combined with simulated annealing to expand the solution space for optimization to obtain the final solution, aiming to improve the performance of the algorithm in the distributed flexible job shop scheduling problem in the processing stage.
[0006] In order to achieve the above object, the present invention adopts the following technical solution: In a first aspect, the present invention provides a distributed flexible workshop scheduling method based on a multi-objective grey wolf algorithm, comprising: Initialize algorithm parameters and define the encoding and decoding mechanism using three-layer encoding; the three-layer encoding includes process sequence, machine selection and factory selection; The initial wolf pack is initialized using a hybrid strategy based on three-layer coding. Half of the initial wolf pack is generated randomly, and the other half is generated based on optimization indicators: The initial wolf pack is divided into non-dominated hierarchies by non-dominated sorting, the crowding degree of each solution is calculated, and the crowding degree sorting of the population is obtained according to the crowding degree sorting and the dominance relationship sorting within the hierarchy; The position of the wolf pack leader is determined based on the number of non-dominated layers and the ranking of crowding; Perform crossover mutation on the individual positions of the wolf pack and merge the wolf packs, update the merged wolf packs, and obtain the non-dominated elite solution set; A destruction operator and a repair operator are set, the selection probability of the destruction operator and the repair operator is dynamically adjusted, and the search solution space is expanded based on a simulated annealing algorithm to optimize the elite solution set and obtain a final solution.
[0007] Preferably, the initial wolf group is initialized by adopting a hybrid strategy based on three-layer coding, wherein half of the initial wolf group is randomly generated and the other half is generated based on an optimization index; specifically, the strategy includes: For half of the initial wolf population, randomization was used to determine the process sequence, machine selection, and plant selection; For the other half of the initial wolf pack, the process sequence is determined based on the average processing time, the machine selection is determined based on different criteria, and the plant selection is determined based on the completion time and the earliest completion time.
[0008] Preferably, the method of dividing the non-dominated hierarchy of the initial wolf pack by non-dominated sorting, calculating the crowding degree of each solution and obtaining the crowding degree sorting of the population according to the crowding degree sorting and the dominance relationship sorting within the hierarchy specifically includes: The initial wolf pack is divided into different non-dominated levels through non-dominated sorting, and the crowding degree of each solution in each level is calculated; The solutions in each layer are arranged in descending order of crowding degree, and then sorted according to the dominance relationship within the hierarchy to obtain the crowding degree ranking of the entire wolf pack.
[0009] Preferably, the step of determining the wolf pack leader based on the number of non-dominated layers and the order of crowding degree specifically includes: The wolf pack leaders include alpha wolf, beta wolf and gamma wolf; If the number of non-dominated levels is less than four, the three wolves with the highest crowding ranking are selected as α wolf, β wolf and γ wolf; If the number of non-dominated layers is greater than or equal to four, then α wolf, β wolf and γ wolf are selected in the first layer, the second layer and the third layer respectively based on the selection rule; the selection rule is to calculate the sum of the crowding degrees of all solutions in the same layer, and determine the leader according to the maximum proportion of each solution in the sum of the crowding degrees.
[0010] Preferably, the crossover mutation of the individual positions of the wolf pack is specifically performed as follows: The crossover operator is used to update the individual positions of the wolf pack; The random two-point exchange operator is used to mutate the process sequence, and the random replacement machine strategy is used to mutate the machine selection.
[0011] Preferably, the updating of the merged wolf pack to obtain a non-dominated elite solution set specifically includes: When the number of non-dominated hierarchies in the merged population is less than four, a leader individual is randomly selected to perform a crossover mutation operation with individual X in the population; When the number of non-dominated levels in the population is greater than or equal to four, if individual X comes from the first non-dominated level and is the leader α wolf, a mutation operation is performed on it; if individual X comes from the first non-dominated level but is not the leader α wolf, a crossover mutation operation is performed between individual X and the leader α wolf; If individual X comes from the second non-dominated layer and is the leader β wolf, individual X performs a crossover mutation operation with the leader α wolf; if individual X comes from the second non-dominated layer but is not the leader β wolf, individual X randomly selects a leader from α wolf and β wolf to perform a crossover mutation operation; If individual X comes from the third non-dominated level and is the leader γ wolf, a leader is randomly selected from α wolf and β wolf to perform crossover mutation operation with individual X; if X comes from the third non-dominated level but is not the leader γ wolf, individual X randomly selects a leader from α wolf, β wolf, and γ wolf to perform crossover mutation operation; If individual X comes from the fourth or greater non-dominated level, X randomly selects a leader from α wolf, β wolf, and γ wolf to perform a crossover mutation operation; After each crossover mutation operation, the generated new individuals are non-dominated sorted, and the individuals belonging to the non-dominated level are added to the non-dominated elite solution set to obtain the non-dominated elite solution set.
[0012] Preferably, the setting of the destruction operator and the repair operator, dynamically adjusting the selection probability of the destruction operator and the repair operator, and expanding the search solution space based on the simulated annealing algorithm, optimizing the elite solution set, and obtaining the final solution specifically includes: Extract individual coding vectors from the non-dominated elite solution set, and use the destruction operator and the repair operator to update the individual coding vectors; At the beginning of the iteration, the destruction operator and the repair operator are selected with the same selection probability; as the iteration proceeds, the selection probability of the operator is dynamically updated using adaptive large neighborhood search according to the scores of the destruction operator and the repair operator; the scores are:
[0013] in, ; The adaptive large neighborhood search is used to dynamically update the selection probability of the operator as follows:
[0014]
[0015] in, is the selection probability of the destruction operator in this round, is the selection probability of the repair operator in this round; is the selection probability of the destruction operator in the previous round, is the selection probability of the repair operator in the previous round; It's the score. is the reaction factor, , is the current iteration number of the adaptive large neighborhood search phase; Simulated annealing is used as the acceptance criterion. The temperature is updated at a specific cooling rate starting from the initial temperature. After the iteration, the optimal solution in the non-dominated elite solution set is output as the final solution.
[0016] In a second aspect, the present invention provides a distributed flexible workshop scheduling system based on a multi-objective grey wolf algorithm, comprising: A parameter initialization module is used to initialize algorithm parameters and define the encoding and decoding mechanism using three-layer coding; the three-layer coding includes process sequence, machine selection and factory selection; The population initialization module is used to initialize the initial wolf population using a mixed strategy based on three-layer coding. Half of the initial wolf population is generated randomly, and the other half is generated based on optimization indicators: A crowding degree calculation module is used to divide the non-dominated hierarchy of the initial wolf pack by non-dominated sorting, calculate the crowding degree of each solution, and obtain the crowding degree sorting of the population according to the crowding degree sorting and the dominance relationship sorting within the hierarchy; A leader determination module is used to determine the position of the wolf pack leader based on the number of non-dominated layers and the crowding ranking; The initial solution acquisition module is used to perform crossover mutation on the individual positions of the wolf pack and to merge the wolf packs, and to update the merged wolf packs to obtain a non-dominated elite solution set; The final solution acquisition module is used to set the destruction operator and the repair operator, dynamically adjust the selection probability of the destruction operator and the repair operator, expand the search solution space based on the simulated annealing algorithm, optimize the elite solution set, and obtain the final solution.
[0017] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a distributed flexible workshop scheduling method based on a multi-objective grey wolf algorithm as described in the first aspect.
[0018] In a fourth aspect, the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of a distributed flexible workshop scheduling method based on a multi-objective grey wolf algorithm as described in the first aspect are implemented.
[0019] Compared with the prior art, the present invention has the following beneficial effects: (1) Based on actual production scenarios, the present invention designs a variety of initialization strategies and combines them with random initialization to form a hybrid strategy for guiding population initialization, enriching the diversity of the initial solution set; secondly, the present invention optimizes the leader selection and parent selection mechanisms to ensure that the algorithm can continue to evolve towards the optimal solution during the iteration process, thereby improving the algorithm convergence speed and accuracy; finally, the present invention combines the adaptive large neighborhood search with the MOGWO algorithm to optimize the elite solution set and improve the quality of the solution.
[0020] (2) The present invention uses a hybrid strategy to initialize the initial wolf pack. Half of the initial wolf pack is generated randomly, and the other half is generated based on optimization indicators. In the part generated based on the optimization indicators, the process sequence is determined based on the average processing time, the machine selection is determined based on different standards, and the factory selection is determined based on the completion time and the earliest completion time. In this way, the initial wolf pack is generated by combining randomness and targeting, effectively increasing the diversity of the initial solution set and avoiding the situation where the initial solution is too single and limited.
[0021] (3) The present invention adopts a three-layer coding definition encoding and decoding mechanism, which comprehensively covers multiple factors such as process sequence, machine selection and factory selection, and describes the scheduling problem in a detailed coding manner. At the same time, the non-dominated hierarchy is divided by non-dominated sorting and the congestion ranking is calculated. Based on this, the wolf pack leader is determined, and a series of complex and orderly operations such as crossover mutation, wolf pack merging and updating are used to gradually explore the solution space, search and optimize in multiple dimensions and multiple levels, which increases the possibility of finding an accurate optimal solution.
[0022] (4) The present invention sets a destruction operator and a repair operator, and dynamically adjusts their selection probabilities, expanding the search solution space based on the simulated annealing algorithm. The destruction operator can break the structure of the existing optimal solution, and the repair operator reconstructs it based on the destruction. The combination of the two and the dynamic adjustment of the probability make the algorithm not limited to a local area. The simulated annealing algorithm updates the temperature at a specific cooling rate from the initial temperature. Even if the test solution and the current solution do not dominate each other, there is a probability that it will be accepted, so that it can jump out of the local optimum and continue to explore a better solution, effectively preventing premature convergence.
[0023] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their description are used to explain the present invention but do not constitute a limitation of the present invention.
[0025] Figure 1 A main flow chart of a distributed flexible workshop scheduling method based on a multi-objective grey wolf algorithm provided by an embodiment of the present invention; Figure 2 A detailed flow chart of a distributed flexible workshop scheduling method based on a multi-objective grey wolf algorithm provided by an embodiment of the present invention; Figure 3 A coding schematic diagram provided for an embodiment of the present invention; Figure 4 A Gantt chart of the scheduling results in example MK02 provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0027] Embodiment 1 like Figure 1 As shown, this embodiment discloses a distributed flexible workshop scheduling method based on a multi-objective grey wolf algorithm, comprising the following steps: S1: Initialize algorithm parameters and define the encoding and decoding mechanism using three-layer encoding; the three-layer encoding includes process sequence, machine selection and factory selection; S2: A hybrid strategy is used to initialize the initial wolf pack based on three-layer coding. Half of the initial wolf pack is generated randomly, and the other half is generated based on the optimization index. S3: Divide the non-dominated hierarchy of the initial wolf pack by non-dominated sorting, calculate the crowding degree of each solution, and obtain the crowding degree sorting of the population according to the crowding degree sorting and the dominance relationship sorting within the hierarchy; S4: Determine the position of the wolf pack leader based on the number of non-dominated layers and the ranking of crowding; S5: Perform crossover mutation on the individual positions of the wolf pack and merge the wolf packs, update the merged wolf packs, and obtain the non-dominated elite solution set; S6: Setting a destruction operator and a repair operator, dynamically adjusting the selection probability of the destruction operator and the repair operator, and expanding the search solution space based on a simulated annealing algorithm, optimizing the elite solution set, and obtaining a final solution.
[0028] Next, combine Figure 2 , a distributed flexible workshop scheduling method based on a multi-objective grey wolf algorithm disclosed in this embodiment is described in detail.
[0029] In S1, the optimization objectives are to minimize the maximum completion time and total energy consumption of the distributed flexible job shop, and initialize the algorithm parameters: population size =100, crossover probability =1, mutation probability =0.2, destruction limit =0.05, lower limit of damage =0.1.
[0030] In the distributed flexible workshop scheduling problem, the purpose of determining the encoding and decoding mechanism is to transform the actual workshop scheduling problem into a form that the algorithm can handle, and at the same time to convert the results obtained by the algorithm back to the actual workshop scheduling plan.
[0031] A three-layer coding method is used to represent the solution of the distributed flexible job shop scheduling problem, namely process sequence OS, machine selection MS and factory selection FS.
[0032] Among them, encoding is to express the process sequence, machine selection and factory selection in the workshop scheduling problem in a specific encoding method so that the improved multi-objective grey wolf algorithm can operate and optimize it. Decoding is to convert the encoding results after algorithm optimization into an actual executable workshop scheduling plan to determine which factory, which machine and in what order each workpiece is processed.
[0033] Coding diagram as follows Figure 3 As shown, the encoding mode is: S101: The value of each element in the first layer OS represents a workpiece, and the number of times the value appears from left to right represents the number of processes of the workpiece, and the length is equal to the total number of processes of all workpieces. The number of processes refers to the number of processing steps that a workpiece needs to go through during the production process.
[0034] S102: The value of each element in the second layer MS represents the selected machine number. The value represents the processing machine of each process in the ascending order of the workpiece from left to right, and the length is equal to the total number of processes of all workpieces.
[0035] S103: The length of the third layer FS is equal to the number of all workpieces, and the value of each element in FS represents the homogeneous factory number selected in the ascending order of the workpieces.
[0036] The decoding modes are: First, obtain the set of workpieces assigned to each factory from FS. Then, traverse the process sequence OS from left to right to obtain the processing sequence, and assign each process to the corresponding factory. Then traverse the MS vector from left to right to obtain the machine selection for each process, and arrange each process to be processed on the machine in the corresponding factory.
[0037] In S2, a mixed strategy is used to initialize the population: half of the initial population is generated in a random manner, and the process sequence, machine selection, and factory selection are randomly determined; the other half is generated using a strategy that uses optimization indicators: OS based on average processing time, MS based on different standards, and FS based on makespan (completion time) and earliest completion time. The strategy using optimization indicators is specifically: S201: Determine the process sequence based on the average processing time OS: Calculate the average processing time of all processes for each workpiece, and arrange the workpieces in descending order according to this time. Prioritize the workpieces with the longest average total processing time for processing, and update their remaining average total processing time after processing. Repeat this cycle until the processing order of all workpieces is determined. S202: Determine machine selection MS based on different criteria: S2021: Select the machine with the shortest processing time for each operation.
[0038] S2022: Select the machine with the smallest current load. If the loads are the same, select the machine with the smallest processing time.
[0039] S2023: Select the machine with the shortest completion time for each process.
[0040] S2024: Select the machine with the lowest energy consumption for each process. If the energy consumption is the same, select the machine with the shortest completion time.
[0041] S203: Determine factory selection based on makespan and earliest completion time FS: After determining the processing order of the workpieces and selecting the machines, randomly generate the workpiece sequence and apply two allocation rules: S2031: Assign the artifact to the factory that currently has the smallest makespan.
[0042] S2032: Allocate the workpiece to the factory that can complete its processing earliest.
[0043] This embodiment adopts a hybrid initialization method. The random generation part allows the initial solution to be evenly distributed in a wide solution space, reducing restrictions on the initial solution and avoiding weakening the search capability due to the limitations of the initial setting. Based on the optimization index generation part, the population generation is guided from multiple dimensions, reducing the complexity of the algorithm and making the search direction clearer. Multi-strategy initialization increases the diversity of solutions, effectively preventing the algorithm from falling into the local optimum too early in the later evolution, allowing the algorithm to explore more efficiently in the global scope and improving the probability and efficiency of finding the optimal solution.
[0044] In S3, the initial population level division and crowding ranking are performed.
[0045] The wolf pack is divided into different non-dominated levels through non-dominated sorting, and the crowding degree of each solution in each level is calculated. The solutions in each level are sorted in descending order of crowding degree, and then sorted according to the dominance relationship within the level, so as to obtain the crowding degree ranking of the entire population.
[0046] Specifically, in the non-dominated sorting process, the solutions represented by these wolf individuals are compared. If a solution is not inferior to other solutions in all objectives and is better than other solutions in at least one objective, then this solution belongs to the first non-dominated level, that is, the optimal batch of solutions. Then find the relatively optimal solution among the remaining solutions and classify it as the second non-dominated level. And so on, the wolf pack is divided into different non-dominated levels.
[0047] After that, the degree of congestion of each solution in each layer is calculated. The degree of congestion is an indicator that reflects the density of the solution distribution in the target space. Taking the minimum maximum completion time and the minimum total energy consumption as the optimization goal as an example, for a solution in the same level, the distance between its neighboring solutions in terms of processing time and energy consumption is observed. The larger the distance, the more "sparse" its location is, and the smaller the congestion, and vice versa.
[0048] The solutions in each layer are sorted in descending order of congestion, that is, the solutions with high congestion (closer surrounding solutions) are placed in front. Then, a secondary sorting is performed based on the dominance relationship within the layer. If a solution dominates another solution (better in each objective) at the same congestion, the dominated solution is placed in front.
[0049] By sorting layer by layer, we can eventually get the crowding ranking of the entire population, which will help to screen out more advantageous and diverse solutions from the population in the future, and promote the algorithm to develop in the direction of finding the optimal solution set for multi-objective optimization problems.
[0050] In S4, the positions of wolf pack leaders α, β, and γ are determined based on the number of non-dominated layers and the order of crowding. Specifically: S401: If the non-dominated level is less than four, directly select the three wolves with the highest crowding ranking as α wolf, γ wolf, and β wolf; S402: If the number of non-dominated levels is greater than or equal to four, select wolf α in the first level, wolf γ in the second level, and wolf β in the third level as the leader of the wolf pack. The selection rule is to calculate the sum of the crowding degrees of all solutions in the same level, and then determine the leader according to the maximum proportion of each solution in the sum of crowding degrees.
[0051] In this embodiment, the pros and cons and diversity of solutions can be comprehensively considered according to the sorting of the number of non-dominated levels and the degree of crowding. When the number of levels is less than four, the three wolves with the highest degree of crowding are selected to focus on the better and more dispersed individuals, which is conducive to rapid convergence to the high-quality area; and when the number of levels is greater than or equal to four, leaders are selected proportionally at each level to ensure that excellent individuals at different levels have the opportunity to guide the wolf pack's search, avoiding relying on only one level and losing other potential optimal solutions. This not only promotes the algorithm to explore the global optimal, but also maintains the diversity of the population, making the search process more efficient and comprehensive, and improving the quality of the algorithm solution.
[0052] In S5, crossover mutation and population merging are performed, and the merged population is updated to obtain a non-dominated elite solution set. Specifically: S501: Use a process-biased crossover operator to cross the process sequence OS parent vector, and use a universal crossover operator to cross the factory selection FS and the machine selection MS.
[0053] The principle of the process-biased crossover operator is as follows: first, all workpieces are randomly divided into two sets X and Y. For the first parent A, all processes belonging to set X are found, and these processes are copied to the same position in the offspring vector a. The processes belonging to set Y in the second parent B are copied to the offspring vector b. Finally, the processes belonging to Y in B are filled into the blank positions without genes in a from left to right, and the first offspring is generated. The processes belonging to X in A are filled into the blank positions without genes in b from left to right, and the second offspring is generated. By analogy, the crossover operation can generate large disturbances and the search efficiency is extremely high.
[0054] These two crossover methods are commonly used strategies for solving workshop scheduling problems. They can generate new individuals by recombinating the genes of parent individuals, which helps to improve the diversity and performance of the offspring of the population.
[0055] S502: Use a random double-point exchange operator to perform a mutation operation on the process sequence OS vector.
[0056] First, two positions on the process sequence OS vector are randomly selected, and then the genes of the two positions are exchanged, and finally the original solution is replaced with the mutated solution. Similarly, the random replacement machine strategy is adopted for the machine selection MS vector. A process is randomly selected, and another machine different from the current machine is selected for processing within its optional machine range.
[0057] In this embodiment, a wider solution space can be searched through multiple crossover and mutation methods. Different crossover and mutation operations can guide the population to evolve in different directions, which helps to discover high-quality solutions that may have been overlooked.
[0058] After the crossover mutation is completed, the mutated offspring population is directly merged with the original population to form a new merged population, which is then updated to obtain a non-dominated elite solution set. Specifically: Traversing each individual X in the population as one of the parents, if the number of non-dominated levels in the population is less than four, wolf X randomly selects an individual among the leaders for crossover mutation.
[0059] Otherwise, the parent is selected according to the following strategy: 1) If wolf X comes from the first non-dominated level and wolf X is the leader α wolf, perform a mutation operation on wolf X; if wolf X comes from the first non-dominated level and wolf X is not the leader α wolf, perform a crossover and mutation operation on wolf X and the leader α wolf.
[0060] 2) If wolf X comes from the second non-dominated hierarchy and wolf X is the leader β wolf, wolf X performs crossover and mutation operations with the leader α wolf; if wolf X comes from the second non-dominated hierarchy and wolf X is not the leader β wolf, wolf X randomly selects a leader from α wolf and β wolf for crossover and mutation operations.
[0061] 3) If wolf X comes from the third non-dominated level and wolf X is the leader γ wolf, a leader is randomly selected from α wolf and β wolf for crossover and mutation operations; if wolf X comes from the third non-dominated level and wolf X is not the leader γ wolf, wolf X randomly selects a leader from α wolf, β wolf, and γ wolf for crossover and mutation operations.
[0062] 4) If wolf X comes from the fourth or greater non-dominated level, wolf X randomly selects a leader from α wolf, β wolf, and γ wolf for crossover and mutation operations.
[0063] After each crossover mutation operation is completed, the generated new individuals are sorted non-dominatedly, and the individuals belonging to the non-dominated level are added to the non-dominated elite solution set. If the new individual does not belong to the current non-dominated level, it will not be added to the non-dominated elite solution set. Repeat this process until all individuals in the population are traversed and the non-dominated elite solution set is obtained.
[0064] In this embodiment, the leader (α wolf, β wolf, γ wolf) is a better individual determined based on the non-dominated hierarchy and crowding ranking. By allowing other individuals to cross-mutate with the leader, the excellent genes of the leader can be used to guide the population to evolve in a better direction, so that the offspring individuals have a greater probability of inheriting excellent characteristics. At the same time, different cross-mutation strategies are adopted according to the individuals coming from different non-dominated hierarchies, which can not only ensure that the global better area (the front non-dominated hierarchy) is searched and optimized, but also does not ignore the potential high-quality solutions that may exist in other hierarchies. For example, individuals from the back non-dominated hierarchy also have the opportunity to cross-mutate with the leader, which helps to jump out of the local optimum and explore a wider solution space, and also makes the evolution of the population more balanced and comprehensive.
[0065] In S6, the destruction operator and the repair operator are first designed.
[0066] The following four destruction operators based on the encoding vector position are designed: 1) Random destruction operator: Randomly select the position of the encoding vector to be destroyed. The random destruction operation helps to escape the local optimal solution, breaks the original search path, and provides a wider exploration space for the algorithm to find a better solution.
[0067] 2) Destruction operator based on idle time: Calculate the idle time of each process and arrange them in descending order, destroy the process position with longer idle time, and obtain the destroyed encoding vector and the destroyed workpiece serial number.
[0068] 3) Destruction operator based on key factories: Identifying the factory with the longest completion time as the key factory and destroying the last processed workpiece position in the key factory will help shorten the maximum completion time and improve production efficiency.
[0069] 4) Destruction operator based on machine load: Identify the machine with the longest processing time in the key factory as the machine with the highest load, and destroy the workpiece position on this machine. This strategy helps to reduce the energy consumption of the factory, thereby achieving the goal of energy conservation and emission reduction and reducing production costs.
[0070] Design three repair operators as follows: 1) Random repair operator: randomly insert the damaged workpiece number into the damaged encoding vector to form a new process code. For the damaged machine code, randomly select a machine from the optional machines at the damaged position as the processing machine for the process.
[0071] 2) Time-greedy repair operator: When repairing the process code, consider the influence of other workpieces and processes in the workpiece process, and greedily insert the damaged process into a random position between the two influencing factors. For the machine code, greedily select each machine at the damaged process position. Traverse the above process codes and machine codes, and select the best process code and machine code after repair based on the completion time.
[0072] 3) Energy consumption greedy repair operator: The repair process is a time greedy repair operator, and the acceptance criterion is the total energy consumption of the machine. The best process code and machine code after repair are selected.
[0073] Furthermore, adaptive large neighborhood search is used to dynamically adjust the selection probability of the destruction and repair operators to optimize the elite solution set. The acceptance criterion of the simulated annealing algorithm is combined in the search to allow inferior solutions to be accepted with a certain probability, so as to search the solution space more widely and obtain the final production plan.
[0074] In this embodiment, the selection of destruction and repair operators is controlled by a roulette mechanism, and adaptive selection is performed according to probability. In each selection process, all destruction operators and repair operators can be selected; and the probability of selection is affected by historical results. More excellent operators have a greater probability of being selected, which not only helps to optimize the population, but also allows operators with poorer performance to be selected with a lower probability to a certain extent, so as to achieve the purpose of diversification. is the probability of choosing different destruction operators, is the probability of selecting different repair operators. At the beginning of the iteration, they are all set to 1, that is, the probability of being selected remains the same. As the iteration proceeds, the weights will be dynamically updated and adjusted according to the recorded damage and the performance of the repair operator. Specifically: At the beginning of an iteration, all destruction and repair operators have the same probability of being selected, i.e. and are all set to 1. As the iterations proceed, the weights are dynamically updated and adjusted based on the performance of the recorded destruction and repair operators. The performance of the operators in each iteration is scored To measure.
[0075] Score The expression is as follows:
[0076] in, .
[0077] The selection probability of the destruction operator and the repair operator is updated based on the score. The formula is as follows:
[0078]
[0079] in, , They represent the probability of selecting different destruction operators at time t and t+1 respectively, , They represent the probability of selecting different repair operators at time t and t+1 respectively; is the reaction factor, , is the current iteration number of the adaptive large neighborhood search phase.
[0080] During the iteration process, the solution update mechanism is as follows: 1) If the test solution generated during the iteration dominates the current solution, the current solution will be updated to the test solution, and the test solution will also be added to the elite solution set.
[0081] 2) If the test solution and the current solution do not dominate each other, the test solution will be retained in the elite solution set, and the current solution will be updated with a certain probability according to the acceptance rule.
[0082] 3) If the test solution is dominated by the current solution, the elite solution set remains unchanged and the current solution is not updated.
[0083] Using simulated annealing as the acceptance criterion, the algorithm starts from the initial temperature T. As the iteration proceeds, the cooling temperature is determined by the following formula:
[0084] in, is the cooling rate, .
[0085] In the simulated annealing process, even if the test solution does not dominate the current solution, it has a certain probability of being accepted, which helps to search the solution space more extensively. The Metropolis acceptance criterion allows Accepting non-optimal solutions, The calculation formula is as follows:
[0086] Among them, The test solution is Current solution.
[0087] After the iteration, the non-dominated solution set in the elite solution set is output, which is the final production plan.
[0088] In order to prove the effectiveness of the solution described in this embodiment, the following relevant experimental verification is carried out in combination with specific embodiments: A classic flexible job shop scheduling example (MK02) with a scale of 10 workpieces, 6 machines, and a total number of 58 processes is set, and the minimization of the maximum completion time and machine energy consumption is taken as the optimization goal to verify the effectiveness of the method proposed in this embodiment.
[0089] The three evaluation indicators HV (Hypervolume), GD (Generational Distance) and IGD (Inverse Generational Distance) are selected to evaluate the performance of the improved multi-objective grey wolf algorithm (IMOGWO). Specifically, HV is used to evaluate the diversity and coverage of the Pareto front solution set, and GD is used to measure the distance between the individual and the optimal solution in the Pareto front solution set, and to evaluate the quality of the solution set and the degree of approximation to the global optimal solution. IGD measures the distance from each solution in the Pareto front to the true Pareto front, thereby evaluating the degree of closeness between the solution set generated by the algorithm and the ideal solution set.
[0090] The comparison models are as follows: MOEAD: Multi-Objective Evolutionary Algorithm IMANS: A co-evolutionary algorithm based on inverse model and adaptive neighborhood search HMMA: A knowledge-driven meme algorithm NSGAII: Multi-Objective Evolutionary Algorithm II SPAMA: A popularity-based meme algorithm IMOGWO: Improved Multi-Objective Grey Wolf Algorithm (proposed by this invention) Table 1 Performance comparison
[0091] Figure 4 The application results of the IMOGWO algorithm in the MK02 example are shown, where M1 to M6 represent the six machines in the MK02 example, namely, machine 1 to machine 6; and F1 and F2 represent two factories, namely, factory 1 and factory 2. As shown in Table 1, IMOGWO performs well in the classic example MK02, with HV and GD being the best, and IGD performing well and ranking second. It can be seen that IMOGWO has superior performance in solving the distributed flexible job shop scheduling problem.
[0092] In view of the insufficient diversity of the initial solution set, this specific embodiment uses a hybrid strategy to initialize the wolf pack, half of which is randomly generated, and the other half is based on optimization indicators to determine the process sequence, machine and factory selection, which effectively enriches the diversity of the initial solution; for complex problems that are difficult to find an exact optimal solution, a three-layer coding is used to comprehensively describe the scheduling elements, and the wolf pack leader is determined by non-dominated sorting and congestion calculation. Then, through multi-step operations such as crossover mutation, wolf pack merging and updating, the complex solution space is gradually explored to improve the probability of finding an exact optimal solution; in order to avoid premature convergence to a local optimal solution, a destruction operator and a repair operator are set, and their selection probability is dynamically adjusted according to the score, and combined with a simulated annealing algorithm, the destruction operator breaks the local structure, the repair operator reconstructs, and the simulated annealing allows the acceptance of non-optimal solutions, thereby jumping out of the local, continuously exploring a better solution space, and obtaining the final optimal solution. Improve the scheduling efficiency of distributed flexible job shops, optimize resource allocation, enhance scheduling flexibility, avoid local optimality, and effectively guarantee overall production efficiency and quality.
[0093] Embodiment 2 This embodiment provides a distributed flexible workshop scheduling system based on a multi-objective grey wolf algorithm, including: A parameter initialization module is used to initialize algorithm parameters and define the encoding and decoding mechanism using three-layer coding; the three-layer coding includes process sequence, machine selection and factory selection; The population initialization module is used to initialize the initial wolf population using a mixed strategy based on three-layer coding. Half of the initial wolf population is generated randomly, and the other half is generated based on optimization indicators: A crowding degree calculation module is used to divide the non-dominated hierarchy of the initial wolf pack by non-dominated sorting, calculate the crowding degree of each solution, and obtain the crowding degree sorting of the population according to the crowding degree sorting and the dominance relationship sorting within the hierarchy; A leader determination module is used to determine the position of the wolf pack leader based on the number of non-dominated layers and the crowding ranking; The initial solution acquisition module is used to perform crossover mutation on the individual positions of the wolf pack and to merge the wolf packs, and to update the merged wolf packs to obtain a non-dominated elite solution set; The final solution acquisition module is used to set the destruction operator and the repair operator, dynamically adjust the selection probability of the destruction operator and the repair operator, expand the search solution space based on the simulated annealing algorithm, optimize the elite solution set, and obtain the final solution.
[0094] Embodiment 3 This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the distributed flexible workshop scheduling method based on a multi-objective grey wolf algorithm as described in the first embodiment above are implemented.
[0095] Embodiment 4 This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in a distributed flexible workshop scheduling method based on a multi-objective grey wolf algorithm as described in the first embodiment above are implemented.
[0096] The steps or modules involved in the above embodiments 2 to 4 correspond to those in embodiment 1. For the specific implementation, please refer to the relevant description of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.
[0097] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A distributed flexible workshop scheduling method based on a multi-objective grey wolf algorithm, characterized in that: include: Initialize algorithm parameters and define the encoding and decoding mechanism using three-layer encoding; the three-layer encoding includes process sequence, machine selection and factory selection; The initial wolf pack is initialized using a hybrid strategy based on three-layer coding. Half of the initial wolf pack is generated randomly, and the other half is generated based on optimization indicators: The initial wolf pack is divided into non-dominated hierarchies by non-dominated sorting, the crowding degree of each solution is calculated, and the crowding degree sorting of the population is obtained according to the crowding degree sorting and the dominance relationship sorting within the hierarchy; The position of the wolf pack leader is determined based on the number of non-dominated layers and the ranking of crowding; Perform crossover mutation on the individual positions of the wolf pack and merge the wolf packs, update the merged wolf packs, and obtain the non-dominated elite solution set; A destruction operator and a repair operator are set, the selection probability of the destruction operator and the repair operator is dynamically adjusted, and the search solution space is expanded based on a simulated annealing algorithm to optimize the elite solution set and obtain a final solution.
2. A distributed flexible workshop scheduling method based on a multi-objective grey wolf algorithm as claimed in claim 1, characterized in that: The hybrid strategy based on the three-layer coding is used to initialize the initial wolf group, half of the initial wolf group is randomly generated, and the other half is generated based on the optimization index; specifically, it includes: For half of the initial wolf population, randomization was used to determine the process sequence, machine selection, and plant selection; For the other half of the initial wolf pack, the process sequence is determined based on the average processing time, the machine selection is determined based on different criteria, and the plant selection is determined based on the completion time and the earliest completion time.
3. A distributed flexible workshop scheduling method based on a multi-objective grey wolf algorithm as claimed in claim 1, characterized in that: The method of dividing the non-dominated hierarchy of the initial wolf pack by non-dominated sorting, calculating the crowding degree of each solution, and obtaining the crowding degree sorting of the population according to the crowding degree sorting and the dominance relationship sorting within the hierarchy, specifically includes: The initial wolf pack is divided into different non-dominated levels through non-dominated sorting, and the crowding degree of each solution in each level is calculated; The solutions in each layer are arranged in descending order of crowding degree, and then sorted according to the dominance relationship within the hierarchy to obtain the crowding degree ranking of the entire wolf pack.
4. A distributed flexible workshop scheduling method based on a multi-objective grey wolf algorithm as claimed in claim 1, characterized in that: The method of determining the wolf pack leader based on the number of non-dominated layers and the order of crowding degree specifically includes: The wolf pack leaders include alpha wolf, beta wolf and gamma wolf; If the number of non-dominated levels is less than four, the three wolves with the highest crowding ranking are selected as α wolf, β wolf and γ wolf; If the number of non-dominated layers is greater than or equal to four, then α wolf, β wolf and γ wolf are selected in the first layer, the second layer and the third layer respectively based on the selection rule; the selection rule is to calculate the sum of the crowding degrees of all solutions in the same layer, and determine the leader according to the maximum proportion of each solution in the sum of the crowding degrees.
5. A distributed flexible workshop scheduling method based on a multi-objective grey wolf algorithm as claimed in claim 1, characterized in that: The crossover mutation of the individual positions of the wolf pack is specifically as follows: The crossover operator is used to update the individual positions of the wolf pack; The random two-point exchange operator is used to mutate the process sequence, and the random replacement machine strategy is used to mutate the machine selection.
6. A distributed flexible workshop scheduling method based on a multi-objective grey wolf algorithm as claimed in claim 1, characterized in that: The merged wolf pack is updated to obtain a non-dominated elite solution set, which specifically includes: When the number of non-dominated hierarchies in the merged population is less than four, a leader individual is randomly selected to perform a crossover mutation operation with individual X in the population; When the number of non-dominated levels in the population is greater than or equal to four, if individual X comes from the first non-dominated level and is the leader α wolf, a mutation operation is performed on it; if individual X comes from the first non-dominated level but is not the leader α wolf, a crossover mutation operation is performed between individual X and the leader α wolf; If individual X comes from the second non-dominated layer and is the leader β wolf, individual X performs a crossover mutation operation with the leader α wolf; if individual X comes from the second non-dominated layer but is not the leader β wolf, individual X randomly selects a leader from α wolf and β wolf to perform a crossover mutation operation; If individual X comes from the third non-dominated level and is the leader γ wolf, a leader is randomly selected from α wolf and β wolf to perform crossover mutation operation with individual X; if X comes from the third non-dominated level but is not the leader γ wolf, individual X randomly selects a leader from α wolf, β wolf, and γ wolf to perform crossover mutation operation; If individual X comes from the fourth or greater non-dominated level, X randomly selects a leader from α wolf, β wolf, and γ wolf to perform a crossover mutation operation; After each crossover mutation operation, the generated new individuals are non-dominated sorted, and the individuals belonging to the non-dominated level are added to the non-dominated elite solution set to obtain the non-dominated elite solution set.
7. A distributed flexible workshop scheduling method based on a multi-objective grey wolf algorithm as claimed in claim 1, characterized in that: The method includes setting the destruction operator and the repair operator, dynamically adjusting the selection probability of the destruction operator and the repair operator, expanding the search solution space based on the simulated annealing algorithm, optimizing the elite solution set, and obtaining the final solution; specifically including: Extract individual coding vectors from the non-dominated elite solution set, and use the destruction operator and the repair operator to update the individual coding vectors; At the beginning of the iteration, the destruction operator and the repair operator are selected with the same selection probability; as the iteration proceeds, the selection probability of the operator is dynamically updated using adaptive large neighborhood search according to the scores of the destruction operator and the repair operator; the scores are: in, ; The adaptive large neighborhood search is used to dynamically update the selection probability of the operator as follows: in, is the selection probability of the destruction operator in this round, is the selection probability of the repair operator in this round; is the selection probability of the destruction operator in the previous round, is the selection probability of the repair operator in the previous round; It's the score. is the reaction factor, , is the current iteration number of the adaptive large neighborhood search phase; Simulated annealing is used as the acceptance criterion. The temperature is updated at a specific cooling rate starting from the initial temperature. After the iteration, the optimal solution in the non-dominated elite solution set is output as the final solution.
8. A distributed flexible workshop scheduling system based on a multi-objective grey wolf algorithm, characterized in that: include: A parameter initialization module is used to initialize algorithm parameters and define the encoding and decoding mechanism using three-layer coding; the three-layer coding includes process sequence, machine selection and factory selection; The population initialization module is used to initialize the initial wolf population using a mixed strategy based on three-layer coding. Half of the initial wolf population is generated randomly, and the other half is generated based on optimization indicators: A crowding degree calculation module is used to divide the non-dominated hierarchy of the initial wolf pack by non-dominated sorting, calculate the crowding degree of each solution, and obtain the crowding degree sorting of the population according to the crowding degree sorting and the dominance relationship sorting within the hierarchy; A leader determination module is used to determine the position of the wolf pack leader based on the number of non-dominated layers and the crowding ranking; The initial solution acquisition module is used to perform crossover mutation on the individual positions of the wolf pack and to merge the wolf packs, and to update the merged wolf packs to obtain a non-dominated elite solution set; The final solution acquisition module is used to set the destruction operator and the repair operator, dynamically adjust the selection probability of the destruction operator and the repair operator, expand the search solution space based on the simulated annealing algorithm, optimize the elite solution set, and obtain the final solution.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by the processor, the steps in the distributed flexible workshop scheduling method based on the multi-objective grey wolf algorithm as described in any one of claims 1 to 7 are implemented.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the distributed flexible shop scheduling method based on the multi-objective grey wolf algorithm as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Logistics vehicle distribution scheduling method, vehicle, electronic equipment and storage medium
CN114781706A
Multi-target distributed flexible workshop scheduling optimization method based on grey wolf algorithm
CN115438877A
Multi-target flexible job shop scheduling method based on mixed grey wolf algorithm
CN117495041A
Method and system for dividing local power grid islands containing distributed power supplies based on GSA-GWO algorithm
CN118117641A
Discrete marine predator method for solving visit route of traveling salesman
CN118521021A
Cited By
Order process merging workshop scheduling method and system based on job level constraint
CN121961098A