A distributed permutation flow shop scheduling optimization method with preventive maintenance

By employing a multi-population co-evolutionary framework and a hybrid meta-heuristic algorithm, the complexity of the distributed replacement flow shop scheduling problem increased by preventative maintenance is addressed, resulting in more efficient scheduling optimization.

CN122088997BActive Publication Date: 2026-07-21LIAOCHENG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
LIAOCHENG UNIV
Filing Date
2026-04-22
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In existing distributed permutation flow shop scheduling problems, the introduction of preventive maintenance increases the complexity of the problem, leading to a complex solution space structure and challenging the global exploration and local development capabilities of optimization algorithms.

Method used

A multi-population co-evolutionary framework is adopted, dividing the population into explorer and developer subpopulations. By combining Q-learning and multi-armed slot machine models, a search strategy is dynamically selected, and the solution is optimized through a mixed-integer linear programming model. A hybrid metaheuristic algorithm combining the DIWO algorithm and the CP model is designed.

Benefits of technology

It effectively balances the algorithm's global exploration and local development capabilities, improving the efficiency and quality of solving the distributed replacement flow shop scheduling problem with preventive maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122088997B_ABST
    Figure CN122088997B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of distributed permutation flow shop scheduling in intelligent manufacturing, and particularly relates to a distributed permutation flow shop scheduling optimization method with preventive maintenance. The application divides a population into two populations of explorers and developers for collaborative evolution, and completes state evaluation and search action decision based on population improvement rate and diversity through Q learning. Eight kinds of neighborhood disturbance operators of three types of factory layer, workpiece layer and local layer are adaptively selected for individuals in combination with a multi-armed tiger machine model. After iterative optimization of propagation diffusion, local search, competition exclusion and population immigration, an elite library is constructed to complete deep search, and finally, a global optimal solution of a heuristic algorithm is taken as a hot start point to complete final optimization through a constraint programming (CP) model. The application significantly improves the solution accuracy and efficiency of the scheduling problem, and effectively balances the global exploration and local development capabilities of the algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of distributed replacement flow shop scheduling technology in intelligent manufacturing, and particularly relates to a distributed replacement flow shop scheduling optimization method with preventive maintenance. Background Technology

[0002] The Distributed Permutation Flowshop Scheduling Problem (DPFSP) is an important extension of the classic permutation flowshop scheduling problem in modern distributed manufacturing environments. With the widespread adoption of global manufacturing networks and collaborative production models, it has been found that multiple production centers or distributed manufacturing systems can reduce production costs and management risks while improving product quality. DPFSP, due to its precise characterization of multi-site collaborative scheduling problems, has become a research hotspot in operations research and intelligent manufacturing.

[0003] Existing technical research typically assumes that all machines are accessible throughout the manufacturing process. However, in real-world production environments, this is often not the case. Manufacturing equipment inevitably experiences performance degradation after long-term continuous operation. To ensure product quality and production safety, we must perform maintenance operations on the system to restore it to a specific state. Maintenance operations generally fall into two categories: corrective maintenance (CM) and preventive maintenance (PM). As the names suggest, corrective maintenance refers to salvage maintenance performed after a machine has failed, while preventive maintenance refers to preventative maintenance performed while the machine is still in good condition. This method introduces preventive maintenance into the Distributed Permutation Flowshop Scheduling Problem (PM / DPFSP), making it closer to engineering practice, but also significantly increasing the problem's complexity. The introduction of maintenance activities creates equipment unavailability intervals in the time dimension, breaking the continuity assumption of traditional scheduling models, making the solution space structure more rugged and complex, posing a severe challenge to the global exploration and local exploitation capabilities of optimization algorithms. Summary of the Invention

[0004] To address the technical problems existing in the background art described above, this invention proposes a distributed replacement flow shop scheduling optimization method with preventive maintenance.

[0005] To achieve the above objectives, the technical solution adopted by the present invention includes the following steps:

[0006] S1. Initialization operation: Complete the initialization of the running parameters of the Discrete Invading Weeds Optimization Algorithm (DIWO), and at the same time perform dual population initialization, dividing the population into the Explorer population (ERP) and the Developer population (ETP), and generating initial solutions using the corresponding heuristic rules respectively.

[0007] S2 and Q learning status assessment: Calculate the normalized improvement rate and normalized population diversity of ERP and ETP respectively, and obtain a comprehensive score by weighted summation of the two populations based on the two indicators, and complete the search status level classification of Q learning.

[0008] S3, Q-learning action decision and operator selection: First, determine whether the current iteration needs to execute a decision. If so, use a greedy strategy to select an action in the Q-learning action space for the corresponding population. If not, use the action from the previous iteration. Then, through the multi-armed slot machine model, within the operator selection constraint range corresponding to the selected action, select the corresponding perturbation operator for each individual in the population.

[0009] S4. Reproduction and Dispersion: Calculate the number of offspring seeds that each individual can produce based on the fitness value of individuals in the population. Based on the selected perturbation operator, perform a specified number of perturbation operations on each parent individual to generate offspring seed individuals.

[0010] S5. Local Search: For the best individuals generated by ERP and ETP in this iteration, perform a neighborhood search to optimize the solution quality of the individuals.

[0011] S6. Competition Elimination: Merge the parent population of the current iteration with all the offspring seed individuals generated in S4 to form a candidate pool. Sort the individuals in the candidate pool in ascending order according to their fitness values, select the best individuals to form the next generation population, and eliminate the rest.

[0012] S7. Population Migration and Parameter Update: Determine whether migration is needed in this iteration. If migration is needed, first select some elite individuals for bidirectional circular migration, and then update the relevant parameter values ​​of Q-learning and multi-armed slot machine; otherwise, directly update the relevant parameter values ​​of Q-learning and multi-armed slot machine.

[0013] S8. Elite Pool Deep Search: Check if the time requirement is met. If it is within the time limit, return to S2. Otherwise, select a portion of elite individuals from each population, use a dual-source selection strategy to build an elite pool, and then perform a deep search on all individuals in the elite pool one by one.

[0014] S9. Solving the CP model: The global optimal solution is used as the hot start point of the constraint programming CP model. The CP model is used to find the optimal solution. The solution output by the CP model is compared with the global optimal solution obtained by the heuristic algorithm. The optimal solution is retained and output.

