A flexible job shop dynamic scheduling method based on deep reinforcement learning

Through deep reinforcement learning and multi-agent methods, a flexible workshop job scheduling model is constructed, which solves the problems of real-time multi-objective optimization and insufficient generalization in the existing technology, and achieves efficient production scheduling in a dynamically changing environment.

CN117892969BActive Publication Date: 2024-10-29HENAN UNIV OF SCI & TECH
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202410075997.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-18
Publication Date
2024-10-29
Estimated Expiration
2044-01-18

AI Technical Summary

Technical Problem

Existing technology is difficult to achieve real-time multi-objective optimization in flexible workshop job scheduling, and relies on scheduling rules, resulting in a lack of generalization and inability to effectively respond to dynamic changes and real-time needs.

Method used

Using a multi-agent method based on deep reinforcement learning, through the Markov decision-making process and heterogeneous graph network, a multi-objective model and scheduling state are constructed to realize the collaboration between high-level agents and low-level agents, and dynamically adjust production tasks and resource allocation. Optimize job scheduling.

Benefits of technology

It realizes real-time multi-objective optimization in a dynamically changing environment, improves production efficiency and reduces costs, solves the problem of insufficient generalization caused by dependence on scheduling rules, and improves the quality of scheduling decisions and system robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117892969B_ABST
    Figure CN117892969B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for dynamic scheduling of flexible workshop operations based on deep reinforcement learning, which belongs to the field of dynamic scheduling of workshop operations. The method includes taking the minimization of the total delay time of the operation, the minimization of the maximum completion time of the operation and the maximization of the average machine utilization rate as the optimization objectives to obtain a multi-objective model; using a disjunctive graph model to abstract the dynamic workshop scheduling problem to obtain a scheduling state; according to the scheduling state and the multi-objective model, taking the optimization objective as a high-level intelligent agent, taking the operation and the machine as a low-level intelligent agent, and using a Markov decision process to obtain a job scheduling model; obtaining a new job set, and according to the new job set, using the job scheduling model, obtaining a scheduling schedule to complete the dynamic scheduling of flexible workshop operations. The present invention solves the problem of relying on scheduling rules and lack of generalization in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of dynamic scheduling of workshop operations, and in particular relates to a flexible dynamic scheduling method for workshop operations based on deep reinforcement learning. Background Art

[0002] In modern discrete customized manufacturing, random events and changes such as random arrival of jobs, machine failures, order cancellations or modifications occur frequently. Manufacturing processes are becoming more and more sophisticated, and there are conflicting situations between different goals, which need to be optimized simultaneously. Therefore, the difficulty and complexity of workshop scheduling have also increased. Traditional workshop scheduling methods can no longer meet the needs of modern manufacturing. In addition, the allocation of production tasks and production resources also needs to be flexibly adjusted according to real-time needs.

[0003] For multi-objective dynamic flexible job shop scheduling (MODFJSP), domestic and foreign scholars have proposed various methods to solve this problem, including scheduling rules, genetic algorithms, particle swarm optimization algorithms, simulated annealing algorithms, etc. Although the well-designed scheduling rules are suitable for dealing with dynamic large-scale problems in intelligent manufacturing, the quality of solutions generated by these rules is still not optimal. In addition, designing appropriate priority scheduling rules requires a lot of expert experience. In contrast, the use of swarm intelligence algorithms can explore the solution space through a complex search process to find high-quality solutions. However, when the problem scale changes, the swarm intelligence algorithm needs to be re-iterated to find the optimal solution, which is not suitable for real-time scheduling. Therefore, when solving problems in practice, it is necessary to carefully weigh the advantages and disadvantages of swarm intelligence algorithms.

[0004] Current research work can be divided into two categories: one is to use heuristic algorithms to explore possible solutions through a complex search process; the other is to tend to apply reinforcement learning algorithms to select appropriate scheduling rules to achieve scheduling optimization. However, heuristic algorithms need to be iterated again when the problem scale changes, which wastes a lot of computing resources and is not suitable for real-time scheduling. The design of scheduling rules relies too much on expert experience and the choices are quite limited, resulting in many possible high-quality scheduling solutions being ignored, and both methods are mostly aimed at single-objective problems.

[0005] Deep reinforcement learning is an artificial intelligence-based learning method that combines deep learning and reinforcement learning techniques and has made great progress in solving combinatorial optimization problems. For the problem of flexible job shop scheduling, deep reinforcement learning methods train intelligent scheduling agents to enable them to observe the state from the environment and make decisions. The core idea of ​​this method is to optimize the scheduling strategy through interaction with the environment to minimize multiple preset optimization objectives. By applying deep reinforcement learning methods, the manufacturing industry can achieve real-time scheduling and operate while optimizing multiple objectives at the same time. Therefore, in order to adapt to real-time changes such as random arrival of jobs, machine failures, and order cancellations or modifications, as well as to flexibly adjust production tasks and resource allocation as needed, there is an urgent need for a real-time multi-objective real-time rescheduling method that can achieve both time efficiency and solution quality. Summary of the invention

[0006] In view of the above-mentioned deficiencies in the prior art, the present invention provides a flexible workshop operation dynamic scheduling method based on deep reinforcement learning, which solves the problem of the prior art relying on scheduling rules and lacking generalization.

[0007] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is: a flexible workshop operation dynamic scheduling method based on deep reinforcement learning, comprising the following steps:

[0008] S1, taking minimization of total delay time, minimization of maximum completion time and maximization of average machine utilization as optimization objectives, a multi-objective model is obtained;

[0009] S2, abstract the dynamic job shop scheduling problem using the disjunctive graph model to obtain the scheduling status;

[0010] S3. Based on the scheduling status and multi-objective model, the optimization target is used as the high-level intelligent agent, and the job and machine are used as the low-level intelligent agents. The Markov decision process is used to obtain the job scheduling model.

[0011] S4. Obtain a new job set, and based on the new job set, use the job scheduling model to obtain a scheduling schedule to complete the dynamic scheduling of flexible workshop jobs.

[0012] The beneficial effects of the present invention are as follows: This method is based on hierarchical multi-agent deep reinforcement learning and local search, and utilizes hierarchical multi-agent deep reinforcement learning methods to make optimal decisions in dynamic flexible workshop job scheduling; This method allows flexible selection of optimization targets according to demand, and achieves real-time optimization of targets through collaboration between agents. At the same time, through deep reinforcement learning technology, the agent can observe the state from the environment and learn the best decision-making strategy to improve production efficiency and reduce costs. Local search technology can further optimize existing scheduling solutions and improve the quality of solutions. This method improves production efficiency and reduces costs while meeting dynamically changing market demands, and solves the challenge of relying on scheduling rules and lack of generalization in the prior art.

[0013] Furthermore, the expression of the multi-objective model in step S1 is:

[0014]

