Distributed hybrid flow shop dynamic scheduling method based on learnable iterative greedy algorithm

By combining a learnable iterative greedy algorithm with long short-term memory networks and near-end policy optimization, the robustness of dynamic scheduling in distributed hybrid assembly line workshops is solved, achieving efficient scheduling scheme generation and rapid response. This approach is applicable to complex manufacturing systems such as electronic assembly and automobile manufacturing.

CN122114513APending Publication Date: 2026-05-29NANJING NORMAL UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANJING NORMAL UNIVERSITY
Filing Date
2026-02-27
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing technologies are insufficient to effectively cope with sudden events such as dynamic workpiece arrivals and machine failures in distributed hybrid production lines, resulting in insufficient robustness of scheduling schemes. Traditional methods cannot capture the temporal characteristics of dynamic environments and lack adaptability.

Method used

By employing a learnable iterative greedy algorithm, combined with long short-term memory networks and proximal policy optimization, and through two-dimensional encoding strategies and multi-dimensional state feature extraction, a neighborhood structure and reward mechanism are designed, enabling the agent to dynamically adjust the scheduling strategy and balance global exploration with local development.

Benefits of technology

It generates high-quality scheduling schemes in dynamic environments, responds quickly to emergencies, and improves the robustness and efficiency of the scheduling schemes, making it suitable for real-time resource scheduling in complex manufacturing systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122114513A_ABST
    Figure CN122114513A_ABST
Patent Text Reader

Abstract

The application discloses a distributed hybrid flow shop dynamic scheduling method based on a learnable iterative greedy algorithm, relates to the flow shop scheduling technical field, and aims at a dynamic workpiece arrival and machine fault scene, takes minimizing the maximum completion time as a core target, is based on three coupled subproblems of a distributed hybrid flow shop, adopts a two-dimensional coding strategy to represent a factory distribution and a workpiece sequencing scheme, combines a first available machine rule and a first come first served rule to construct a decoding mechanism, designs a multi-level neighborhood operation set as an action space of an agent, deals with emergent events of the dynamic workpiece arrival and the machine fault, extracts state features as input by using a long short-term memory network, trains the agent by using a proximal policy optimization algorithm and an experience replay mechanism, dynamically adjusts a decision strategy, makes the agent self-adaptively select a rescheduling, a destruction reconstruction and a local search strategy, balances global exploration and local development, and finally improves scheduling quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of flow shop scheduling technology, and in particular to a distributed hybrid flow shop dynamic scheduling method based on a learnable iterative greedy algorithm. Background Technology

[0002] With the deepening of intelligent transformation in the manufacturing industry, distributed production models have become a key means to enhance enterprise competitiveness. Distributed hybrid flow shop scheduling, as one of the core optimization problems of modern manufacturing systems, distributes production tasks to multiple geographically dispersed factories, each employing a hybrid flow line structure to achieve resource synergy and maximize efficiency. The actual production environment is highly dynamic, with frequent events such as the random arrival of new workpieces and sudden machine failures, making static scheduling schemes difficult to apply directly. This has spurred research into the dynamic scheduling problem of distributed hybrid flow shops. Traditional methods typically simplify dynamic problems into static models or employ periodic rescheduling strategies, but these methods cannot effectively capture the temporal characteristics of the dynamic environment, resulting in insufficient robustness of the scheduling scheme.

[0003] To address this challenge, metaheuristic algorithms have been widely used in scheduling optimization. However, these methods have significant limitations in dynamic environments: first, the diversity of the algorithm population is prone to decay over time, leading to premature convergence; second, the search process lacks a mechanism for utilizing historical experience, making it impossible to learn optimization knowledge from past scheduling decisions; furthermore, neighborhood structure design often relies on human experience, making it difficult to adaptively balance global exploration and local development. Summary of the Invention