[0015] Preferably, the initialization of the Discrete Invasive Weeds Optimization Algorithm (DIWO) in step S1 specifically includes initializing the following parameters: initial population size. Maximum number of individuals that a population can hold The maximum number of seeds that the optimal individual can generate in a single iteration. The minimum number of seeds that the worst individual can generate in a single iteration. The number of times an individual performs a perturbation operation in a single diffusion. The initialization rules for the dual population are as follows: For the explorer population (ERP), the HR1 heuristic is used to generate an initial solution: based on the longest processing time (LPT) rule, the total processing time of each workpiece on all machines is calculated, and the workpieces are sorted from largest to smallest total processing time to obtain the LPT sequence. The first workpiece in the LPT sequence is placed into the new sequence. For the remaining workpieces, the maximum completion time after insertion into all possible positions in the new sequence is evaluated, and the position that minimizes the maximum completion time is selected for insertion. After each insertion, a local search for adjacent swaps is performed in the new sequence. After all workpieces are inserted, the HR1 initial solution is obtained. For the developer population (ETP), the H... R2 heuristic generation of initial solutions: Based on the Shortest Processing Time (SPT) rule, sort the workpieces by their total processing time in ascending order to obtain the SPT sequence; take the first two workpieces from the LPT sequence, compare the maximum completion time of the two sorts and select the better sort to form a new sequence; evaluate the maximum completion time of each of the remaining workpieces in the SPT sequence after inserting it into all possible positions in the new sequence, and select the position that minimizes the maximum completion time for insertion. After inserting all workpieces, the HR2 initial solution is obtained; after obtaining the first initial solution, the remaining initial solutions are generated by copying the first initial solution and repeating the insertion operation twice by randomly selecting workpiece positions.

[0016] Preferably, step S2 is implemented as follows:

[0017] S21. Using the current optimal solution Best solution within the historical window To calculate the improvement rate: Then, normalization is performed on it to obtain the normalized improvement rate. : When the historical records are insufficient to reach the set threshold, the normalization improvement rate is set to 0.5 by default.

[0018] S22. Calculate the similarity between two workpiece sequences, given two workpiece sequences of length n. Calculate its Hamming distance For a population containing N individuals Calculate the average Hamming distance between all unique pairs of individuals in the population to obtain the average Hamming distance of the population. The obtained average Hamming distance Normalization is performed to obtain the normalized population diversity D;

[0019] S23. A comprehensive score is obtained by weighting and summing the Explorer population ERP and Developer population ETP using normalized improvement rate and normalized population diversity. The comprehensive score is then used to classify the Q-learning search state into three discrete levels: poor, average, and good. The weighted summation method is as follows: , .

[0020] Preferably, step S3 is implemented as follows:

[0021] S31. Define operators, which include eight complementary neighborhood operators across three levels: factory layer, workpiece layer, and local layer. Among them, the factory layer operators include cross-factory exchange operator, cross-factory insertion operator, and factory block migration operator; the workpiece layer operators include long-distance insertion operator, multiple exchange operator, and block inversion operator; and the local layer operators include adjacent exchange operator and short-distance insertion operator.

[0022] S32. The Q-learning action space is defined to include development action AET, exploration action AER, and balancing action ABE. When AET is selected, the population can only select operators from the local layer for perturbation operations. When AER is selected, the algorithm will select operators from the factory layer for perturbation operations. When ABE is selected, operators can be freely selected from all eight operators for perturbation operations.

[0023] S33, Using a greedy strategy To select an action, the algorithm first generates a range at each decision stage. Uniformly distributed random numbers ,like If the Q-value is the highest, then randomly select an action from the Q-learned action space; otherwise, iterate through all actions in the current state and select the action with the highest Q-value. ERP and ETP need to be configured differently. Value configuration; then, using a multi-armed gambling machine within the operator selection constraints of the Q-learning action, the operator with the largest sample value is selected as the executor of this perturbation operation for each individual in the population.

[0024] Preferably, step S4 is implemented as follows:

[0025] S41. Set the fitness value of the best individual in the current population. The fitness value of the worst individual is Calculate the number of seeds for individual i. The calculation method is as follows:

[0026] ,in, Let represent the maximum and minimum number of seeds that a single individual can generate in one iteration, respectively. Represents the fitness value of individual i, when When all individuals in the population have the same fitness value, the number of seeds produced by each individual is taken as... The average value;

[0027] S42. For each newly generated seed, based on the solution of its parent individual, continuously execute... The perturbation operation generates a new candidate solution; the perturbation operator is selected using the operator chosen by the multi-armed gambling machine in S3.

[0028] Preferably, the execution method of the insertion neighborhood search in step S5 is as follows: identify individuals with the minimized maximum completion time from all new seeds generated in this round of breeding process as search objects; perform insertion move evaluation on each workpiece in the sequence in turn; after removing the target workpiece from the current position, traverse all possible insertion positions in the sequence and calculate the corresponding maximum completion time; select the position that minimizes the maximum completion time as the proposed new position; accept the insertion move and update the solution if and only if the reduction in the maximum completion time of the solution by the new insertion position reaches a preset threshold; otherwise, restore the workpiece to its original position; set a continuous unimproved counter; when the counter value reaches the total number of workpieces, determine that the current solution has reached the local optimum state of the insertion neighborhood and terminate the local search.

[0029] Preferably, step S7 is implemented as follows:

[0030] S71. First, determine whether migration is needed in this iteration, and set a fixed iteration interval for migration operations. The number of individual immigrants The calculation method is as follows: ,in, This indicates the floor function. Expressed as immigration rate. Indicates the current Population size;

[0031] S72. Perform a two-way circular migration. The first direction is migration from ERP to ETP, selecting the most suitable candidate from the ERP. Each individual is copied into the ETP, replacing the worst-fitting individual in the ETP. The first direction is migration from ETP to ERP, selecting the most fit individuals from ETP. Each individual is considered a candidate for immigration. For each candidate individual, the algorithm searches for the individual with the smallest Hamming distance in the ERP, that is, the individual with the most structural similarity, and then replaces the similar individual with the candidate individual.

[0032] S73. Update the Q table for Q learning: ,in, These represent the current state and the new state after the action is performed, respectively. Indicates the selected action. Indicates a new state Below, the maximum Q-value corresponding to all possible actions, where r represents the immediate reward obtained after performing the action. For learning rate, Discount factor;

[0033] S74. Simultaneously update the parameters of the Beta distribution corresponding to the multi-armed slot machine, using the following update method: Where i represents the index of the candidate operator. Let be the two shape parameters of the Beta distribution corresponding to the multi-armed slot machine, representing the magnitude of the cumulative positive and negative rewards of operator i, respectively.

[0034] Preferably, the immediate reward r obtained after performing the action is calculated as follows: ,in, These are the global minimum and maximum completion times before and after the action is executed.

[0035] Preferably, step S8 is implemented as follows:

[0036] S81. Set the total time limit to TimeLimit, then the time allocated in the DIWO phase... Time allocated in the CP phase They are respectively: , ,in, This is the time allocation coefficient;

[0037] S82. When not within the time limit, select the top k elite individuals in fitness from the two populations and add them to the elite pool.

[0038] S83. Perform a depth search. For each individual in the elite pool, examine each job in the sequence in turn, evaluate the maximum change in completion time after moving it to all possible positions, and select the move that produces the greatest improvement. This process is iterated until no better move can be found after continuously traversing all jobs.