[0015] Among them, MODFJSP is a multi-objective model; Minimize is the minimization function; Total tard is the total delay time of the job; i is the job number; n is the number of jobs; max is the maximization function; The time to complete all operations for the i-th job; n i is the total number of operations of the ith job; D i is the job overtime time of the i-th job; Makespan is the maximum completion time of all operations of the i-th job; U ave is the average machine utilization rate; m is the number of machines; k is the machine number; j is the operation number of the i-th job; t ijk is the processing time of the jth operation of the i-th job on the k-th machine; X ijk It is an identifier of whether the jth operation of the ith job can be performed on the kth machine. If yes, it is 1, otherwise, it is 0; time is the current time of the environment.

[0016] The beneficial effect of the above further scheme is: to describe the flexible workshop job scheduling problem under various resource constraints through mathematical modeling, so as to optimize the job processing sequence and maximize the production efficiency.

[0017] Furthermore, the expression of the scheduling state in step S2 is:

[0018] G=(N,M,C,ε0,g)

[0019]

[0020] Among them, G is the scheduling state; N is the operation node; M is the machine node; C is the directed arc; ε0 is the undirected arc; g is the optimization target node; O ij is the jth operation of the ith job; i is the job number; j is the operation number of the ith job; Start is the virtual start node with a processing time of zero; End is the end node.

[0021] The beneficial effect of the above further solution is that the scheduling state clearly shows the complex relationship between various tasks and resources in the production workshop in a graphical way, and intuitively presents the temporal relationship of tasks, resource availability and other important constraints through the representation of nodes and edges. This graphical modeling makes the problem more specific and easy to understand, which is conducive to the formal description and visual analysis of the problem.

[0022] Furthermore, the step S3 is specifically as follows:

[0023] S301, obtaining instance data;

[0024] S302. According to the instance data, scheduling status and multi-objective model, the optimization target is used as the high-level agent, and the job and machine are used as the low-level agent. The high-level agent and the low-level agent are trained using the Markov decision process to obtain a job scheduling model.

[0025] The beneficial effects of the above further scheme are: this method has the advantages of hierarchical optimization, comprehensive consideration of multiple objectives, strong learning and adaptability, and optimization of the decision-making process, which enables the model to more effectively cope with complex job scheduling problems, improve the robustness and performance of the system, and gradually improve the decision-making strategy through the learning and optimization process to achieve more intelligent and flexible production scheduling.

[0026] Furthermore, the step S302 is specifically as follows:

[0027] S3021, sampling the instance data to obtain sampled data;

[0028] S3022, taking the optimization target as the high-level agent and the tasks and machines as the low-level agents;

[0029] S3023, according to the high-level intelligent agent and the low-level intelligent agent, target selection is performed based on the scheduling state and the multi-objective model to obtain the target to be optimized;

[0030] S3024, using the scheduling state, performing operation and machine pair selection to obtain an operation machine pair;

[0031] S3025. Update the start time and end time of the operation in the operating machine pair using a local search method according to the operating machine pair;

[0032] S3026, updating the state of the high-level agent and the state of the low-level agent respectively according to the target to be optimized, the operating machine pair, and the start time and end time of the operation in the operating machine pair;

[0033] S3027. Calculate rewards according to the target to be optimized;

[0034] S3028, determine whether all operations that need to be processed in the sampled data have been scheduled and arranged on the corresponding machines. If so, directly go to step S3029, otherwise, return to step S3023;

[0035] S3029. According to the reward, the state of the high-level agent and the state of the low-level agent, the proximal strategy optimization algorithm is used to update the network parameters of the high-level agent and the network parameters of the low-level agent; the expressions of the loss function of the policy network and the loss function of the critic network in the proximal strategy optimization algorithm are respectively:

[0036]

[0037] L critic =(r t +v(s t+1 )-v(s t )) 2

[0038]

[0039]

[0040] Among them, L policy is the loss function of the policy network; min{·} is the minimization function; is the probability ratio; is the advantage function at time t; t is the time; clip(·) is the clipping function; ε is the clipping parameter; L critic is the loss function of the critic network; r t is the reward; v(·) is the output function of the critic network; s t+1 is the new state of the agent; s t is the state of the agent at time t; π(·) is the new strategy; a t is the action of the agent at time t; θ is the agent network parameter corresponding to the new strategy; π old (·) is the old strategy; θ old is the agent network parameter corresponding to the old strategy; γ t' is the discount factor at time t'; r t' is the reward at time t'; T is all time steps; t' is the time; the agent can be a high-level agent or a low-level agent;

[0041] S30210, determine whether the first formula is valid, if so, verify the high-level agent and the low-level agent, obtain the strategy verification result, and enter step S30211, otherwise, directly enter step S30211; the expression of the first formula is:

[0042] imodN val = = 0

[0043] Among them, i is the number of iterations; mod is the remainder; N val To verify the threshold;

[0044] S30211, determine whether the second formula is valid, if so, return to step S3021, otherwise, directly go to step S30212; the expression of the second formula is:

[0045] imodN r = = 0

[0046] Among them, N r is the sampling threshold;

[0047] S30212, determine whether the first equation is established, if so, directly go to step S30213, otherwise, return to step S3022; the expression of the first equation is:

[0048] i=N ep

[0049] Among them, N ep is the maximum iteration threshold;

[0050] S30213. Set an observation interval and determine whether the strategy verification result converges within the observation interval. If so, end the training and obtain the job scheduling model. Otherwise, adjust the hyperparameters of the high-level agent and the hyperparameters of the low-level agent, and return to step S3022.

[0051] The above further solution has the beneficial effect of ensuring the correctness and consistency of the algorithm, which helps to reduce the occurrence of misunderstandings and errors and improve the reliability and stability of the algorithm.

[0052] Furthermore, the step S3023 is specifically as follows:

[0053] S30231. Using the scheduling state, the processing state of the operation node, the operation completion time of the operation node, the earliest available time of the machine node, the operation processing time of the machine node and the current target value of the target node are used as the first original feature vector;

[0054] S30232. Map the first original feature vector from a low dimension to a high dimension using a multilayer perceptron to obtain a first high-dimensional feature vector;

[0055] S30233. According to the first high-dimensional feature vector, a heterogeneous graph network structure with L layers stacked is used to calculate the feature vector embedding of each node; the feature representation of each node in the heterogeneous graph network structure at the lth layer is:

[0056]

[0057] in, is the feature representation of node v at layer l; l is the network layer number; is the multilayer perceptron of the lth layer; θ l is the parameter of the lth layer network; ∈ l is the learning parameter; is the feature representation of node v at layer l-1; u is a node; N (v) is the neighborhood set of node v; is the feature representation of node u at layer l-1;

[0058] S30234. According to the feature vector embedding of each node, based on the scheduling state, average pooling is used to obtain the embedding vector of the first graph feature:

[0059]

