Dynamic scheduling method and system for unstable hybrid job shop with randomly arrived orders
By adopting the deep reinforcement learning framework of multi-agent and double-layer action space in dynamic scheduling, we solve the problems of huge state space and action space, computational complexity and reward design in the scheduling problem, and realize the dynamic scheduling optimization in the mixed job shop. , improving production efficiency and energy utilization.
Patent Information
- Application Number
- CN202410878821.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-10-15
AI Technical Summary
When solving dynamic scheduling problems, existing technologies face problems such as huge state space and action space, large consumption of computing resources, complex uncertainties, and reward function design problems, resulting in low efficiency in the application of deep reinforcement learning in scheduling problems.
Adopting an end-to-end Markov decision-making process, setting up multi-agent and double-layer action spaces, optimizing state space exploration and action selection through the memory playback buffer mechanism and greedy rule strategy in the Q-network training phase, the design is based on machine and Operational reward mechanism to achieve scheduling optimization.
It effectively reduces the training complexity and overall completion time, improves production efficiency and energy utilization, and realizes real-time processing and optimization of dynamic scheduling of mixed job workshops in an uncertain environment.
Smart Images

Figure CN118780540A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent manufacturing and scheduling optimization, and mainly relates to a dynamic scheduling method and system for an unstable mixed job shop with randomly arriving orders. Background Art
[0002] Scheduling problem refers to the problem of how to allocate limited resources under the premise of meeting specific requirements. The variables involved in the shop scheduling problem are usually discrete variables, and its mathematical programming model has the characteristics of difficult modeling, many constraints, huge solution space and complex calculation. The job shop scheduling problem is one of the most typical shop scheduling models. In the JSP problem, the processing task is called a "workpiece", and each workpiece is processed according to a certain number of processes but in a different order. With the increasing complexity of production scheduling problems, the importance of solving complex shop type scheduling problems has become increasingly apparent. Hybrid job shop scheduling problem is a combination of parallel machine scheduling and job shop scheduling. It allows multiple parallel candidate machines to be used for processing in one process, and the parallel machines are heterogeneous.
[0003] The Dynamic Job Shop Scheduling Problem (DFJSP) is a scheduling problem that is more extensive and in line with actual production conditions, based on the traditional fixed scheduling model, taking into account various emergencies in the actual production environment, such as machine failures, emergency order insertions, delivery date changes, and processing time changes. It has become one of the hot topics in the field of scheduling research. Therefore, studying dynamic scheduling problems has important theoretical significance and engineering value. The study of dynamic scheduling problems is of great significance to improving the efficiency of production workshops. Stable and efficient dynamic scheduling algorithms can greatly reduce the cost loss when encountering emergencies in the production process. However, as a strong NP-hard problem, a stable and efficient solution method for dynamic scheduling is still a difficult point in current research. Common methods for solving DFJSP problems include scheduling rules, metaheuristic algorithms, and machine learning algorithms. In recent years, with the continuous development of artificial intelligence technology, deep reinforcement learning algorithms have provided new ideas for solving scheduling problems in complex and uncertain environments.
[0004] Deep reinforcement learning (DRL) is a machine learning method that learns behavioral strategies through interaction with the environment. The core concepts of DRL include the design of agents, environments, states, actions, rewards, and the training of neural networks. Agents select and execute actions through trained neural networks, interact with the environment, and adjust their strategies based on the rewards obtained from the environment to maximize the cumulative rewards. In the study of scheduling problems, DRL is widely used to solve complex and dynamic scheduling problems. For example, in the dynamic flexible job shop scheduling problem, DRL can help agents learn how to optimally allocate resources and schedule tasks under different emergencies to improve production efficiency and cope with uncertainty. By constantly trying and adjusting strategies, DRL can find better scheduling solutions and reduce delays and costs in the production process. However, the application of reinforcement learning in the study of scheduling problems at this stage still faces some challenges. First, the state space and action space of the scheduling problem are usually very large, resulting in the training process of the DRL algorithm requiring a lot of computing resources and time. Second, the uncertainty and complexity in the actual production environment increase the difficulty of designing and debugging the DRL algorithm. Finally, how to design an effective reward function to guide the agent to learn a scheduling strategy that meets actual needs is also an important research problem. Therefore, although deep reinforcement learning has shown great potential in the study of scheduling problems, its application methods still need to be further explored and optimized. Summary of the invention
[0005] The present invention is aimed at the problems existing in the prior art, and provides a method and system for dynamic scheduling of unstable mixed job shops with randomly arriving orders. In the model building stage, an end-to-end Markov decision process is established, and by setting multiple stage-based agents, the rapid expansion of action and state space under large-scale problem factors is avoided, and a reasonable training time is guaranteed. In the Q-network training stage, a memory playback buffer mechanism is set to collect training data, and the timing of rescheduling is determined according to the order arrival time and the machine failure time. The action selection strategy based on greedy rules is used to achieve full exploration of the state space, and a double-layer action space is introduced to determine the order and location of operation execution. In the Q-network testing stage, a certain scale of test examples are input, and a solution is generated using the trained network. The present invention aims to minimize the maximum completion time and total energy consumption, and has broad application value and use prospects in the field of intelligent manufacturing.
[0006] In order to achieve the above-mentioned object, the technical solution adopted by the present invention is: a method for dynamic scheduling of unstable mixed job shops with randomly arriving orders, comprising at least a model building phase, a Q-network training phase, and a Q-network testing phase;
[0007] A. Model building stage: The scheduling problem is modeled as a multi-agent based Markov decision process (MDP), expressed as M(S, A, P, R); where S represents the real-time state of the agent in the environment, A represents the set of actions, P gives the state transition probability distribution after the state S takes action A, and R is the return or reward, which occurs after the state performs the action; by setting up multiple agents based on stages, the rapid expansion of the action and state space is avoided, and the training time is guaranteed;
[0008] BQ-network training phase: Combined with the Q-target value network, a reward-based loss function is designed and the experience replay mechanism is used to complete the training of the Q-current value network parameters whose input is the state feature and output is the action selection probability; during the training process, a memory replay buffer mechanism is set to collect training data, and the rescheduling timing is determined according to the order arrival time and machine failure time; a two-layer action execution strategy is introduced to determine the operation execution location and order; and a greedy rule-based action selection strategy is used to achieve full exploration of the state space;
[0009] C: Q-network testing phase: After the test case is input, the trained neural network is used dynamically to select operations and machines according to the arrival time of the operations at each phase, and the process is executed multiple times until all operations are completed.
[0010] As an improvement of the present invention, in the model building stage, the agent is a stage in the hybrid job shop production mode; the input features of the state at least include the waiting operation, machine idle time and partial feasible solutions of the current stage; the action space is designed as a hierarchical multi-action space, represented by A=A op ×A mac , where A op Represents the operation action space, A mac Represents the machine action space; the stage selects actions and executes them through a deep neural network, which is determined by the state s k,i Transition to the next state s k,i+1 After the state transition occurs, the machine release / idle time, the operation completion progress of the job, and the operation completion time variables are updated numerically; when the state changes from s k,i Transfer to k,i+1 When , the agent obtains rewards from the environment, which are based on the machine idle time and processing time to achieve the maximum completion time and minimize the total energy consumption.
[0011] As another improvement of the present invention, the Q-network training stage specifically includes the following steps:
[0012] B1: Initialize network parameters and set a size of Size B Buffer area B stores training data; set the sampling batch size length;
[0013] B2: Determine the initial state s of each stage based on the scheduling problem sample k,i and the initial action space A k,i , the values of some feasible solution vectors in the initial state characteristics are initialized to 0;
[0014] B3: For state s k,i ,If a new operation arrives, the new operation is added to the operation action space and waits for processing;
[0015] B4: Select action a using the ε-greedy strategy k,i , randomly select actions with probability ε; use the Q-current value network with probability 1-ε to obtain the operation and machine action space probability distribution Q op (s k,i ; A op k,i θ op ) and Q mac (s k,i ; A mac k,i θ mac ), and then choose the action with the highest probability;
[0016] B5: Execute action a k,i , update the machine completion time, stage completion time, and workpiece completion time variable values of stage k;
[0017] B6: If a machine fails, whether to reschedule the operation is determined based on whether the machine is idle;
[0018] B7: Calculate reward r k,i , complete status s k,i arrive k,i+1 's conversion, and record (s k,i ,a k,i ,r k,i ,s k,i+1 ) into buffer area B;
[0019] B8: If the number of records is greater than length, randomly select length records; for each record, input s into the two Q-target value networks k,i+1 Get the output value;
[0020] B9: Calculate the loss function based on the output results of the Q-current value network and the Q-target value network, and update the Q-current value network parameters through back propagation;
[0021] B10: Order s k,i Equal to s k,i+1and increment i by 1; if all operations are completed, jump to B11; otherwise, jump to step B3;
[0022] B11: Update the number of iterations e, and every E T The target value network parameters are updated once in each iteration and are equal to the current value network parameters; if the iteration limit E is reached, the training is stopped; otherwise, jump to step B2 to continue training.
[0023] In order to achieve the above-mentioned purpose, the present invention also adopts a technical solution: a dynamic scheduling system for an unstable mixed job shop with randomly arriving orders, including a computer program, which implements the steps of any of the above-mentioned methods when executed by a processor.
[0024] Compared with the prior art, the present invention has the following beneficial effects: the present invention discloses a system and method for dynamic scheduling of an unstable mixed job shop with random arrival of orders, and processes the scheduling problem of a mixed job shop with uncertain factors in a dynamic manufacturing scenario based on an end-to-end deep reinforcement learning framework, thereby reducing the overall completion time and energy consumption; the present invention reduces the training complexity under the constraints of mass production tasks and ensures real-time scheduling by establishing a Markov decision process based on multiple agents; accurately and reasonably completes the action selection of the state by designing a two-layer action space based on machines and operations, and determines the location and order of operation execution; by setting a multi-factor reward mechanism, ensures the optimal balance between the mutually exclusive dual objectives, and enhances the learning feedback effect of the reinforcement learning model. The present invention comprehensively considers the real-time processing method of workshop scheduling under the dynamic arrival of workpieces and machine failures, effectively optimizes the order processing timing and allocation process, thereby improving the production efficiency and energy utilization of the entire process, and has broad application value and use prospects in the fields of intelligent manufacturing and scheduling optimization. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a structural diagram of the two-layer system architecture of the hybrid job shop scheduling of the present invention;
[0026] Figure 2 It is a schematic diagram of the Markov decision process of the present invention;
[0027] Figure 3 It is a normalized schematic diagram of some feasible solutions in the state characteristics of the present invention;
[0028] Figure 4 It is a schematic diagram of three possible distributions of state transitions occurring in the present stage;
[0029] Figure 5 It is a flow chart of the steps in the Q network training phase of the present invention. DETAILED DESCRIPTION
[0030] The present invention will be further explained below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the following specific embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention.
[0031] Example 1
[0032] A method for dynamic scheduling of unstable mixed job shops with randomly arriving orders is applied to a two-layer system architecture of mixed job shop scheduling under at least one uncertain environment, such as Figure 1 As shown, the two-layer system architecture includes a customer module and a supplier module, wherein:
[0033] Customer module: Customers put forward production requirements to suppliers, and production requirements are in the form of manufacturing orders (represented by J i , i={1,…,N}, where N is the total order quantity) arrives at the production workshop in batches, each batch contains N(J i ) workpieces, and the order arrival time (TJ i ,i={1,…,N})dynamically distributed.
[0034] Supplier Module: Contains a hybrid job shop that can handle dynamic requests, which requires each workpiece to follow a pre-set process The processing sequence passes through all processing stages in sequence, where s represents the number of processing stages. Workpiece j can select parallel machines m at each processing stage k. k A machine q (q={1,…,m k}) The products are processed and transported to the next stage in batches by transport vehicles.
[0035] In the two-layer system architecture of the hybrid job shop scheduling, the workpieces in the same batch are processed in the same order, but there is no continuous processing constraint. The workpiece process cannot be repeated, and the workpieces follow a non-preemptive mode. The parallel machines in the workshop are heterogeneous, that is, the main consideration is the difference in processing speed between parallel machines, and the processing time of the workpieces of each machine does not overlap; the transport vehicles in the workshop are homogeneous and have load restrictions. According to the system scenario, for each trip, the workpieces carried by the transport vehicle should belong to the same order or are about to arrive at the same subsequent stage (same processing direction).
[0036] A method for dynamic scheduling of unstable hybrid job shops with random order arrival based on the above two-layer system architecture for hybrid job shop scheduling includes at least a model building phase, a q network training phase, and a q network testing phase.
[0037] A. Model building phase: The scheduling problem is modeled as a multi-agent based Markov decision process (MDP), expressed as M(S, A, P, R), such as Figure 2As shown in the figure, S represents the real-time state of the agent in the environment, A represents the set of actions, P gives the state transition probability distribution after the state S takes action A, and R is the return or reward, which occurs after the state executes the action.
[0038] The Markov decision process in the model building phase requires detailed provisions for the agent, state, action, reward, and state transition, as follows:
[0039] A1. Agent: Consider a stage in the manufacturing system environment as an agent, and multiple stages in the mixed workshop production mode constitute multiple agents. When the machine in the stage is idle and there is a job waiting queue, the stage performs an action;
[0040] A2. State: As the input of deep reinforcement learning, the state can represent the local features of the agent at the current moment. The local features of the state include the waiting operation, machine idle time and partial feasible solutions of the current stage. The waiting operation represents the set of operations that can be performed when the machine in the current stage is idle, which can be represented as a one-dimensional binary vector, whose size is equal to the number of workpieces. The machine idle time feature refers to the idle time of all machines in the stage under the current state. The partial feasible solution feature is designed to be a one-dimensional vector containing the execution order information of a certain stage at the current moment, and each value represents the execution order number of the operation. In order to ensure the consistency of the quantity of state features in each stage, the size of the partial feasible solution vector is the sum of the number of operations of all workpieces and the number of machines in the current stage.
[0041] The features need to be normalized. For the waiting operation set, each value is a Boolean type to indicate whether the operation is waiting for processing in a certain state, so there is no need to normalize the waiting operation vector. For the machine idle time, the normalization factor is set to the maximum estimated completion time ET, and the calculation formula is as follows:
[0042]
[0043] Where NJ is the total number of workpieces in all orders, For operation O j,k The processing time of the machine with the minimum speed is selected. The idea of ET estimation is to assume that all operations are processed by the same machine at each stage.
[0044] like Figure 3 As shown, for the partially feasible solution vector Sol, each value is scaled according to the total number of operations of all workpieces so that it is in the range of 0 to 1. The final characteristic representation of the partially feasible solution is:
[0045]
[0046] Among them, Select(j) represents the scheduling sequence number of job j in the current stage;
[0047] A3. Action: The set of actions that the agent performs when a state transition occurs. Since the operation needs to select a machine before sorting, the action space is designed as a hierarchical multi-action space, represented by A=A op ×A mac , where A op Represents the operation action space, A mac Represents the machine action space. If there is an operation waiting to be processed in a certain stage, an action is selected in the operation and machine action space respectively. In addition, an empty action φ0 is added to the operation action space to indicate a situation where there is no operation to be selected;
[0048] A4. State transition: After the stage completes the selection and execution of the action, its current state s k,i Transition to the next state s k,i+1 After the state transition occurs, the variables such as machine release / idle time, operation completion progress of the job, operation completion time, and current stage completion time need to be updated numerically to indicate the change in the environment;
[0049] A5. Reward: When the state changes from s k,i Transfer to k,i+1 When , the agent gets rewards from the environment. The optimization objectives of the entire scheduling system are to maximize the completion time and minimize the total energy consumption. In order to achieve the simultaneous optimization of the two objectives using deep reinforcement learning, a reward mechanism based on machine idle time and processing time is designed. The reward mechanism is divided into three parts, which reflect different optimization effects respectively. The formula is:
[0050]
[0051] in,
[0052]
[0053] represents the machine idle time, where Indicates state s k,i The selected machine The release time of Refers to the state k,i Selected Machine In status k,i-1 The release time. For operation O j,k In the machine The actual processing time. When the machine idle time is reduced, the total completion time and standby energy consumption will be reduced. Therefore, the reward is negatively correlated with the machine idle time. According to action a k,i Is it a no-op φ0? The calculation method changes.
[0054]
[0055] It represents the difference between the completion time of the selected machine in the next state and the completion time of the stage in the current state. k,i Indicates state s k,i The completion time of the next stage is the maximum release time of all machines in the stage. Figure 4 There are three possible distributions of state transitions in the stages. Figure 4 In the state (a), you need to select an operation action and a machine action to enter the next state. Assume that operation O is selected as the operation action. Next, the machine action is selected. Since there are three candidate processing machines (M1, M2, M3) in operation O at this time, there are three distributions of the next state of the stage, such as Figure 4 (b)-(d) are shown. Calculate under three possible distributions Recorded as but It can be seen that when a state transition occurs, selecting the machine with a small completion time in the current state as the processing machine to be operated in the next state is conducive to shortening the completion time in the short term, that is, The smaller the better. Therefore, the regulation The smaller it is, the higher the reward.
[0056]
[0057] In , ω represents the target preference degree, which takes values between 0 and 1. For , due to the different speeds among parallel machines, the smaller the speed, the longer the machine processing time, but the less processing energy consumption. Therefore, using The size of the reaction energy consumption. Since there are contradictory characteristics between the two optimization goals, setting ω means determining the size of the reward set by considering the energy consumption goal according to the goal preference;
[0058] BQ network training phase: Combined with the Q-target value network, a reward-based loss function is designed and the experience replay mechanism is used to complete the training of the Q-current value network parameters whose input is the state feature and output is the action selection probability, such as Figure 5 shown.
[0059] The Q network training phase specifically includes the following steps:
[0060] B1: Initialize the Q-current value network and Q-target value network parameters θ for machine selection mac and Parameters θ of the Q-current value network and Q-target value network for action selection op and And order Set a size to Size B Buffer area B stores training data; set the sampling batch size length;
[0061] B2: According to the scheduling problem sample, determine the number of workshop stages and order arrival time, and then determine the initial state s of each stage k,i and the initial action space A k,i The values of some feasible solution vectors in the initial state characteristics are initialized to 0;
[0062] B3: For state s k,i At stage k, if a new operation arrives, the new operation is added to the operation action space to wait for processing; the step B3 specifically includes:
[0063] B301: Determine in state s k,i The criterion for a new operation to arrive is that the arrival time of the operation is less than or equal to the minimum completion time of all machines in the stage under that state;
[0064] B302: If a new operation arrives, add it to the operation action space A op k,i In the state s k,i One of the candidate actions in the process of transfer occurs;
[0065] B4: Select action a using the ε-greedy strategy k,i , that is, randomly select an action with a probability of ε; use the Q-current value network with a probability of 1-ε to obtain the operation and machine action space probability distribution Q op (s k,i ; A op k,i θ op ) and Q mac (s k,i ; A mac k,i θ mac ), and then choose the action with the highest probability.
[0066] In step B4, the ε-greedy strategy is used to select actions, and the specific steps are:
[0067] B401: Set the variable ε. If ε, then according to the random function Randoma(A k,i ) in the machine and operation action space A mac k,i and A op k,i Randomly select actions within; if 1-ε, then according to the network output result Q op (s k,i ; A op k,i θ op ) and Q mac (s k,i ; A mac k,i θ mac ) Choose the action with the highest probability a op k,i and a mac k,i , as follows:
[0068]
[0069] Where, u = {'op', 'mac'};
[0070] B402: Update ε. ε decays during the training iteration process, and the lower bound is ε_min, and the decay rate is d. The update rule is as follows:
[0071]
[0072] B5: Execute action a k,i , update the machine completion time, stage completion time, workpiece completion time and other variable values of stage k. The specific update description of the variables is:
[0073] B501: Status k,i Next, machine q (q={1,…,m i}) The completion time is recorded as TCM k,i,q , in the initial state (i=1) TCM k,i,q The value of is 0. In other states, if the selected action is not empty, the completion time of the selected machine increases until the selected operation is completed; if the action space is empty, the machine waits for the operation to arrive, and updates the completion time of all machines to the earliest arrival operation time, TCM k,i,q The calculation formula is:
[0074]
[0075] Among them, a k,i =a op k,i ∪a mack,i ,TA j,k Indicates operation O j,k The arrival time, Ω op represents the set of unprocessed workpieces in stage k;
[0076] B502: In each state, the completion time of the stage is updated to the maximum completion time of all machines in the stage. k,i The completion time is recorded as TCS k,i , and its calculation formula is:
[0077]
[0078] B503: The completion time of an operation depends on the stage state when the operation is selected for processing. k,i If operation O j,k is selected to be processed on machine q, then O j,k The completion time is:
[0079]
[0080] B6: If a machine fails, whether to reschedule the operation is determined based on whether the machine is idle.
[0081] The specific steps of B6 are:
[0082] B601: The machine fault time T_fault occurs at s k,i to k,i+1 During the transfer process, the judgment condition is that T_fault is less than or equal to TCM k,i,q ;
[0083] B602: If machine q is idle when it fails, then m k =m k -1, A mac k,i =A mac k,i -{q};
[0084] B603: If machine q is in the processing state when the machine fails, the operation processed on the machine is rescheduled, that is, the variable value change operation of B602 is executed, and then in state s k,i Next, re-enter the action space A k,i Select the operation and machine to process;
[0085] B7: Calculate reward r k,i , complete status s k,i arrive k,i+1 's conversion, and record (s k,i ,a k,i,r k,i ,s k,i+1 ) into buffer area B;
[0086] B8: If the number of records is greater than length, randomly select length records. For each record, enter s in the two Q-target value networks. k,i+1 Get the output value;
[0087] B9: Calculate the loss function based on the output results of the Q-current value network and the Q-target value network, and update the Q-current value network parameters through back propagation. The loss function is calculated based on the Q-current value and Q-target value, and its formula is as follows:
[0088]
[0089] Among them, F(s k,i ) is a Boolean variable. If state i is not the last state, F(s k,i )=1; otherwise, F(s k,i )=0;
[0090] In step B9, due to the differences in the optional action space in each state, a masked sigmoid activation function is used, and the specific steps are as follows:
[0091] B901: For each operation, if it is a legal operation in the current state, let it correspond to the mask mask (a u k,i )=1; otherwise 0;
[0092] B902: The sum of the output of the linear layer and the natural logarithm of the mask is used as the input of the sigmoid activation function to calculate the execution probability of each action. The calculation formula is:
[0093]
[0094] Among them, Y(a u k,i ) represents the output of the linear layer in the neural network;
[0095] B10: Order s k,i =s k,i+1 , i=i+1. If all operations are completed, jump to B11; otherwise, jump to step B3;
[0096] B11: Update the number of iterations e, and every E T Update the target value network parameters once iteratively. If the iteration limit is reached, that is, e=E, the training is stopped; otherwise, jump to step B2 to continue training;
[0097] C: Q-network testing phase: After the test case is input, the trained neural network is used dynamically to select operations and machines according to the arrival time of the operations at each phase. This process is performed multiple times until all operations are completed.
[0098] It should be noted that the above content only illustrates the technical idea of the present invention and cannot be used to limit the protection scope of the present invention. For ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications all fall within the protection scope of the claims of the present invention.
Claims
1. A method for dynamic scheduling of unstable mixed job shops with randomly arriving orders, characterized by: At least includes a model building phase, a Q-network training phase, and a Q-network testing phase; A. Model building stage: The scheduling problem is modeled as a multi-agent based Markov decision process (MDP), expressed as M(S, A, P, R); where S represents the real-time state of the agent in the environment, A represents the set of actions, P gives the state transition probability distribution after the state S takes action A, and R is the return or reward, which occurs after the state performs the action; by setting up multiple agents based on stages, the rapid expansion of the action and state space is avoided, and the training time is guaranteed; BQ-network training phase: Combined with the Q-target value network, a reward-based loss function is designed and the experience replay mechanism is used to complete the training of the Q-current value network parameters whose input is the state feature and output is the action selection probability; during the training process, a memory replay buffer mechanism is set to collect training data, and the rescheduling timing is determined according to the order arrival time and machine failure time; a two-layer action execution strategy is introduced to determine the operation execution location and order; and a greedy rule-based action selection strategy is used to achieve full exploration of the state space; C: Q-network testing phase: After the test case is input, the trained neural network is used dynamically to select operations and machines according to the arrival time of the operations at each phase, and the process is executed multiple times until all operations are completed.
2. The method for dynamic scheduling of unstable mixed job shops with randomly arriving orders as claimed in claim 1, characterized in that: In the model building stage, the agent is a stage in the hybrid job shop production mode; the input features of the state include at least the waiting operation, machine idle time and partial feasible solutions of the current stage; the action space is designed as a hierarchical multi-action space, represented by A=A op ×A mac , where A op Represents the operation action space, A mac Represents the machine action space; the stage selects actions and executes them through a deep neural network, which is determined by the state s k,i Transition to the next state s k,i+1 After the state transition occurs, the machine release / idle time, the operation completion progress of the job, and the operation completion time variables are updated numerically; when the state changes from s k,i Transfer to k,i+1 When , the agent obtains rewards from the environment, which are based on the machine idle time and processing time to achieve the maximum completion time and minimize the total energy consumption.
3. The method for dynamic scheduling of unstable mixed job shops with randomly arriving orders as claimed in claim 1, characterized in that: The Q-network training phase specifically includes the following steps: B1: Initialize network parameters and set a size of Size B Buffer area B stores training data; set the sampling batch size length; B2: Determine the initial state s of each stage based on the scheduling problem sample k,i and the initial action space A k,i , the values of some feasible solution vectors in the initial state characteristics are initialized to 0; B3: For state s k,i ,If a new operation arrives, the new operation is added to the operation action space and waits for processing; B4: Select action a using the ε-greedy strategy k,i , randomly select actions with probability ε; use the Q-current value network with probability 1-ε to obtain the operation and machine action space probability distribution Q op (s k,i ; A op k,i θ op ) and Q mac (s k,i ; A mac k,i θ mac ), and then choose the action with the highest probability; B5: Execute action a k,i , update the machine completion time, stage completion time, and workpiece completion time variable values of stage k; B6: If a machine fails, whether to reschedule the operation is determined based on whether the machine is idle; B7: Calculate reward r k,i , complete status s k,i arrive k,i+1 's conversion, and record (s k,i ,a k,i ,r k,i ,s k,i+1 ) into buffer area B; B8: If the number of records is greater than length, randomly select length records; for each record, input s into the two Q-target value networks k,i+1 Get the output value; B9: Calculate the loss function based on the output results of the Q-current value network and the Q-target value network, and update the Q-current value network parameters through back propagation; B10: Order s k,i Equal to s k,i+1 and increment i by 1; if all operations are completed, jump to step B11; otherwise, jump to step B3; B11: Update the number of iterations e, and every E T The target value network parameters are updated once in each iteration and are equal to the current value network parameters; if the iteration limit E is reached, the training is stopped; otherwise, jump to step B2 to continue training.
4. The method for dynamic scheduling of unstable mixed job shops with randomly arriving orders as claimed in claim 3, characterized in that: In step B3, the state s is determined. k,i The criterion for whether a new operation arrives is: the arrival time of the operation is less than or equal to the minimum completion time of all machines in the stage under this state. If a new operation arrives, it is added to the operation action space A. op k,i In the state s k,i One of the candidate actions during the transfer process.
5. The method for dynamic scheduling of unstable mixed job shops with randomly arriving orders as claimed in claim 4, characterized in that: In step B4, the ε-greedy strategy is used to select actions, and the specific steps are: B401: Set the variable ε; if ε, then according to the random function Randoma(A k,i ) in the machine and operation action space A mac k,i and A op k,i Randomly select actions within; if 1-ε, then according to the network output result Q op (s k,i ; A op k,i θ op ) and Q mac (s k,i ; A mac k,i θ mac ) Choose the action with the highest probability a op k,i and a mac k,i ; Where, u = {'op', 'mac'}; B402: Update ε; ε decays with the training iteration process, and the decay rate is d. When the value of ε is less than the lower bound ε_min, ε is updated to ε_min; 6. The method for dynamic scheduling of unstable mixed job shops with randomly arriving orders as claimed in claim 5, characterized in that: In step B5, the specific steps of updating the variable values of the machine completion time, stage completion time, and workpiece completion time of stage k are as follows: B501: In the initial state of each stage, the completion time value of all machines is 0; in other states, if the selected action is not empty, the completion time of the selected machine increases until the selected operation is processed; if the action space is empty, the machine waits for the operation to arrive, and the completion time of all machines is updated to the earliest arrival operation time; B502: In each state, the completion time of the stage is updated to the maximum completion time of all machines in the stage; B503: The completion time of an operation depends on the stage state when the operation is selected for processing; if the operation is selected in the initial state, its completion time is equal to its processing time; if it is selected in other states, the completion time is the same as the completion time of the selected machine.
7. The method for dynamic scheduling of unstable mixed job shops with randomly arriving orders as claimed in claim 6, characterized in that: The specific steps of whether to reschedule the operation in step B6 are: B601: The machine fault time T_fault occurs at s k,i to k,i+1 During the transfer process, the judgment condition is that T_fault is less than or equal to TCM k,i,q ; B602: If machine q is idle when it fails, then m k The number of is reduced by one, and machine q is removed from the machine action space; B603: If machine q is in the processing state when the machine fails, the operation processed on the machine is rescheduled, that is, the variable value change operation of B602 is executed, and then in state s k,i Next, re-enter the action space A k,i Select the operation and machine to process.
8. The method for dynamic scheduling of unstable mixed job shops with randomly arriving orders as claimed in claim 7, characterized in that: In step B9, the loss function is calculated according to the Q-current value and the Q-target value, and the formula is as follows: Among them, F(s k,i ) is a Boolean variable. If state i is not the last state, F(s k,i )=1; otherwise, F(s k,i )=0; Due to the differences in the optional action space under each state, a sigmoid activation function with a mask is used. For each operation, if it is a legal operation under the current state, the mask mask (a u k,i )=1; otherwise 0; the sum of the output of the linear layer and the natural logarithm of the mask is used as the input of the sigmoid activation function to calculate the execution probability of each action. The calculation formula is: Among them, Y(a u k,i ) represents the output of the linear layer in the neural network.
9. A system for dynamic scheduling of unstable mixed job shops with randomly arriving orders, comprising a computer program, characterized in that: When the computer program is executed by a processor, the steps of any one of the above methods are implemented.
Citation Information
Cited By
Depth map reinforcement learning generation method for multi-task multi-criterion resource scheduling
CN119204095A
A Deep Graph Reinforcement Learning Generation Method for Multi-task and Multi-criteria Resource Scheduling
CN119204095B
AI production operation management method based on large model
CN120069489A
Knowledge and data hybrid-driven intelligent scheduling method under random arrival of batch
CN120218566A
Hybrid flow shop dynamic scheduling method and system considering machine predictive maintenance
CN121563151A