[0039] S84. After completing the depth search for each elite individual, the algorithm compares the optimized solution with the current global optimum. If the solution after the depth search has a smaller maximum completion time, the global optimum is updated.

[0040] Compared with the prior art, the advantages and positive effects of the present invention are as follows:

[0041] 1. This invention designs a multi-population co-evolutionary framework, which structurally balances the global exploration and local development capabilities of the algorithm by dividing a single population into "explorers" and "developers" subpopulations with different search tendencies.

[0042] 2. This invention introduces a two-layer adaptive decision-making mechanism. At the macro level, Q-learning is used to simulate the process of an agent learning the optimal search strategy in interaction with the environment, and the global search mode is dynamically selected according to the population state (such as improvement trend and diversity). At the micro level, a multi-armed slot machine model is adopted to adaptively select the most effective perturbation operator for each individual from a perturbation operator library containing factory layer, workpiece layer and local layer.

[0043] 3. This invention designs MILP and CP models for solving the optimal solution based on the characteristics of PM / DPFSP.

[0044] 4. This invention proposes a hybrid metaheuristic algorithm that combines the improved DIWO algorithm and the CP model. Attached Figure Description

[0045] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 This is a flowchart illustrating the implementation of the present invention; Figure 2 A schematic diagram illustrating the process of exchanging operators across factories; Figure 3 A schematic diagram illustrating the process of inserting operators across factories; Figure 4 A schematic diagram of the factory block migration operator process; Figure 5 A schematic diagram of the long-distance insertion operator process; Figure 6 A schematic diagram of the process of multiple commutation operators; Figure 7 A schematic diagram of the block inversion operator process; Figure 8 A schematic diagram of the process of the adjacent exchange operator; Figure 9 Figure 10(a) shows the process of the short-distance insertion operator; Figure 10(a) shows the parameter calibration stage, where the time allocation coefficients are being calibrated. The main effects plots of the parameters at their respective levels are shown in Figure 10(b), which shows the parameter calibration stage and the calibrated migration intervals. The main effects plots of the parameters at their respective levels are shown in Figure 10(c), which shows the calibration phase and the calibrated immigration rate. The main effects plots of the parameters at their respective levels are shown in Figure 10(d), which shows the parameter calibration stage and the initial population size at which the parameters were calibrated. Main effects plot of parameters at their respective levels. Detailed Implementation

[0047] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0048] Numerous specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways than those described herein, and therefore the invention is not limited to the specific embodiments disclosed in the following specification.

[0049] Examples, such as Figure 1 As shown, this invention provides an optimization method for solving the scheduling of a distributed replacement flow shop with preventive maintenance, with the objective of minimizing the maximum completion time. This method is mainly implemented through the following process.

[0050] Step 1, Initialization. Initialize the DIWO algorithm and the population. Specifically, DIWO requires the following parameters: , , , and Perform initialization. (The following is a partial sentence or paragraph.) This indicates the number of individuals (weeds) included in the algorithm's initialization phase; This represents the maximum number of individuals allowed to be accommodated during the algorithm's execution. This represents the maximum number of offspring (seeds) that the most fit individual in the current population can produce in a single reproductive iteration. This represents the minimum number of offspring (seeds) that the individual with the worst fitness in the current population can produce in a single reproductive iteration; This represents the number of times each newly generated seed individual performs perturbation operations (such as insertion and swapping) based on its parent solution during the spatial diffusion phase.

[0051] Specifically, the initialization of the population defines the two populations as the Explorer Population (ERP) and the Explorer Population (ETP), respectively.

[0052] The ERP system uses the HR1 heuristic, which involves sorting by the longest processing time (LPT) rule and calculating the total processing time for each workpiece across all machines. , Where i is the workpiece number. For workpiece The processing time on machine k, where m is the total number of machines. Then, according to... Arrange the workpieces in descending order to obtain the LPT sequence. .Will The first workpiece in the sequence is placed in the new sequence. In China, for The remaining workpiece Each one will be evaluated Insert into the current sequence All possible locations (total) After ( ), the new partial sequence is formed. The maximum completion time value is used to select the location that yields the minimum maximum completion time value. Insertion. After each insertion operation, immediately update the current... The sequence performs a local search for adjacent swaps, attempting to swap all adjacent workpiece pairs in the sequence. If a swap reduces the maximum completion time, it is accepted. After inserting all workpieces, the final sequence is obtained. .

[0053] ETP uses the HR2 heuristic, which calculates the value according to the formula in the ERP system. Sort by shortest processing time (SPT), that is, according to its... The workpieces are sorted in ascending order of value to obtain the SPT sequence. Extract the sequence. For the first two workpieces, compare their maximum completion times under the two sorting methods, and select the better one to form a new sequence. ,for For the other artifacts in the sequence, we evaluate them one by one and insert them into the current sequence. All possible locations (total) After ( ), the new partial sequence is formed. Find the maximum completion time value, select the position that yields the minimum maximum completion time value, and insert it. The resulting final sequence is... .

[0054] Furthermore, after obtaining the first initial solution using the above method, other initial solutions are obtained by copying this solution and then randomly selecting two positions in the sequence. and ,Will The workpiece is moved out of the designated position and inserted into... At the given position, repeating the above operation twice will yield a new initial solution.

[0055] Step 2: Q-learning status assessment: Calculate the normalized improvement rate and normalized population diversity of ERP and ETP respectively. Based on the two indicators, perform a weighted summation on the two populations to obtain a comprehensive score, and complete the search status level classification of Q-learning.

[0056] Specifically, this invention divides the Q-learning search state into three discrete levels: state 0 (poor state), state 1 (medium state), and state 2 (good state). The state determination is based on a comprehensive evaluation of two core indicators: normalized improvement rate. And normalized population diversity D.

[0057] Among them, the improvement rate By comparing the current optimal solution Best solution within the historical window To calculate, specifically defined as: Then, Normalization operation is performed to obtain the normalized improvement rate. : When the historical records are insufficient to reach the set threshold, the normalization improvement rate is set to 0.5 by default, indicating a medium level.

[0058] This invention uses Hamming distance to measure the similarity between two workpiece sequences. For two workpiece sequences, each of length n... Its Hamming distance Defined as: Where n represents the number of workpieces. Sequences The workpiece number at the i-th position, This is a characteristic function; it takes a value of 1 when the condition within the parentheses is true, and a value of 0 otherwise. For a population containing N individuals... Calculate all unique pairs of individuals in the population. The average Hamming distance between the populations is obtained by calculating the average Hamming distance between them. The average Hamming distance was normalized to obtain normalized population diversity.

[0059] Then, normalized improvement rates were applied to the explorer and developer populations. The comprehensive score is obtained by weighted summation of the normalized population diversity D and the average population diversity D, and is specifically defined as follows: , .in, This represents the overall score of the explorer population; This represents the overall score of the developer community.