[0060] Among them, h G is the embedding vector of the first graph feature; |M| is the number of machine nodes; is the feature vector embedding of the kth machine; M k is the kth machine; k is the machine number; M is the machine node; |N| is the number of operation nodes; For operation O ij The feature vector embedding of ij is the jth operation of the i-th job; i is the job number; j is the operation number of the i-th job; N is the operation node; |g| is the number of optimization target nodes; To optimize the target node g o The feature vector embedding of g o is the oth optimization target node; o is the optimization target node number; g is the optimization target node; || is the splicing operation;

[0061] S30235, embed the embedding vector of the first graph feature and the feature vector of the kth machine, and perform operation O ij The feature vector embedding and optimization target node g o The feature vectors of are embedded and concatenated to obtain a first concatenated vector;

[0062] S30236. According to the first concatenated vector, a multi-layer perceptron is used to obtain a target to be optimized from a multi-objective model based on minimization of the action selection probability. The expression of the action selection probability is:

[0063]

[0064]

[0065] in, Choose probabilities for actions; is the action of the high-level agent; is the state of the high-level agent; exp(·) is an exponential function with a natural constant as the base; For Action In Status The priority index to be selected; is an action element in the optional action set; is the set of optional actions for the high-level agent, namely, Og arc; For Action In Status The priority index to be selected; Based on θ high Multilayer perceptron of θ high are the network parameters of the MLP in the high-level agent.

[0066] The beneficial effect of the above further solution is: comprehensively considering multiple objectives and weighing their importance to determine the optimization direction of the overall scheduling, so as to ensure that the scheduling result achieves a good balance between multiple objectives.

[0067] Furthermore, the S3024 is specifically:

[0068] S30241. Using the scheduling state, the processing state of the operation node, the operation completion time of the operation node, the earliest available time of the machine node, and the operation processing time of the machine node are used as the second original feature vector;

[0069] S30242. Map the second original feature vector from low dimension to high dimension using a multilayer perceptron to obtain a second high-dimensional feature vector;

[0070] S30243. According to the second high-dimensional feature vector, the embedding of the operation node and the embedding of the machine node are calculated using the heterogeneous graph network structure with L layers stacked; the embedding expressions of the single-layer operation node and the single-layer machine node are respectively:

[0071]

[0072]

[0073]

[0074]

[0075]

[0076] in, is the embedding of a single-layer machine node; σ(·) is the nonlinear activation function sigmod; α kk To use the softmax function for e kk Parameters after normalization; e kk is the attention coefficient between machine nodes; The feature vector of the machine node using MLP mapping; ij is the jth operation of the i-th job; i is the job number; j is the operation number of the i-th job; N t (M k ) is M k Neighborhood operations; M k is the kth machine; k is the machine number; α ijk To use the softmax function for e ijk Parameters after normalization; e ijk is the attention coefficient of the operation node to the machine node; The feature vector of the MLP mapping is adopted for the operation node; Embedding of single-layer operation nodes; The first multi-layer perceptron embeds the operation nodes; ELU is the activation function; is the second multi-layer perceptron; i(j-1) is the j-1th operation of the ith job; is the third multi-layer perceptron; is the fourth multi-layer perceptron; i(j+1) is the j+1th operation of the ith job; is the fifth multi-layer perceptron; is the sum of the embedded eigenvalues ​​of the machine nodes; LeakyRelu(·) is the activation function; is a trainable parameter; N t (O ij ) is operation O ij Available machines in the neighborhood;|| for the splicing operation;

[0077] S30244. According to the embedding of the operation node and the embedding of the machine node, average pooling is used to obtain the embedding vector of the second graph feature:

[0078]

[0079] Among them, x G is the embedding vector of the second graph feature; |M| is the number of machine nodes; M is the machine node; is the embedding of machine nodes; |N| is the number of operation nodes; N is the operation node; To embed the operation nodes;

[0080] S30245, concatenating the embedding vector of the second graph feature, the embedding of the operation node, and the embedding of the machine node to obtain a second concatenated vector;

[0081] S30246. According to the second concatenated vector, a multilayer perceptron is used to randomly select an operation machine pair based on the selection probability of the operation machine pair to obtain the operation machine pair. The expression of the selection probability of the operation machine pair is:

[0082]

[0083]

[0084] in, The probability of selecting the pair for the operation machine; Actions for low-level agents; is the state of the low-level agent; exp(·) is an exponential function with a natural constant as the base; For Action In Status The priority index to be selected; Action elements in the optional action set for low-level agents; is the set of optional actions for the low-level agent, i.e., OM arcs; For Action In Status The priority index to be selected; Based on θ low Multilayer perceptron of θ low are the network parameters of the MLP in the low-level agent.

[0085] The beneficial effect of the above further solution is: operations and machines are selected so that each operation can be processed on a suitable machine, thereby optimizing key indicators such as processing time, overtime time, machine utilization, etc.

[0086] Furthermore, the step S3025 is specifically as follows:

[0087] S30251, obtaining a list of idle times of machines in the operation machine alignment;

[0088] S30252. According to the idle time list of the machine, obtain the operation P in the operation machine pair. ijthe available start time of the idle time period, the idle time period start time and the idle time period end time;

[0089] S30253, obtain the end time of the previous operation, and ij Based on the available start time of the idle time period, the start time of the idle time period, the end time of the idle time period, and the end time of the previous operation, determine whether the preset conditions are met. If so, operation P ij The start time of operation P ij At the available start time of the idle time period, operation P ij The end time of operation P ij The start time and operation P ij The sum of the processing time, otherwise, operation P ij The start time of the operation is the maximum value between the earliest available time and the arrival time of the machine. ij The end time of operation P ij The start time and operation P ij The sum of the processing time; the preset conditions are specifically:

[0090] C i(j-1) <C'∧(C'-S')≥t ijk

[0091] Among them, C i(j-1) is the end time of the previous operation; C' is the end time of the idle time period; S' is the end time of the operation P ij The available start time in the idle time period; t ijk For operation P ij processing time.

[0092] The beneficial effect of the above further scheme is that by finding out all idle time periods of the machine, it is possible to determine whether the operation meets the processing conditions and to shorten the completion time of the operation as much as possible, while improving the utilization rate of the machine.

[0093] Furthermore, when the optimization target is to minimize the total delay time of the job, the expression of the reward in step S3027 is:

[0094]

[0095]

[0096] When the optimization target is to minimize the maximum completion time of the job, the reward expression in step S3027 is:

[0097]

[0098] When the target to be optimized is to maximize the average machine utilization, the expression of the reward in step S3027 is:

[0099]

