Distributed flexible job shop scheduling method and system based on multi-scale map attention mechanism for automobile manufacturing

By adopting a distributed flexible work workshop scheduling method based on multi-scale graph attention mechanism in automobile manufacturing, and combining with the PPO-AC algorithm to optimize the scheduling strategy, the problems of scheduling complexity and resource allocation efficiency are solved, and the production efficiency is improved and the adaptation to complex scenarios is achieved.

CN120146147AActive Publication Date: 2025-06-13KUNMING UNIV OF SCI & TECH
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510630742.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-06-13
Estimated Expiration
2045-05-16

AI Technical Summary

Technical Problem

In automobile manufacturing, the scheduling complexity of distributed flexible operation workshops has increased. How to effectively improve the efficiency and resource allocation of various links in the production process of multi-process parts has become the key to improving the economic benefits and market competitiveness of enterprises.

Method used

A distributed flexible operation workshop scheduling method based on multi-scale graph attention mechanism is adopted. By constructing an energy-saving distributed flexible operation workshop scheduling model, combining PPO-AC algorithm to optimize the scheduling strategy, dealing with job conflicts and resource allocation problems, and reducing machine idleness and waiting time.

Benefits of technology

It has achieved the shortening of the overall operation completion time of the work workshop, improved production efficiency, adapted to complex operation scenarios, and effectively responded to high variability and personalized production needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120146147A_ABST
    Figure CN120146147A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of automobile manufacturing, and discloses an automobile-manufacturing-oriented distributed flexible job shop scheduling method and system based on a multi-scale map attention mechanism, and the method comprises the steps: firstly obtaining a constraint term of a distributed flexible job shop and the maximum completion time of an optimization target; and constructing an energy-saving distributed flexible job shop scheduling model, firstly performing multi-scale expansion on the heterogeneous graph # imgabs0 # through a multi-scale center expansion attention window, and embedding different node types in the heterogeneous graph # imgabs1 # by adopting two different algorithms. According to the method, the scheduling strategy optimized by the PPO-AC algorithm is adopted, so that the problems of job conflicts and resource allocation can be more effectively solved, and machine idling and waiting time caused by improper scheduling are reduced. In an experimental environment, by using the scheduling strategy provided by the invention, the overall job completion time of the job shop is averagely shortened by 20%, and the production efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automobile manufacturing, and specifically to a distributed flexible job shop scheduling method and system based on multi-scale graph attention mechanism for automobile manufacturing. Background Technique

[0002] In the automobile manufacturing industry, part processing is a crucial link in the entire production chain. Each type of automobile needs to be precisely processed and assembled from a variety of mechanical parts. In the production process of automobile parts, multi-process machining occupies a large proportion of the output value. These multi-level machining capabilities have become the most important criteria for measuring the technical level of automobile manufacturing. With the increasingly fierce market competition, single-factory part processing has begun to evolve into distributed processing, which increases the complexity of scheduling. How to effectively improve the efficiency of each link in the production process of multi-process parts and the allocation of each factory is the key to improving the economic benefits and market competitiveness of enterprises.

[0003] In automobile manufacturing, a distributed flexible job shop specifically refers to a manufacturing system that can flexibly handle various production tasks. Such a system usually includes multiple independent but collaborative production workshops and production machines. Each workshop can handle all types of manufacturing tasks while the machines can handle specific types of manufacturing tasks. For example, one machine may focus on the processing of engine components, while another machine deals with the welding and assembly of the body. Therefore, the scheduling system must be able to efficiently manage resources and production processes, ensure the smooth connection of each process, reduce waiting and idle time, and optimize the overall performance of the production line. Therefore, the energy-saving distributed flexible job shop scheduling problem (DFJSP) for automobile manufacturing is a complex problem in industrial production management, aiming to optimize job sequencing, machine allocation, and time arrangement in the production process of automobile parts to improve production efficiency and reduce costs. For tasks with multiple processing sequences and multiple machines, how to effectively schedule is the key to improving production flexibility and market response speed. In DFJSP, three closely coupled sub-problems need to be decided: assigning jobs to factories, assigning operations to machines, and determining the operation sequence.