[0004] The purpose of this invention is to provide a distributed hybrid flow shop dynamic scheduling method based on a learnable iterative greedy algorithm. This method takes minimizing the maximum completion time as its core objective, and can dynamically adjust decision-making strategies to balance global exploration and local development in response to unexpected events such as dynamic workpiece arrivals and machine failures.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: A dynamic scheduling method for a distributed hybrid flow shop based on a learnable iterative greedy algorithm, the method comprising: Step 1: Encode the coupled subproblems of dynamic scheduling of distributed hybrid flow workshops using a two-dimensional encoding strategy, decode based on the first available machine rule and the first-come-first-served rule, randomly generate dynamic scheduling instances for training, and initialize the scheduling solution using an improved NEH_F heuristic algorithm. Step 2: Extract multi-dimensional state features from the current scheduling solution represented by two-dimensional encoding, generate an environmental state embedding vector as input to the agent, design a neighborhood structure based on the two-dimensional encoding strategy as the agent's action space, and select actions according to the current scheduling solution; Step 3: Apply the agent's output action to the current scheduling solution, calculate the reward value based on the change in production state, update the current scheduling solution and extract its features, save the quadruplets to the experience pool, and randomly sample several quadruplets from the experience pool to train the agent. Step 4: Determine whether the current scheduling solution has completed all workpiece processing tasks and responded to all dynamic events. If the conditions are met, the current training round ends; otherwise, return to Step 2: Determine whether the maximum number of training rounds has been reached. If it has, output the fully trained agent model; otherwise, return to Step 1 to continue training. Step 5, the online scheduling phase, uses the improved NEH_F heuristic algorithm to generate an initial scheduling scheme and calculate its maximum completion time. For dynamic events, the fully trained intelligent agent model is invoked to adjust the current scheduling scheme in real time. Step 6: Determine whether all workpiece processing tasks have been completed and all dynamic events have been responded to. If the conditions are met, output the current solution; otherwise, return to step 5.

[0006] As a further preferred embodiment of the present invention, the method of encoding the coupled sub-problems of dynamic scheduling of distributed hybrid flow workshops using a two-dimensional encoding strategy is as follows: Let a scheduling solution be represented by a two-dimensional vector, and let the cooperative representation be used to represent the complete problem space of the distributed shop scheduling problem. The first dimension... Represents the workshop vector, second dimension This indicates the workpiece processing sequence of the first process in each workshop.

[0007] As a further preferred embodiment of the present invention, the decoding based on the first available machine rule and the first-come-first-served rule is performed as follows: When a machine becomes idle, the earliest ready workpiece is selected from the queue of workpieces to be processed in the current process and processed. When a workpiece is ready, it is assigned to one of the multiple parallel machines that can process the workpiece, based on the machine that is expected to start processing earliest.

[0008] As a further preferred embodiment of the present invention, the coupling sub-problem includes: Factory allocation distributes the set of workpieces to be processed to multiple distributed factories, selecting a suitable processing factory for each workpiece. Workpiece sequencing determines the processing order of each stage for all workpieces within the same factory. Machine selection: All operations follow the same process route and go through multiple different steps, each of which requires selection from the factory's available machine set.

[0009] As a further preferred embodiment of the present invention, the improved NEH_F heuristic algorithm is as follows: The total processing time for each workpiece across all processing stages is calculated using the following formula: ; in, Indicates workpiece In the stage Processing time, This represents the total number of stages; Workpiece set By total processing time Arrange in descending order to obtain the sequence ; From sequence Extract the first half of the workpieces and calculate the average processing time for each workpiece in the first half of the processing stage. The calculation formula is as follows: ; in, Indicates workpiece In the stage Processing time; according to These workpieces are rearranged in ascending order to form a sequence. And merge it with the remaining workpieces into the final sequence; will sequence The front of the middle One workpiece is assigned to each factory, and one workpiece is assigned to each factory. For the remainder For each workpiece, an optimal insertion strategy is adopted. All possible insertion positions in each factory are traversed, and the completion time after insertion is calculated. The factory and insertion position that minimize the completion time are selected. The workpiece sequence of the factory is updated until all workpieces are assigned.

