Intelligent scheduling and automatic closed-loop control method for large-scale production workshop operation
By modeling the flexible job shop scheduling problem as a Markov process, training the policy model using graph neural networks and behavior cloning methods, and combining a constraint programming real-time solver and dynamic switching method, the real-time and efficient problem of flexible job scheduling in large production workshops is solved, and efficient solution generation is achieved.
Patent Information
- Application Number
- CN202511106924.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-08
- Publication Date
- 2025-12-23
AI Technical Summary
Existing flexible job shop scheduling problems are difficult to solve in real time and efficiently in large production workshops. Traditional methods have high computational complexity, while deep reinforcement learning methods fail to fully utilize the advantages of traditional methods and cannot be effectively integrated, resulting in the inability to quickly generate high-quality solutions.
The flexible workshop scheduling problem is modeled as a Markov process. Graph neural networks are used to extract features, and a policy model is trained by combining the behavior cloning method. A constraint programming real-time solver predictor is introduced, and the behavior cloning and constraint programming methods are dynamically switched to build an efficient solution.
It can quickly generate high-quality solutions in real time, combining the advantages of traditional and modern methods, improving production efficiency, and is suitable for instances of different sizes and complexities, with good scalability and adaptability.
Smart Images

Figure CN121187231A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of automation control technology, and in particular relates to an intelligent scheduling and automatic closed-loop control method for large-scale production workshop operations. Background Technology
[0002] Breakthroughs in information and communication technologies, especially the development of the Internet, the Internet of Things (IoT), cloud computing, and big data, have provided strong support for the intelligentization of manufacturing. Interconnectivity between devices and between devices and systems has become possible, and real-time transmission and analysis of production data have become a reality, creating conditions for the realization of smart factories. Intensified global market competition has prompted manufacturing enterprises to seek more efficient, flexible, and intelligent production models. Traditional production methods can no longer meet market demands; therefore, manufacturing enterprises need to enhance their competitiveness through the application of intelligent technologies.
[0003] The Flexible Job Shop Scheduling Problem (FJSSP) is an important research topic in combinatorial optimization and production management. Efficiently solving this problem is crucial for the operational success of numerous industrial and service sectors. Especially in rapidly changing environments, real-time solutions are becoming increasingly critical. Manufacturing companies must make reasonable order scheduling and scientific production arrangements in real time to meet ever-increasing customer demand. This allows companies to fully utilize existing production capacity, ensure batch production and on-time delivery, effectively shorten order delivery times, reduce order delays, and maximize customer satisfaction.
[0004] Traditional approaches to the flexible job shop scheduling problem rely primarily on exact algorithms, including mixed-integer linear programming and branch-and-bound algorithms. These methods typically face significant computational complexity challenges, especially in medium to large-scale problem instances. Heuristic methods, including various scheduling rules, can produce solutions in real-time, but often fall short of the required quality. Metaheuristic methods, such as genetic algorithms and simulated annealing, provide more robust solutions by iterating through multiple possibilities, but these methods can also become complex and computationally intensive, failing to produce solutions in real-time.
[0005] Current progress in the flexible job shop scheduling problem is primarily based on deep reinforcement learning (DRL) because it can generate high-quality real-time solutions. However, deep reinforcement learning methods often fail to fully leverage the advantages of existing techniques such as exact algorithms or constraint programming (CP). First, the large solution space makes finding the optimal solution through reinforcement learning computationally very complex. Models trained on such instances may ultimately yield unsatisfactory results. Second, deep reinforcement learning methods often fail to fully utilize the potential of other techniques in the field, such as exact algorithms and constraint programming. For example, for smaller problem instances, exact algorithms like constraint programming can provide optimal solutions at near real-time speeds, but reinforcement learning-based methods cannot effectively integrate this approach. This results in missing significant opportunities to enhance performance by combining the strengths of traditional and modern methods. Summary of the Invention
[0006] The purpose of this invention is to provide an intelligent scheduling and automatic closed-loop control method for large-scale production workshop operations to solve the above-mentioned technical problems.
[0007] To solve the above-mentioned technical problems, the specific technical solution of the intelligent scheduling and automatic closed-loop control method for large-scale production workshop operations of the present invention is as follows:
[0008] A method for intelligent scheduling and automatic closed-loop control of operations in a large-scale production workshop includes the following steps:
[0009] Step 1: Model the problem as a Markov process;
[0010] Step 2: Extract features from heterogeneous graphs using graph neural networks;
[0011] Step 3: Train the policy model using the behavior cloning method;
[0012] Step 4: Constraint programming real-time solution capability predictor;
[0013] Step 5: Use behavior cloning and constraint programming to build the solution together.
[0014] Furthermore, step 1 includes the following steps:
[0015] Step 1.1: Model the problem as a Markov process. Defining a Markov process only requires specifying a state space, an action space, and a transition function.
[0016] Step 1.2: State Space: A state space representation based on previously proposed heterogeneous graphs is adopted and extended. These graphs include different types of nodes, edge types, and features. At each step t, the state S... t Defined as a heterogeneous graph G t =(V t Et ), where set V t It includes three types of nodes: operations, jobs, and machines, and E t The graph contains six types of edges, both directed and undirected, and the edge characteristics are as follows:
[0017] An undirected edge between an operation and a machine represents the machine that can perform the operation. An undirected edge is represented by two directed edges between a machine and an operation, and vice versa. Information about this relationship is added to this undirected edge.
[0018] A directed edge between an operation and a task represents an operation that belongs to a task;
[0019] A directed edge between operations indicates that one operation follows immediately before another.
[0020] The directed edges between machines and jobs, each job is associated with a machine that can execute its first operation. If all operations have been executed, the node will not be connected to any machine. Similar to the edges between operations and machines, this edge also has characteristics.
[0021] Tasks are interconnected because the status of a task and the operations it has not yet performed will affect the importance of completing other tasks.
[0022] The reason machines are interconnected is similar to that of tasks, because they regulate each other;
[0023] Step 1.3: Action Space: At each time step t, the action space A t Corresponding to compatible jobs and machines, when selecting a job, the first operation of that job that has not yet been scheduled is selected. This decision-making process is modeled as an edge classification problem to determine the most suitable pairing.
[0024] Step 1.4: Transfer Function: This solution is constructed by sequentially assigning jobs to machines. After an operation is assigned, it is removed, and the edges of the selected job are updated to reflect the next operation to be performed and the characteristics of all nodes.
[0025] Furthermore, step 2 includes the following steps:
[0026] Machine m k The initial representation is named Where d M This is the initial number of machine features, for operation o. ij Its initial representation is An edge connecting two nodes is represented as... Where d OM It's a feature dimension. The first step is to calculate the attention coefficients for the three relationships: the coefficient between the machine and the operation.ij The calculation is as follows:
[0027]
[0028] Where a is the activation function. It is a learnable linear transformation, d′ MO It is the dimension of the embedded hidden space, and the other two attention coefficients: machine m k and m k′ coefficients between and machine m k and homework j i coefficients between Calculate in the same way;
[0029] After calculating the attention coefficient, machine m k The new embedding h′ mk The calculation is as follows:
[0030]
[0031] Among them JM mk It connects compatible operations with machines. k The set of edges, h ji It is homework j i Embedded, It is a feature of the edge connecting the two;
[0032] To enhance the ability of GNNs to capture more meaningful relationships between nodes, two strategies are employed: using multiple attention heads and increasing the number of layers. For the first approach, using multiple attention heads, assuming there are K attention heads, K distinct embeddings will be computed, denoted as... Where k = 1, 2, ..., K, each attention head has its unique attention coefficients and corresponding linear transformations. These embeddings are then concatenated to obtain the final embedding, expressed as the formula:
[0033]
[0034] For the second method of increasing the number of layers, the entire process is repeated L times, each time using different learnable parameters. In each layer l, the embeddings computed in the previous layer l-1 are utilized, and the output of this layer is represented as...
[0035] Furthermore, step 3 includes the following steps:
[0036] Training a model using the behavior cloning method requires generating a set of optimal solutions S, a set of instances that can be solved within 60 seconds using constraint programming, then constructing trajectories of states and actions, and establishing feasible machine operation assignments. Operations are first sorted by start time, then by end time, and a series of states and operations are constructed according to this order. For each solution e∈S, a trajectory T is created. e ={(s1,a1),(s2,a2),...,(s |O| ,a |O| )}, where O is the set of operations for the instance being solved, the number of actions corresponds to the number of operations, actions include assigning operations to the machine, and for all i = {1, 2, ..., |O|}, s i It is a heterogeneous graph, a i The operations to be taken are as follows; ultimately, the dataset is defined as the union of all trajectories.
[0037] The set of trajectories constitutes the dataset used to train the model as a supervised learning model, in n e Perform this operation on each iteration, dividing the dataset into n parts for each iteration. b The next step is to define the loss function, choosing to use KL divergence loss because this method is more stable for policy distillation.
[0038] Finally, a policy π is generated using the embeddings computed by the GNN. θ (a t |s t A multilayer perceptron is used to define the policy on the edges connecting compatible jobs and machines, for state s. t This set of edges is denoted as MJ. t Then choose edge e∈MJ t The probability of this edge connecting job j i and machine m k And the edges have characteristics Defined as:
[0039]
[0040]
[0041] Finally, for strategy π θ The loss function is calculated as follows:
[0042]
[0043] For π θ (s i ) is the probability distribution of all actions.
[0044] Furthermore, step 4 includes the following steps:
[0045] Create a dataset containing instances of varying sizes and solve them, while simultaneously saving the quality of the solutions over time. For each solution e∈S in the dataset... CP All will generate A sequence of solutions, where m is the number of solutions found for the instance. Indicates time t i The completion cycle of the i-th solution obtained above is used to obtain the variable to be predicted. Let's assume this is... The last cycle to complete makes t j ≤d nO *0.01, the variable to be predicted will be The minimum value of this variable is 0, indicating that the CP method achieves a short time d. nO * If no results are produced within 0.01, it indicates that the CP method is not suitable for this instance; a maximum value of 1 indicates that the CP method does not improve the value found in a short time, indicating that the solution found quickly is optimal or close to optimal.
[0046] Predictor variables are selected based on instance characteristics, and a traditional regression model is chosen.
[0047] Furthermore, step 5 includes the following steps:
[0048] By continuously assigning operations to the machine until the instance becomes simple enough; that is, until the model’s constraint programming ability predicts more than a constant.
[0049] The intelligent scheduling and automatic closed-loop control method for large-scale production workshop operations of the present invention has the following advantages:
[0050] 1. Enhance performance by combining the advantages of traditional and modern methods.
[0051] While deep reinforcement learning can achieve real-time solutions to the flexible job shop scheduling problem, the vast solution space makes finding the optimal solution computationally very complex. This complexity may prevent models from being trained on such instances, thus limiting their effectiveness. For smaller problem instances, exact methods such as constraint programming can provide near real-time optimal solutions, but reinforcement learning-based methods cannot effectively integrate this knowledge, missing a significant opportunity to enhance performance by combining the advantages of traditional and modern methods. Therefore, this invention integrates constraint programming into a deep learning framework, enabling the rapid generation of high-quality solutions in real-time scenarios. Compared to traditional exact or heuristic methods, this approach combining deep learning and constraint programming generates solutions in a shorter time, thereby improving productivity.
[0052] 2. Utilize the advantages of both methods
[0053] For models trained using behavior cloning, it can quickly assign operations, making it suitable for the initial operation assignment phase of complex instances. For constraint programming capability prediction, it can solve quickly and ensure solution quality when instances become sufficiently simple. It also predicts the applicability of constraint programming methods in real time, ensuring a timely switch to the latter. The proposed method can dynamically switch between behavior cloning models and constraint programming methods, balancing speed and solution quality. It leverages the advantages of behavior cloning models in the initial stage of complex instances and utilizes the advantages of constraint programming methods after instance simplification, obtaining superior solutions and significantly improving overall solution efficiency.
[0054] 3. Good scalability
[0055] The proposed hybrid approach is not only applicable to scheduling problems but also effectively applied to other combinatorial optimization problems, such as the Traveling Salesman Problem (TSP). By combining deep reinforcement learning-based policies with traditional optimization methods, the hybrid approach achieves superior results across various domains. It can handle instances of varying sizes and complexities, demonstrating good adaptability and scalability. Whether dealing with small-scale or large-scale instances, the hybrid approach effectively improves both solution efficiency and solution quality.
[0056] 4. Potential for a wide range of applications
[0057] Hybrid methods possess the potential to solve optimization problems across various fields, and can be applied to practical industrial, commercial, and scientific research scenarios, bringing significant value in improving efficiency, reducing costs, and optimizing resource allocation. With continuous technological advancements and methodological refinements, hybrid methods will play a crucial role in an even wider range of areas, providing innovative and feasible solutions to real-world problems. For example, in logistics and transportation management: combinatorial optimization problems frequently arise in the logistics and transportation field, such as the vehicle routing problem (VRP) and the container loading problem. Hybrid methods can be used to optimize transportation routes and maximize loading efficiency, thereby reducing transportation costs and improving logistics efficiency. Attached Figure Description
[0058] Figure 1 A diagram showing the components and their interactions during model training and real-world applications;
[0059] Figure 2 This is a flowchart of the model training phase;
[0060] Figure 3 This is a flowchart of the method application phase. Detailed Implementation
[0061] To better understand the purpose, structure, and function of this invention, the intelligent scheduling and automatic closed-loop control method for large-scale production workshop operations of this invention will be described in further detail below with reference to the accompanying drawings.
[0062] In view of the above problems, the subject of this invention is: (1) a deep learning model training method based on heterogeneous graph neural network is proposed, which uses the optimal solution generated by constraint programming for training; (2) a constraint programming real-time solution prediction capability predictor is designed; (3) a new method is introduced to combine deep learning method with constraint programming to generate a solution in real time for flexible job shop scheduling problem instances.
[0063] In the deep learning model training method based on heterogeneous graph neural networks of this invention, training data is first generated by solving a series of combinatorial optimization problems of controllable scale using constraint programming methods, and recording the state-action trajectory of the optimal solution. Next, feature extraction is performed, using a heterogeneous graph attention network to encode each state, obtaining a graph feature representation for each state. Finally, policy training is performed using a behavior cloning method to pair the graph features of the states with the corresponding optimal actions, training the policy network.
[0064] In the supervised learning method for the constraint programming capability predictor proposed in this invention, a dataset of flexible job shop scheduling problem instances of varying scales and complexities is first created. These instances differ in the number of machines, jobs, and operations, processing time, and the range of machines available for each operation. Then, the change in solution quality for each instance over time is recorded. Finally, the ability of the instance to be solved in real-time through constraint programming is evaluated based on the change in solution quality.
[0065] Therefore, during the inference process, when a new instance problem needs to be solved, a constraint programming capability predictor is applied to obtain a score ranging from 0 to 1, where 1 represents the confidence that the instance can be solved using constraint programming methods in real-time. If this confidence level is less than a set threshold, it is transformed into an instance heterogeneous graph, and a behavior cloning method is applied by assigning a machine to each process, thereby reducing the size and complexity of the problem. The constraint programming capability predictor is then applied again to calculate the score for the instance, and the above operation is repeated until the instance's score exceeds the threshold. At this point, constraint programming methods are applied to solve the remaining parts of the instance.
[0066] like Figure 1-3 As shown, the intelligent scheduling and automatic closed-loop control method for large-scale production workshop operations of the present invention includes the following steps:
[0067] Step 1: Model the problem as a Markov process
[0068] Step 1.1: Model the problem as a Markov process. The key difference between a Markov process and a Markov decision process is that a Markov decision process requires a reward function. Since behavior-cloning methods do not require this function, defining a Markov process only requires specifying a state space, an action space, and a transition function.
[0069] Step 1.2: State Space. A state space representation based on previously proposed heterogeneous graphs is adopted and extended. These graphs include different types of nodes, edge types, and features. At each step t, state S... t Defined as a heterogeneous graph G t =(V t E t ), where set V t It includes three types of nodes (operations, jobs, and machines), and E t It contains six types of edges, both directed and undirected. The edge features of the graph are as follows:
[0070] An undirected edge between an operation and a machine. This relationship represents the machine that can perform the operation. An undirected edge is represented by two directed edges between a machine and an operation, and vice versa. Information about this relationship, such as its processing time and other characteristics, is added to this undirected edge.
[0071] A directed edge between an operation and a task represents an operation that belongs to a task.
[0072] A directed edge between operations indicates that one operation immediately precedes another.
[0073] Directed edges between machines and jobs. Each job is associated with a machine capable of performing its first operation. If all operations have been performed, the node will not be connected to any machine. Similar to the edges between operations and machines, these edges also have characteristics, such as their processing time.
[0074] Tasks are interconnected because the status of a task and the operations it has not yet performed will affect the importance of completing other tasks.
[0075] The reason machines are interconnected is similar to that of tasks, because they regulate each other.
[0076] Step 1.3: Action Space. At each time step t, the action space A... t This corresponds to compatible jobs and machines. When selecting a job, the first operation of that job that has not yet been scheduled is chosen. This decision-making process can be modeled as an edge classification problem to determine the most suitable pairing.
[0077] Step 1.4: Transition Function. This solution is constructed by sequentially assigning jobs to machines. After an operation is assigned, it is removed, and the edges of the selected jobs are updated to reflect the next operation to be executed and the characteristics of all nodes.
[0078] Step 2: Extract features from heterogeneous graphs using graph neural networks
[0079] Taking the embedding of machine nodes as an example, the computation of other nodes is similar. A machine node is associated with all the operations it can process, with all other machine nodes, in order to share information about their respective states and establish priorities, and with jobs that can be immediately scheduled on the machine. Machine m k The initial representation is named Where d M This is the initial number of machine features. Similarly, for operation o... ij Its initial representation is An edge connecting two nodes is represented as... Where d OM This refers to the dimension of the features. The first step is to calculate the attention coefficients for the three relationships: the coefficient between the machine and the operation. ij The calculation is as follows:
[0080]
[0081] Where 'a' is the activation function (softmax), It is a learnable linear transformation, d′ MO It is the dimension of the embedded hidden space. The other two attention coefficients... (machine m) k and m k′ (coefficients between) and (machine m) k and homework j i The coefficients between them are calculated in a similar way.
[0082] After calculating the attention coefficient, machine m k The new embedding h′ mk The calculation is as follows:
[0083]
[0084] Among them JM mk It connects compatible operations with machines. k The set of edges, h ji It is homework j i Embedded, It is a feature of the edge connecting the two.
[0085] To enhance the ability of GNNs to capture more meaningful relationships between nodes, two strategies are employed: using multiple attention heads and increasing the number of layers. For the first approach, using multiple attention heads, assuming there are K attention heads, K distinct embeddings will be computed, denoted as... Where k = 1, 2, ..., K. Each attention head has its unique attention coefficients and corresponding linear transformations. These embeddings are then concatenated to obtain the final embedding, expressed as the formula:
[0086]
[0087] For the second method of increasing the number of layers, the entire process is repeated L times, each time using different learnable parameters. A sufficient number of layers can facilitate the propagation of information from nodes that are not directly connected. In each layer l, the embeddings computed in the previous layer l-1 are utilized, and the output of this layer is represented as...
[0088] Step 3: Train the policy model using the behavior cloning method
[0089] Training the model using the behavior cloning method requires generating a set of optimal solutions S. A set of instances that can be solved within 60 seconds using constraint programming is generated, and then trajectories of states and actions are constructed. A feasible assignment of machine operations is established. To achieve this, operations are first sorted by start time, then by end time. A series of states and operations are constructed according to this order. For each solution e∈S, a trajectory T is created. e ={(s1,a1),(s2,a2),...,(s |O| ,a |O| )}, where O is the set of operations for the instance being solved. The number of actions corresponds to the number of operations, which includes assigning operations to the machine. For all i = {1, 2, ..., |O|}, s i It is a heterogeneous graph, a i This is the operation to be taken. Finally, the dataset is defined as the union of all trajectories.
[0090] The set of trajectories constitutes the dataset used to train the model as a supervised learning model. In n e Perform this operation on each iteration, dividing the dataset into n parts for each iteration. b The next step is to define the loss function. KL divergence loss is chosen because it is more stable for policy distillation.
[0091] Finally, a policy π is generated using the embeddings computed by the GNN. θ (a t |s tA multilayer perceptron is used to define policies on the edges connecting compatible jobs and machines. For state s t This set of edges is denoted as MJ. t Then choose edge e∈MJ t The probability of this edge connecting job j i and machine m k And the edges have characteristics Defined as:
[0092]
[0093] Finally, for strategy π θ The loss function is calculated as follows:
[0094]
[0095] For π θ (s i ) is the probability distribution of all actions.
[0096] Step 4: Constraint Programming Real-Time Solving Capability Predictor
[0097] Because it requires assigning operations using a policy model trained with behavior clones until the instance becomes sufficiently simple, it necessitates the ability to predict when an instance is considered sufficiently simple for real-time resolution using constraint programming methods. To address this, the problem is defined as a supervised learning problem, and the resulting method is named the Constraint Programming Real-Time Solving Capability Predictor. There is no precise definition of "real-time" in existing literature; therefore, for the purposes of this invention, a method can be considered real-time if it can generate a solution for an instance with O operations within a few seconds |O|*om, where om is assumed to be close to 0. A value of 0.01 is assumed. This value allows the method to achieve execution times comparable to other deep reinforcement learning-based methods, aiming to balance speed and solution quality.
[0098] The first step in solving this problem is to create a dataset containing instances of varying sizes and solve them, while preserving how the quality of the solutions changes over time. These instances should vary not only in the number of machines, jobs, and operations, but also in the processing time and the range of machines available for the operations, thus ensuring dataset diversity. For each solution e∈S in the dataset... CP All will generate A sequence of solutions, where m is the number of solutions found for the instance. Indicates time t i The completion cycle of the i-th solution obtained above. This allows us to obtain the variable we want to predict. Suppose this is... The last cycle to complete makes tj ≤d nO *0.01, the variable to be predicted will be The minimum value of this variable is 0, indicating that the CP method achieves a short time d. nO * No results were produced within 0.01, indicating that the CP method is not suitable for this instance. A maximum value of 1 indicates that the CP method did not improve the value found within a short time, suggesting that the solution found quickly is optimal or close to optimal.
[0099] After establishing the predictor variables, the problem is structuring into a supervised learning regression problem, requiring the specification of a prediction algorithm and the identification of the predictor variables. This approach must be scale-independent, ensuring it remains effective regardless of the instance size, and efficient to avoid excessive computational overhead. To meet these criteria, predictor variables are selected based on instance characteristics, and a traditional regression model, such as gradient boosting regression, is chosen.
[0100] Step 5: Build a solution using behavior cloning and constraint programming.
[0101] Combining a policy model trained using behavior clones with constraint programming ability predictions yields better results than using either method alone. This is achieved by continuously assigning operations to the machine until the instances become sufficiently simple; that is, until the model's constraint programming ability predictions exceed a constant (let's say the model's prediction value exceeds 0.98).
[0102] It is understood that the present invention has been described through some embodiments, and those skilled in the art will recognize that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of the invention. Furthermore, under the teachings of the present invention, these features and embodiments can be modified to adapt to specific situations and materials without departing from the spirit and scope of the invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of the present invention.
Claims
1. A method for intelligent scheduling and automatic closed-loop control of operations in a large-scale production workshop, characterized in that, Includes the following steps: Step 1: Model the problem as a Markov process; Step 2: Extract features from heterogeneous graphs using graph neural networks; Step 3: Train the policy model using the behavior cloning method; Step 4: Constraint programming real-time solution capability predictor; Step 5: Use behavior cloning and constraint programming to build the solution together.
2. The intelligent scheduling and automatic closed-loop control method for large-scale production workshop operations according to claim 1, characterized in that, Step 1 includes the following steps: Step 1.1: Model the problem as a Markov process. Defining a Markov process only requires specifying a state space, an action space, and a transition function. Step 1.2: State Space: A state space representation based on previously proposed heterogeneous graphs is adopted and extended. These graphs include different types of nodes, edge types, and features. At each step t, the state S... t Defined as a heterogeneous graph G t =(V t E t ), where set V t It includes three types of nodes: operations, jobs, and machines, and E t The graph contains six types of edges, both directed and undirected, and the edge characteristics are as follows: An undirected edge between an operation and a machine represents the machine that can perform the operation. An undirected edge is represented by two directed edges between a machine and an operation, and vice versa. Information about this relationship is added to this undirected edge. A directed edge between an operation and a task represents an operation that belongs to a task; A directed edge between operations indicates that one operation follows immediately before another. The directed edges between machines and jobs, each job is associated with a machine that can execute its first operation. If all operations have been executed, the node will not be connected to any machine. Similar to the edges between operations and machines, this edge also has characteristics. Tasks are interconnected because the status of a task and the operations it has not yet performed will affect the importance of completing other tasks. The reason machines are interconnected is similar to that of tasks, because they regulate each other; Step 1.3: Action Space: At each time step t, the action space A t Corresponding to compatible jobs and machines, when selecting a job, the first operation of that job that has not yet been scheduled is selected. This decision-making process is modeled as an edge classification problem to determine the most suitable pairing. Step 1.4: Transfer Function: This solution is constructed by sequentially assigning jobs to machines. After an operation is assigned, it is removed, and the edges of the selected job are updated to reflect the next operation to be performed and the characteristics of all nodes.
3. The intelligent scheduling and automatic closed-loop control method for large-scale production workshop operations according to claim 1, characterized in that, Step 2 includes the following steps: Machine m k The initial representation is named Where d M This is the initial number of machine features, for operation o. ij Its initial representation is An edge connecting two nodes is represented as... Where d OM It's a feature dimension. The first step is to calculate the attention coefficients for the three relationships: the coefficient between the machine and the operation. ij The calculation is as follows: Where a is the activation function. It is a learnable linear transformation, d′ MO It is the dimension of the embedded hidden space, and the other two attention coefficients: machine m k and m k′ coefficients between and machine m k and homework j i coefficients between Calculate in the same way; After calculating the attention coefficient, machine m k The new embedding h′ mk The calculation is as follows: Among them JM mk It connects compatible operations with machines. k The set of edges, h ji It is homework j i Embedded, It is a feature of the edge connecting the two; To enhance the ability of GNNs to capture more meaningful relationships between nodes, two strategies are employed: using multiple attention heads and increasing the number of layers. For the first approach, using multiple attention heads, assuming there are K attention heads, K distinct embeddings will be computed, denoted as... Where k = 1, 2, ..., K, each attention head has its unique attention coefficients and corresponding linear transformations. These embeddings are then concatenated to obtain the final embedding, expressed as the formula: For the second method of increasing the number of layers, the entire process is repeated L times, each time using different learnable parameters. In each layer l, the embeddings computed in the previous layer l-1 are utilized, and the output of this layer is represented as...
4. The intelligent scheduling and automatic closed-loop control method for large-scale production workshop operations according to claim 1, characterized in that, Step 3 includes the following steps: Training a model using the behavior cloning method requires generating a set of optimal solutions S, a set of instances that can be solved within 60 seconds using constraint programming, then constructing trajectories of states and actions, and establishing feasible machine operation assignments. Operations are first sorted by start time, then by end time, and a series of states and operations are constructed according to this order. For each solution e∈S, a trajectory T is created. e ={(s1,a1),(s2,a2),...,(s |O| ,a |O| )}, where O is the set of operations for the instance being solved, the number of actions corresponds to the number of operations, actions include assigning operations to the machine, and for all i = {1, 2, ..., |O|}, s i It is a heterogeneous graph, a i The operations to be taken are as follows; ultimately, the dataset is defined as the union of all trajectories. The set of trajectories constitutes the dataset used to train the model as a supervised learning model, in n e Perform this operation on each iteration, dividing the dataset into n parts for each iteration. b The next step is to define the loss function, choosing to use KL divergence loss because this method is more stable for policy distillation. Finally, a policy π is generated using the embeddings computed by the GNN. θ (a t |s t A multilayer perceptron is used to define the policy on the edges connecting compatible jobs and machines, for state s. t This set of edges is denoted as MJ. t Then choose edge e∈MJ t The probability of this edge connecting job j i and machine m k And the edges have characteristics Defined as: Finally, for strategy π θ The loss function is calculated as follows: For π θ (s i ) is the probability distribution of all actions.
5. The intelligent scheduling and automatic closed-loop control method for large-scale production workshop operations according to claim 1, characterized in that, Step 4 includes the following steps: Create a dataset containing instances of varying sizes and solve them, while simultaneously saving the quality of the solutions over time. For each solution e∈S in the dataset... CP All will generate A sequence of solutions, where m is the number of solutions found for the instance. Indicates time t i The completion cycle of the i-th solution obtained above is used to obtain the variable to be predicted. Let's assume this is... The last cycle to complete makes t j ≤d nO *0.01, the variable to be predicted will be The minimum value of this variable is 0, indicating that the CP method achieves a short time d. nO * If no results are produced within 0.01, it indicates that the CP method is not suitable for this instance; a maximum value of 1 indicates that the CP method does not improve the value found in a short time, indicating that the solution found quickly is optimal or close to optimal. Predictor variables are selected based on instance characteristics, and a traditional regression model is chosen.
6. The intelligent scheduling and automatic closed-loop control method for large-scale production workshop operations according to claim 1, characterized in that, Step 5 includes the following steps: By continuously assigning operations to the machine until the instance becomes simple enough; that is, until the model’s constraint programming ability predicts more than a constant.