[0100] in, For reward; Tard e (t) is the overdue time at time t; Tard e (t+1) is the overdue time at time t+1 after the operation scheduling is completed; t is the time; i is the job number; n is the number of jobs; D i is the job overdue time of the i-th job; n i is the total number of operations of the ith job; j is the operation number of the ith job; For operation P ij Average processing time on available machines; C i(j-1) The end time of the previous operation; C max (t) is the maximum completion time starting from time t; C max (t+1) is the maximum completion time starting from time t+1 after the operation scheduling is completed; U ave (t) is the average machine utilization at time t; U ave (t+1) is the average machine utilization at time t+1 after the operation scheduling is completed.

[0101] The beneficial effects of the above further scheme are: selecting appropriate reward expressions according to different objectives to guide the agent to take different actions in different states, maximize the long-term cumulative rewards, and evaluate and feedback the agent's actions to guide its learning process.

[0102] Furthermore, in the process of obtaining the scheduling schedule based on the new job set and using the job scheduling model in step S4, when selecting the operating machine pair, the operating machine pair with the maximum selection probability is used as the selection criterion.

[0103] The beneficial effect of the above further scheme is: executing the learned optimal strategy under deterministic conditions and selecting the optimal action in order to expect to obtain the maximum cumulative reward. BRIEF DESCRIPTION OF THE DRAWINGS

[0104] Figure 1 The figure is a flow chart of the method of the present invention.

[0105] Figure 2 Obtain a flow chart for the job scheduling model in the present invention.

[0106] Figure 3 Schematic diagram of the multi-objective flexible workshop operation dynamic scheduling method based on deep reinforcement learning in the present invention.

[0107] Figure 4 It is a disjunctive graph representing the scheduling problem in Example 2 of the present invention.

[0108] Figure 5 Schematic diagram of the MDP decision process in Embodiment 2 of the present invention.

[0109] Figure 6 This is a state diagram of decision point t4 in embodiment 2 of the present invention.

[0110] Figure 7 This is a state diagram of decision point t5 in embodiment 2 of the present invention.

[0111] Figure 8 This is the Gantt chart of the scheduling plan in Example 2 of the present invention.

[0112] Fig. 9 This is a diagram for solving an example in Embodiment 2 of the present invention. DETAILED DESCRIPTION

[0113] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.

[0114] Example 1

[0115] like Figure 1 As shown, in one embodiment of the present invention, a flexible workshop operation dynamic scheduling method based on deep reinforcement learning includes the following steps:

[0116] S1, taking minimization of total delay time, minimization of maximum completion time and maximization of average machine utilization as optimization objectives, a multi-objective model is obtained;

[0117] S2, abstract the dynamic job shop scheduling problem using the disjunctive graph model to obtain the scheduling status;

[0118] S3. Based on the scheduling status and multi-objective model, the optimization target is used as the high-level intelligent agent, and the job and machine are used as the low-level intelligent agents. The Markov decision process is used to obtain the job scheduling model.

[0119] S4. Obtain a new job set, and based on the new job set, use the job scheduling model to obtain a scheduling schedule to complete the dynamic scheduling of flexible workshop jobs.

[0120] In this embodiment, the present invention designs a real-time multi-objective scheduling method that does not rely on scheduling rules but adopts end-to-end learning to solve the challenge of relying on scheduling rules and lacking generalization in the prior art.

[0121] The expression of the multi-objective model in step S1 is:

[0122]

[0123] Among them, MODFJSP is a multi-objective model; Minimize is the minimization function; Total tard is the total delay time of the job; i is the job number; n is the number of jobs; max is the maximization function; C i,ni The time to complete all operations for the i-th job; n i is the total number of operations of the ith job; D i is the job overtime time of the i-th job; Makespan is the maximum completion time of all operations of the i-th job; U ave is the average machine utilization rate; m is the number of machines; k is the machine number; j is the operation number of the i-th job; t ijk is the processing time of the jth operation of the i-th job on the k-th machine; X ijk It is an identifier of whether the jth operation of the ith job can be performed on the kth machine. If yes, it is 1, otherwise, it is 0; time is the current time of the environment.

[0124] In this embodiment, the multi-objective flexible job shop dynamic scheduling (MODFJSP) with random new job arrival is defined as follows: There are n consecutive new jobs dynamically arriving at the shop and need to be processed on m machines. Each job consists of n i operations, where O ij is the jth operation of the i-th job. Each operation O ij Processing can be performed on any machine selected from a set of compatible machines. Operation O ij The processing time on the kth machine is t ijk The arrival time and overdue time of the i-th job are A i and D i When the i-th job is in A i When the machine arrives at the workshop, it will be assigned to the buffer of available machines. When a processing task is completed, the machine will select the next job to be processed from the buffer. ij The machine allocation and processing sequence can be calculated based on C ijThe completion time is expressed and a feasible scheduling plan is generated. The optimization goal is to minimize the total delay time of the job, minimize the maximum completion time and maximize the average machine utilization. To simplify the problem, the following constraints need to be met:

[0125] (1) A machine can only process one job at a time.

[0126] (2) All operations belonging to the same job should be processed in a fixed order.

[0127] (3) Each operation should be carried out without interruption.

[0128] (4) Ignore shipping time and setup time.

[0129] The expression of the scheduling state in step S2 is:

[0130] G=(N,M,C,ε0,g)

[0131]

[0132] Among them, G is the scheduling state; N is the operation node; M is the machine node; C is the directed arc; ε0 is the undirected arc; g is the optimization target node; O ij is the jth operation of the ith job; i is the job number; j is the operation number of the ith job; Start is the virtual start node with a processing time of zero; End is the end node.

[0133] In this embodiment, the present invention uses a disjunctive graph to describe the scheduling state, where to represent the set of all operations, Start and End represent virtual start and end nodes with processing time zero, C is a set of directed arcs (conjunction) representing the precedence constraints between operations on the same job, and D is a set of undirected arcs (disjunction).

[0134] In the Markov decision making (MDP) process of the hierarchical agent in the present invention, a heterogeneous graph G = (N, M, C, ε0, g) is used to represent the actual scheduling state, where N, M, C, ε0, and g represent the optimization operation node, machine node, directed arc, undirected arc, and optimization target node, respectively, and the attention mechanism is combined to make the optimal decision in each time slot.

[0135] The step S3 is specifically as follows:

[0136] S301, obtaining instance data;

[0137] S302. According to the instance data, scheduling status and multi-objective model, the optimization target is used as the high-level agent, and the job and machine are used as the low-level agent. The high-level agent and the low-level agent are trained using the Markov decision process to obtain a job scheduling model.

[0138] like Figure 2 As shown, the step S302 is specifically as follows:

[0139] S3021, sampling the instance data to obtain sampled data;

[0140] S3022, taking the optimization target as the high-level agent and the tasks and machines as the low-level agents;

[0141] S3023, according to the high-level intelligent agent and the low-level intelligent agent, target selection is performed based on the scheduling state and the multi-objective model to obtain the target to be optimized;

[0142] S3024, using the scheduling state, performing operation and machine pair selection to obtain an operation machine pair;

[0143] S3025. Update the start time and end time of the operation in the operating machine pair using a local search method according to the operating machine pair;