[0010] As a further preferred embodiment of the present invention, the multi-dimensional state feature extraction includes: The parameters include: number of factories, number of processing stages, standard deviation of maximum completion time for each factory, range of maximum completion time for each factory, dynamic event type flag, expected event processing time, standard deviation of load for each factory, remaining time percentage, remaining event percentage, optimization percentage, number of rescheduling operations for a single factory, number of rescheduling operations for other factories, number of rescheduling operations for the entire factory, number of destruction and reconstruction operations, number of local search operations, number of single-workpiece operations, number of block operations, and number of distributed search operations.

[0011] As a further preferred embodiment of the present invention, the action space includes a rescheduling strategy, a destruction and reconstruction strategy, and a local search strategy.

[0012] As a further preferred embodiment of the present invention, the reward value is calculated based on the change in production status, and the formula for calculating the reward value is as follows: ; in, Indicates the base value for the reward. This represents the reward discount factor. This represents the reward balance factor. Indicates time optimization efficiency. This indicates the variation in the standard deviation of completion time among factories.

[0013] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention takes minimizing the maximum completion time as its core objective, effectively responding to unexpected events such as dynamic workpiece arrivals and machine failures. By combining long short-term memory networks and near-end policy optimization methods, it extracts temporal features from historical scheduling data, enabling the agent to dynamically adjust its decision-making strategy. By designing a multi-level action space and a targeted neighborhood structure, it balances global exploration and local development, rapidly generating high-quality scheduling schemes under real-time constraints, avoiding premature convergence, and meeting the needs of efficient production and resource optimization. This provides a robust and intelligent dynamic scheduling solution for distributed hybrid assembly line workshops. Attached Figure Description

[0014] Figure 1 This is a flowchart of a distributed hybrid flow workshop dynamic scheduling method based on a learnable iterative greedy algorithm in an embodiment of the present invention. Detailed Implementation

[0015] To make the objectives, technical solutions, and beneficial effects of this invention clearer, the specific embodiments of this invention will be described in detail below with reference to the accompanying drawings. These embodiments are merely preferred examples of this invention, used to aid in understanding the inventive concept, and do not constitute a limitation on the scope of protection.

[0016] In terms of computational complexity, the classic hybrid flow shop scheduling problem has been proven to be NP-hard. The extended version in a distributed environment, involving three coupled sub-problems—factory allocation, job sequencing, and machine selection—further increases the difficulty, classifying it as a strongly NP-hard problem. The introduction of dynamic events further increases the problem's dimensionality and complexity, making the search for the optimal scheduling solution computationally almost infeasible.

[0017] This invention proposes a dynamic scheduling method for distributed hybrid flow workshops based on a learnable iterative greedy algorithm. By introducing a learnable iterative greedy algorithm, integrating long short-term memory networks and near-end strategy optimization methods, it extracts temporal patterns from historical scheduling data, dynamically adjusts the search strategy, and coordinates rescheduling, destruction and reconstruction, and local search operations through multi-level action space coordination, thereby significantly improving scheduling quality and response efficiency in dynamic environments.

[0018] This invention can generate high-quality scheduling schemes in a short time. It is applicable to complex manufacturing systems such as electronic assembly and automobile manufacturing, as well as industrial environments that require efficient real-time resource scheduling, such as mass production lines. Furthermore, it can be adapted to more complex needs in actual production by expanding constraints such as energy consumption, worker allocation, or transportation logistics.

[0019] Specifically, refer to Figure 1 This embodiment introduces a dynamic scheduling method for a distributed hybrid flow shop based on a learnable iterative greedy algorithm, which includes the following: Step 1: For the three coupled subproblems of dynamic scheduling of distributed hybrid flow workshop, a two-dimensional coding strategy is used to encode the coupled subproblems of dynamic scheduling of distributed hybrid flow workshop to represent a scheduling solution.