[0004] In recent years, many effective methods have emerged to solve the DFJSP. The solutions can be classified into four categories: exact algorithms, heuristic algorithms, meta-heuristic algorithms, and machine learning-based algorithms. Exact algorithms can obtain the optimal solution, including mixed integer linear programming (MILP) and branch and bound (B&B). Among the exact algorithms, MILP is often used to solve the DFJSP and its extended problems. Although MILP is very suitable for medium and small-scale problems, when faced with large-scale problems, it often fails to obtain an optimal or even satisfactory solution. Heuristic algorithms can find solutions quickly, but cannot guarantee optimality and may fall into local optima. Most recent studies on the DFJSP have adopted meta-heuristic algorithms, which are mainly divided into three categories: trajectory-based meta-heuristic algorithms, population-based meta-heuristic algorithms, and hybrid meta-heuristic algorithms. Trajectory-based meta-heuristic algorithms search the solution space by iteratively improving a single or several solutions. Most trajectory-based meta-heuristic algorithms are local search, such as simulated annealing (SA) and tabu search (TA). Trajectory-based meta-heuristic algorithms find the optimal solution by gradually exploring and forming a specific path in the solution space. In contrast, population-based meta-heuristics use the solutions of the entire population, including genetic algorithms (GA), particle swarm optimization (PSO), and ant colony optimization (ACO). Hybrid algorithms combine the capabilities of trajectory-based search enhancement meta-heuristics and population-based search diversification meta-heuristics, and have been proven to be effective in solving various problems. Hybrid algorithms mainly include hybrid intelligent optimization algorithms (HIOA) and hybrid genetic algorithms (HGA), where HIOA is a particularly popular method for solving the DFJSP. HIOA provides a combination of multiple algorithmic advantages, but increases complexity and higher computational costs. In addition, HIOA cannot achieve interactive learning. HIOA is usually based on predefined rules and heuristics, which results in HIOA's inability to re-optimize parameters and strategies through trial-and-error feedback. Summary of the Invention

[0005] (I) Technical problems to be solved

[0006] In view of the deficiencies of the prior art, the present invention provides a distributed flexible job shop scheduling method and system based on multi-scale graph attention mechanism for automobile manufacturing, which has the advantages of improving production efficiency, etc., and solves the above technical problems.

[0007] (II) Technical solutions

[0008] To achieve the above object, the present invention provides the following technical solutions: A distributed flexible job shop scheduling method based on multi-scale graph attention mechanism for automobile manufacturing, comprising the following steps:

[0009] S1. Obtain the constraint items and the optimization objective of the makespan of the distributed flexible job shop, and construct an energy-saving distributed flexible job shop scheduling model;

[0010] Taking the makespan as the optimization objective, the expression is as follows:

[0011]

[0012] In the formula, represents the makespan;

[0013] Obtain the constraint items of the distributed flexible job shop, including: job assignment constraint, machine occupancy constraint, machine availability constraint, operation sequence constraint, time calculation, non-conflict constraint between jobs, and makespan definition;

[0014] The expression of the job assignment constraint is as follows:

[0015]

[0016] In the formula, represents the total number of factories; represents the index of the factory; represents the first binary decision variable, that is, if job is assigned to factory , then it is set to 1, otherwise 0; represents any symbol; represents the job index;

[0017]

[0018] In the formula, represents the th factory, , where, represents the set of factories, ; represents the number of machines in each factory, represents the index of the machine; represents the operation number on the machine in factory ; represents the position, and the constraint ensures that each position of each machine can only be occupied by one operation; represents the second binary variable, that is, if operation is processed at position on the first machine in factory , and operation is processed on the second machine , then it is set to 1, otherwise 0, where, Indicates the index of the machine, ≠ ; subscript Indicates the index of the operation, , Indicates the execution of the th job The number of operations, Indicates the job The th operation; where, Indicates the set of jobs, , Indicates the set of machines, , and Indicates the virtual machine, Indicates the set of operations, ;

[0019]

[0020] In the formula, Indicates the first operation of the job The allocation variable on the virtual machine , that is, the virtual start node;

[0021] The machine occupancy constraint is as follows:

[0022]

[0023]

[0024] In the formula, Indicates the total number of jobs, Indicates the index of the job ; Indicates the third binary variable, that is, if the operation In the factory In the machine The position on Processed, and the operation Processed on the machine , then set to 1, otherwise 0, to ensure that each operation must be assigned to a unique location and machine;

[0025] The machine availability constraint expression is as follows:

[0026]

[0027]

[0028]

[0029] In the formula, Represents the fourth binary variable, i.e., if the operation can be processed on the machine in the factory , it is set to 1, otherwise 0;

[0030] The expression for the operation sequence constraint is as follows:

[0031]

[0032] In the formula, represents the fifth binary decision variable, i.e., if the operation is processed at the position on the machine in the factory , and the operation is processed on the machine , it is set to 1, otherwise 0, where, represents the index of the machine, ≠ ;

[0033]

[0034] In the formula, represents the second binary variable when takes 2; represents the assignment variable of the first operation of the job on the virtual machine ;

[0035] The expression for time calculation is as follows:

[0036]

[0037] In the formula, represents the completion time of the operation ; represents the start time of the operation ; represents the actual processing time of the operation on the machine in the factory ;

[0038]

[0039] In the formula, represents the completion time of the operation when takes 1; represents the start time of the operation when takes 1;

[0040]

[0041] In the formula, Indicates that when When operating completion time;

[0042] The expression of the conflict-free constraint between jobs is as follows:

[0043]

[0044]