[0144] S3026, updating the state of the high-level agent and the state of the low-level agent respectively according to the target to be optimized, the operating machine pair, and the start time and end time of the operation in the operating machine pair;

[0145] S3027. Calculate rewards according to the target to be optimized;

[0146] S3028, determine whether all operations that need to be processed in the sampled data have been scheduled and arranged on the corresponding machines. If so, directly go to step S3029, otherwise, return to step S3023;

[0147] S3029. According to the reward, the state of the high-level agent and the state of the low-level agent, the proximal strategy optimization algorithm is used to update the network parameters of the high-level agent and the network parameters of the low-level agent; the expressions of the loss function of the policy network and the loss function of the critic network in the proximal strategy optimization algorithm are respectively:

[0148]

[0149] L critic =(r t +v(s t+1 )-v(s t )) 2

[0150]

[0151]

[0152] Among them, L policyis the loss function of the policy network; min{·} is the minimization function; is the probability ratio; is the advantage function at time t; t is the time; clip(·) is the clipping function; ε is the clipping parameter; L critic is the loss function of the critic network; r t is the reward; v(·) is the output function of the critic network; s t+1 is the new state of the agent; s t is the state of the agent at time t; π(·) is the new strategy; a t is the action of the agent at time t; θ is the agent network parameter corresponding to the new strategy; π old (·) is the old strategy; θ old is the agent network parameter corresponding to the old strategy; γ t' is the discount factor at time t'; r t' is the reward at time t'; T is all time steps; t' is the time; the agent can be a high-level agent or a low-level agent;

[0153] S30210, determine whether the first formula is valid, if so, verify the high-level agent and the low-level agent, obtain the strategy verification result, and enter step S30211, otherwise, directly enter step S30211; the expression of the first formula is:

[0154] imodN val = = 0

[0155] Among them, i is the number of iterations; mod is the remainder; N val To verify the threshold;

[0156] S30211, determine whether the second formula is valid, if so, return to step S3021, otherwise, directly go to step S30212; the expression of the second formula is:

[0157] imodN r = = 0

[0158] Among them, N r is the sampling threshold;

[0159] S30212, determine whether the first equation is established, if so, directly go to step S30213, otherwise, return to step S3022; the expression of the first equation is:

[0160] i=N ep

[0161] Among them, N ep is the maximum iteration threshold;

[0162] S30213. Set an observation interval and determine whether the strategy verification result converges within the observation interval. If so, end the training and obtain the job scheduling model. Otherwise, adjust the hyperparameters of the high-level agent and the hyperparameters of the low-level agent, and return to step S3022.

[0163] In this embodiment, N ep The strategy verification results obtained after the training are used to adjust the hyperparameters. Specifically, after the training is completed, a line graph of each strategy verification result is drawn to observe whether the strategy verification results converge within a certain range. If the results oscillate in the later stages of training, this may mean that the hyperparameters set in the training are unreasonable, and the hyperparameters need to be adjusted and retrained. Only when the verification results converge to a certain range in the later stages of training can the hyperparameter design be proven to be reasonable.

[0164] In this embodiment, in hierarchical reinforcement learning, there are two types of agents: high-level agents and low-level agents; high-level agents are responsible for learning how to select subtasks, while low-level agents are responsible for learning how to perform specific actions in subtasks; in the present invention, the optimization goal is the high-level agent, and the job and the machine are the low-level agents; the reward in step S3027 of the present invention is the reward in "using the Markov decision process to obtain the job scheduling model".

[0165] In this embodiment, the dynamic job shop scheduling problem can be abstracted by using a disjunctive graph model and converted into a sequential decision process, also known as a Markov decision process (MDP). The original jobs in the shop and the initial states of the newly arrived jobs are represented by a disjunctive graph, the purpose of which is to remove redundant disjunctive arcs through an iterative process and ultimately achieve the optimization goal.

[0166] The method can be divided into three stages: the first stage is the selection of optimization objectives, the second stage is the selection of operations and machine pairs, and the third stage is the local search process.

[0167] The step S3023 is specifically as follows:

[0168] S30231. Using the scheduling state, the processing state of the operation node, the operation completion time of the operation node, the earliest available time of the machine node, the operation processing time of the machine node and the current target value of the target node are used as the first original feature vector;

[0169] S30232. Map the first original feature vector from a low dimension to a high dimension using a multilayer perceptron to obtain a first high-dimensional feature vector;

[0170] S30233. According to the first high-dimensional feature vector, a heterogeneous graph network structure with L layers stacked is used to calculate the feature vector embedding of each node; the feature representation of each node in the heterogeneous graph network structure at the lth layer is:

[0171]

[0172] in, is the feature representation of node v at layer l; l is the network layer number; is the multilayer perceptron of the lth layer; θ l is the parameter of the lth layer network; ∈ l is the learning parameter; is the feature representation of node v at layer l-1; u is a node; N (v) is the neighborhood set of node v; is the feature representation of node u at layer l-1;

[0173] S30234. According to the feature vector embedding of each node, based on the scheduling state, average pooling is used to obtain the embedding vector of the first graph feature:

[0174]

[0175] Among them, h G is the embedding vector of the first graph feature; |M| is the number of machine nodes; is the feature vector embedding of the kth machine; M k is the kth machine; k is the machine number; M is the machine node; |N| is the number of operation nodes; For operation O ij The feature vector embedding of ij is the jth operation of the i-th job; i is the job number; j is the operation number of the i-th job; N is the operation node; |g| is the number of optimization target nodes; To optimize the target node g o The feature vector embedding of g o is the oth optimization target node; o is the optimization target node number; g is the optimization target node; || is the splicing operation;

[0176] S30235, embed the embedding vector of the first graph feature and the feature vector of the kth machine, and perform operation O ij The feature vector embedding and optimization target node g o The feature vectors of are embedded and concatenated to obtain a first concatenated vector;

[0177] S30236. According to the first concatenated vector, a multi-layer perceptron is used to obtain a target to be optimized from a multi-objective model based on minimization of the action selection probability. The expression of the action selection probability is:

[0178]

[0179]

[0180] in, Choose probabilities for actions; is the action of the high-level agent; is the state of the high-level agent; exp(·) is an exponential function with a natural constant as the base; For Action In Status The priority index to be selected; is an action element in the optional action set; is the set of optional actions for the high-level agent, namely, Og arc; For Action In Status The priority index to be selected; Based on θ high Multilayer perceptron of θ high are the network parameters of the MLP in the high-level agent.

[0181] The S3024 is specifically:

[0182] S30241. Using the scheduling state, the processing state of the operation node, the operation completion time of the operation node, the earliest available time of the machine node, and the operation processing time of the machine node are used as the second original feature vector;

[0183] S30242. Map the second original feature vector from low dimension to high dimension using a multilayer perceptron to obtain a second high-dimensional feature vector;