[0020] The three coupled subproblems include: Factory allocation distributes the set of workpieces to be processed to multiple distributed factories, selecting a suitable processing factory for each workpiece. Workpiece sequencing determines the processing order of each stage for all workpieces within the same factory. Machine selection: All operations follow the same process route and go through multiple different steps. Each step requires selecting (appropriate machines) from the factory's available machine set.

[0021] The coupled subproblem of dynamic scheduling in a distributed hybrid flow shop is encoded using a two-dimensional coding strategy, as follows: A scheduling solution can be represented by a two-dimensional vector. Let the complete problem space of the distributed shop scheduling problem be represented collaboratively, with the first dimension being... Represents the workshop vector, second dimension This represents the workpiece processing sequence of the first process in each workshop, and the objective value of this scheduling solution is the maximum completion time.

[0022] Decoding using the first-available-machine rule and the first-come-first-served rule allows for the rapid acquisition of a complete scheduling scheme. Based on the proposed encoding scheme, the decoding process transforms the solution representation into a feasible schedule. In the machine allocation stage, each operation of the workpiece is assigned to the earliest idle machine. Subsequent stages follow the first-come-first-served principle to sort the operations, determining their priority in non-decreasing order based on the completion time of the operation in the previous stage. The problem space is constructed based on the first-available-machine rule and the first-come-first-served rule. The decoding method is as follows: When a machine becomes idle, the earliest ready workpiece is selected from the queue of workpieces to be processed in the current process and processed. When a workpiece is ready, it is assigned to one of the multiple parallel machines that can process the workpiece, based on the machine that is expected to start processing earliest.

[0023] Dynamic scheduling in distributed hybrid flow shops can be modeled as a Markov decision process, employing Long Short-Term Memory (LSTM) networks and multilayer perceptrons as the training method for agents. By introducing LSTM networks to perform temporal modeling of multi-dimensional state characteristics, the agent can capture the dynamic evolution of system states and the chain effects of events, thereby enhancing the depth of perception of dynamic disturbances, reducing response lag, and improving the foresight of scheduling.

[0024] Randomly generate dynamic scheduling instances for training, including the number of jobs, processing stages, factories, machine configurations for each stage in all factories, dynamic events (job arrival time and machine failure time), and processing time and machine failure repair time for each job in different processing stages.

[0025] The two-dimensional vector determines the processing sequence of the first operation in the distributed factory, thus solving the first two problems. Based on this encoding, two decoding rules are used to handle the processing sequence and machine selection of all workpieces in subsequent operations. The combination of encoding and decoding solves these three sub-problems.

[0026] Based on the generated dynamic scheduling instance, the improved NEH_F heuristic algorithm is used to initialize the scheduling solution. This serves as the starting point for a training round of the agent.

[0027] The improved NEH_F heuristic algorithm is as follows: The total processing time for each workpiece across all processing stages is calculated using the following formula: ; in, Indicates workpiece In the stage Processing time, This represents the total number of stages.

[0028] Workpiece set By total processing time Arrange in descending order to obtain the sequence ; From sequence Extract the first half of the workpieces and calculate the average processing time for each workpiece in the first half of the processing stage. The calculation formula is as follows: ; In the formula, Indicates workpiece In the stage Processing time; according to These workpieces are rearranged in ascending order to form a sequence. And merge it with the remaining workpieces into the final sequence.

[0029] will sequence The front of the middle Each workpiece is assigned to a different factory, and each factory is assigned one workpiece.

[0030] For the remainder For each workpiece, an optimal insertion strategy is adopted. All possible insertion positions in each factory are traversed, and the completion time after insertion is calculated. The factory and insertion position that minimize the completion time are selected. The workpiece sequence of the factory is updated until all workpieces are assigned.