[0045] In the formula, Indicates the second operation The completion time of represents the index of the second job, , represents the index of the second operation, ; Represents the fifth binary variable, if the operation In the factory Medium Machine Position on Processing and operation In the machine If it is processed, it is set to 1, otherwise it is 0; Represents a positive number, used to convert logical constraints into mathematical expressions; represents a sorting decision variable. If the operation exist If it is processed before, it is set to 1, otherwise it is 0; since there is only one workpiece processed at position p of a machine, , Only one is 1;

[0046] The expression for the maximum completion time definition is as follows:

[0047]

[0048] In the formula, Indicates when Pick Time Operation completion time;

[0049] .

[0050] S2, model the distributed flexible job shop scheduling model as a single-agent Markov decision process;

[0051] S3. Obtain the processing information of the distributed flexible job shop, organize it into a processing feature matrix, and represent the processing feature matrix as a heterogeneous graph , and perform multi-scale expansion on the heterogeneous graph through a multi-scale center expansion attention window. Then, use two different algorithms for embedding different node types in the heterogeneous graph, and finally obtain the heterogeneous graph embedding ; ;

[0052] S4. Use the agent PAC to probabilistically select an action based on the Softmax policy according to the current state , obtain a reward and enter the next state . Store all the data of the agent and read it when updating the policy. Among them represents the time step, that is, the current time of the state is t; ;

[0053] S5. Perform network update. Train the Critic network in the agent PAC based on the state, action, and average reward of the agent. Calculate the advantage function according to the value function value output by the Critic network : , and then calculate the loss function . The Actor network in the agent PAC performs gradient descent based on the reward. Among them, represents the cumulative reward, represents the time step for calculating the loss function, represents the value prediction of the Critic network for the current state ;

[0054] S6. Judge whether all action scheduling is completed. If no termination signal appears, return to S3. If a termination signal appears, it means the scheduling is completed;

[0055] S7. Judge whether the current iteration number is equal to the update step. If it meets the condition, verify the validation set and retain the optimal policy and the optimal scheduling plan. If it does not meet the condition, proceed to the next step;

[0056] S8. Judge whether the current iteration number exceeds the maximum iteration number. If it meets the condition, end all training and output the optimal policy and the optimal scheduling plan. If it does not meet the condition, proceed to the next training.

[0057] As a preferred technical solution of the present invention, the step S2 includes the following steps:

[0058] S2.1. Set the state set, including:

[0059] Operating status , is represented by six local features, namely , where represents whether the operation has been scheduled, represents the number of machines that can be used for the processing operation , represents the number of factories that can be used for the processing operation , represents the processing time of the operation, represents the operation belonging to the job the number of unprocessed operations, represents the operation start time, represents the job end time;

[0060] Machine operating status , is represented by three local features, namely , where represents the operations that the machine can handle, represents the available time of the machine, represents the utilization rate of the machine;

[0061] Factory operating status , is represented by three local features, namely , represents the number of operations expected to be processed in the factory , represents the processing time of the operations expected to be processed in the factory , represents the factory machine utilization rate;

[0062] The state of the undirected arc connecting the operation node and the machine node Original feature is represented as , , ; which contains a feature , represents the actual processing time of the machine operation, represents the arc set composed of all undirected arcs, represents that the feature is a one-dimensional tensor;

[0063] The state of the undirected arc connecting the factory node and the machine node Original feature is represented as , , ; It contains a feature , represents the total time of the operations to be processed on the machine, represents the set of undirected arc features connecting the factory nodes and the machine nodes;

[0064] S2.2. Construct the agent PAC, and the agent PAC applies the optimization strategy of PPO to the Actor - Critic architecture for construction;

[0065] S2.3. Set the discount factor of the agent PAC , the reward function , the cumulative reward , and its specific expression is as follows:

[0066]

[0067]

[0068] Among them, represents the agent PAC reward, represents the scheduling of the maximum completion duration, represents the scheduling of the maximum completion duration represents the initially preset maximum completion time. In a specific problem instance, there is a constant , which means that minimizing and maximizing are equivalent, represents the total time steps, represents the maximum completion time.

[0069] As a preferred technical solution of the present invention, the specific steps in step S3 are as follows:

[0070] S3.1. Use a multi - scale central expansion attention window to expand the heterogeneous graph .

[0071] S3.2. Input the expanded heterogeneous graph into an adaptive multi - node embedding heterogeneous graph neural network for embedding. The adaptive multi - node embedding heterogeneous graph neural network embeds the expanded heterogeneous graph specifically including embedding machine nodes, factory nodes, operation nodes, and graph embedding, and performing aggregation after embedding to finally obtain the heterogeneous graph embedding .

[0072] As a preferred technical solution of the present invention, the adaptive multi-node embedded heterogeneous graph neural network for machine node embedding includes two meta-paths. The first is from the machine node to the operation node, and self-attention mechanism is used for path embedding. The second is from the machine node to the factory node, and self-attention mechanism is used for path embedding. And the embedding results of the two meta-paths are aggregated by self-attention mechanism to obtain the machine embedding features ;

[0073] The adaptive multi-node embedded heterogeneous graph neural network for factory node embedding only contains one meta-path, and self-attention mechanism is used for path embedding without path aggregation to obtain the machine embedding features ;