[0060] Step 3: Perform action decision-making and operator selection for Q-learning. First, determine whether a decision is needed in the current iteration. If so, use a greedy strategy to select an action within the Q-learning action space for the corresponding population; otherwise, use the action from the previous iteration. Then, using a multi-armed slot machine model, within the operator selection constraints corresponding to the selected action, select the corresponding perturbation operator for each individual in the population.

[0061] Specifically, this invention designs eight complementary neighborhood operators across three levels: factory layer, workpiece layer, and local layer. The factory layer operators include: cross-factory exchange operator, cross-factory insertion operator, and factory block migration operator. The cross-factory exchange operator (e.g....) Figure 2 ,in, This represents the i-th factory. (Representing the i-th workpiece, the same below) involves randomly selecting two workpieces from the workpiece sequence and then swapping their positions in the sequence. Cross-factory insertion operators (such as...) Figure 3 This involves randomly selecting a workpiece from the workpiece sequence, removing it from its original position, and then inserting it into another random position in the sequence. Factory block migration operators (such as...) Figure 4 The Job Sequence (representing the total sequence of jobs before they are assigned to a specific factory) is a sub-block containing three to five consecutive jobs selected from the job sequence. The entire sub-block is then removed from its original position and moved to the end of the sequence.

[0062] The workpiece layer operators include: long-distance insertion operators, multiple exchange operators, and block inversion operators. Long-distance insertion operators (such as...) Figure 5 A random exchange operator (such as a multiple exchange operator) selects an item from a sequence, removes it from its original position, and inserts it into any other position in the sequence, without imposing a limit on the insertion distance. Figure 6 The number of swap pairs is adaptively determined based on the sequence length. Specifically, when the sequence length is greater than or equal to six, two to three pairs of non-overlapping workpieces are randomly selected for simultaneous swapping; otherwise, two swaps are performed by default. Block inversion operators (such as...) Figure 7 The process involves randomly determining a sub-block of three to six workpiece lengths and its starting position, and then completely reversing the order of all workpieces within that sub-block.

[0063] The local layer operators include: the adjacency exchange operator and the short-distance insertion operator. The adjacency exchange operator (such as...) Figure 8 This involves randomly selecting two adjacent workpieces from a workpiece sequence and then swapping their positions. Short-distance insertion operators (such as...) Figure 9 This involves randomly selecting a workpiece, removing it from its original position, and then inserting it into a region two to three positions away from its original location. The insertion direction is randomly determined; it can move forward or backward, but the distance it moves is strictly limited.

[0064] The action space of Q-learning comprises three actions: expansion (ACTION_EXPLOIT, AET), exploration (ACTION_EXPLORE, AER), and balancing (ACTION_BALANCE, ABE). Different actions impose different restrictions on operator selection: when AET is selected, the population can only select operators from the local layer for perturbation operations; when AER is selected, the algorithm selects operators from the factory layer for perturbation operations; when ABE is selected, operators can be freely selected from all eight operators for perturbation operations.

[0065] The choice of movements adopts classic... Strategy. Specifically, at each decision point, the algorithm first generates a random number r uniformly distributed within the interval [0,1]. If the Q-value is the highest, then an action is randomly selected from the Q-learned action space; otherwise, the Q-values ​​of all actions in the current state are traversed, and the action with the highest Q-value is selected. Specifically, ERP and ETP require different... Value configuration.

[0066] Then, using a multi-armed gambling machine, within the operator selection constraints of the Q-learning action, a corresponding operator is selected for each individual in the population. Specifically, the core idea is to maintain a Beta distribution describing the success probability of each operator. The Beta distribution is a continuous probability distribution defined on the interval [0,1], consisting of two shape parameters. and It is completely determined, and its probability density function is: , ,in For the Gamma function, Record the cumulative positive reward amount. Record the cumulative magnitude of negative rewards.

[0067] Then, for each candidate operator i in the set, the multi-armed gambling machine uses its corresponding Beta distribution. Randomly sample a value As an estimate of the success probability of the operator, the operator with the largest sample value is then selected as the executor of this perturbation operation.

[0068] Step 4, Reproduction and Dispersal: Calculate the number of offspring seeds each individual can produce based on its fitness value within the population. Using the selected perturbation operator, perform a specified number of perturbation operations on each parent individual to generate offspring seeds. Specifically, let the fitness value of the best individual in the current population be... The fitness value of the worst individual is Then the number of seeds for individual i The calculation is performed using the following formula: ,in Let represent the maximum and minimum number of seeds that a single individual can generate in one iteration, respectively. Represents the fitness value of individual i, when When all individuals in the population have the same fitness value, the number of seeds produced by each individual is taken as... The average value.

[0069] For each newly generated seed, the algorithm is executed continuously based on the solutions of its parent individuals. The perturbation operation generates a new candidate solution. The perturbation operator is selected from the operator chosen by the multi-armed gambling machine in step 3.

[0070] Step 5, Local Search: For the best individuals generated in this iteration of ERP and ETP respectively, an insertion neighborhood search is performed to optimize the solution quality of the individuals. Specifically, firstly, individuals with the minimized maximum completion time are identified from all new seeds generated in this breeding process as search objects. The algorithm performs an insertion neighborhood search on the sequence of workpieces for the search object, that is, the algorithm performs an insertion move evaluation on each workpiece in turn: after removing the target workpiece from its current position, all possible insertion positions in the sequence are traversed, the maximum completion time value corresponding to each insertion scheme is calculated, and finally the position that can produce the minimum maximum completion time value is selected as the proposed new position of the workpiece. Then, this position is compared with the acceptance criterion of the insertion move, that is, the algorithm accepts the move and updates the solution if and only if the new insertion position of the workpiece can strictly reduce the maximum completion time value of the current solution; otherwise, the workpiece is restored to its original position. In addition, this invention also sets a continuous unimproved counter: whenever an insertion move fails to improve the solution quality, the counter is incremented; and once an improved move is found, the counter is immediately reset to zero. When continuous attempts to insert and move all workpieces fail to yield improvement, i.e., when the counter reaches the total number of workpieces, the algorithm determines that the current solution has reached a local optimum with respect to the insertion neighborhood, and the local search process terminates.

[0071] Step 6, Competition Elimination: The parent population of the current iteration is merged with all offspring seeds generated in S4 to form a candidate pool. Individuals in the candidate pool are then sorted in ascending order according to their fitness values. The best individuals are selected to form the next generation population, while the rest are eliminated. Specifically, first, all new seeds generated in this round of reproduction and diffusion are merged with the current parent population to form a candidate pool containing both new and old individuals. Then, all individuals in the candidate pool are sorted in ascending order according to their fitness values, placing high-quality individuals with smaller maximum completion times at the top. Finally, the algorithm selects the individuals with the best fitness from the sorted candidate pool. One individual becomes a member of the next generation of the population, while the rest are eliminated.