[0031] Step 2, for the current scheduling solution represented by two-dimensional encoding Multi-dimensional state feature extraction is performed, and temporal dependencies are mined using a long short-term memory network to generate environment state embedding vectors. As input to the agent, the environmental state, as one form of representation, can be represented by a one-dimensional vector with 128 values. A neighborhood structure is designed based on a two-dimensional encoding strategy, serving as the agent's action space. According to the current scheduling solution Select Action .

[0032] In the flow shop scheduling problem, neighborhood structure refers to a method of generating new solutions by locally adjusting the current solution. The design of the neighborhood structure directly affects the search efficiency of the scheduling optimization algorithm and the quality of the final solution. Based on a dynamic scenario and two-dimensional encoding, this embodiment designs rescheduling strategies Oa1-Oa4 and Ob1-Ob4, and specifically designs destruction-reconstruction strategy Dr1-Dr4 and local search strategy LS1-LS4.

[0033] Multi-dimensional state feature extraction includes: The parameters include: number of factories, number of processing stages, standard deviation of maximum completion time for each factory, range of maximum completion time for each factory, dynamic event type flag, expected event processing time, standard deviation of load for each factory, remaining time percentage, remaining event percentage, optimization percentage, number of rescheduling operations for a single factory, number of rescheduling operations for other factories, number of rescheduling operations for the entire factory, number of destruction and reconstruction operations, number of local search operations, number of single-workpiece operations, number of block operations, and number of distributed search operations.

[0034] Action space It consists of a combination of three strategies: rescheduling strategy, destruction and reconstruction strategy, and local search strategy; as detailed below:

[0035] (1) Rescheduling strategy: Eight rescheduling strategies are designed for two types of events: dynamic workpiece arrival and machine failure.

[0036] (11) Rescheduling strategy for new workpiece arrival events: Single-factory rapid insertion strategy (Oa1): Insert new workpieces into all feasible positions and select the scheduling scheme with the shortest manufacturing period as the optimal position; Single-factory local optimization strategy (Oa2): Based on the optimal location determined by Oa1, new workpieces are pre-allocated, and then greedy insertion and exchange operations are performed on the sequence of workpieces to be processed within a single factory to select the scheduling scheme with the shortest manufacturing period. Critical Factory Coordination Strategy (Oa3): After adopting the tail-append initialization strategy, greedy insertion and exchange operations are performed on the sequence of workpieces to be processed in the critical factory and the sequence of other factories to select the scheduling scheme with the shortest manufacturing period. Whole-factory distributed strategy (Oa4): After adopting the tail-append initialization strategy, greedy insertion and exchange operations are performed on the sequence of unprocessed workpieces in the critical factory and the sequence of all factories to select the scheduling scheme with the shortest manufacturing period. (12) Rescheduling strategy for machine failure events: Machine quick changeover strategy (Ob1): Based on the original production scheduling scheme, the workpieces in the faulty factory are reallocated to available machines and the manufacturing period is recalculated; In-plant rescheduling strategy (Ob2): Rescheduling optimization is performed within the plant where the faulty machine is located. Greedy insertion and swap operations are performed on the sequence of processes to be processed within the plant where the faulty machine is located, and the scheduling scheme with the shortest manufacturing period is selected. Cross-factory collaboration strategy (Ob3): Reschedule and optimize the factory where the faulty machine is located with other factories. After handling the machine fault, perform greedy insertion and exchange operations on the sequence of unprocessed workpieces in the critical factory and the sequence of other factories, and select the scheduling scheme with the shortest manufacturing period. Global rescheduling strategy (Ob4): Perform global rescheduling optimization across all factories. After handling machine failures, perform greedy insertion and swap operations on the sequence of unprocessed workpieces in the critical factory and the sequences in all factories, and select the scheduling scheme with the shortest manufacturing period. (2) For the destruction and reconstruction strategy, four destruction and reconstruction strategies are designed based on two-dimensional coding: Critical Plant Workpiece Destruction Reconstruction (Dr1): Randomly select several workpieces from the processing sequence of the critical plant and randomly reinsert them into the processing sequence of the same plant; Distributed job destruction and reconstruction (Dr2): Randomly select several jobs from the waiting queues of all factories and randomly reinsert these jobs into the processing sequence of all factories; Critical Plant Block Operation Destruction Reconstruction (Dr3): After removing workpiece blocks from the critical plant according to the block size, the sequence to be processed in the critical plant is reconstructed. The sequence is divided into blocks according to the block size, and several blocks are randomly selected to ensure that the total number of workpieces exceeds the number of randomly selected workpieces. These blocks are then randomly reinserted into the sequence of the same plant. Distributed Block Operation Destruction Reconstruction (Dr4): After removing workpiece blocks from all factories according to block size, global reconstruction is performed. The processing sequences of all factories are divided into blocks according to block size. Several blocks are randomly selected to ensure that the total number of workpieces exceeds the number of randomly selected workpieces. These blocks are then randomly reinserted into the sequences of all factories.