[0184] S30243. According to the second high-dimensional feature vector, the embedding of the operation node and the embedding of the machine node are calculated using the heterogeneous graph network structure with L layers stacked; the embedding expressions of the single-layer operation node and the single-layer machine node are respectively:

[0185]

[0186]

[0187]

[0188]

[0189]

[0190] in, is the embedding of a single-layer machine node; σ(·) is the nonlinear activation function sigmod; α kk To use the softmax function for e kk Parameters after normalization; e kkis the attention coefficient between machine nodes; The feature vector of the machine node using MLP mapping; ij is the jth operation of the i-th job; i is the job number; j is the operation number of the i-th job; N t (M k ) is M k Neighborhood operations; M k is the kth machine; k is the machine number; α ijk To use the softmax function for e ijk Parameters after normalization; e ijk is the attention coefficient of the operation node to the machine node; The feature vector of the MLP mapping is adopted for the operation node; Embedding of single-layer operation nodes; MLP1 low The first multi-layer perceptron embeds the operation nodes; ELU is the activation function; is the second multi-layer perceptron; i(j-1) is the j-1th operation of the ith job; is the third multi-layer perceptron; is the fourth multi-layer perceptron; i(j+1) is the j+1th operation of the ith job; is the fifth multi-layer perceptron; is the sum of the embedded eigenvalues ​​of the machine nodes; Leaky Relu(·) is the activation function; is a trainable parameter; N t (O ij ) is operation O ij Available machines in the neighborhood;|| for the splicing operation;

[0191] S30244. According to the embedding of the operation node and the embedding of the machine node, average pooling is used to obtain the embedding vector of the second graph feature:

[0192]

[0193] Among them, x G is the embedding vector of the second graph feature; |M| is the number of machine nodes; M is the machine node; is the embedding of machine nodes; |N| is the number of operation nodes; N is the operation node; To embed the operation nodes;

[0194] S30245, concatenating the embedding vector of the second graph feature, the embedding of the operation node, and the embedding of the machine node to obtain a second concatenated vector;

[0195] S30246. According to the second concatenated vector, a multilayer perceptron is used to randomly select an operation machine pair based on the selection probability of the operation machine pair to obtain the operation machine pair. The expression of the selection probability of the operation machine pair is:

[0196]

[0197]

[0198] in, The probability of selecting the pair for the operation machine; Actions for low-level agents; is the state of the low-level agent; exp(·) is an exponential function with a natural constant as the base; For Action In Status The priority index to be selected; Action elements in the optional action set for low-level agents; is the set of optional actions for the low-level agent, i.e., OM arcs; For Action In Status The priority index to be selected; Based on θ low Multilayer perceptron of θ low are the network parameters of the MLP in the low-level agent.

[0199] The step S3025 is specifically as follows:

[0200] S30251, obtaining a list of idle times of machines in the operation machine alignment;

[0201] S30252. According to the idle time list of the machine, obtain the operation P in the operation machine pair. ij the available start time of the idle time period, the idle time period start time and the idle time period end time;

[0202] S30253, obtain the end time of the previous operation, and ij Based on the available start time of the idle time period, the start time of the idle time period, the end time of the idle time period, and the end time of the previous operation, determine whether the preset conditions are met. If so, operation P ij The start time of operation P ij At the available start time of the idle time period, operation P ij The end time of operation P ij The start time and operation P ij The sum of the processing time, otherwise, operation P ij The start time of the operation is the maximum value between the earliest available time and the arrival time of the machine. ijThe end time of operation P ij The start time and operation P ij The sum of the processing time; the preset conditions are specifically:

[0203] C i(j-1) <C'∧(C'-S')≥t ijk

[0204] Among them, C i(j-1) is the end time of the previous operation; C' is the end time of the idle time period; S' is the end time of the operation P ij The available start time in the idle time period; t ijk For operation P ij processing time.

[0205] When the optimization target is to minimize the total delay time of the job, the reward expression in step S3027 is:

[0206]

[0207]

[0208] When the optimization target is to minimize the maximum completion time of the job, the reward expression in step S3027 is:

[0209]

[0210] When the target to be optimized is to maximize the average machine utilization, the expression of the reward in step S3027 is:

[0211]

[0212] Among them, r t low For reward; Tard e (t) is the overdue time at time t; Tard e (t+1) is the overdue time at time t+1 after the operation scheduling is completed; t is the time; i is the job number; n is the number of jobs; D i is the job overdue time of the i-th job; n i is the total number of operations of the ith job; j is the operation number of the ith job; For operation P ij Average processing time on available machines; C i(j-1) The end time of the previous operation; C max (t) is the maximum completion time starting from time t; C max (t+1) is the maximum completion time starting from time t+1 after the operation scheduling is completed; U ave (t) is the average machine utilization at time t; Uave (t+1) is the average machine utilization at time t+1 after the operation scheduling is completed.

[0213] In the process of obtaining the scheduling schedule based on the new job set and using the job scheduling model in step S4, when selecting the operating machine pair, the operating machine pair with the highest selection probability is selected as the selection criterion.

[0214] In this embodiment, Figure 3 The figure shows a schematic diagram of the multi-objective flexible workshop job dynamic scheduling method based on deep reinforcement learning of the present invention. In the figure, Combination is a splicing operation; the method includes two agents, namely a high-level agent (target agent) and a low-level agent (job and machine agent). At each rescheduling point t (that is, whenever a new job arrives or an operation is completed), the high-level agent selects a target to be optimized for temporary optimization. The low-level agent combines the optimization target with the state at the current moment to form a new state input, selects an unscheduled operation through a neural network, and assigns it to an available machine. Then, a local search algorithm is used to determine the start time of the job. A reward is obtained according to the temporary goal, and it is transferred to the next state, and the above steps are repeated until all operations are completed.

[0215] Example 2

[0216] The invention provides an example of dynamic flexible workshop scheduling, which covers 3 jobs and 3 machines, as shown in Table 1. In the table, "-" is used to indicate that a certain operation cannot be processed on a specific machine, and an arrival time of 0 indicates that the original job in the workshop can be processed immediately. In addition, the slack time indicates the processing time available for all operations of the job. If the completion time of the last operation of a job exceeds the difference between the overdue time and the arrival time, then the job will be considered overdue.

[0217] Table 1

[0218]

[0219] The above example uses a disjunctive graph to represent the scheduling problem, such as Figure 4 As shown in the figure, the black solid line represents the priority constraint relationship of each operation. The different dotted lines represent the processing machines that can be used for each operation and the goals that can be optimized.

