A method and system for generating priority scheduling rules for a distributed job shop
The scheduling rule generation model constructed by deep reinforcement learning and graph neural networks solves the problem of insufficient self-learning and self-evolution capabilities in distributed job shop scheduling, realizes efficient and accurate scheduling rule generation, and improves production efficiency and adaptability.
Patent Information
- Application Number
- CN202310439782.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-20
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2043-04-20
AI Technical Summary
Existing technologies lack self-learning and self-evolution capabilities in distributed job shop scheduling, resulting in low adaptability and efficiency of scheduling rules, making it difficult to cope with complex and ever-changing production demands.
A scheduling rule generation model is constructed by combining deep reinforcement learning with graph neural networks. Features are extracted by Markov decision model and graph neural network, and a self-learning and self-evolving priority scheduling rule generation method is designed. The disjunctive graph is used to represent factory allocation and process sequencing, and a reward mechanism is combined to optimize scheduling decisions.
It improves the self-learning and self-evolution capabilities of scheduling rules, shortens the solution time, improves production efficiency, is applicable to different scheduling environments, and has high generalization and stability.
Smart Images

Figure CN116500986B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of job shop scheduling, and more particularly, to a priority dispatch rule generation method and system for distributed job shop. BACKGROUND
[0002] Production scheduling is an important part of manufacturing systems, directly affecting the efficiency and competitiveness of enterprises. Distributed manufacturing has become an important development direction of manufacturing industry, which has the advantages of flexibility, rapid response and high reliability, etc. It can meet the urgent production demand, promote customization, low cost and small batch production, and reduce the dependence of production on the environment. Distributed job shop scheduling problem (DJSP) is a typical representative of equipment manufacturing, which regards each factory as a job shop, and the processes of different workpieces may be different. It mainly includes two sub-problems: job shop allocation and scheduling of work processes on machines in each shop to meet different production demands, such as Figure 1 as shown.
[0003] Priority dispatch rule (PDR) is a classic heuristic method, which has been widely used in actual production. Compared with more accurate algorithms and meta-heuristic algorithms, PDR is intuitive, fast, easy to understand, and is widely used in various scheduling problems. For complex production scenarios lacking prior knowledge, the advantage of PDR is more obvious. A good PDR is based on rich domain knowledge, and is constantly improved in the process of trial and error. In addition, the performance of PDR is greatly affected by the problem size. Therefore, it is very important to design a general priority dispatch rule generation method with self-learning and self-evolution ability to solve complex and variable production scheduling problems.
[0004] Deep reinforcement learning (DRL) technology combines the perception ability of deep learning and the decision-making ability of reinforcement learning, which is a kind of artificial intelligence method closer to human thinking way. DRL has autonomy, can learn the best action selection, and make real-time response to the environment. In addition, it has strong generalization ability and fast solving speed, so it is very valuable to explore its application in the field of job shop scheduling.
[0005] Graph theory is widely used in job shop scheduling, and the disjunctive graph expression of the solution of the scheduling problem can clearly describe the constraint relationship between the processes of the same workpiece. In the field of deep learning, graph neural network (GNN) is a network structure that directly operates graph data, which has been successfully applied in decentralized wireless resource allocation, industrial equipment residual service life prediction, and voltage stability control in power systems. SUMMARY
[0006] In view of the above defects or improvement needs of the prior art, the present application provides a priority scheduling rule generation method and system for a distributed job shop, which aims to provide a priority scheduling rule generation method with self-learning and self-evolution capabilities and strong universality, and to realize priority scheduling rule generation for a distributed job shop.
[0007] To achieve the above-mentioned purpose, according to the first aspect of the present application, a priority scheduling rule generation method for a distributed job shop is provided, comprising the following steps:
[0008] A scheduling rule generation model is constructed for decision-making of the distributed job shop scheduling problem, wherein:
[0009] The distributed job shop scheduling problem is represented as a disjunctive graph: each factory corresponds to a sub-disjunctive graph, and the sub-disjunctive graphs of all factories are spliced to obtain a disjunctive graph that can represent factory allocation and process ordering within all factories, each node of the disjunctive graph includes factory information allocated;
[0010] The disjunctive graph is solved by a Markov decision model: the Markov decision model updates the disjunctive graph through multiple decisions, gradually perfecting all nodes in the disjunctive graph, thereby obtaining a final solution; during the decision-making process, the features of the disjunctive graph are extracted by a graph neural network, and action decisions are made by an actor network;
[0011] According to the pre-acquired data set, the constructed scheduling rule generation model is trained, and the parameters of the graph neural network and the actor network are iteratively updated to obtain a trained scheduling rule generation model;
[0012] The scheduling rule generation model is trained to realize the generation of scheduling rules for a distributed job shop.
[0013] As a further optimization, in the scheduling rule generation model, the factory allocation of each workpiece is first determined, and then the disjunctive graph is solved by the Markov decision model; the factory allocation method of the workpiece is:
[0014] The total processing time of each workpiece to complete all processes is calculated, and the workpieces are sorted in ascending order of total processing time; then the first f workpieces are sequentially placed in f factories, and f is the total number of factories;
[0015] For the rest of the workpieces, calculate the total processing time of all workpieces in the current factory, and assign the workpiece at the top of the current order to the factory with the smallest total processing time; repeat this process until the factory assignment of all workpieces is completed.
[0016] As a further preferred, the Markov decision model includes the state characteristics of each time in the decision process;
[0017] For any decision point t, the disjunctive graph at time t includes 5 features, and the 5 features constitute the state characteristics; the 5 features are specifically:
[0018] 1) Node v corresponds to the processing time p of process O ji ; ji ;
[0019] 2) Binary variable b(v,s t ); When the node v corresponds to the process O ji has completed scheduling at time t, b(v,s t ) = 1, otherwise b(v,s t ) = 0;
[0020] 3) Node v corresponds to the factory fac(v,s ji ) where the process O t is located; If the workpiece is assigned to factory k, then the factory characteristics of all processes of the workpiece at time t are represented as fac(v,s t ) = k;
[0021] 4) The estimated lower bound c ji (O LB ,s ji ) of the completion time of node v corresponding to process O t ;
[0022] When process O ji is the first process of workpiece J j , its estimated lower bound is equal to the release time of workpiece J j plus the processing time of process O ji ;
[0023] When process O ji is not the first process of workpiece J j , it is determined that if process O ji is completed at time t, its estimated lower bound of completion time is equal to its actual completion time; Otherwise, the estimated lower bound is calculated by c LB (O ji ,s t ) = c LB (O j,i-1 ,st )+p ji The calculation yields c. LB (O j,i-1 ,s t ) represents process O ji The lower bound of the estimated completion time of the previous process, p ji It is process O ji Processing time;
[0024] 5) Node v corresponds to process O ji The earliest release time est(O) ji ,s t );
[0025] In the initial state s0: when process O ji It is workpiece J j In the first process, its earliest release time is 0; when process O ji Not workpiece J j In the first process, its earliest release time is est(O ji ,s0)=est(O j,i-1 ,s0)+p j,i-1 , where est(O j,i-1 ,s0) represents process O ji The previous process O j,i-1 The earliest release time, p j,i-1 It is process O j,i-1 Processing time;
[0026] state s t When t≠0: When process O ji Once processing is complete, its earliest release time is 0; when process O... ji It was not processed and its preceding process O j,i-1 Once processing is complete, then process O... ji The earliest release time is equal to that of its preceding process O. j,i-1 Completion time; when process O ji It was not processed and its preceding process O j,i-1 If processing is not completed, the earliest release time is at process O. j,i-1 The earliest release time plus process O j,i-1 Processing time p j,i-1 .
[0027] As a further optimization, the Markov decision model also includes actions, state transitions, and rewards at each step of the decision-making process; specifically:
[0028] Action: Action space A of decision point t t It is the set of the next steps for all unfinished workpieces;
[0029] State transition: insert the selected action into a feasible position so that the earliest start processing time of the process is minimized;
[0030] Reward: at decision point t, if action a t is selected, the current reward is R(s t ,a t )=C k (s t )-C k (s t+1 ), where R(s t ,a t ) is the reward value obtained by selecting action a t in state s t , C k (s t ) is the maximum completion time of factory k at time t, and C k (s t+1 ) is the maximum completion time of factory k at time t+1 after action a t is taken.
[0031] As a further preferred, the five feature combinations are as follows:
[0032] Each feature matrix has a size of [n, m], which is rewritten as a one-dimensional matrix with a size of [n x m, 1], n is the total number of workpieces, and m is the total number of processes for each workpiece; the one-dimensional matrices corresponding to the five features are spliced into a matrix of [n x m, 5], and then the matrix is normalized to obtain the state features.
[0033] As a further preferred, in the decision-making process, the features of the implication graph are extracted by a graph neural network and input into the actor network, and then the actor network scores each action, and based on the score, the probability of each action being selected is calculated by a softmax function, and the action with the maximum selection probability is output.
[0034] As a further preferred, the scheduling rule generation model is trained by an Adam optimizer.
[0035] As a further preferred, when training the scheduling rule generation model, the network loss function is calculated by an asynchronous advantage actor-critic network, the learning rate is dynamically adjusted by an Adam optimizer, and the parameters of the graph neural network and the actor network are updated.
[0036] According to the second aspect of the present application, a priority scheduling rule generation system for a distributed job shop is provided, which comprises a processor for executing the priority scheduling rule generation method for the distributed job shop.
[0037] According to a third aspect of the present application, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the above method for generating priority scheduling rules of a distributed job shop.
[0038] Overall, compared with the prior art, the above technical solutions conceived by the present application mainly have the following technical advantages:
[0039] 1. According to the characteristics of the distributed job shop, the present application designs a representation method of the resolution graph, and further establishes the connection between the resolution graph representation of the distributed job shop scheduling problem and the graph neural network, thereby constructing a scheduling rule generation model, which can make real-time scheduling decisions by observing the current scheduling environment, providing a new perspective for solving scheduling problems; at the same time, the solving time is shortened, the solution quality is improved, and the enterprise production efficiency is significantly improved.
[0040] 2. Compared with the existing priority scheduling rule method, the present application has strong self-learning and self-evolution ability, and is more efficient and has stronger optimization; compared with the existing meta-heuristic algorithm, the present application is simple and easy to understand, has strong generalization and stability, and can be applied to different scheduling environments.
[0041] 3. The present application designs a factory allocation rule to pre-allocate workpieces to factories, and further designs the state characteristics and reward mechanism in the Markov decision model according to the characteristics of the distributed problem, to realize efficient and accurate generation of the priority scheduling rules of the distributed job shop. BRIEF DESCRIPTION OF DRAWINGS
[0042] Figure 1 Fig. 1 is a schematic diagram of factory allocation in a distributed job shop according to an embodiment of the present application;
[0043] Figure 2 Fig. 2 is a resolution graph of a solution of a distributed job shop according to an embodiment of the present application;
[0044] Figure 3 Fig. 3 is a schematic diagram of the action space in a Markov decision model according to an embodiment of the present application;
[0045] Figure 4 Fig. 4 is a schematic diagram of state transition in a Markov decision model according to an embodiment of the present application;
[0046] Figure 5 Fig. 5 is a comparison result diagram of a TA data set with two factories according to an embodiment of the present application, a classical scheduling rule, a meta-heuristic algorithm, and a reinforcement learning algorithm;
[0047] Figure 6Figs. (a)-(c) are respectively comparative result graphs of the embodiment of the present application on the TA data set with the number of jobs being 3 and the classic scheduling rule, the meta-heuristic algorithm and the reinforcement learning algorithm;
[0048] Figure 7 Figs. (a)-(c) are respectively comparative result graphs of the embodiment of the present application on the TA data set with the number of jobs being 4 and the classic scheduling rule, the meta-heuristic algorithm and the reinforcement learning algorithm;
[0049] Figure 8 Fig. 4 is a flow chart of a priority scheduling rule generation method for a distributed job shop according to an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application. In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.
[0051] The priority scheduling rule generation method for a distributed job shop provided by the embodiment of the present application, as shown in Fig. 1, comprises the following steps: Figure 8
[0052] S1, a scheduling rule generation model is constructed for decision-making of a distributed job shop scheduling problem; in the scheduling rule generation model, the distributed job shop scheduling problem is represented as a disjunctive graph, and the disjunctive graph is solved through a Markov decision model; specifically comprising:
[0053] (1) solution representation method
[0054] In the job shop scheduling problem, the disjunctive graph is a classical solution representation method. The disjunctive graph is a directed graph G=(V,C∪D), wherein V is a node set, the set V contains job process nodes and two empty nodes {S,T}, the processing time of the empty nodes is 0, and all processing tasks start from the node S and end at the node T. C is a connection arc set, representing the priority constraint relationship between the processes of the same job. D is a disjunctive arc set, representing the sequence of the processes processed on the same machine.
[0055] For DJSP, the present application proposes a spliced disjunctive graph representation method, wherein each node contains not only basic node information such as the processing time of the node corresponding process and the earliest start processing time, but also an additional information, i.e., the processing factory of each process. The factory allocation information in the disjunctive graph can reflect the factory allocation scheme of the DJSP.
[0056] For example, in an instance with 2 factories and 6 workpieces, the workpiece processing information is shown in Table 1, and the disjunctive graph representation of the initial information is as follows: Figure 2 (a) Figure 2 In diagram (b), a feasible solution is shown. Workpieces 1, 2, and 3 are processed in factory 1 (the first three rows), and workpieces 4, 5, and 6 are processed in factory 2 (the last three rows). The processing sequence of operations on the same machine is indicated by dashed arrows of the same color, such as operation O. 11 O 22 and O 31 Process sequentially on machine M2, with the process priority of the same workpiece marked by a black arrow.
[0057] Table 1. Processing time and machine information for each process.
[0058]
[0059] (2) Factory allocation rules
[0060] The factory allocation rule is used to solve the first subproblem in DJSP—workshop allocation of jobs. First, all jobs are sorted in ascending order of their total processing time. Then, the first f jobs (where f is the total number of factories) are placed into the f factories in sequence. For the remaining jobs, the total processing time of all jobs in each factory is calculated, and the job with the highest current processing time is assigned to the factory with the shortest total processing time. This process is repeated until all jobs are allocated to factories.
[0061] (3) Markov decision model
[0062] DJSP is a sequential decision problem that can be constructed as a Markov decision process. A Markov decision process can be represented by a quintuple (S, A, P, γ, R), where S is the set of states, A is the set of actions, P is a dynamic model, γ is a discount factor with a value between 0 and 1, and R is the reward function.
[0063] At any decision point t, the agent observes the current environmental state s. t ∈S, choose an action a using the given strategy π(S→A). t ∈A, the agent has probability p(s) t+1 |s t ,a t Entering a new state t+1 And receive a real-time reward r t ∈R.
[0064] This invention uses a disjunctive graph approach to represent the solution of DJSP, and its Markov model is established as follows:
[0065] State: the disjunctive graph G(t) = (V, C U D c (t), D u (t)) at any decision point t reflects the state of the current solution. D c (t) contains disjunctive arcs with directions, D u (t) contains disjunctive arcs without directions, D c (t) U D u (t) = D. When the DJSP is in the initial state, D c (t) = φ; when the DJSP has finished scheduling, D u (t) = φ; and the set V contains all the processing operations.
[0066] Any node v in the set V contains the following five features:
[0067] 1) the processing time p ji of the operation O ji corresponding to the node v;
[0068] 2) the binary variable b(v, s t ); when the operation O ji corresponding to the node v has finished scheduling at time t, b(v, s t ) = 1, otherwise b(v, s t ) = 0;
[0069] 3) the factory fac(v, s ji ) in which the operation O t corresponding to the node v is located; if the job J j is assigned to the factory k, then the factory feature of all the operations of the job J t at time t is represented as fac(v, s ji ) = k, k e [1, f];
[0070] 4) the lower bound c LB (v, s t ) of the completion time of the operation O ji corresponding to the node v;
[0071] When i = 1, i.e., the operation O j is the first operation of the job J j , its lower bound is equal to the release time of the job J ji plus the processing time of the operation O ji ;
[0072] When i ≠ 1, i.e., the operation O j is not the first operation of the job J jiIf the processing is completed, then the estimated lower bound of its completion time is equal to its actual completion time; otherwise, this lower bound is determined by formula c. LB (O ji ,s t ) = c LB (O j,i-1 ,s t )+p ji The calculation yields , where is O. j,i-1 For process O ji The previous process, p ji It is process O ji Processing time;
[0073] 5) Node v corresponds to process O ji The earliest release time est(O) ji ,s t );
[0074] In the initial state s0, when i = 1, that is, in process O ji It is workpiece J j In the first process, its earliest release time is 0, i.e., est(O j1 ,s0)=0; when i≠1, i.e., process O ji Not workpiece J j In the first process, its initial release time is est(O ji ,s0)=est(O j,i-1 ,s0)+p j,i-1 process O j,i-1 It is process O ji The previous process, p j,i-1 It is process O j,i-1 Processing time;
[0075] state s t When (t≠0), if process O ji Once processing is complete, its earliest release time is set to 0, i.e., est(O ji ,s t ) = 0; when process O ji It was not processed and its preceding process O j,i-1 Once processing is complete, then process O... ji The earliest release time is equal to that of its preceding process O. j,i-1 The completion time, i.e., est(O ji ,s t ) = c LB (O j,i-1 ,s t Otherwise, if process O ji The previous process O j,i-1 If processing is not completed, the earliest release time is at process O.j,i-1 The earliest release time plus process O j,i-1 Processing time p j,i-1 , i.e., est(O ji ,s t ) = est(O j,i-1 ,s t )+p j,i-1 .
[0076] Using the above five features to represent the state of a DJSP at any given time, we can obtain five matrices of size [n, m]. These can be written as one-dimensional matrices of size [n×m, 1], and then concatenated to form a feature matrix of size [n×m, 5]. Simultaneously, a normalization formula is applied... Normalization is performed to obtain the state characteristics.
[0077] Actions: A DJSP problem with n jobs and m operations per job contains n×m operations. At each decision point, the agent chooses one operation. According to the definition of the DJSP problem, at any given time, each job can only complete one operation. Therefore, the action space A at time t is... t It is a collection of the next steps for all unfinished workpieces; as the workpieces are gradually completed, the operational space gradually decreases. For example... Figure 3 As shown in (a), process O 11 O 21 and O 31 It has already been scheduled, therefore the action space is {O} 12 O 22 O 32 O 41 O 51 O 61};like Figure 3 As shown in (b), when process O 22 If selected and scheduled, the action space becomes {O}. 12 O 23 O 32 O 41 O 51 O 61};like Figure 3 As shown in (c), if process O 23 If scheduled, the action space becomes {O}. 12 O 32 O 41 O 51 O 61}, and the size of the action space is reduced by one.
[0078] State transition: When an agent selects an action, it needs to determine its earliest start time to minimize the completion time of the current process. For example... Figure 4 As shown, process O is circled with a solid line. 11 O 21 and O 31 The scheduling has been completed; the remaining unscheduled processes are circled with dashed lines. For example... Figure 4 As shown in (a), in state s3, action a3 = 0 22 Removed from state space {O 12 O 22 O 32 O 41 O 51 O 61 Selected from}. Process O 22 The earliest start time for processing is 3, that is, process O. 21 The completion time, on machine M2, when process O 22 Earlier than process O 31 During processing, if the start time of processing is the shortest, then the state of the disjunction diagram will change from... Figure 4 The diagram shown in (a) becomes Figure 4 In section (b), process O 31 The start time has been changed from 2 to 6.
[0079] Reward: The reward is a feedback signal from the environment, indicating the quality of the decision made by the agent at the current decision point. The goal of reinforcement learning is to maximize the agent's current reward and the expected cumulative reward. The reward function at time t is defined as R(s). t ,a t )=H(s t )-H(s t+1 H(·) represents the quality assessment under different states. In this invention, the maximum completion time of a DJSP directly reflects the efficiency of workshop production. Considering the distributed nature of DJSP, a reward function based on the maximum completion time of each factory is designed. The maximum completion time of each factory is equal to the maximum completion time of all processes within that factory, i.e., Cmax. k =max(C LB (O ji )|fac(O ji ()=k),k∈[1,f]. When all processes are scheduled, the maximum completion time is C. max =max(C k At decision point t, if action a t The corresponding process is in factory k, then H(s) t ) = C k (s t The reward function of this invention is R(s).t ,a t ) = C k (s t )-C k (s t+1 As can be seen from the reward function, maximizing the cumulative reward is equivalent to minimizing the maximum completion time.
[0080] (4) GNN-based strategy
[0081] Traditional PDR (Programmable Deployment Redirection) selects a process for scheduling with probability 1 at each step. This invention designs a GNN-based policy π(a) t |s t The policy outputs a probability distribution based on the action space. To optimize this policy, the policy parameters θ need to be determined through training to obtain a policy π with optimal parameters. θ (a t |s t ).
[0082] Graph embedding: Embedding is a compressed representation of information. This invention employs a Graph Isomorphism Network (GIN) to extract features from the disjunctive graph. Given a graph G = (V, C∪D), after K iterations, GIN computes a p-dimensional embedding information vector for all nodes in set V. The update formula for the node information in GIN is as follows: in, It is the compressed information of node v after k iterations. These are the original features of node v. The network parameters obtained in the k-th iteration are θ k Multilayer perceptron network, ∈ (k) It is a learnable parameter, and N(v) is the neighborhood of node v.
[0083] Information aggregation: An average pooling function is used to aggregate the node information after K iterations, expressed as follows: When the state is s t At that time, any process O ji (O ji The initial feature of (∈V) is a 5-dimensional vector. in, and These are the process Os obtained according to the normalization formula. ji The normalized values of the five features. After K iterations, process O ji The features are expressed as The global graph embedding information h can be obtained from the average pooling function. g (st )。
[0084] Action selection: The action space is a set consisting of all unfinished machining workpieces' current processes. The present application adopts an actor network composed of two layers of multilayer perceptron to calculate the probability distribution of the action space. The integrated node embedding information and global embedding information are input into the actor network, the actor network scores each action, and the probability of each action being selected is calculated by the softmax function, and the action with the maximum selection probability is output.
[0085] Reinforcement learning method: Actor-Critic Network is a very effective reinforcement learning method, which combines policy gradient and temporal difference learning. The actor network is a policy function, which learns a policy to make the agent obtain as high a reward as possible from the environment. The critic network is a value function, which is used to evaluate the strategy of the current policy. Based on the value function, the Actor-Critic Network updates the network parameters once every step. The present application adopts Asynchronous Advantage Actor-Critic (A3C) to realize the self-learning of the strategy, thereby updating the network parameters.
[0086] S2, according to the pre-acquired data set, training the constructed scheduling rule generation model to obtain a trained scheduling rule generation model; specifically comprising:
[0087] (5) Model training
[0088] The Adam optimizer is used to train the scheduling rule generation model.
[0089] For different scales of DJSP, the model is trained respectively, and each scale of problem is iterated 1000 times, and the model is updated once every iteration. Every 10 iterations, the model is verified on 50 fixed test cases designed in advance, and if the current model optimizes the average value of 50 test cases, the current model is saved.
[0090] (6) Model effect verification
[0091] The saved model can be directly used for solving the DJSP problem, and the real-time scheduling requirement is achieved.
[0092] In order to verify the practical application effect of the present application, the TA standard test set is selected for simulation test, and is compared with 8 kinds of classic PDR, 5 kinds of meta-heuristic algorithms and 3 kinds of RL algorithms.
[0093] Figures 5 to 7 The comparison results of the present application and other algorithms when solving the TA data set with the number of plants being 2, 3 and 4 are shown in the figure. It can be seen from the results in the figure that the PDR generation method based on GNN and RL proposed by the present application can solve DJSP problems of different scales, and has great advantages compared with traditional PDR, meta-heuristic algorithms and related RL algorithms.
[0094] In addition to designing experiments to verify the effectiveness of the present application, the model trained by solving problems of different scales is used to solve large-scale problems, and the generalization of the present application is verified. The experimental results are shown in Table 2. It can be seen from the data in the table that the objective function values obtained by different models for the same problem are not much different, which shows that the present application has strong generalization.
[0095] Table 2 Model generalization verification data
[0096]
[0097] Figures 5 to 7 The reaction variable is the relative percentage increase (RPI), and its calculation formula is Method sol is the maximum completion time of the current example calculated by the algorithm Method, and Best sol is the optimal value of the maximum completion time of the current example calculated by all comparison algorithms.
[0098] Those skilled in the art can easily understand that the above description is only a preferred embodiment of the present application, and is not intended to limit the present application. Any modification, equivalent replacement and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for generating priority scheduling rules in a distributed job shop, characterized in that, The method comprises the following steps: A scheduling rule generation model is constructed for decision-making of a distributed job shop scheduling problem, wherein: First, the factory allocation of each workpiece is determined, and the method for allocating the factory of the workpiece is as follows: the total processing time of each workpiece for completing all processes is calculated respectively, and each workpiece is sorted in ascending order of the total processing time; then the first workpiece is put into the first factory, the second workpiece is put into the second factory, and so on, wherein the total number of factories is . . For the remaining workpieces, the total processing time of all workpieces in the current factory is calculated, and the workpiece with the highest priority in the current sorting is allocated to the factory with the smallest total processing time; this process is repeated until the factory allocation of all workpieces is completed. The distributed job shop scheduling problem is represented as an OR graph: each factory corresponds to a sub-OR graph, and the sub-OR graphs of all factories are spliced to obtain an OR graph that can represent factory allocation and process sequencing in all factories, each node of the OR graph including factory allocation information; The OR graph is solved by a Markov decision model: the Markov decision model updates the OR graph through multiple decisions to gradually improve all nodes in the OR graph, thereby obtaining a final solution; during the decision-making process, the features of the OR graph are extracted by a graph neural network, and action decisions are made by an actor network; The constructed scheduling rule generation model is trained according to a pre-acquired data set, and the parameters of the graph neural network and the actor network are iteratively updated to obtain a trained scheduling rule generation model; The scheduling rule generation model is trained by the trained scheduling rule generation model to generate scheduling rules for a distributed job shop; The Markov decision model includes state features, actions, state transitions, and rewards at each time during the decision-making process, and specifically includes: State feature: for any decision point The disjunction graph of time instants, wherein the nodes include 5 features, and the 5 features constitute a state feature; the 5 features are specifically: 1) node corresponding procedure processing time ; 2) binary variable ; when the node corresponding procedure in the moment the schedule has been completed, , otherwise ; 3) Nodes Corresponding process The factory where If the workpiece is assigned to the factory In the middle, all processes of the workpiece are in The factory characteristics at each moment are all represented as ; 4) node corresponding procedure estimated lower bound of the completion time ; When the process is the first process of the workpiece , the lower bound is estimated to be equal to the release time of the workpiece plus the processing time of the process ; When the process is not the first process of the workpiece , it is determined that if the process is completed at the time , the lower bound is equal to its actual completion time; otherwise, the lower bound is calculated by , wherein is the lower bound of the completion time of the previous process of the process , and is the processing time of the process . 5) node corresponding procedure earliest release time ; initial state Time: When the process It is a workpiece The earliest release time in the first process =0; when the process is Not a workpiece In the first process, its earliest release time is ,in For process Previous process The earliest release time, It is a process Processing time; Status Time, when the process is finished, the earliest release time is 0; when the process is not finished and its previous process is finished, the earliest release time of the process is equal to the finish time of its previous process ; when the process is not finished and its previous process is not finished, the earliest release time is the earliest release time of the process plus the processing time of the process ; Action: Decision Point of the action space a set of next processes for all unfinished workpieces; State transition: the selected action is inserted into a feasible position to minimize the earliest start processing time of the process; Reward: at the decision point If the action The corresponding process is in the factory. If the result is correct, the current reward is... ,in It is a state Select action below The reward value obtained, yes Time Factory Maximum completion time It is to take action back Factory of Time Maximum completion time.
2. The method for generating priority scheduling rules for a distributed job shop of claim 1, wherein, The five feature combinations are as follows: Each feature matrix has a size of The feature matrix is rewritten as a one-dimensional matrix with a size of is the total number of workpieces, is the total number of processes for each workpiece; five one-dimensional matrices corresponding to five features are spliced into a matrix, and the matrix is normalized to obtain the state features. 3. The method for generating priority scheduling rules for a distributed job shop of claim 1, wherein, During the decision-making process, the features of the OR graph are extracted by a graph neural network and input into an actor network, and then the actor network scores each action, and based on the score, the probability of selection of each action is calculated by a softmax function, and the action with the maximum selection probability is output.
4. The method of claim 1-3, wherein, The scheduling rule generation model is trained by an Adam optimizer.
5. The method for generating priority scheduling rules for a distributed job shop of claim 4, wherein, When training the scheduling rule generation model, the network loss function is calculated by an asynchronous advantage actor-critic network, the learning rate is dynamically adjusted by an Adam optimizer, and the parameters of the graph neural network and the actor network are updated.
6. A distributed job shop priority scheduling rule generation system, characterized by, The computer program is executed by a processor to implement the priority scheduling rule generation method for a distributed job shop according to any one of claims 1-5.
7. A computer-readable storage medium having stored thereon a computer program, characterized in that The computer program is executed by a processor to implement the priority scheduling rule generation method for a distributed job shop according to any one of claims 1-5.
Citation Information
Patent Citations
Energy-saving workshop scheduling system for distributed heterogeneous factories
CN113344383A
Multi-task edge calculation scheduling optimization method based on graph attention network
CN113946423A
Job-shop scheduling method based on graph neural network
CN114757512A