[0037] (3) Four local search strategies are designed for local search: In-plant single-job optimization (LS1): For jobs in the critical factory's processing sequence, greedily insert or swap them within the factory and select the scheduling scheme with the shortest manufacturing period. Cross-factory single job optimization (LS2): Job transfer and exchange are performed between all factories. For jobs in the sequence to be processed in the critical factory, greedy insertion or exchange is performed with the sequences of all factories to select the scheduling scheme with the shortest manufacturing period. In-plant block operation optimization (LS3): Perform workpiece block-based insertion and exchange operations within the critical plant. After dividing the sequence to be processed in the critical plant into workpiece blocks, perform greedy insertion or exchange within the plant and select the scheduling scheme with the shortest manufacturing period. Cross-factory block operation optimization (LS4): Global block operation collaborative optimization. After dividing the processing sequences of all factories into workpiece blocks, the workpiece blocks of the processing sequences of critical factories are greedily inserted or swapped with the sequences of all factories to select the scheduling scheme with the shortest manufacturing period.

[0038] By designing a multi-layered action space that includes rescheduling, destruction and reconstruction, and local search, agents can dynamically select or combine different operation strategies based on real-time status, thereby achieving collaborative optimization among distributed resources, balancing global exploration and local development, and significantly improving the resource utilization and overall performance of the production system.

[0039] Action space The specific implementation method is as follows: the intelligent agent outputs an action. Choose triplet Combination, in which Indicates the rescheduling policy, This indicates a strategy of destruction and reconstruction. The local search strategy is represented by N; if an operation is not executed, it is represented by N; all action combinations are shown in Table 1.

[0040] Table 1 Action Combination Table

[0041] Step 3, for the current scheduling solution Applying actions to the agent's output Calculate reward values ​​based on changes in production status. Update the current scheduling solution and extract its features. , quadruple Save the data to the experience pool, randomly sample a number of quadruplets from the experience pool to train the agent. By using the experience data of these quadruplets, the agent can learn the value of different actions in different states. Then, to improve the agent's decision-making ability, the proximal policy optimization algorithm can be used to jointly optimize the long short-term memory network and adjust the parameters of the agent network.

[0042] Among them, the reward value is calculated based on the change in production status. The calculation formula is as follows: ; in, Indicates the base value for the reward. This represents the reward discount factor. This represents the reward balance factor; The time optimization benefit is represented by the difference between the upper bound of the maximum completion time and the current maximum completion time. , This represents the upper bound of the maximum completion time. For new workpiece arrival events, the calculation result using the optimal tail insertion strategy is used as the upper bound of the time. For machine failure events, the maximum completion time is recalculated using the original machine allocation scheme as the upper bound of the time. Indicates the current maximum completion time; This represents the change in the standard deviation of completion time among factories. , This represents the standard deviation of the inter-factory completion time after the action is performed. It represents the standard deviation of the completion time between factories before the execution of the action.

