Multi-resource flexible job shop scheduling method based on multi-agent reinforcement learning
By training workpiece allocation, AGV scheduling and process selection agents in a multi-agent reinforcement learning system, the problem of inefficiency in production resource scheduling in multi-resource flexible job workshops is solved, and stable, orderly production plans and low completion times are achieved. , improving production efficiency and robustness.
Patent Information
- Application Number
- CN202410735681.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2024-10-11
AI Technical Summary
In multi-variety, small-batch, personalized customization production, traditional manufacturing systems are difficult to optimize the scheduling of production resources, resulting in low production efficiency, especially in multi-resource flexible job workshops, where workpiece allocation, process selection and automatic guided vehicle scheduling are Coordination is difficult to achieve efficiently.
Using a method based on multi-agent reinforcement learning, by designing a multi-agent system, using deep reinforcement learning algorithms to train agents, create workpiece allocation agents, AGV scheduling agents and process selection agents, and define state space, action space and rewards. The function is trained using the DDQN method to optimize multi-resource flexible job shop scheduling.
It achieves stable and orderly production plans at different scales, significantly reduces the maximum completion time, improves production efficiency, shows strong robustness and adaptability, and surpasses the performance of traditional methods.
Smart Images

Figure CN118761572A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of job shop scheduling, and in particular relates to a multi-resource flexible job shop scheduling method based on multi-agent reinforcement learning. Background Art
[0002] In the manufacturing system, a scientific and reasonable resource scheduling method determines the production efficiency of the enterprise. The traditional single-variety and large-scale manufacturing method can no longer meet the personalized needs of current customers. With the rise of intelligent manufacturing technology, manufacturing companies have begun to continuously upgrade the equipment in the manufacturing workshop, and the degree of manufacturing automation has been greatly improved, thereby improving production efficiency. Therefore, under the organizational mode of multi-variety small-batch and personalized customized production, how to optimize the scheduling of production resources and achieve the optimal allocation of production resources is the main problem faced by manufacturing companies, especially discrete manufacturing companies, in practicing intelligent manufacturing and achieving high-quality development of enterprises.
[0003] The multi-resource flexible job shop scheduling problem is an extension of the flexible job shop scheduling problem. It not only considers the workpiece allocation and process selection involved in the production process, but also considers the scheduling and coordination of automatic guided vehicles between processing equipment and transportation resources.
[0004] The multi-resource flexible job shop scheduling problem has been widely studied since it was proposed. There are three types of solutions: scheduling rule-based, meta-heuristic-based, and reinforcement learning-based. The rule-based scheduling method makes scheduling choices at each scheduling moment. The advantage of this method is fast response speed, but low efficiency, and it cannot achieve good results in the long run. When solving the shop scheduling problem based on the meta-heuristic method, it can be flexibly applied to different types of shop scheduling problems and has strong optimization capabilities, but it is easy to fall into local optimality and has poor robustness. It performs poorly when solving high-dimensional and nonlinear problems.
[0005] The reinforcement learning-based method has strong robustness while taking into account both responsiveness and optimization effect, and can effectively solve the impact of high-dimensional and nonlinear problems. Among them, the DQN algorithm is the most commonly used algorithm. However, due to estimation errors, DQN may overestimate the Q value in some cases, causing the algorithm to converge to a suboptimal strategy prematurely. Summary of the invention
[0006] In view of the technical defects and improvement needs brought about by the prior art, the present invention provides a multi-resource flexible job shop scheduling method based on multi-agent reinforcement learning, which aims to achieve a stable and orderly production plan by designing a reasonable multi-agent system and then adopting an effective deep reinforcement learning algorithm to train the agents, thereby minimizing the maximum completion time.
[0007] To achieve the above object, the present invention provides a multi-resource flexible job shop scheduling method based on multi-agent reinforcement learning, the method comprising:
[0008] Aiming at the joint scheduling problem of workpieces, AGVs and machines in flexible job shops, a multi-resource flexible job shop scheduling model is established with the minimization of completion time as the optimization goal.
[0009] Create a workpiece allocation agent to solve the workpiece allocation problem, create an AGV scheduling agent to solve the AGV selection problem, and create a process selection agent to solve the machine process selection problem;
[0010] Define the state space, action space and reward function of each type of intelligent agent, and use the DDQN method to train each type of intelligent agent separately;
[0011] Verify the superiority of the proposed method at different scales.
[0012] Furthermore, a multi-resource flexible job shop scheduling model is established, wherein the multi-resource flexible job shop scheduling model includes hard constraints, soft constraints, workpiece status information, AGV status information and machine status information in the flexible job shop.
[0013] Furthermore, the multi-resource flexible job shop scheduling model is established to transform the multi-resource flexible job shop scheduling problem into a multi-agent reinforcement learning problem, which specifically includes:
[0014] By transforming the multi-resource flexible job shop scheduling model into a multi-agent reinforcement learning problem;
[0015] Create a workpiece allocation agent to solve the workpiece allocation problem, create an AGV scheduling agent to solve the AGV selection problem, and create a process selection agent to solve the machine process selection problem;
[0016] The DDQN method is used to train each agent separately.
[0017] Create an artifact allocation agent to solve the artifact allocation problem, including:
[0018] When a workpiece needs to be allocated or re-allocated, the workpiece allocation agent allocates the workpiece to the appropriate machine;
[0019] Construct the state space, action space, and reward function of the artifact allocation agent.
[0020] Construct the state space of the artifact allocation agent as follows:
[0021] (1) Machine utilization
[0022]
[0022] Among them, Acpt i For machine M i The actual processing time, R t For machine M i Running time.
[0023] (2) The processing time of the remaining processing steps of the machine
[0024]
[0025] Among them, J i For machine M i A collection of processes to be processed, pt j is the processing time of the current process of workpiece j.
[0026] (3) Number of machine operations to be processed
[0027]
[0028] Among them, J i For machine M i A collection of operations to be processed.
[0029] Workpiece transfer time between machines
[0030] T=T1+T2 (4)
[0031] Among them, T1 is the travel time of AGV to the location of the workpiece, and T2 is the transportation time required for AGV to transport the workpiece to the target location.
[0032] Construct the action space of the artifact allocation agent as follows:
[0033] The action space of the workpiece allocation agent can be defined as the selection range of machines and equipment in the workshop.
[0034] Construct the reward function of the artifact allocation agent as follows:
[0035]
[0036] in, It refers to the reward brought by the decision-making action of the process allocation agent at time t, and wait_time_1 refers to the waiting time of the workpiece in the machine.
[0037] Furthermore, an AGV scheduling agent is created to solve the AGV selection problem, including:
[0038] When performing a handling task, the AGV scheduling agent selects the appropriate AGV for handling;
[0039] Construct the state space, action space and reward function of the AGV scheduling agent.
[0040] Construct the state space of the AGV scheduling agent as follows:
[0041] (1) Current status of AGV
[0042]
[0043] Where N is the set of AGVs.
[0044] (2) Estimated time for AGV to move to the workpiece location
[0045]
[0046] Among them, T p,q For AGV n The travel time from the current position p to the workpiece position q.
[0047] (3) The remaining completion time of the AGV in executing the previous handling task
[0048]
[0049] Among them, T ct For AGV n The estimated completion time of the previous transport task, T now is the current time.
[0050] Construct the action space of the AGV scheduling agent as follows:
[0051] The action space of the AGV scheduling agent directly corresponds to the selection of AGV vehicles in the workshop.
[0052] Construct the reward function of the AGV scheduling agent as follows:
[0053]
[0054] in, It refers to the reward brought by the decision-making action of the AGV scheduling agent at time t, and wait_time_1 refers to the time the workpiece waits to be transported.
[0055] Furthermore, a process selection agent is created to solve the machine process selection problem, including:
[0056] When the machine becomes idle and the set of pending operations is not empty, the operation selection agent selects a suitable operation from the set of pending operations for processing;
[0057] The construction process selects the agent's state space, action space, and reward function.
[0058] The state space of the construction step selection agent is as follows:
[0059] (1) The processing time of the current process of the workpiece
[0060]
[0061] Among them, J i,j,op Refers to the machine M i The processing time of the current process of workpiece j on .
[0062] (2) The remaining processing time of the workpiece
[0063]
[0064] Among them, J i,j,ap Refers to the machine M i The workpiece j on and the processing time required for the current process.
[0065] (3) Number of workpieces to be processed
[0066] Nop j =|I i,j | (12)
[0067] Among them, I i,j Refers to the machine M i The process set of workpiece j on ;
[0068] (4) The workpiece’s stagnation time in the machine buffer
[0069] T sta =T now -T arr (13)
[0070] Among them, T now is the current time, T arr It is the time when the workpiece arrives at the machine.
[0071] The construction process selects the action space of the agent as follows:
[0072] Six common order selection rules are selected as the action space of the process selection agent, as shown below:
[0073] (1) First-in, first-out (FIFO);
[0074] (2) Select the workpiece with the shortest processing time in the current process (SPT);
[0075] (3) Select the workpiece with the shortest remaining processing time (SRPT);
[0076] (4) Select the workpiece with the longest remaining processing time (LRPT);
[0077] (5) Select the workpiece with the fewest remaining operations (FRO);
[0078] (6) Select the workpiece with the longest waiting time (LWT).
[0079] Construct a reward function for the process selection agent. If the workpiece can complete the processing process within the specified time, a positive reward will be given. Otherwise, a corresponding penalty will be given. The specified time is set to 10 time steps, as shown below:
[0080] γ=10-process_time (14)
[0081]
[0082] Furthermore, the DDQN method is used to train each agent separately, including:
[0083] The DDQN method uses two independent networks to select and evaluate action values to reduce over-estimation during training. The target value is calculated as follows:
[0084]
[0085] Among them, r t Refers to the immediate reward obtained after executing action a at time t, γ refers to the discount factor, Refers to calculating the next state s according to the target network t+1 The Q value of taking the best action is, represents the parameters of the target network, θ T Indicates the parameters of the current network.
[0086] At the i-th iteration, by minimizing the loss function To train the network, the calculation is as follows:
[0087]
[0088] Among them, Q(s,a) refers to the Q value obtained after executing the action in the current state. Refers to the Q value obtained by taking the best action according to the target network.
[0089] Furthermore, the superiority of the proposed method is verified at different scales, including:
[0090] By comparing with existing heuristic algorithms, the performance of various agents in the proposed method at different scales is verified;
[0091] Compared with the composite heuristic scheduling algorithm, the superiority of the proposed method at different scales is verified. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] Figure 1 Technology Roadmap
[0093] Figure 2 The structure diagram of multi-resource flexible job shop scheduling
[0094] Figure 3 A multi-layer distributed scheduling framework
[0095] Figure 4 Training plans for centralized training and distributed execution
[0096] Figure 5 Schematic diagram for workshop simulation and training
[0097] Figure 6 Network structure diagram
[0098] Figure 7 This is a comparison chart of standardized performance under conventional scheduling scale.
[0099] Figure 8 This is a comparison chart of standardized performance under ultra-large scheduling scale Specific implementation plan
[0100] The flexible job shop scheduling problem in this embodiment is described as follows:
[0101] like Figure 2 As shown, there are N workpieces to be processed on m machines, each of which contains n j The processing procedures are fixed. Each process can select a processing machine from a group of optional machines. The processing time of the same process on different processing machines may not be the same. The transportation of workpieces between machines is achieved through a limited number of AGVs. The goal of scheduling is to first assign the workpiece to the appropriate machine, then transport it through the appropriate AGV, and then the machine selects the appropriate processing procedure for processing, so as to minimize the total completion time.
[0102] In the multi-resource flexible job shop scheduling method based on multi-agent reinforcement learning disclosed in the present invention, in the above scheduling problem description, in order to distinguish it from other scheduling problems, the following explanation is made:
[0103] (1) Each machine is equipped with a workpiece buffer area with ample space to effectively manage the storage and transfer of workpieces before and after processing;
[0104] (2) The AGV moves only one workpiece at a time, assuming that there will be no delays due to congestion;
[0105] (3) Each machine M j Only one workpiece can be processed at a time and each workpiece can only be processed by one machine at a time;
[0106] (4) All AGVs and machines do not malfunction and can work continuously;
[0107] (5) The time interval between two workpieces processed continuously by a machine is negligible;
[0108] (6) There are order constraints between different processes of the same workpiece, but there are no order constraints between the processes of different workpieces;
[0109] (7) The processing of the process on the machine cannot be interrupted;
[0110] (8) The AGV's operating speed is uniform and constant, and is not affected by the load;
[0111] (9) There is an AGV parking area with sufficient space next to the machine;
[0112] (10) At time 0, all AGVs and machines are in available status;
[0113] (11) At time 0, all AGVs and workpieces are in the waiting area;
[0114] (12) The time it takes for AGVs and machines to load and unload workpieces is not taken into account.
[0115] Use the DDQN algorithm to train three types of agents. Figure 3 As shown in the figure, the workpiece allocation agent allocates the common accessories to the appropriate machine when the workpiece needs to be allocated or redistributed; the AGV scheduling agent selects the appropriate AGV for transportation when performing the transportation task; and the process selection agent selects the appropriate process from a set of multiple processes to be processed for processing when the machine becomes idle.
[0116] In the multi-resource flexible job shop scheduling method based on multi-agent reinforcement learning disclosed in the present invention, a centralized training and distributed execution training scheme is adopted. In the training phase, the data of all agents of the same type are concentrated together, so that the strategy and learning process can be optimized from a global perspective; in the execution phase, each agent makes decisions independently according to its own strategy without relying on the information or control of other agents. Implementation details are as follows Figure 4 shown.
[0117] In order to ensure the effectiveness of training and the stability of the environment, the training of various agents is carried out separately. The workshop simulation and training process are as follows: Figure 5 shown.
[0118] In the multi-resource flexible job shop scheduling method based on multi-agent reinforcement learning disclosed in the present invention, the network model uses the tanh function as the activation function and uses the Huber loss as the loss function for training. In terms of network optimization, the stochastic gradient descent (SGD) algorithm is used, and the momentum parameter is set to 0.9. The hyperparameter settings of the network are shown in Table 4. The training process is as follows Figure 6 shown.
[0119] In the multi-resource flexible job shop scheduling method based on multi-agent reinforcement learning disclosed in the present invention, in order to verify the effectiveness of the proposed method, 10 standard scale examples are compared with 48 sets of composite scheduling rules, and the standardized performance is used as the performance evaluation index. The calculation method is as follows:
[0120]
[0121] Among them, T baseline is the benchmark algorithm, T algorithm For comparison algorithms.
[0122] The comparison results are as follows Figure 7 As shown, the red bold line segment is the multi-resource flexible job shop scheduling method based on multi-agent reinforcement learning disclosed in the present invention.
[0123] In the multi-resource flexible job shop scheduling method based on multi-agent reinforcement learning disclosed in the present invention, in order to verify the generalization ability of the proposed method, 48 sets of composite scheduling rules are compared under 9 ultra-large-scale examples. The comparison results are as follows: Figure 8 As shown, the red bold line segment is the multi-resource flexible job shop scheduling method based on multi-agent reinforcement learning disclosed in the present invention.
[0124] Depend on Figure 7 and Figure 8 Analysis shows that the multi-resource flexible job shop scheduling method based on multi-agent reinforcement learning disclosed in the present invention has better standardized performance than the composite scheduling rules; at the same time, as the complexity of the workshop increases, the multi-resource flexible job shop scheduling method based on multi-agent reinforcement learning disclosed in the present invention far exceeds other composite scheduling rules in performance and has good adaptability.
[0125] The specific description above further illustrates the purpose, technical solutions and beneficial effects of the invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A multi-resource flexible job shop scheduling method based on multi-agent reinforcement learning, characterized by: The following steps are involved: S1. Aiming at the joint scheduling problem of workpieces, AGVs and machines in a flexible job shop, a multi-resource flexible job shop scheduling model is established with the minimization of completion time as the optimization goal; The issues include: By transforming the multi-resource flexible job shop scheduling model into a multi-agent reinforcement learning problem; Create a workpiece allocation agent to solve the workpiece allocation problem, create an AGV scheduling agent to solve the AGV selection problem, and create a process selection agent to solve the machine process selection problem; The DDQN method is used to train each agent separately.
2. The multi-resource flexible job shop scheduling method based on multi-agent reinforcement learning according to claim 1 is characterized in that: A multi-resource flexible job shop scheduling model is established, wherein the multi-resource flexible job shop scheduling model includes hard constraints, soft constraints, workpiece status information, AGV status information and machine status information in the flexible job shop.
3. The multi-resource flexible job shop scheduling method based on multi-agent reinforcement learning according to claim 2 is characterized in that: The multi-resource flexible job shop scheduling model is established to transform the multi-resource flexible job shop scheduling problem into a multi-agent reinforcement learning problem, specifically including: By transforming the multi-resource flexible job shop scheduling model into a multi-agent reinforcement learning problem; Create a workpiece allocation agent to solve the workpiece allocation problem, create an AGV scheduling agent to solve the AGV selection problem, and create a process selection agent to solve the machine process selection problem; The DDQN method is used to train each agent separately.
4. The multi-resource flexible job shop scheduling method based on multi-agent reinforcement learning according to claim 3 is characterized in that: Create an artifact allocation agent to solve the artifact allocation problem, including: When a workpiece needs to be allocated or re-allocated, the workpiece allocation agent allocates the workpiece to the appropriate machine; Construct the state space, action space and reward function of the artifact allocation agent; 4.1 Construct the state space of the artifact allocation agent as follows: (1) Machine utilization in, For Machine The actual processing time, For Machine Running time; (2) The processing time of the remaining processing steps of the machine in, For Machine A collection of processes to be processed. For workpiece Processing time of the current operation (3) Number of machine processing steps to be completed in, For Machine Processing process collection (4) Workpiece transfer time across machines in, is the travel time from AGV to the location of the workpiece, The time required for the AGV to transport the workpiece to the target location; 4.
2. Construct the action space of the artifact allocation agent as follows: The action space of the workpiece allocation agent can be defined as the selection category of machines and equipment in the workshop; 4.
3. Construct the reward function of the artifact allocation agent as follows: in, Refers to the process allocation agent The rewards of making decisions at all times, Refers to the waiting time of the workpiece in the machine.
5. The multi-resource flexible job shop scheduling method based on multi-agent reinforcement learning according to claim 3 is characterized in that: Create an AGV scheduling agent to solve the AGV selection problem, including: When performing a handling task, the AGV scheduling agent selects the appropriate AGV for handling; Construct the state space, action space and reward function of the AGV scheduling agent; 5.
1. Construct the state space of the AGV scheduling agent as follows: (1) Current status of AGV in, Assemble for AGV; (2) Estimated time for AGV to move to the workpiece location in, for From current location To the workpiece location The travel time between (3) The remaining completion time of the AGV in performing the previous handling task in, for The estimated completion time of the last handling task. is the current time; 5.
2. Construct the action space of the AGV scheduling agent as follows: The action space of the AGV scheduling agent directly corresponds to the selection of AGV vehicles in the workshop; 5.
3. Construct the reward function of the AGV scheduling agent as follows: in, Refers to the process allocation agent The rewards of making decisions at all times, Refers to the waiting time of the workpiece in the machine.
6. The multi-resource flexible job shop scheduling method based on multi-agent reinforcement learning according to claim 3 is characterized in that: Create a process selection agent to solve the machine process selection problem, including: When the machine becomes idle and the set of pending operations is not empty, the operation selection agent selects a suitable operation from the set of pending operations for processing; Construct the state space, action space and reward function of the process selection agent; 6.
1. Construct the state space of the process selection agent as follows: (1) The processing time of the current process of the workpiece in, Point to the machine Workpiece on Current process processing time; (2) The remaining processing time of the workpiece in, Point to the machine Workpiece on Together with the processing time required for the current operation; (3) Number of workpieces to be processed in, Point to the machine Workpiece on A set of processes; (4) The workpiece’s stagnation time in the machine buffer in, is the current time, is the time when the workpiece arrives at the machine; 6.
2. Construct the action space of the process selection agent as follows: Six common order selection rules are selected as the action space of the process selection agent, as shown below: (1) First-in, first-out (FIFO); (2) Select the workpiece with the shortest processing time in the current process (SPT); (3) Select the workpiece with the shortest remaining processing time (SRPT); (4) Select the workpiece with the longest remaining processing time (LRPT); (5) Select the workpiece with the fewest remaining operations (FRO); (6) Select the workpiece with the longest waiting time (LWT); 6.3 Construct the reward function of the process selection agent. If the workpiece can complete the processing process within the specified time, a positive reward will be given. Otherwise, a corresponding penalty will be given. The specified time is set to 10 time steps, as shown below: in, Refers to the process selection agent The rewards of making decisions at all times, Refers to the time it takes for a workpiece to be processed from the time it starts waiting to be processed to the time it is actually processed.
7. The multi-resource flexible job shop scheduling method based on multi-agent reinforcement learning according to claim 3 is characterized in that: Use the DDQN method to train each agent separately, including: The DDQN method uses two independent networks to select and evaluate action values to reduce over-estimation during training. The target value is calculated as follows: in, refer to Always perform actions The immediate reward you get after is the discount factor, Refers to calculating the next state based on the target network Take the best action value, represents the parameters of the target network, Represents the parameters of the current network; In the At the iteration, by minimizing the loss function To train the network, the calculation is as follows: in, Refers to the result obtained after executing the action in the current state value, Refers to the best action taken according to the target network value.
8. The multi-resource flexible job shop scheduling method based on multi-agent reinforcement learning according to claim 1 is characterized in that: Verify the superiority of the proposed method at different scales, including: By comparing with existing heuristic algorithms, the performance of various agents in the proposed method at different scales is verified; Furthermore, compared with the composite heuristic scheduling algorithm, the superiority of the proposed method at different scales is verified.
Citation Information
Cited By
Flexible assembly job shop green dynamic multi-target scheduling method under personnel learning effect
CN119739131A
Multi-agent dynamic flexible job shop scheduling solving method based on D3QN network
CN120146146A
Man-machine collaborative assembly line scheduling method and system based on reinforcement learning
CN121504047A