[0072] Step 7, Population Migration and Parameter Value Update: Determine whether migration is needed in this iteration. If migration is needed, first select some elite individuals for bidirectional circular migration, and then update the relevant parameter values ​​of Q-learning and multi-armed slot machine; otherwise, directly update the relevant parameter values ​​of Q-learning and multi-armed slot machine.

[0073] Specifically, the immigration operation is performed at fixed iteration intervals. The number of immigrant individuals per execution The calculation formula is: ,in, This indicates the floor function. Expressed as immigration rate. Indicates the current Population size. Immigration operations involve individual migration in two directions. The first direction is migration from ERP to ETP, employing an elite-replaces-disadvantage strategy. Specifically, the most fit individuals are first selected from the ERP. Each individual is copied into the ETP, replacing the worst-fitting individual in the ETP. Individuals. The second direction is migration from ETP to ERP, employing an elite replacement strategy for similar individuals. Specifically, firstly, the top fittest individuals are selected from the ETP. Each individual is considered a candidate for immigration. For each candidate individual, the algorithm searches for the individual with the smallest Hamming distance in the ERP, i.e. the individual with the most similar structure, and then replaces the similar individual with the candidate individual.

[0074] Then, the Q-table update for Q-learning follows the formula: ,in, These represent the current state and the new state after the action is performed, respectively. Indicates the selected action. Indicates a new state Below, the maximum Q-value corresponding to all possible actions, where r represents the immediate reward obtained after performing the action. For learning rate, This is the discount factor. Furthermore, this invention employs a reward mechanism based on the degree of improvement in maximum completion time. When an action improves the global optimal solution, the algorithm provides a positive reward; if the solution quality does not improve or even deteriorates, the reward is zero or negative. The specific formula for calculating the reward value r is: ,in, These are the global minimum and maximum completion times before and after the action is executed.

[0075] Multi-armed slot machines also need to update the parameters of the corresponding Beta distribution based on their actual performance. The specific update rules are as follows: Where i represents the index of the candidate operator. Let be the two shape parameters of the Beta distribution corresponding to the multi-armed slot machine, representing the magnitude of the cumulative positive and negative rewards of operator i, respectively.

[0076] Step 8, Elite Pool Deep Search: Check if the time requirement is met. If it is within the time limit, return to S2; otherwise, select a subset of elite individuals from each population, construct an elite pool using a dual-source selection strategy, and then perform a deep search on each individual in the elite pool. Specifically, let the total time limit be TimeLimit. The time allocated in the DIWO phase is the time allocation coefficient. Time allocated in the CP phase They are respectively: , If not within the time limit, select the top k fitness-ranked elite individuals from each of the two populations and add them to the elite pool E: ,in, Let i be the i-th individual in the ERP system. Let i be the i-th individual in the ETP. Then, a degree-based search is employed, using a full neighborhood search method based on job insertion. For each individual in the elite pool, the algorithm sequentially examines each job in the sequence, evaluates the change in maximum completion time after moving it to all possible positions, and selects the move that produces the greatest improvement. This process is iterated until no better move can be found after continuously traversing all jobs. After completing the depth-search for each elite individual, the algorithm compares the optimized solution with the current global optimum. If the solution after the depth-search has a smaller maximum completion time, the global optimum is updated.

[0077] Step 9: Solve the CP model. The solution obtained from the heuristic algorithm is used as the hot start point for the CP model, which is then used to find a better solution. The results from the CP model are then compared with those from the heuristic algorithm, and the best solution is retained and output. This invention proposes a mixed-integer linear programming model (MILP model) and a CP model to solve the distributed permutation flow shop scheduling problem with preventative maintenance, aiming to minimize the maximum completion time.

[0078] Specifically, the MILP model includes the following set of constraints:

[0079] (1)

[0080] (2)

[0081] (3)

[0082] (4) (5)

[0083] (6)

[0084] (7)

[0085] (8)

[0086] (9)

[0087] (10)

[0088] (11)

[0089] (12)

[0090] (13)

[0091] (14)

[0092] (15)

[0093] (16)

[0094] The parameters of the MILP model are defined as follows: n represents the total number of workpieces; M represents the total number of machines; and F represents the total number of factories. Represents a set of workpieces ; Indicates machine set 1, ; Indicates machine set 2, ; Represents a set of factories. ; Represents location set 1, ; Represents location set 2, ;MAX represents a sufficiently large positive integer, MAX=10000.

[0095] The decision variables in the MILP model are defined as follows: This represents the processing time of workpiece j on machine m. This indicates the preventative maintenance time for machine m; This represents the preventive maintenance time threshold for machine m; This indicates the start time of workpiece j on machine m. This represents the start time of the pr-th position on machine m in factory f; It is a 0-1 binary variable, indicating whether workpiece j is processed at the pr-th priority position in factory f. It is a 0-1 binary variable, indicating whether preventive maintenance should be performed after the pr-th position of machine m in factory f; This represents the cumulative processing time at the pr-th position on machine m in factory f; This indicates the maximum completion time. Among them, .

[0096] Constraint (1) represents the objective of this research problem as minimizing the maximum completion time. Constraint (2) indicates that no PM operation is needed after the last position of all machines; Constraint (3) indicates the cumulative processing time of the first position, that is, the cumulative processing time of the first position of each machine is equal to the time for processing the workpiece at that position; Constraints (4) and (5) together form the cumulative maintenance time constraint, that is, these two constraints cumulatively calculate the processing time, providing a basis for judging whether a PM operation is needed at this position; Constraint (6) indicates that the cumulative processing time of each position cannot exceed the time threshold set for the PM operation; Constraint (7) indicates the maintenance time constraint, if it is determined that a PM operation is needed after the pr position, maintenance time must be reserved; Constraint (8) Ensure that each workpiece must be assigned to one location in a factory; constraint (9) defines that the completion time of all workpieces on the last machine cannot exceed the maximum completion time; constraint (10) ensures that a workpiece must be completed on the previous machine before it can be processed on the next machine; constraint (11) stipulates that each location can only accommodate one workpiece; constraint (12) ensures that workpieces are arranged in priority order, and the earlier locations must be occupied first; constraints (13) and (14) together establish the correspondence between the location start time and the workpiece start time; constraints (15) and (16) together form a non-negative constraint, ensuring the non-negativity of the start time.

[0097] Furthermore, the CP model includes the following set of constraints:

[0098] (17)

[0099] (18)

[0100] (19)

[0101] (20)

[0102] (twenty one)

[0103] (twenty two)

[0104] (twenty three)

[0105] (twenty four)

[0106] (25)

[0107] (26)