[0074] The adaptive multi-node embedded heterogeneous graph neural network for operation node embedding is embedded by stacking multiple MLPs. The specific expression is as follows:

[0075]

[0076] Wherein, represents that the instance is based on the original heterogeneous graph for embedding the operation node for embedding, , , , , respectively represent the first to fifth multi-layer perceptrons used for embedding, represents the current embedding operation the direct predecessor of the original features, represents the current embedding operation the direct successor of the original features, represents the original features of the current embedding operation Since the machine embedding is performed before the operation embedding, represents the machine connected by the current embedding operation the embedding features obtained through machine embedding, respectively represent activation functions, represents concatenation;

[0077] The specific expression of the adaptive multi-node embedded heterogeneous graph neural network for graph embedding is as follows:

[0078]

[0079]

[0080]

[0081] and 、 respectively represent the finally obtained operation embedding, machine embedding, and factory embedding. respectively represent the local operation embedding, local machine embedding, and local factory embedding obtained by performing graph embedding on the heterogeneous graph subgraphs with a scale of r = 1. respectively represent the local operation embedding, local machine embedding, and local factory embedding obtained by performing graph embedding on the heterogeneous graph subgraphs with a scale of r = 2. respectively represent the local operation embedding, local machine embedding, and local factory embedding obtained by performing graph embedding on the heterogeneous graph subgraphs with a scale of r = . respectively represent the local operation embedding, local machine embedding, and local factory embedding obtained by performing graph embedding on the original heterogeneous graph. represents concatenation, where is the scale parameter of the multi-scale central expansion attention window.

[0082] As a preferred technical solution of the present invention, the action is probabilistically selected based on the Softmax strategy in step S4 and the specific expression is as follows:

[0083]

[0084] where represents the probability based on the Softmax strategy, represents the action at the current state priority index, represents all actions at the current state sum of the priority indices, represents the exponential function with the natural constant as the base.

[0085] A distributed flexible job shop scheduling system based on a multi-scale graph attention mechanism for automotive manufacturing, which is used to run the above-mentioned distributed flexible job shop scheduling method based on a multi-scale graph attention mechanism for automotive manufacturing.

[0086] Compared with the prior art, the present invention provides a distributed flexible job shop scheduling method and system based on a multi-scale graph attention mechanism for automotive manufacturing, having the following beneficial effects:

[0087] 1. The scheduling strategy optimized by the PPO-AC algorithm in the present invention can more effectively handle job conflicts and resource allocation problems, reducing machine idling and waiting time caused by improper scheduling. In the experimental environment, using the scheduling strategy of the present invention, the overall job completion time in the job shop is shortened by an average of 20%, improving production efficiency.

[0088] 2. The multi-scale attention mechanism in the present invention enables the system to understand and utilize the relationship between factory operations and machines at different levels, enhancing the adaptability of the scheduling algorithm to complex job scenarios. The deep reinforcement learning with the adaptive multi-scale graph attention mechanism makes a horizontal expansion of the application of deep reinforcement learning in the field of solving the distributed flexible job shop scheduling problem. This flexibility enables the present invention to be applicable not only to traditional manufacturing environments but also to effectively cope with highly variable and personalized production demands. BRIEF DESCRIPTION OF THE DRAWINGS

[0089] Figure 1 It is a schematic flowchart of the present invention;

[0090] Figure 2 It is a schematic diagram of the algorithm framework of the present invention;

[0091] Figure 3 It is a schematic diagram of the network framework of the present invention;

[0092] Figure 4 It is a schematic diagram of the heterogeneous graph of the example of the present invention;

[0093] Figure 5 It is a schematic diagram of the MCW principle of the present invention;

[0094] Figure 6 It is a schematic diagram of the scheduling of a 2*10*5 DFJSP example of the present invention;

[0095] Figure 7 It is a schematic diagram of the scheduling of a 2*20*10 DFJSP example of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0096] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0097] Please refer to Figures 1-7 , a distributed flexible job shop scheduling method based on a multi-scale graph attention mechanism for automobile manufacturing, including the following steps:

[0098] S1. Obtain the constraint items and the optimization objective of the makespan of the distributed flexible job shop, and construct an energy-saving distributed flexible job shop scheduling model. The specific expression is as follows: and construct an energy-saving distributed flexible job shop scheduling model. The specific expression is as follows:

[0099] (1)

[0100] In the formula, represents the makespan;

[0101] Obtain the constraint items of the distributed flexible job shop, including: job assignment constraint, machine occupancy constraint, machine availability constraint, operation sequence constraint, time calculation, non-conflict constraint between jobs, and makespan definition;

[0102] The expression of the job assignment constraint is as follows:

[0103] (2)

[0104] In the formula, represents the total number of factories; represents the index of the factory; represents the first binary decision variable, that is, if job is assigned to factory , then it is set to 1, otherwise it is 0; represents any symbol; represents the job index;