[0043] In this embodiment, as an optional reward benchmark value Reward Discount Factor Reward Balance Factor .

[0044] Step 4: Determine whether the current scheduling solution has completed all workpiece processing tasks and responded to all dynamic events. If the conditions are met, the current training round ends; otherwise, return to Step 2 and determine whether the maximum number of training rounds has been reached (the maximum number of training rounds can be set independently according to training needs). If it has been reached, output the fully trained agent model; otherwise, return to Step 1 to continue training.

[0045] Step 5, the online scheduling phase, uses the improved NEH_F heuristic algorithm to generate an initial scheduling scheme and calculate its maximum completion time. For dynamic events, it calls the fully trained agent model to select actions. The current scheduling scheme is adjusted in real time.

[0046] Step 6: Determine whether all workpiece processing tasks have been completed and all dynamic events have been responded to. If the conditions are met, output the current solution, i.e. the optimal scheduling scheme; otherwise, return to step 5.

[0047] Based on the above steps, this embodiment adopts a learnable iterative greedy method framework, combining the heuristic search capability of traditional iterative greedy search with the agent learning mechanism. This enables the algorithm to perform guided neighborhood search based on the learned strategy during the iteration process, thereby significantly accelerating the convergence speed of the algorithm and effectively improving the quality and robustness of the scheduling scheme.

[0048] This embodiment employs a near-end policy optimization algorithm to train the agent, achieving online learning and adaptive adjustment of the policy while ensuring training stability. This allows for flexible adaptation to production scenarios of different scales and dynamic characteristics, significantly improving the method's versatility and practicality.

[0049] Although the steps in the above embodiments are described in the above order, those skilled in the art will understand that in order to achieve the effect of this embodiment, different steps do not need to be executed in such an order. They can be executed simultaneously (in parallel) or in a reverse order. These simple variations are all within the protection scope of this invention.

[0050] Those skilled in the art will understand that although some embodiments described herein include certain features but not others included in other embodiments, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the claims of this invention, any of the claimed embodiments can be used in any combination.

[0051] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it should be noted that the parts not covered in this invention are the same as or can be implemented using existing technology. It will be readily understood by those skilled in the art that the scope of protection of this invention is obviously not limited to these specific embodiments. Without departing from the principles of this invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions resulting from these changes or substitutions will all fall within the scope of protection of this invention.

Claims

1. A distributed hybrid flow shop dynamic scheduling method based on a learnable iterative greedy algorithm, characterized in that: Step 1: Encode the coupled subproblems of dynamic scheduling of distributed hybrid flow workshops using a two-dimensional encoding strategy, decode based on the first available machine rule and the first-come-first-served rule, randomly generate dynamic scheduling instances for training, and initialize the scheduling solution using an improved NEH_F heuristic algorithm. Step 2: Extract multi-dimensional state features from the current scheduling solution represented by two-dimensional encoding, generate an environmental state embedding vector as input to the agent, design a neighborhood structure based on the two-dimensional encoding strategy as the agent's action space, and select actions according to the current scheduling solution; Step 3: Apply the agent's output action to the current scheduling solution, calculate the reward value based on the changes in production state, update the current scheduling solution, and extract its features. Save the quadruplets to the experience pool, and randomly sample a number of quadruplets from the experience pool to train the agent; Step 4: Determine whether the current scheduling solution has completed all workpiece processing tasks and responded to all dynamic events. If the conditions are met, the current training round ends; otherwise, return to Step 2: Determine whether the maximum number of training rounds has been reached. If it has, output the fully trained agent model; otherwise, return to Step 1 to continue training. Step 5, the online scheduling phase, uses the improved NEH_F heuristic algorithm to generate an initial scheduling scheme and calculate its maximum completion time. For dynamic events, the fully trained intelligent agent model is invoked to adjust the current scheduling scheme in real time. Step 6: Determine whether all workpiece processing tasks have been completed and all dynamic events have been responded to. If the conditions are met, output the current solution; otherwise, return to step 5.