[0108] The interval variables in the CP model include , representing the total range of factory selections for workpiece j, used to associate the workpiece with the corresponding factory's processing flow. The optional range variables in the CP model include... , , , . This indicates that workpiece j is within the entire process range of workpiece f, including all machining stages; This represents the total processing range of workpiece j on machine m in factory f; This represents the processing set interval corresponding to machine m and group g in factory f, which includes the processing steps of all workpieces in that group; This represents the specific processing range of workpiece j on machine m and group g in factory f, where the range size is the workpiece size. Processing time on machine m The sequence variables in the CP model include , ; This represents the processing sequence consisting of all gors intervals of group g on machine m in factory f, with the sequence type distinguished by group g. This represents the processing sequence consisting of the ops intervals of all workpieces j on machine m in factory f, with the sequence type distinguished by workpiece j.

[0109] Among them, constraint (17) restricts each workpiece to be processed in one and only one factory; constraint (18) stipulates that each processing operation must be executed in a grouping mode; constraint (19) ensures that the complete processing time of the workpiece in the factory covers all machine operations; constraint (20) ensures that the workpiece's operations in the factory must be executed in machine order; constraint (21) stipulates that the interval of each group covers all workpiece operations in that group; constraint (22) represents that the workpiece operation sequence on all machines in the same factory is consistent; constraint (23) restricts that workpiece operations on the same machine cannot overlap; constraint (24) represents the constraint that the group sequence of preventive maintenance time has no overlap; constraint (25) ensures that the total processing time of each group does not exceed the maintenance time threshold; the objective function (26) indicates that the objective is to minimize the maximum completion time, where This represents the end time of the interval variable x.

[0110] Next, the solution obtained through the heuristic algorithm is used as a hot start point to find a better solution using the CP model. This invention defines the following initial solution transfer function:

[0111] (27)

[0112] (28)

[0113] (29)

[0114] (30)

[0115] (31)

[0116] Among them, function (27) defines the initial solution object sol of the CP solver; function (28) sets the initial solution sol as the starting point of the CP search; constraint (29) passes the plant allocation decision obtained in the DIWO stage to the CP model, where This indicates the factory number assigned to workpiece j in the DIWO stage; constraint (30) transmits the start time information of each process. Indicates the start time of workpiece j on machine m; constraint (31) transmits preventive maintenance grouping information. This indicates the maintenance group number to which workpiece j belongs on machine m.

[0117] The present invention will be further described and illustrated below through specific examples.

[0118] This invention was executed on a system equipped with an Intel® Core™ i7-12700 CPU and 16GB of RAM. All algorithms were written in C++ in Visual Studio 2022, with the CPLEX solver provided by IBM CPLEX Studio IDE 22.1.1. The time limit for all algorithms is [time limit missing]. Seconds. Among them, Indicates the total number of workpieces. This represents the total number of machines in each factory. The maximum number of individuals allowed in each iteration (PSmax) is set to 50; the maximum number of offspring (Smax) is set to 20; the minimum number of offspring (Smin) is set to 1; the number of consecutive perturbation operations (PLen) is set to 5; and the number of individuals (k) selected in each population when building the elite pool is set to 3. In Q-learning... Strategy The value is set to 0.15 for ERP and 0.05 for ETP; discount factor. The value is set to 0.95 for ERP and 0.85 for ETP.

[0119] In addition, four key parameters need to be determined in this invention, namely the time allocation coefficient. Immigration interval Learning rate of Q learning and initial population size To determine the optimal combination of these parameters, this invention employs the Taguchi Design of Experiments (DOE) for parameter calibration experiments. Considering computational resources and experimental efficiency, a medium-sized test instance (40 workpieces, 8 machines, 4 factories) was selected as the calibration instance. For each parameter, this invention sets four test levels, specifically... The four levels of the parameter are set to , The four levels of the parameter are , The four levels of the parameter are , The four levels of the parameter are Based on an experimental design where each of the four parameters has four factor levels, this invention selects an L16 orthogonal matrix to generate 16 different parameter combinations. For each parameter combination, the algorithm is run independently 10 times, and the average of the 10 runs is taken as the response value for that combination. Table 1 shows the detailed results of the orthogonal experiment, where the Mean value column represents the average maximum completion time obtained by each parameter combination in 10 repeated experiments. Figure 10 shows the main effects plot of the four parameters at their respective levels. Based on the range analysis results and the analysis of the main effects plot of the orthogonal experiment, the optimal parameter combination finally determined by this invention is: =0.8、 =3、 =0.05、 =10.

[0120] Table 1. Results of Taguchi Experiment

[0121]

[0122] This invention proposes a MILP model and a CP model to solve the distributed replacement flow shop scheduling problem with preventive maintenance, which aims to minimize the maximum completion time. The effectiveness of the two models will be verified using 12 test cases of different sizes.

[0123] Table 2 presents the test results of the MILP model proposed in this invention. In the table, "NB-M" represents the number of binary decision variables, "NIV-M" represents the number of integer variables in the MILP model, "NCT-M" represents the number of constraints in the MILP model, "Cmax-M" represents the solution obtained by the MILP model within the time limit, "Time-M" represents the time required to run the MILP model, "TimeLimit" represents the maximum CPU time limit, and "Gap-M" measures the gap between the obtained solution and the lower bound. As can be seen from Table 2, the MILP model only obtained three optimal solutions within the time limit. This is because as the problem size increases, the MILP model struggles to obtain feasible solutions.

[0124] Table 2 Test results of the MILP model proposed in this invention

[0125]

[0126] Table 3 presents the test results of the CP model proposed in this invention. Here, "NCT-C" represents the number of constraints in the CP model, "NV-C" represents the number of variables in the CP model, "Cmax-C" represents the solution obtained by the CP model within the time limit, "Time-C" represents the time required to run the CP model, "TimeLimit" represents the maximum CPU time limit, and "Gap-C" measures the gap between the solution obtained by the CP model and the lower bound. As can be seen from Table 3, the CP model obtained four optimal solutions within the time limit.

[0127] Table 3 Test results of the CP model proposed in this invention

[0128]

[0129] Table 4 shows the comparison results between the MILP model and the CP model. Values ​​marked with "※" represent the optimal values, "Cmax" indicates the solution obtained by the model within the time limit, "Time" represents the time required to run the model, "TimeLimit" represents the maximum CPU time limit, and "Gap" measures the gap between the solution obtained by the model and the lower bound. As can be seen from Table 4, the performance of the CP model is significantly better than that of the MILP model. Therefore, this invention chooses to combine the CP model with the DIWO algorithm to seek a better solution.

[0130] Table 4 Comparison of test results between the MILP model and the CP model proposed in this invention

[0131]