[0105] (3)

[0106] In the formula, represents the th factory, , where, represents the set of factories, ; represents the number of machines in each factory, represents the index of the machine; represents the operation number on the machine in factory ; the constraint ensures that each position of each machine can only be occupied by one operation; represents the position, and the constraint ensures that each position of each machine can only be occupied by one operation; represents the second binary variable, that is, if operation is processed at position on the first machine in factory , and operation is processed on the second machine , then it is set to 1, otherwise it is 0, where, represents the index of the machine, ≠ ; subscript represents the index of the operation, , indicating the th job operation quantity, indicating the job th operation; among them, represents the set of jobs, , represents the set of machines, , and represents the virtual machine, represents the set of operations, ;

[0107] (4)

[0108] In the formula, represents the allocation variable of the first operation of the job on the virtual machine , that is, the virtual starting node;

[0109] The machine occupancy constraint is as follows:

[0110] (5)

[0111] (6)

[0112] In the formula, represents the total number of jobs, represents the index of the job ; represents the third binary variable, that is, if the operation is processed on the machine in the factory and the operation is processed on the machine , then it is set to 1, otherwise 0, to ensure that each operation must be assigned to a unique location and machine;

[0113] The machine availability constraint expression is as follows:

[0114] (7)

[0115] (8)

[0116] (9)

[0117] In the formula, Represents the fourth binary variable, i.e., if the operation can be processed on the machine in the factory it is set to 1, otherwise 0;

[0118] The expression for the operation sequence constraint is as follows:

[0119] (10)

[0120] In the formula, represents the fifth binary decision variable, i.e., if the operation is processed at the position on the machine in the factory and the operation is processed on the machine it is set to 1, otherwise 0, where, represents the index of the machine, ≠ ;

[0121] (11)

[0122] In the formula, represents the second binary variable when takes 2; represents the assignment variable of the first operation of the job on the virtual machine ;

[0123] The expression for time calculation is as follows:

[0124] (12)

[0125] In the formula, represents the completion time of the operation ; represents the start time of the operation ; represents the actual processing time of the operation on the machine in the factory ;

[0126] (13)

[0127] In the formula, represents the completion time of the operation when takes 1; represents the start time of the operation when takes 1;

[0128] (14)

[0129] In the formula, represents the completion time of the operation when ; of the operation.

[0130] The expression for no conflict constraint between operations is as follows:

[0131] (15)

[0132] (16)

[0133] In the formula, represents the completion time of the second operation, where ; represents the index of the second job, , represents the index of the second operation, ; represents the fifth binary variable. If the operation is processed at the position of the machine in the factory , and the operation is processed on the machine , it is set to 1, otherwise 0; represents a positive number used to convert logical constraints into mathematical expressions; represents a sorting decision variable. If the operation is processed before , it is set to 1, otherwise 0; Since only one workpiece is processed at a position p of a machine, so , only one is 1;

[0134] The expression for defining the makespan is as follows:

[0135] (17)

[0136]

[0137] Constraint (1) represents the optimization objective of minimizing the processing time.

[0138] Constraint (2) ensures that each in the job set is assigned to a single factory .

[0139] The constraint set (3)-(4) ensures that all operations of the job ​ All in the same factory are processed.

[0140] Constraint (5) stipulates that each machine in each factory of the factory each position of can only be occupied by a unique operation once.

[0141] Constraint (6) ensures that each operation can be assigned to a machine of the factory at a position on.

[0142] Constraint (7) ensures that there is at least one operation for which there are multiple machines to choose from for processing.

[0143] Constraint set (8)-(9) ensures that each operation the selected processing machine is selected from the set of available machines in.

[0144] Constraint set (10)-(11) ensures that all operations can be processed in sequence, while requiring that the first operation of each job is transported from the virtual machine to ensure that the operations are executed in the correct order.

[0145] Constraint set (12)-(14) determines the start time of each operation and the completion time .

[0146] Constraint set (15)-(16) restricts that there is no overlap between different jobs , that is, the operations of different jobs do not interfere with each other in terms of scheduling or machine allocation.

[0147] Constraint (17) defines the maximum completion time .

[0148] S2. Model the distributed flexible job shop scheduling model as a single-agent Markov decision process; the step S2 includes the following steps:

[0149] S2.1. Set the state set, including:

[0150] The operation running state , is represented by six local features, namely , where, Indicates this operation Whether scheduling has been arranged Indicates the number of machines that can be used for processing operations Indicates the number of factories that can be used for processing operations Indicates the processing time of this operation Indicates the operation Belonging job Number of unprocessed operations Indicates the operation Start time Indicates the belonging job End time;

[0151] Machine running status , Is represented by three local features, namely , where Indicates the operations that the machine can handle Indicates the available time of the machine Indicates the utilization rate of the machine;

[0152] Factory running status , Is represented by three local features, namely , Indicates the number of operations expected to be processed in the factory Indicates the processing time of the operations expected to be processed in the factory Indicates the factory Machine utilization rate;