2. The distributed hybrid flow shop dynamic scheduling method based on a learnable iterative greedy algorithm according to claim 1, characterized in that, The coupled subproblem of dynamic scheduling of distributed hybrid flow workshops is encoded using a two-dimensional coding strategy as follows: Let a scheduling solution be represented by a two-dimensional vector, and let the cooperative representation be used to represent the complete problem space of the distributed shop scheduling problem. The first dimension... Represents the workshop vector, second dimension This indicates the workpiece processing sequence of the first process in each workshop.

3. The distributed hybrid flow shop dynamic scheduling method based on a learnable iterative greedy algorithm according to claim 1, characterized in that, The decoding based on the first available machine rule and the first-come-first-served rule is performed as follows: When a machine becomes idle, the earliest ready workpiece is selected from the queue of workpieces to be processed in the current process and processed. When a workpiece is ready, it is assigned to one of the multiple parallel machines that can process the workpiece, based on the machine that is expected to start processing earliest.

4. The distributed hybrid flow shop dynamic scheduling method based on a learnable iterative greedy algorithm according to claim 1, characterized in that, The coupling subproblems include: Factory allocation distributes the set of workpieces to be processed to multiple distributed factories, selecting a suitable processing factory for each workpiece. Workpiece sequencing determines the processing order of each stage for all workpieces within the same factory. Machine selection: All operations follow the same process route and go through multiple different steps, each of which requires selection from the factory's available machine set.

5. The distributed hybrid flow shop dynamic scheduling method based on a learnable iterative greedy algorithm according to claim 1, characterized in that, The improved NEH_F heuristic algorithm is as follows: The total processing time for each workpiece across all processing stages is calculated using the following formula: ; in, Indicates workpiece In the stage Processing time, This represents the total number of stages; Workpiece set By total processing time Arrange in descending order to obtain the sequence ; From sequence Extract the first half of the workpieces and calculate the average processing time for each workpiece in the first half of the processing stage. The calculation formula is as follows: ; in, Indicates workpiece In the stage Processing time; according to These workpieces are rearranged in ascending order to form a sequence. And merge it with the remaining workpieces into the final sequence; will sequence The front of the middle Each workpiece is assigned to a different factory, and each factory is assigned one workpiece. For the remainder For each workpiece, an optimal insertion strategy is adopted. All possible insertion positions in each factory are traversed, and the completion time after insertion is calculated. The factory and insertion position that minimize the completion time are selected. The workpiece sequence of the factory is updated until all workpieces are assigned.

6. The distributed hybrid flow shop dynamic scheduling method based on a learnable iterative greedy algorithm according to claim 1, characterized in that, The multi-dimensional state feature extraction includes: The parameters include: number of factories, number of processing stages, standard deviation of maximum completion time for each factory, range of maximum completion time for each factory, dynamic event type flag, expected event processing time, standard deviation of load for each factory, remaining time percentage, remaining event percentage, optimization percentage, number of rescheduling operations for a single factory, number of rescheduling operations for other factories, number of rescheduling operations for the entire factory, number of destruction and reconstruction operations, number of local search operations, number of single-workpiece operations, number of block operations, and number of distributed search operations.

7. The distributed hybrid flow shop dynamic scheduling method based on a learnable iterative greedy algorithm according to claim 1, characterized in that, The action space includes rescheduling strategies, destruction and reconstruction strategies, and local search strategies.

8. The distributed hybrid flow shop dynamic scheduling method based on a learnable iterative greedy algorithm according to claim 1, characterized in that, The reward value is calculated based on changes in production status, and the formula for calculating the reward value is as follows: ; in, Indicates the base value for the reward. This represents the reward discount factor. This represents the reward balance factor. Indicates time optimization efficiency. This indicates the change in the standard deviation of completion time between factories.