[0220] An MDP decision process for the above example is as follows Figure 5 As shown in the figure, the color of the node indicates the operation of selecting the same target. At the initial time t1, the set of operations to be processed includes {O 11 , O 21 , O 31}. The upper-level agent follows the strategy (such as (O11 , g1)), select a goal to be optimized. The lower-level agent selects an action and an available machine according to the strategy, for example (O 11 , M2). This choice transforms the set of operations into {O 12 , O 21 , O 31}, and enter the next decision point t2. When the last operation of a job is completed, the operation set is marked as unselectable, resulting in a situation similar to {O 12 , O 22 The option of} appears at time t5. This process continues until the action set is empty and each branch has been established.

[0221] by Figure 6 Taking the decision point t4 as an example, assuming that the start time of t1 is 19:24:34 and the end time of the current environment is 19:32:34. At this decision point, the operations waiting for processing include {O 12 , O 22 The agent needs to select an operation from the operation set for processing. Suppose the action selected by the agent is (O 12 , M1). This choice will cause the environment to undergo a state transition and move to Figure 7 Decision point t5 in , where “J(1,1)=6” means that the processing time of the first operation of job 1 is 6.

[0222] Table 2 shows a complete scheduling plan, and the corresponding scheduling plan Gantt chart is as follows Figure 8 In addition, Fig. 9 The corresponding example solution graph is shown, which clearly shows the machine selected by the agent for the operation and the goal to be optimized at each moment. In this example, the final completion time of the job is 19:35:34, and the calculated overdue time is 1 minute.

[0223] Table 2

[0224]

[0225] The present invention adopts the Pycharm simulation experiment platform and refers to the Brandimarte data for experimental simulation. In the experiment, two evaluation criteria are set to evaluate the method of the present invention. First, the result of the optimal strategy is verified by the validation set; secondly, the inverted generational distance evaluation index (IGD) is used to evaluate the convergence and distribution performance of the algorithm.

[0226] The experimental results show that the target value of the method of the present invention on the validation set converges to a certain interval, which indicates that the method obtains good results on the validation set. At the same time, the IGD value is small, indicating that the algorithm has good convergence and distribution performance.

Claims

1. A flexible workshop dynamic scheduling method based on deep reinforcement learning, characterized in that: The following steps are involved: S1, taking minimization of total delay time of operations, minimization of maximum completion time of operations and maximization of average machine utilization as optimization objectives, a multi-objective model is obtained; the expression of the multi-objective model in step S1 is: in, It is a multi-objective model; is the minimization function; is the total delay time of the operation; Number the job; is the number of jobs; is the maximization function; For the The time it takes for a job to complete all operations; For the The total number of operations for each job; For the The time that the job is overdue for each job; For the The maximum completion time for a job to complete all operations; is the average machine utilization; is the number of machines; Number the machine; For the The operation number of the job; For the The first The operation is The processing time of each machine; For the The first Is it possible for an operation to The identifier of the machine, 1 if possible, otherwise 0; is the current moment of the environment; S2. Abstract the dynamic job shop scheduling problem using a disjunctive graph model to obtain a scheduling state; the expression of the scheduling state in step S2 is: in, is the scheduling status; is the operation node; is a machine node; is a directed arc; is an undirected arc; To optimize the target node; For the The first operations; Number the job; For the The operation number of the job; is a virtual start node with processing time zero; is the end node; S3, according to the scheduling state and the multi-objective model, the optimization target is used as the high-level intelligent agent, the job and the machine are used as the low-level intelligent agent, and the Markov decision process is used to obtain the job scheduling model; the step S3 is specifically as follows: S301, obtaining instance data; S302, according to the instance data, the scheduling status and the multi-objective model, the optimization target is used as the high-level agent, the job and the machine are used as the low-level agent, and the high-level agent and the low-level agent are trained using the Markov decision process to obtain the job scheduling model; the step S302 is specifically as follows: S3021, sampling the instance data to obtain sampled data; S3022, take the optimization target as the high-level agent and the job and machine as the low-level agent; S3023, according to the high-level intelligent agent and the low-level intelligent agent, target selection is performed based on the scheduling state and the multi-objective model to obtain the target to be optimized; S3024, using the scheduling state, performing operation and machine pair selection to obtain an operation machine pair; S3025. Update the start time and end time of the operation in the operating machine pair using a local search method according to the operating machine pair; S3026, updating the state of the high-level agent and the state of the low-level agent respectively according to the target to be optimized, the operating machine pair, and the start time and end time of the operation in the operating machine pair; S3027. Calculate rewards according to the target to be optimized; S3028, determine whether all operations that need to be processed in the sampled data have been scheduled and arranged on the corresponding machines. If so, directly go to step S3029, otherwise, return to step S3023; S3029. According to the reward, the state of the high-level agent and the state of the low-level agent, the proximal strategy optimization algorithm is used to update the network parameters of the high-level agent and the network parameters of the low-level agent; the expressions of the loss function of the policy network and the loss function of the critic network in the proximal strategy optimization algorithm are respectively: in, is the loss function of the policy network; is the minimization function; is the probability ratio; for Advantage function of the moment; for the moment; is the clipping function; is the cropping parameter; is the loss function of the critic network; For reward; is the output function of the critic network; is the new state of the agent; For intelligent agents The state of the moment; for new strategies; For intelligent agents Momentary action; are the agent network parameters corresponding to the new strategy; For the old strategy; are the agent network parameters corresponding to the old strategy; for Discount factor for the moment; for Rewards of the moment; for all time steps; is a moment; the agent may be a high-level agent or a low-level agent; S30210, determine whether the first formula is valid, if so, verify the high-level agent and the low-level agent, obtain the strategy verification result, and enter step S30211, otherwise, directly enter step S30211; the expression of the first formula is: in, is the number of iterations; To take the remainder; To verify the threshold; S30211, determine whether the second formula is valid, if so, return to step S3021, otherwise, directly go to step S30212; the expression of the second formula is: in, is the sampling threshold; S30212, determine whether the first equation is established, if so, directly go to step S30213, otherwise, return to step S3022; the expression of the first equation is: in, is the maximum iteration threshold; S30213, set an observation interval, and determine whether the strategy verification result converges within the observation interval. If so, end the training and obtain the job scheduling model. Otherwise, adjust the hyperparameters of the high-level agent and the hyperparameters of the low-level agent, and return to step S3022; S4. Obtain a new job set, and based on the new job set, use the job scheduling model to obtain a scheduling schedule to complete the dynamic scheduling of flexible workshop jobs.

2. The method for dynamic scheduling of flexible workshop operations based on deep reinforcement learning according to claim 1 is characterized in that: The step S3023 is specifically as follows: S30231. Using the scheduling state, the processing state of the operation node, the operation completion time of the operation node, the earliest available time of the machine node, the operation processing time of the machine node and the current target value of the target node are used as the first original feature vector; S30232. Map the first original feature vector from a low dimension to a high dimension using a multilayer perceptron to obtain a first high-dimensional feature vector; S30233, according to the first high-dimensional feature vector, using a heterogeneous graph network structure with L layers stacked to calculate the feature vector embedding of each node; each node in the heterogeneous graph network structure is embedded in the first high-dimensional feature vector. The feature representation of the layer is: in, For Node In the Feature representation of the layer; Number the network layer; For the Multilayer Perceptron of layers; For the Parameters of the layer network; is the learning parameter; For Node In the Feature representation of the layer; is a node; For Node The neighborhood set of ; For Node In the Feature representation of the layer; S30234. According to the feature vector embedding of each node, based on the scheduling state, average pooling is used to obtain the embedding vector of the first graph feature: in, is the embedding vector of the first image feature; is the number of machine nodes; For the The feature vector embedding of each machine; For the Machines; Number the machine; is a machine node; is the number of operation nodes; For operation The feature vector embedding of For the The first operations; Number the job; For the The operation number of the job; is the operation node; To optimize the number of target nodes; To optimize the target node The feature vector embedding of For the Optimization target nodes; Number the target node for optimization; To optimize the target node; For splicing operation; S30235, embedding the first image feature vector, Feature vector embedding and operation of each machine Embedding the feature vector of the target node and optimizing it The feature vectors of are embedded and concatenated to obtain a first concatenated vector; S30236. According to the first concatenated vector, a multi-layer perceptron is used to obtain a target to be optimized from a multi-objective model based on minimization of the action selection probability. The expression of the action selection probability is: in, Choose probabilities for actions; is the action of the high-level agent; is the state of the high-level agent; is an exponential function with a natural constant as base; For Action In Status The priority index to be selected; is an action element in the optional action set; is the set of optional actions for the high-level agent, namely, Og arc; For Action In Status The priority index to be selected; Based on Multilayer Perceptron; are the network parameters of the MLP in the high-level agent.

3. The method for dynamic scheduling of flexible workshop operations based on deep reinforcement learning according to claim 1 is characterized in that: The S3024 is specifically: S30241. Using the scheduling state, the processing state of the operation node, the operation completion time of the operation node, the earliest available time of the machine node, and the operation processing time of the machine node are used as the second original feature vector; S30242. Map the second original feature vector from low dimension to high dimension using a multilayer perceptron to obtain a second high-dimensional feature vector; S30243. Calculate the embedding of the operation node and the embedding of the machine node using a heterogeneous graph network structure with L stacked layers according to the second high-dimensional feature vector; The expressions for embedding of a single-layer operation node and a single-layer machine node are: in, Embedding of single-layer machine nodes; is the nonlinear activation function sigmod; To use the softmax function Parameters after normalization; is the attention coefficient between machine nodes; The feature vector of the MLP map is used for the machine node; For the The first operations; Number the job; For the The operation number of the job; for Neighborhood operations; For the Machines; Number the machine; To use the softmax function Parameters after normalization; is the attention coefficient of the operation node to the machine node; The feature vector of the MLP mapping is used for the operation node; Embedding of single-layer operation nodes; Embed the operation nodes for the first multi-layer perceptron; is the activation function; is the second multi-layer perceptron; For the The first operations; is the third multi-layer perceptron; is the fourth multi-layer perceptron; For the The first operations; is the fifth multi-layer perceptron; is the sum of the embedded eigenvalues ​​of the machine nodes; is the activation function; is a trainable parameter; For operation Available machines in the neighborhood; For splicing operation; S30244. According to the embedding of the operation node and the embedding of the machine node, average pooling is used to obtain the embedding vector of the second graph feature: in, is the embedding vector of the second image feature; is the number of machine nodes; is a machine node; Embedding of machine nodes; is the number of operation nodes; is the operation node; To embed the operation nodes; S30245, concatenating the embedding vector of the second graph feature, the embedding of the operation node, and the embedding of the machine node to obtain a second concatenated vector; S30246. According to the second concatenated vector, a multilayer perceptron is used to randomly select an operation machine pair based on the selection probability of the operation machine pair to obtain the operation machine pair. The expression of the selection probability of the operation machine pair is: in, The probability of selecting the pair for the operation machine; Actions for low-level agents; is the state of the low-level agent; is an exponential function with a natural constant as base; For Action In Status The priority index to be selected; Action elements in the optional action set for low-level agents; is the set of optional actions for the low-level agent, i.e., OM arcs; For Action In Status The priority index to be selected; Based on Multilayer Perceptron; are the network parameters of the MLP in the low-level agent.

4. The method for dynamic scheduling of flexible workshop operations based on deep reinforcement learning according to claim 1 is characterized in that: The step S3025 is specifically as follows: S30251, obtaining a list of idle times of machines in the operation machine alignment; S30252. According to the idle time list of the machine, obtain the operation of the operation machine pair the available start time of the idle time period, the idle time period start time and the idle time period end time; S30253, get the end time of the previous operation, and Based on the available start time of the idle time period, the start time of the idle time period, the end time of the idle time period, and the end time of the previous operation, determine whether the preset conditions are met. If so, the operation The start time of the operation At the available start time of the idle time period, the operation The end time of the operation Start time and operation The sum of the processing time, otherwise, the operation The start time of the operation is the maximum value between the earliest available time and the arrival time of the machine. The end time of the operation Start time and operation The sum of the processing time; the preset conditions are specifically: in, The end time of the previous operation; The end time of the idle time period; For operation Available start time during free time slot; For operation processing time.

5. The method for dynamic scheduling of flexible workshop operations based on deep reinforcement learning according to claim 1 is characterized in that: When the optimization target is to minimize the total delay time of the job, the reward expression in step S3027 is: When the optimization target is to minimize the maximum completion time of the job, the reward expression in step S3027 is: When the target to be optimized is to maximize the average machine utilization, the expression of the reward in step S3027 is: in, For reward; for The expiration time of the moment; After the operation is scheduled The expiration time of the moment; for the moment; Number the job; is the number of jobs; For the The time that the job is overdue for each job; For the The total number of operations for each job; For the The operation number of the job; For operation Average machining time on available machines; The end time of the previous operation; for The maximum completion time starting at time; After the operation is scheduled The maximum completion time starting at time; for Average machine utilization at the time; After the operation is scheduled The average machine utilization at the time.

6. The method for dynamic scheduling of flexible workshop operations based on deep reinforcement learning according to claim 3 is characterized in that: In the process of obtaining the scheduling schedule based on the new job set and using the job scheduling model in step S4, when selecting the operating machine pair, the operating machine pair with the highest selection probability is selected as the selection criterion.

Citation Information

Patent Citations

  • Workshop scheduling method adaptive to machine state based on deep reinforcement learning

    CN114219274A

  • Flexible job shop scheduling method based on multilayer deep reinforcement learning

    CN114912826A

  • Two-layer system and method for designing multi-agent system and simulator

    CN115104103A

  • Multi-microgrid system layered reinforcement learning optimization method and system, and storage medium

    CN115115211A

  • Online car-hailing scheduling method based on hybrid hierarchical reinforcement learning

    CN115222251A