[0153] The undirected arc connecting the operation node and the machine node Original feature The status is represented as , , ; which contains a feature , Indicates the actual processing time of the machine operation Indicates the arc set composed of all undirected arcs Indicates that the feature is a one-dimensional tensor;

[0154] The undirected arc connecting the factory node and the machine node Original feature The status is represented as , , ; which contains a feature​​​​ , represents the total time of the operations to be processed on the machine; represents the set of undirected arc features connecting the factory nodes and the machine nodes;

[0155] S2.2. Construct the agent PAC, which constructs by applying the optimization strategy of PPO to the Actor-Critic architecture;

[0156] S2.3. Set the discount factor of the agent PAC , the reward function , the cumulative reward , and its specific expression is as follows:

[0157]

[0158]

[0159] where, represents the reward function of the agent PAC, represents the scheduling maximum makespan, represents the scheduling maximum makespan, represents the initially preset maximum completion time. In a specific problem instance, there is a constant , which means minimizing and maximizing are equivalent, represents the total number of time steps, represents the maximum completion time.

[0160] S3. Obtain the processing information of the distributed flexible job shop and organize it into a processing feature matrix, and represent the processing feature matrix as a heterogeneous graph , and for the heterogeneous graph , first perform multi-scale expansion on the heterogeneous graph through a multi-scale central expansion attention window, and for the heterogeneous graph , use two different algorithms for embedding of different node types, and finally obtain the heterogeneous graph embedding ;

[0161] The specific steps in step S3 are as follows:

[0162] S3.1. Use a multi-scale central expansion attention window to expand the heterogeneous graph , first based on the original graph , find the key nodes, that is, the graph in the graph. In particular, when , , that is, the set of selected nodes, , , and then, centered on the key nodes, search outward for subgraphs composed of related nodes at a distance of r from the key nodes, and obtain a heterogeneous graph set after multi-scale expansion , where is the heterogeneous graph after multi-scale central expansion attention window for the heterogeneous graph is expanded to a scale of r, where is a subgraph of the heterogeneous graph, is the original heterogeneous graph, are cascaded and fed into the MLP to obtain the action at the state of the priority index , and the priority index of each action is normalized to obtain a probability distribution;

[0163] S3.2. Input the expanded heterogeneous graph into the adaptive multi-node embedding heterogeneous graph neural network for embedding. The adaptive multi-node embedding heterogeneous graph neural network for the expanded heterogeneous graph for embedding specifically includes machine node embedding, factory node embedding, operation node embedding, and graph embedding. After the embedding is completed, aggregation is performed, and finally, a heterogeneous graph embedding is obtained;

[0164] The machine node embedding of the adaptive multi-node embedding heterogeneous graph neural network includes: The features to be aggregated mainly include the original features of the machine node , the original features of the target operation node , the original features of the factory node , the original features of the undirected arc , the original features of the undirected arc , the original features of the undirected arc , the original features of the undirected arc , the original features of the undirected arc , the original features of the undirected arc , two meta-paths. The first one is from the machine node to the operation node, that is , and the self-attention mechanism is used for path embedding , , are respectively features linearly transformed to the same dimension. The second one is from the machine node to the factory node , and the self-attention mechanism is used for path embedding , are respectively features linearly transformed to the same dimension, and the embedding results of the two meta-paths are aggregated by the self-attention mechanism to obtain the machine embedding feature ; where Attention parameters representing the first meta-path (machine → operation); Attention parameters representing the second meta-path (machine → operation);

[0165] The adaptive multi-node embedding heterogeneous graph neural network performs factory node embedding. The features to be aggregated mainly include the original features of machine nodes ; , factory nodes 's original features undirected arcs 's original features , only contains one meta-path , uses the self-attention mechanism for path embedding , does not perform path aggregation, and obtains the factory embedding features ; Among them, represents the attention parameters only containing one meta-path (machine → operation);

[0166] The adaptive multi-node embedding heterogeneous graph neural network performs operation node embedding. The operation nodes are embedded through multiple layers of MLP stacking. The features to be aggregated mainly include the original features of the target operation node ; , the original features of the direct pre-operation ; , the original features of the direct post-operation ; , machine nodes 's original features , undirected arcs - 's original features , and two directed arcs representing the sequential relationship between operations (i.e., the directed arc connecting operation to , and the reverse directed arc connecting operation to ), and the specific expression is as follows:

[0167]

[0168] Among them, represents that the instance embeds the operation node based on the original heterogeneous graph, , , , , respectively represent the first to fifth multi-layer perceptrons used for embedding, represents the direct predecessor of the current embedding operation 's original features, Indicates the current embedding operation The direct successor of The original features of Indicates the current embedding operation The original features of, because the machine embedding is performed before the operation embedding Indicates the machine connected by the current embedding operation The embedding features obtained through machine embedding Respectively represent the activation function Indicates concatenation;

[0169] The specific expression for the adaptive multi-node embedding heterogeneous graph neural network to perform graph embedding is as follows:

[0170]

[0171]

[0172]

[0173] Among them, , , , , , , , , ,

[0174] , , Respectively represent the finally obtained operation embedding, machine embedding, factory embedding Respectively represent the local operation embedding, local machine embedding, local factory embedding obtained by performing graph embedding on the heterogeneous graph subgraphs with scale r = 1 Respectively represent the local operation embedding, local machine embedding, local factory embedding obtained by performing graph embedding on the heterogeneous graph subgraphs with scale r = 2 Respectively represent based on the scale of r = The local operation embedding, local machine embedding, local factory embedding obtained by performing graph embedding on the heterogeneous graph subgraphs of Respectively represent the local operation embedding, local machine embedding, local factory embedding obtained by performing graph embedding on the original heterogeneous graph Indicates concatenation, where Is the scale parameter of the multi-scale central dilation attention window

[0175] S4. The agent PAC is used according to the current state , probabilistically select an action based on the Softmax policy , obtain a reward and enter the next state , and store all the data of the agent, which is read when the policy is updated. Among them represents the time step, that is, the current time of the state is t;

[0176] probabilistically select an action based on the Softmax policy The specific expression is as follows:

[0177]

[0178] Among them, represents the probability based on the Softmax policy, represents the action in the current state of the priority index, represents all actions in the current state of the sum of the priority indices, represents the exponential function with the natural constant as the base;

[0179] S5. Perform network update. Train the Critic network in the agent's PAC according to the state, action, and average reward of the agent. According to the value function value output by the Critic network , calculate the advantage function: , and then calculate the loss function , among which, represents the advantage function, represents the loss function, represents the value function value output by the Critic network at time represents the value function value output by the Critic network at time represents the total time, represents the reward. The Actor network in the agent's PAC performs gradient descent based on the reward; among them, represents the cumulative reward, represents the time step for calculating the loss function, represents the value prediction value of the Critic network for the current state ;

[0180] S6. Determine whether all action scheduling is completed. If no termination signal appears, return to S3. If a termination signal appears, it means the scheduling is completed;

[0181] S7. Determine whether the current iteration number is equal to the update step. If so, verify the validation set and retain the optimal policy and the optimal scheduling plan. If not, proceed to the next step;

[0182] S8. Determine whether the current iteration number exceeds the maximum iteration number. If so, end all training and output the optimal policy and the optimal scheduling plan. If not, proceed to the next training.

[0183] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A distributed flexible job shop scheduling method based on multi-scale graph attention mechanism for automobile manufacturing, characterized by: The following steps are involved: S1. Obtain the constraints of the distributed flexible job shop and the maximum completion time of the optimization target, and build an energy-saving distributed flexible job shop scheduling model; The distributed flexible job shop constraints include: job allocation constraints, machine occupancy constraints, machine availability constraints, operation sequence constraints, time calculation, non-conflict constraints between jobs and maximum completion time definition; S2, model the distributed flexible job shop scheduling model as a single-agent Markov decision process; S3, obtain the processing information of the distributed flexible job shop and organize it into a processing feature matrix, and represent the processing feature matrix as a heterogeneous graph. The heterogeneous graph is first expanded in multiple scales through a multi-scale center expansion attention window, and two different algorithms are used to embed different node types in the heterogeneous graph, and finally the heterogeneous graph embedding is obtained; S4, using the agent PAC to probabilistically select actions based on the current state based on the Softmax strategy , get reward And enter the next state , and store all the agent's data and read it when updating the strategy; S5. Update the network, train the Critic network in the agent PAC according to the state, action, and average reward of the agent, and output the value function value according to the Critic network , calculate the advantage function, and then calculate the loss function; S6, determine whether all action scheduling is completed, if no termination signal appears, return to S3, if a termination signal appears, it means that the scheduling is completed; S7, determine whether the current number of iterations is equal to the update step size. If yes, verify the verification set and retain the optimal strategy and optimal scheduling solution. If not, proceed to the next step. S8. Determine whether the current number of iterations exceeds the maximum number of iterations. If yes, end all training and output the optimal strategy and optimal scheduling plan. If not, proceed to the next training.

2. According to claim 1, a distributed flexible job shop scheduling method based on a multi-scale graph attention mechanism for automobile manufacturing is characterized by: The step S2 comprises the following steps: S2.

1. Set the state set, including: Operation status , It is represented by six local features, namely ,in, Indicates that the operation Has the scheduling been arranged? Indicates that it can be used for processing operations The number of machines, Indicates that it can be used for processing operations The number of factories, Indicates the processing time of the operation, Indicates the operation Assignment The number of unprocessed operations, Indicates operation The start time of Indicates the job End time of Machine operating status , It is represented by three local features, namely ,in, represents the operations that the machine can handle, Indicates the available time of the machine. Indicates the utilization rate of the machine; Factory operating status , It is represented by three local features, namely , Indicates that it is expected that The number of operations to process, It is expected to be in the factory The processing time of the operations processed in Indicates factory machine utilization; Undirected arcs connecting operation nodes and machine nodes Original Features The state is represented by , , ; contains a feature , represents the actual processing time of the machine operation, represents the arc set consisting of all undirected arcs, Represents features as a one-dimensional tensor; Undirected arcs connecting factory nodes and machine nodes Original Features The state is represented by , , ; contains a feature , Represents the total time of the operation to be processed on the machine; represents the set of undirected arcs connecting factory nodes and machine nodes; S2.2, build the agent PAC, the agent PAC applies the optimization strategy of PPO to the Actor-Critic architecture; S2.