[0132] To verify the effectiveness of the algorithm proposed in this invention, we compared the results of four solutions: solving the problem using only the DIWO algorithm (hereinafter referred to as DIWO), solving the problem using only the improved multi-population DIWO algorithm with Q-learning and multi-armed slot machine (hereinafter referred to as RL-AHP-DIWO), solving the problem using only the CP model (hereinafter referred to as CP), and solving the problem using the method proposed in this invention (hereinafter referred to as RL-AHP-DIWO / CP). The test instances covered different scales, and the number of workpieces ranged from [value missing]. In the above, the range of the number of machines in each factory is within... In the above, the range of values ​​for the number of factories is within Based on this, 45 different test cases of varying sizes were generated. Each size had 5 randomly generated test cases, resulting in a total of 225 different test cases. Each test was repeated 10 times. Tables 5 and 6 show the comparison of the minimum and average results obtained from the 10 tests, with results marked with "※" indicating the best results. Specifically, RL-AHP-DIWO / CP outperformed DIWO, RL-AHP-DIWO, and CP in both minimum and average results. In terms of minimum results, RL-AHP-DIWO / CP outperformed DIWO, RL-AHP-DIWO, and CP or was equal to them in 219 cases, and was worse than DIWO, RL-AHP-DIWO, and CP in only 6 cases. In terms of average results, RL-AHP-DIWO / CP outperformed DIWO, RL-AHP-DIWO, and CP or was equal to them in 219 cases, and was worse than DIWO, RL-AHP-DIWO, and CP in only 6 cases. In addition, as shown in Table 7, paired t-tests with 95% confidence levels were performed on the mean results. All p-values ​​for comparisons of the mean results were below 0.05, indicating statistical significance.

[0133] Table 5 Comparison of the minimum values ​​of the test results for the four solutions

[0134]

[0135]

[0136]

[0137] Table 6 Comparison of the average test results of the four solutions

[0138]

[0139]

[0140]

[0141] Table 7 shows the paired t-tests performed on the mean results.

[0142]

[0143] Next, we compare the results of RL-AHP-DIWO / CP with those of the multi-startiterated greedy algorithm (MStart-IG) and the collaborative multi-swap iterated greedy algorithm (CMSwap-IG). These two algorithms are among the most well-known and relatively novel methods for solving this problem. We used 45 randomly generated test cases of different sizes for comparison. As shown in Table 8, for the vast majority of test cases, RL-AHP-DIWO / CP achieved better average results than MStart-IG and CMSwap-IG. As shown in Table 9, RL-AHP-DIWO / CP performs significantly better.

[0144] Table 8 Comparison of the average test results of the three algorithms

[0145]

[0146] Table 9 shows the paired t-tests performed on the mean results.

[0147]

[0148] In summary, the RL-AHP-DIWO / CP algorithm is the most effective for solving the distributed displacement flow shop scheduling problem with preventative maintenance, with the objective of minimizing the maximum completion time.

[0149] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments for application in other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A method for optimizing the scheduling of a distributed displacement flow shop with preventative maintenance, characterized in that, Includes the following steps: S1. Initialization operation: Complete the initialization of the running parameters of the Discrete Invading Weeds Optimization Algorithm (DIWO), and at the same time perform dual population initialization, dividing the population into the Explorer population (ERP) and the Developer population (ETP), and generating initial solutions using the corresponding heuristic rules respectively. S2 and Q learning status assessment: Calculate the normalized improvement rate and normalized population diversity of ERP and ETP respectively, and obtain a comprehensive score by weighted summation of the two populations based on the two indicators, and complete the search status level classification of Q learning. S3, Q-learning action decision and operator selection: First, determine whether the current iteration needs to execute a decision. If so, use a greedy strategy to select an action in the Q-learning action space for the corresponding population. If not, use the action from the previous iteration. Then, through the multi-armed slot machine model, within the operator selection constraint range corresponding to the selected action, select the corresponding perturbation operator for each individual in the population. S4. Reproduction and Dispersion: Calculate the number of offspring seeds that each individual can produce based on the fitness value of individuals in the population. Based on the selected perturbation operator, perform a specified number of perturbation operations on each parent individual to generate offspring seed individuals. S5. Local Search: For the best individuals generated by ERP and ETP in this iteration, perform a neighborhood search to optimize the solution quality of the individuals. S6. Competition Elimination: Merge the parent population of the current iteration with all the offspring seed individuals generated in S4 to form a candidate pool. Sort the individuals in the candidate pool in ascending order according to their fitness values, select the best individuals to form the next generation population, and eliminate the rest. S7. Population Migration and Parameter Update: Determine whether migration is needed in this iteration. If migration is needed, first select some elite individuals for bidirectional circular migration, and then update the relevant parameter values ​​of Q-learning and multi-armed slot machine; otherwise, directly update the relevant parameter values ​​of Q-learning and multi-armed slot machine. S8. Elite Pool Deep Search: Check if the time requirement is met. If it is within the time limit, return to S2. Otherwise, select a portion of elite individuals from each population, use a dual-source selection strategy to build an elite pool, and then perform a deep search on all individuals in the elite pool one by one. S9. Solving the CP model: The global optimal solution is used as the hot start point of the constraint programming CP model. The CP model is used to find the optimal solution. The solution output by the CP model is compared with the global optimal solution obtained by the heuristic algorithm. The optimal solution is retained and output. The specific implementation of step S3 is as follows: S31. Define operators, which include eight complementary neighborhood operators across three levels: factory layer, workpiece layer, and local layer. Among them, the factory layer operators include cross-factory exchange operator, cross-factory insertion operator, and factory block migration operator; the workpiece layer operators include long-distance insertion operator, multiple exchange operator, and block inversion operator; and the local layer operators include adjacent exchange operator and short-distance insertion operator. S32. The Q-learning action space is defined to include development action AET, exploration action AER, and balancing action ABE. When AET is selected, the population can only select operators from the local layer for perturbation operations. When AER is selected, the algorithm will select operators from the factory layer for perturbation operations. When ABE is selected, operators can be freely selected from all eight operators for perturbation operations. S33, Using a greedy strategy To select an action, the algorithm first generates a range at each decision stage. Uniformly distributed random numbers ,like If the Q-value is the highest, then randomly select an action from the Q-learned action space; otherwise, iterate through all actions in the current state and select the action with the highest Q-value. ERP and ETP need to be configured differently. Value configuration; then, using a multi-armed gambling machine within the operator selection constraints of the Q-learning action, the operator with the largest sample value is selected as the executor of this perturbation operation for each individual in the population.