3. Setting the Agent PAC Discount Factor , the reward function , cumulative rewards , its specific expression is as follows: ; ; in, represents the agent PAC reward function, Representation Scheduling The maximum completion time of Representation Scheduling The maximum completion time of represents the maximum completion time initially set. In a specific problem instance, there is a constant , which means minimizing and maximize are equivalent, represents the total time step, Indicates the maximum completion time.

3. The distributed flexible job shop scheduling method based on multi-scale graph attention mechanism for automobile manufacturing according to claim 2 is characterized by: The specific steps in step S3 are as follows: S3.

1. Using multi-scale center-dilated attention windows for heterogeneous graphs To expand; S3.

2. Expand the heterogeneous graph The input is embedded into an adaptive multi-node embedding heterogeneous graph neural network for embedding. The adaptive multi-node embedding heterogeneous graph neural network is used for the expanded heterogeneous graph. The embedding process includes embedding machine nodes, factory nodes, operation nodes, and graphs. After embedding, they are aggregated to obtain heterogeneous graph embedding. .

4. The distributed flexible job shop scheduling method based on multi-scale graph attention mechanism for automobile manufacturing according to claim 3 is characterized by: The adaptive multi-node embedding heterogeneous graph neural network for machine node embedding includes two meta-paths. The first is from machine node to operation node, and the path embedding is performed using the self-attention mechanism. The second is from machine node to factory node, and the path embedding is performed using the self-attention mechanism. The embedding results of the two meta-paths are aggregated using the self-attention mechanism to obtain the machine embedding feature. ; The adaptive multi-node embedding heterogeneous graph neural network is used to embed factory nodes, which only contains one meta-path and uses the self-attention mechanism to embed the path without path aggregation to obtain the factory embedding feature. ; The adaptive multi-node embedding heterogeneous graph neural network performs operation node embedding. The operation nodes are embedded by stacking multiple layers of MLP. The specific expression is as follows: ; in, Indicates that the instance is based on the original heterogeneous graph to perform operation nodes Embed, , , , , Respectively represent the first to fifth multi-layer perceptrons used for embedding, Indicates the current embed operation Direct front drive The original characteristics of Indicates the current embed operation The direct successor The original characteristics of Indicates the current embed operation The original characteristics of the machine embedding are performed before the operation embedding. Indicates the machine that the current embedding operation is connected to Embedded features obtained through machine embedding, They represent activation functions, Indicates cascade; The specific expression of graph embedding by the adaptive multi-node embedding heterogeneous graph neural network is as follows: ; ; ; , , They represent the final operation embedding, machine embedding, and factory embedding respectively. They represent the local operation embedding, local machine embedding, and local factory embedding obtained by embedding the heterogeneous graph subgraph with scale r=1. They represent the local operation embedding, local machine embedding, and local factory embedding obtained by embedding the heterogeneous graph subgraphs with a scale of r=2. Respectively represent the scale based on r= The heterogeneous graph subgraphs are embedded into graphs to obtain local operation embedding, local machine embedding, and local factory embedding. They represent the local operation embedding, local machine embedding, and local factory embedding obtained by embedding the original heterogeneous graph. represents a cascade, where is the scale parameter of the multi-scale center dilated attention window.

5. The distributed flexible job shop scheduling method based on multi-scale graph attention mechanism for automobile manufacturing according to claim 3 is characterized by: In step S4, the action is selected probabilistically based on the Softmax strategy. The specific expression is as follows: ; in, Represents the probability based on Softmax strategy, Indicates action In the current state The priority index of Indicates all actions In the current state The sum of the priority indexes, Represents an exponential function with a natural constant as base.

6. A distributed flexible job shop scheduling system based on multi-scale graph attention mechanism for automobile manufacturing, characterized by: Used to run a distributed flexible job shop scheduling method based on a multi-scale graph attention mechanism for automobile manufacturing as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Event detection method based on multi-scale heterogeneous graph embedding algorithm

    CN114528479A

  • Flexible job-shop energy-saving scheduling method oriented to excitation-driven demand response

    CN119228058A

  • Job-shop scheduling method and system based on principal component heterogeneous graph neural network

    CN119512005A

  • Flexible job shop scheduling method based on act-critic multi-agent deep reinforcement learning

    CN119740803A

  • Heterogeneous graph attention networks for scalable multi-robot scheduling

    US20220226994A1