2. The method for optimizing the scheduling of a distributed replacement flow shop with preventative maintenance according to claim 1, characterized in that, Step S1 initializes the runtime parameters of the Discrete Invasive Weed Optimization Algorithm (DIWO), specifically including initializing the following parameters: initial population size. Maximum number of individuals that a population can hold The maximum number of seeds that the optimal individual can generate in a single iteration. The minimum number of seeds that the worst individual can generate in a single iteration. The number of times an individual performs a perturbation operation in a single diffusion. The initialization rules for the dual populations are as follows: For the Explorer population (ERP), the HR1 heuristic is used to generate the initial solution: based on the Longest Processing Time (LPT) rule, the total processing time of each workpiece on all machines is calculated, and the workpieces are sorted from largest to smallest total processing time to obtain the LPT sequence. The first workpiece in the LPT sequence is placed into the new sequence, and the maximum completion time of each remaining workpiece after insertion into all possible positions in the new sequence is evaluated. The position that minimizes the maximum completion time is selected for insertion, and a local search for adjacent swaps is performed on the new sequence after each insertion. After all workpieces are inserted, the HR1 initial solution is obtained. For the Developer population (ETP), the HR2 heuristic is used to generate the initial solution: based on the Shortest Processing Time (SPT) rule, the workpieces are sorted from smallest to largest total processing time to obtain the SPT sequence. The first two workpieces in the LPT sequence are taken out, and the maximum completion time of the two sorts is compared and the better sort is selected to form a new sequence. The maximum completion time of each remaining workpiece in the SPT sequence after insertion into all possible positions in the new sequence is evaluated, and the position that minimizes the maximum completion time is selected for insertion. After all workpieces are inserted, the HR2 initial solution is obtained. After obtaining the first initial solution, the remaining initial solutions are generated by copying the first initial solution and then performing the insertion operation twice at randomly selected workpiece positions.

3. The method for optimizing the scheduling of a distributed replacement flow shop with preventative maintenance according to claim 1, characterized in that, The specific implementation of step S2 is as follows: S21. Using the current optimal solution Best solution within the historical window To calculate the improvement rate: Then, normalization is performed on it to obtain the normalized improvement rate. : When the historical records are insufficient to reach the set threshold, the normalization improvement rate is set to 0.5 by default. S22. Calculate the similarity between two workpiece sequences, given two workpiece sequences of length n. Calculate its Hamming distance For a population containing N individuals Calculate the average Hamming distance between all unique pairs of individuals in the population to obtain the average Hamming distance of the population. The obtained average Hamming distance Normalization is performed to obtain the normalized population diversity D; S23. A comprehensive score is obtained by weighting and summing the Explorer population ERP and Developer population ETP using normalized improvement rate and normalized population diversity. The comprehensive score is then used to classify the Q-learning search state into three discrete levels: poor, average, and good. The weighted summation method is as follows: , .

4. The method for optimizing the scheduling of a distributed replacement flow shop with preventative maintenance according to claim 1, characterized in that, The specific implementation of step S4 is as follows: S41. Set the fitness value of the best individual in the current population. The fitness value of the worst individual is Calculate the number of seeds for individual i. The calculation method is as follows: ,in, Let represent the maximum and minimum number of seeds that a single individual can generate in one iteration, respectively. Represents the fitness value of individual i, when When all individuals in the population have the same fitness value, the number of seeds produced by each individual is taken as... The average value; S42. For each newly generated seed, based on the solution of its parent individual, continuously execute... The perturbation operation generates a new candidate solution; the perturbation operator is selected using the operator chosen by the multi-armed gambling machine in S3.

5. The method for optimizing the scheduling of a distributed replacement flow shop with preventative maintenance according to claim 1, characterized in that, The specific execution method of the insertion neighborhood search in step S5 is as follows: From all the new seeds generated in this round of breeding process, the individual with the minimum maximum completion time is identified as the search object. Insertion move evaluation is performed on each workpiece in the sequence in turn. After removing the target workpiece from the current position, all possible insertion positions in the sequence are traversed and the corresponding maximum completion time is calculated. The position that minimizes the maximum completion time is selected as the proposed new position. If and only if the reduction of the maximum completion time of the solution by the new insertion position reaches a preset threshold, the insertion move is accepted and the solution is updated. Otherwise, the workpiece is restored to its original position. A continuous unimproved counter is set. When the counter value reaches the total number of workpieces, it is determined that the current solution has reached the local optimum state of the insertion neighborhood, and the local search is terminated.

6. The method for optimizing the scheduling of a distributed replacement flow shop with preventative maintenance according to claim 1, characterized in that, The specific implementation of step S7 is as follows: S71. First, determine whether migration is needed in this iteration, and set a fixed iteration interval for migration operations. The number of individual immigrants The calculation method is as follows: ,in, This indicates the floor function. Expressed as immigration rate. Indicates the current Population size; S72. Perform a two-way circular migration. The first direction is migration from ERP to ETP, selecting the most suitable candidate from the ERP. Each individual is copied into the ETP, replacing the worst-fitting individual in the ETP. The first direction is migration from ETP to ERP, selecting the most fit individuals from ETP. Each individual is considered a candidate for immigration. For each candidate individual, the algorithm searches for the individual with the smallest Hamming distance in the ERP, that is, the individual with the most structural similarity, and then replaces the similar individual with the candidate individual. S73. Update the Q table for Q learning: ,in, These represent the current state and the new state after the action is performed, respectively. Indicates the selected action. Indicates a new state Below, the maximum Q-value corresponding to all possible actions, where r represents the immediate reward obtained after performing the action. For learning rate, Discount factor; S74. Simultaneously update the parameters of the Beta distribution corresponding to the multi-armed slot machine, using the following update method: Where i represents the index of the candidate operator. Let be the two shape parameters of the Beta distribution corresponding to the multi-armed slot machine, representing the magnitude of the cumulative positive and negative rewards of operator i, respectively.

7. The method for optimizing the scheduling of a distributed replacement flow shop with preventative maintenance according to claim 6, characterized in that, The specific calculation method for the immediate reward r obtained after performing the action is as follows: ,in, These are the global minimum and maximum completion times before and after the action is executed.

8. The method for optimizing the scheduling of a distributed replacement flow shop with preventative maintenance according to claim 1, characterized in that, The specific implementation of step S8 is as follows: S81. Set the total time limit to TimeLimit, then the time allocated in the DIWO phase... Time allocated in the CP phase They are respectively: , ,in, This is the time allocation coefficient; S82. When not within the time limit, select the top k elite individuals in fitness from the two populations and add them to the elite pool. S83. Perform a depth search. For each individual in the elite pool, examine each job in the sequence in turn, evaluate the maximum change in completion time after moving it to all possible positions, and select the move that produces the greatest improvement. This process is iterated until no better move can be found after continuously traversing all jobs. S84. After completing the depth search for each elite individual, the algorithm compares the optimized solution with the current global optimum. If the solution after the depth search has a smaller maximum completion time, the global optimum is updated.

Citation Information

Patent Citations

  • Numerical control multi-objective optimization energy-saving method and system based on improved wolf pack algorithm

    CN120928787A

  • Optimization method of flexible job shop scheduling for solving and adjusting resource constraints

    CN121599415A