A predictive scheduling method and system for dynamic flexible job shops
By real-time monitoring and prediction of machine failures, combined with reinforcement learning algorithms to optimize scheduling, the problems of insufficient machine failure identification and slow response in existing workshop scheduling methods have been solved, realizing efficient and intelligent production scheduling in dynamic flexible workshops.
Patent Information
- Application Number
- CN202411911096.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-12-23
AI Technical Summary
Existing workshop scheduling methods lack real-time monitoring and prediction of machine health status, making it impossible to identify potential failure risks in advance, leading to production interruptions and increased maintenance costs. Furthermore, they are slow to react in dynamic environments, relying on manual intervention to adjust production plans, resulting in a lag in the scheduling system's response.
By collecting machine operating status in real time, combining historical data and reinforcement learning algorithms, the system predicts machine failure probability, establishes a scheduling model, outputs the optimal scheduling scheme, and reschedules under trigger conditions. It integrates machine health status monitoring and fault prediction models to achieve automated and intelligent scheduling.
It effectively avoids frequent downtime caused by machine failures, improves production efficiency and machine lifespan, reduces resource waste, ensures high efficiency and continuity of the production process, and significantly improves production line stability and response speed.
Smart Images

Figure CN119717735B_ABST
Abstract
Description
Technical Field
[0001] This invention pertains to dynamic scheduling technology in industrial manufacturing, specifically relating to a predictive scheduling method and system for dynamic flexible workshops. Background Technology
[0002] With increasing complexity and uncertainty in manufacturing, traditional shop floor scheduling methods are struggling to meet production demands in dynamic environments, particularly when dealing with machine malfunctions and job insertions. These methods often exhibit slow response times, leading to production disruptions and reduced efficiency. Existing solutions typically lack predictability of machine conditions and are unable to take preventative measures before malfunctions occur.
[0003] The main problems with dynamic flexible shop floor scheduling are as follows: 1) Existing scheduling methods typically only take remedial measures after machine failures occur, lacking real-time monitoring and prediction of machine health status, and failing to identify potential failure risks in advance. This passive approach leads to production interruptions and increased maintenance costs. 2) Existing scheduling systems are slow to react to sudden situations such as job insertions, order changes, and machine failures in dynamic environments, relying on manual intervention to adjust production plans. The scheduling system's response is lagging, lacking real-time performance and intelligence. 3) Most existing scheduling systems rely on periodic maintenance strategies, unable to flexibly adjust according to actual operating conditions. Periodic maintenance may lead to over- or under-maintenance, increasing resource waste and failing to address machine failure risks in a timely manner, thus affecting production line stability and machine lifespan. Therefore, there is an urgent need for an optimization method that can predict machine failures and dynamically adjust scheduling. Summary of the Invention
[0004] This invention addresses the shortcomings of existing technologies by providing a predictive scheduling method and system for dynamic flexible workshops. It can effectively address machine failures and new job insertion issues in dynamic production environments, optimize scheduling performance, reduce workpiece delays, and improve overall production efficiency.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] In a first aspect, the present invention provides a predictive scheduling method for dynamic flexible job shops, comprising:
[0007] S1: Real-time acquisition of machine operating status to establish a mathematical model of the workshop environment;
[0008] S2: Using machines as the target, combining historical data and real-time collected data, predict the failure probability of each machine;
[0009] S3: Establish a scheduling model consisting of a workshop environment and a scheduling agent using a reinforcement learning algorithm. In the scheduling model, the machine failure probability and machine operating status obtained in the workshop environment are used as input data for the reinforcement learning algorithm, and the corresponding optimal scheduling scheme that conforms to the scheduling rules is output.
[0010] S4: Execute the optimal scheduling scheme and monitor it, and reschedule when the triggering conditions are met.
[0011] Optionally, in step S1, the machine operating status includes the machine's current load, idle time, and machine health status.
[0012] Optionally, in step S1, the mathematical model of the workshop environment satisfies the following constraints:
[0013]
[0014] C i,j,k >S i,j,k
[0015]
[0016]
[0017]
[0018]
[0019] In the formula, i, j, and k represent the workpiece index, process index, and machine index, respectively, and the i-th workpiece is denoted as J. i O i,j C represents the j-th process of the i-th workpiece; i,0 Indicates workpiece J i The start time, C i,j Indicates process O i,j Completion time; C i,j,k and S i,j,k Representing process O i,j The completion time and start time on machine k; M i,j Indicates compatible process O i,j The set of machines, ζ i,j,k Indicates workpiece J i Whether the processing was completed on machine k; if yes, the value is 1; otherwise, the value is 0. i,1,k Indicates process O i,1 The processing time on machine k, A i Indicates workpiece J i Arrival time; ε i,j_i’j’ Indicates process O i,j Is it in process O? i’,j′Previously, if yes, it was 1; otherwise, it was 0.
[0020] Optionally, in step S2, predicting the failure probability of each machine includes:
[0021] S2.1: Extract characteristic data of the machine's health status based on the machine's historical operating status data and real-time collected operating status data;
[0022] S2.2: Principal component analysis is used to reduce the dimensionality of the extracted feature data;
[0023] S2.3: The extracted feature data is used to train the random forest model to learn the relationship between feature data and faults, and then to predict the failure probability of the machine.
[0024] S2.4: Input the machine's current feature data in real time, and calculate the machine's failure probability using the random forest model as follows:
[0025] P fault (t)=f(X=f(φ) L , φ W , φ I )
[0026] In the formula, φ L For machine load, φ W For the machine's health status, φ I The idle time is denoted by f(·). The function f(·) is learned from the random forest model and is used to calculate the failure probability of the machine in a given state.
[0027] Optionally, in step S3, the scheduling objective of the scheduling model is to minimize the delay time of all tasks, as expressed below:
[0028]
[0029] In the formula, C i D represents the actual delivery time of the current workpiece. i This indicates the original delivery date of the current workpiece, and n represents the number of workpieces arriving in succession.
[0030] Optionally, in step S3, the reinforcement learning algorithm uses DDQN, which consists of one input layer, multiple hidden layers, and one output layer. The input layer takes in a state vector, and the output layer outputs five actions that conform to the scheduling rules to minimize the delay time. The number of nodes in the input layer is equal to the number of state features in the state vector, and the number of nodes in the output layer is equal to the number of actions. The state vector is an input vector generated by vectorizing the state data of all machines and workpieces. The hidden layer uses a fully connected network, with each layer containing multiple neurons and using the tanh activation function.
[0031] Optionally, in step S3, the scheduling rules include five rules for minimizing the delay time, as follows:
[0032] Rule 1: Define reference time T as the current decision point time, and the average completion time of the last operation assigned to each machine is t; if a certain workpiece J i Delivery time D i If the time is earlier than the current time T, then it is added to the delayed workpiece set. middle, Select the process with the minimum redundancy time from the set of delayed workpieces. Represented as t i Indicates a certain workpiece J i The average completion time of the last process; assigning machines to processes based on the shortest completion time, assigning them to the earliest available machine for processing, machine selection is represented as... T a The earliest available time for the current machine is determined. If several machines have the same earliest available time, the machine is randomly assigned to one of them. If the set of delayed workpieces is empty, the remaining processes for each workpiece are sorted according to the time remaining until the delivery date, and the process with the most urgent time is selected as the next processing process. Before assigning to the earliest available machine, the health status of the machine is checked. If the machine has a fault warning, other machines without fault warnings are given priority. If all machines have a fault probability, the machine with the lowest fault probability is selected.
[0033] Rule 2: Based on the remaining delivery time and the remaining processing time t of the workpiece. r Sort by the ratios, and the ratios are calculated as follows: t r (O i,j ) indicates workpiece operation O i,j The remaining processing time; select the workpiece operation with the smallest ratio to allocate the machine, and use the machine failure probability as a weighting factor during allocation, expressed as: P fault (M k ) represents machine M k The probability of failure;
[0034] Rule 3: Select the next unfinished operation from the workpiece with the greatest risk of delay and assign it to the machine with the lowest utilization rate; the greatest risk of delay is defined as: J max =argmax{D i -(T+t r (J i The machine with the lowest utilization rate is represented as Where U(M) k ) for machine M k The utilization rate; before allocation, the probability of machine failure is assessed. If the machine with the lowest utilization rate is also the machine with the highest failure risk, then machine selection is expressed as... ω1 and ω2 are weighting coefficients for utilization and failure probability;
[0035] Rule 4: Randomly select an incomplete process, prioritize excluding machines with a high probability of failure, and then assign it to the earliest available machine, represented as... And P fault (M k )≤P t P t The threshold for the maximum probability of failure;
[0036] Rule 5: From the estimated incomplete workpiece process set Select the process with the shortest remaining processing time and assign it to the earliest available machine. Machine selection is represented as...
[0037] Optionally, in step S4, the triggering conditions include: when a new task arrives at the workshop and when it is predicted that the machine will malfunction at a certain point in time.
[0038] Optionally, in step S4, during the rescheduling, the priority of all workpieces is recalculated, and a maintenance window time is reserved for the faulty machine; at the same time, the Q value of possible actions is recalculated based on the current operating status, and the optimal scheduling scheme is selected.
[0039] Secondly, the present invention provides a dynamic flexible job shop predictive scheduling system, comprising:
[0040] The data acquisition module is used to collect machine operating status in real time and establish a mathematical model of the workshop environment.
[0041] The prediction module is used to predict the failure probability of each machine by combining historical data and real-time collected data.
[0042] The optimization module is used to establish a scheduling model consisting of a workshop environment and a scheduling agent using a reinforcement learning algorithm. In the scheduling model, the machine failure probability and machine operating status obtained in the workshop environment are used as input data for the reinforcement learning algorithm, and the corresponding optimal scheduling scheme that conforms to the scheduling rules is output.
[0043] The execution module is used to execute the optimal scheduling scheme and monitor it, and reschedule when the triggering conditions are met.
[0044] The beneficial effects of this invention are:
[0045] (1) This invention integrates machine health status monitoring and fault prediction model, which can predict the fault risk of the machine based on real-time data and adjust the production plan before the fault occurs, effectively avoiding frequent downtime caused by machine aging and wear, thereby improving production efficiency and machine service life.
[0046] (2) The present invention uses a deep reinforcement learning algorithm to enable the scheduling system to respond to changes in the dynamic production environment in real time, dynamically optimize the production plan based on real-time data, realize automated and intelligent scheduling, significantly improve production efficiency, shorten response time, and reduce scheduling lag.
[0047] (3) The present invention uses a predictive maintenance mechanism to determine the best maintenance time based on the real-time failure probability of the machine, avoids excessive or insufficient maintenance, reduces resource waste, ensures that the machine is always in the best working condition, extends the machine's service life and improves the stability of the production line.
[0048] (4) This invention takes into account factors such as workpiece priority and machine failure risk, and designs flexible scheduling rules to ensure the efficiency and continuity of the production process and reduce the risk of delay. Attached Figure Description
[0049] Figure 1 This is a flowchart of a dynamic, flexible job shop predictive scheduling method.
[0050] Figure 2 This is a flowchart of the fault prediction model.
[0051] Figure 3 This is the overall framework diagram of the scheduling model.
[0052] Figure 4 This is a schematic diagram of the tool life curve. Detailed Implementation
[0053] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0054] In the entire production scheduling environment, production equipment (i.e., machines) is denoted as M. Each machine is an independent processing unit, containing a total of m processing units, denoted as M1, M2, ..., M. m There are n consecutively arriving workpieces, denoted as J1, J2, ..., Jn. nThe number of processing steps varies for each workpiece, and each step can be completed on different processing units to maximize production efficiency and equipment utilization.
[0055] In one embodiment, the present invention proposes a dynamic flexible job shop predictive scheduling method, the overall implementation process of which is as follows: Figure 1 As shown, the specific steps include:
[0056] Step 1: Within a defined production area, monitor the operating status of each machine in real time, recording its current load, idle time, and tool wear. Simultaneously, track the processing progress of all workpieces, including completed and pending processes for each workpiece. Data collected by sensors and programmable logic controllers (PLCs) is transmitted to the intelligent agent in the scheduling model, used in the mathematical model of the flexible workshop, and provides input for subsequent scheduling optimization.
[0057] In this embodiment, the scheduling objective of the scheduling model is to minimize the delay time of all tasks, as expressed below:
[0058]
[0059] In the formula, C i D represents the actual delivery time of the current workpiece. i This indicates the original delivery date for the current workpiece.
[0060] The mathematical model of the workshop environment must satisfy the following constraints:
[0061]
[0062] C i,j,k >S i,j,k (3)
[0063]
[0064]
[0065]
[0066]
[0067] Where i, j, and k represent the workpiece index, process index, and machine index, respectively, and the i-th workpiece is denoted as J. i O i,j Let C represent the j-th operation of the i-th workpiece. Equation (2) states that the completion time of each operation must be a non-negative number. i,0 Indicates workpiece J i The start time, C i,j Indicates process O i,jThe completion time; Equation (3) represents the completion time of process O. i,j The completion time C on machine k i,j,k At the start time S i,j,k Then; Equation (4) indicates that each process can only be assigned to one machine, M i,j Indicates compatible process O i,j The set of machines, ζ i,j,k Indicates workpiece J i Whether the processing is completed on machine k, if yes, is 1, otherwise is 0; Equation (5) ensures that the workpiece can only be processed after arrival, and the completion time of the first process is greater than its start time plus the arrival time of the machine, t i,1,k Indicates process O i,1 The processing time on machine k, A i Indicates workpiece J i Arrival time; Equation (6) confirms the process sequence constraints, ε i,j _ i′,j′ Indicates process O i,j Is it in process O? i’,j′ Previously, if it was 1, it was 0 otherwise; Equation (7) means that only one process can be processed on each machine at a time.
[0068] Step 2: Taking the machines as the research object, combine historical data and real-time collected data to predict the failure probability of each machine (denoted as P). fault The scheduling intelligence can intervene in advance and arrange relevant personnel for maintenance based on the real-time predicted probability of machine failure. The failure prediction model is based on the tool life curve and multiple state parameters, and specifically includes the following steps:
[0069] (1) In this embodiment, taking the cutting tool as an example, the historical running time of the machine, load level, degree of tool wear, and real-time collected tool usage time, cutting speed and cutting angle are input to plot the trend of wear over time. The curve is smoothed by the sliding window method to remove noise and extract feature points such as the sharp wear points of the tool life.
[0070] (2) Feature engineering is used to extract feature values such as wear rate and life inflection point from the tool life curve. These feature values can well reflect the current health status of the machine. Principal component analysis (PCA) is used to reduce the dimensionality of the extracted features to reduce the computational complexity of the model.
[0071] (3) The extracted feature data is used to train the random forest model. The random forest model learns the relationship between each feature and the fault by integrating multiple decision trees and using the machine's historical data, thereby predicting the risk of future faults. Cross-validation is used to evaluate the predictive performance of the model to ensure its generalization ability on different datasets.
[0072] (4) During actual operation, the machine's current characteristic data is input in real time, and combined with the tool life curve, the machine's failure probability is calculated. Failure probability P fault The calculation formula is as follows:
[0073] P fault (t)=f(X=f(φ) L , φ W , φ I (8)
[0074] Where, φ L For machine load, φ W For the health status of the machine, taking the cutting tool as an example, it refers to the degree of tool wear, φ I This represents the idle time. The function f(·) is learned from the random forest model and is used to calculate the failure probability of the machine in a given state.
[0075] Specifically, the fault prediction model calculates the machine's failure probability using an exponential distribution model based on historical and real-time machine operating data. When the predicted failure probability exceeds a set threshold, a maintenance plan is automatically triggered to ensure production is not affected by unexpected downtime. Simultaneously, the machine's health score (H) is dynamically updated for overall production risk assessment. The health score for each machine is calculated based on the failure probability and machine load.
[0076] H k =1-P fault (9)
[0077] When a machine's health score falls below a set threshold, the frequency of assigning tasks to that machine will be reduced, and a new production schedule will be generated to create a suitable maintenance time window.
[0078] To facilitate understanding of the fault prediction model in this embodiment, the complete step-by-step process of the model is provided as follows: Figure 2 As shown, it includes steps such as data input, feature extraction, model training, real-time prediction, and maintenance triggering.
[0079] Step 3: Initialize the scheduling optimization model.
[0080] This embodiment optimizes production scheduling based on the DDQN algorithm. For example... Figure 3 As shown, the entire scheduling model consists of an environment and a scheduling agent. In the environment, data from the production process is processed to output tool life curves for fault prediction, and the resulting machine fault probabilities and machine states serve as input data for the online network. The input data includes shop floor state vectors (such as machine load L, idle time T). idle Failure probability P faultThe parameters are: tool wear (W), machine health score (H), workpiece machining progress (P), and workpiece priority (U). The output is the optimal scheduling action (denoted as A). op The scheduling results are stored in the database for subsequent scheduling adjustments.
[0081] During the initialization phase, firstly, the state vector is constructed:
[0082] Using NumPy, all machine and workpiece status data are vectorized to generate an input vector S. The input vector includes: tool wear, remaining machine idle time, machine working time, system latest shutdown time, remaining machine processing time, workpieces that have completed all processes, completed workpiece processes, workpiece start processing time, workpiece remaining processing time, workpiece waiting processing time, remaining processing time of the current process, workpiece arrival time, workpiece delay time, and current machine usage time.
[0083] Secondly, construct and train DDQN:
[0084] DDQN consists of multiple fully connected layers, with one input layer, one output layer, and multiple hidden layers. The number of nodes in the input and output layers equals the number of state features. Each hidden layer consists of multiple nodes. The input layer receives the processed state vector, and the hidden layers use a fully connected network, with each layer containing multiple neurons and employing the tanh activation function. The output layer outputs an action consisting of five scheduling rules to minimize latency.
[0085] The DDQN training process in this embodiment is as follows: First, the Q-network and the target Q-network are initialized, respectively constructed as the behavior network and the target network, and their initial parameters are set to θ and θ. At the same time The initial value is assigned to θ. Next, an experience replay pool is constructed. Used to store experiential data collected during the production process, each piece of experiential data is represented by its current state s. t Actions taken (a) t The reward r t And the next state s t+1 Composition. During the production process, based on the current state s t Select action a using behavioral networks t A reward r is obtained after performing the action. t And enter a new state s t+1 Then experience {s t a t r t s t+1 The data is stored in the experience replay pool. To optimize the behavior network, a small batch is randomly sampled from the experience replay pool. The data, i.e., sample data, is used to calculate the Q-value of the current state through the behavioral network and the Q-value of the next state through the target network to determine the target Q-value. Specifically, the target Q-value is given by the following formula:
[0086]
[0087] Where, r t γ represents the immediate reward, reflecting the direct result of the action, and is typically used to encourage or punish the agent's behavior; γ represents the discount factor, determining the agent's emphasis on future rewards, ranging from 0 to 1; a′ is the action that maximizes the Q-value; s t+1 This represents the next state, which is when action a is being performed. t The new state reached afterward; θ is the parameter of the online network, which is updated at each step via gradient descent; These are the parameters of the target network. Finally, the parameters θ of the behavioral network are updated by minimizing the following loss function using the gradient descent algorithm:
[0088]
[0089] E represents the expected value calculated for all empirical data randomly sampled from the experience replay pool; by continuously optimizing this loss function, the parameters of the behavioral network are gradually updated to improve the accuracy of action selection and the efficiency of production scheduling.
[0090] Step 4: Implementation of the scheduling rules.
[0091] First, define the action space:
[0092] Action 'a' represents the allocation relationship between the workpiece and the machine. All possible actions are listed in the action set, and the optimal action is selected using a deep reinforcement learning algorithm. To overcome the limitations of any single rule, the action space designed in this embodiment consists of various heuristic rules, and an appropriate scheduling rule is selected at the decision point. This embodiment designs five scheduling rules, aiming to allocate workpieces with a risk of delay to machines, considering that the longer the machine runs, the higher the probability of failure, thus ensuring that delays due to machine failures are avoided to the greatest extent possible.
[0093] The action space in this embodiment consists of 5 scheduling rules for minimizing delay:
[0094] Rule 1: First, define a reference time T as the current decision point time, and let t be the average completion time of the last operation assigned to each machine. If the deadline D of a certain workpiece... i If the time is earlier than the current time T, then it is added to the delayed workpiece set. In, that is Select the process with the least redundant time from the set of delayed workpieces. Represented as t i This represents the average completion time of the last operation for a given workpiece; then, machines are assigned to the operations based on the shortest completion time, with the earliest available machine being used for processing. This is represented as... T a The earliest available time for the current machine. If several machines have the same earliest available time, the machine is randomly assigned to one of them. If the set of delayed jobs is empty, the remaining processes for each job are sorted according to their time to delivery, and the process with the most urgent time is selected as the next processing step. Before assigning to the earliest available machine, the health status of that machine is checked. If the machine has a fault warning, other machines with better health status are given priority. If all machines have a fault risk, the machine with the lowest fault risk is selected.
[0095] Rule 2: Based on the remaining delivery time and the remaining processing time t of the workpiece. r Sort the ratios by the following ratios, which are calculated as follows: The machine is assigned to the workpiece process with the smallest ratio. A smaller ratio indicates a higher risk of delay, but the assigned machine is still the one with the earliest availability. Simultaneously, machine failure risk is used as a weighting factor, multiplying the ratio by (1 + failure probability), expressed as... This avoids selecting machines with a high risk of failure.
[0096] Rule 3: Select the next unfinished operation from the workpiece with the greatest risk of delay and assign it to the machine with the lowest utilization rate. The greatest risk of delay is defined as: J max =argmax{D i -(T+t r (J i The machine with the lowest utilization rate is represented as Where U(M) k This represents the machine's utilization rate. Before proceeding, assess the machine's failure probability. If the machine with the lowest utilization rate is also the one with the highest failure risk, consider selecting a machine with a lower failure probability but a slightly higher utilization rate. Specifically: Wherein: ω1 and ω2 are weighting coefficients for utilization and failure probability, used to balance the influence of the two factors.
[0097] Rule 4: Randomly select an incomplete process, prioritize excluding machines with a high risk of failure to ensure that the workpiece is not assigned to a machine that is about to malfunction, and then assign it to the earliest available machine. And Pfault (M k )≤P t P t This is the threshold for the maximum probability of failure.
[0098] Rule 5: From the estimated incomplete workpiece process set Select the process with the shortest remaining processing time and assign it to the earliest available machine. Machine selection is represented as...
[0099] During the training phase, to enhance exploratory learning, the action at each rearrangement point is randomly selected. However, when the trained DDQN is applied to a real-world production process, actions with higher Q values should be selected with a higher probability. On the other hand, if the action with the highest Q value is always selected, reinforcement learning can easily get stuck in local optima. Therefore, this embodiment employs a dynamic ε-greedy strategy to select actions. In this strategy, ε is initially set to 0.9 and decays with each iteration. The minimum value of ε is set to 0.05. The probability of development in each step is 0.95, and the probability of exploration is 0.05. Therefore, this embodiment designs a dynamic ε greedy strategy calculated by equation (12) to adapt to the flexible job shop scheduling problem in different solution spaces.
[0100]
[0101] Where, n ep s represents the total number of training rounds; s represents the training step length.
[0102] The urgency of each workpiece is calculated using the following formula:
[0103]
[0104] Among them, U i Indicating the urgency of the workpiece, D i This is the deadline for delivery of the workpiece. This represents the total time required for a workpiece to complete all processing steps on machine k. The time required varies depending on the machine. Workpieces with higher urgency need to be processed as quickly as possible.
[0105] Step 5: Real-time scheduling, execution, and monitoring.
[0106] (1) Execution of task assignment:
[0107] Once the scheduling decision is made, the system issues task instructions through the central controller. Each instruction includes key information such as the workpiece number, target machine, and processing steps. After the task is issued, the processing status of each machine is displayed in real time through the human-machine interface (HMI). Operators can monitor and confirm the execution of the task through the HMI to ensure that the scheduling instructions are implemented correctly.
[0108] (2) Real-time monitoring and status feedback:
[0109] Each machine is equipped with a vibration sensor to monitor its operating status in real time during processing and prevent malfunctions. Sensor data is transmitted to the central controller via the MQTT protocol for real-time data feedback. Simultaneously, each workpiece passes through an RFID reader during its movement, recording and tracking its position information and storing the data to ensure transparency and traceability throughout the production process.
[0110] Step 6: Trigger rescheduling and maintenance.
[0111] Rescheduling is triggered primarily by two conditions: when a new task arrives at the workshop or when a machine failure is predicted at a certain point in time, rescheduling is automatically triggered. During rescheduling, the priority of all workpieces is recalculated, and a maintenance window is reserved for the failed machine to ensure the continuity of production as much as possible without interrupting workpiece processing. Based on the current state, the Q-values of possible actions are recalculated to select the optimal scheduling scheme. Once the rescheduling decision is generated, tasks on high-risk machines are migrated to machines with lower loads, and this scheduling adjustment is recorded in the scheduling log to ensure the scheduling process is transparent and traceable, facilitating future analysis and optimization.
[0112] To more clearly illustrate the relationship between tool wear and failure occurrence, this embodiment introduces a tool wear failure occurrence curve based on historical data (see...). Figure 4 This curve, by recording the wear and tear of each machine during different working periods, reveals the pattern of tool performance gradually declining over time. This curve is an important reference, helping to assess the health status of each machine under different operating conditions through accumulated wear data. In this way, the probability of machine failure can be predicted more accurately, and preventative maintenance can be performed at the appropriate time.
[0113] During training, the scheduling strategy is gradually optimized by continuously analyzing tool wear curve data. Each scheduling decision is based not only on workpiece priority and the machine's current load, but also on tool wear status and expected failure time, ensuring efficient production while rationally scheduling maintenance operations. Through this curve, the system learns to schedule maintenance operations before the machine reaches its peak failure rate, minimizing the risk of failure. This learning method based on historical data effectively reduces production interruptions caused by unexpected machine failures and improves stability.
[0114] In another embodiment, the present invention proposes a dynamic flexible job shop predictive scheduling system, which corresponds to the dynamic flexible job shop predictive scheduling method of the foregoing embodiments, and includes:
[0115] The data acquisition module is used to collect machine operating status in real time and establish a mathematical model of the workshop environment.
[0116] The prediction module is used to predict the failure probability of each machine by combining historical data and real-time collected data.
[0117] The optimization module is used to establish a scheduling model consisting of a workshop environment and a scheduling agent using a reinforcement learning algorithm. In the scheduling model, the machine failure probability and machine operating status obtained in the workshop environment are used as input data for the reinforcement learning algorithm, and the corresponding optimal scheduling scheme that conforms to the scheduling rules is output.
[0118] The execution module is used to execute the optimal scheduling scheme and monitor it, and reschedule when the triggering conditions are met.
[0119] In this system, the functions and workflows of each module are the same as those of the predictive scheduling method for a dynamic flexible workshop in the aforementioned embodiment, so they will not be described again here.
[0120] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0121] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should be considered within the scope of protection of the present invention.
Claims
1. A predictive scheduling method for dynamic flexible job shops, characterized in that, include: S1: Real-time acquisition of machine operating status to establish a mathematical model of the workshop environment; the mathematical model of the workshop environment satisfies the following constraints: C i,j,k >S i,j,k In the formula, i, j, and k represent the workpiece index, process index, and machine index, respectively, and the i-th workpiece is denoted as J. i O i,j C represents the j-th process of the i-th workpiece; i,0 Indicates workpiece J i The start time, C i,j Indicates process O i,j Completion time; C i,j,k and S i,j,k These represent process Q respectively. i,j The completion time and start time on machine k; M i,j Indicates compatible process O i,j The set of machines, ζ i,j,k Indicates workpiece J i Whether the processing was completed on machine k; if yes, the value is 1; otherwise, the value is 0. i,1,k Indicates process Q i,1 The processing time on machine k, A i Indicates workpiece J i Arrival time; ε i,j_i’,j’ Indicates process O i,j Is it in process O? i’,j’ Previously, if yes, the value was 1; otherwise, it was 0. S2: Using machines as the target, combining historical data and real-time collected data, predict the failure probability of each machine; S3: Establish a scheduling model consisting of a workshop environment and a scheduling agent employing a reinforcement learning algorithm. In this model, the machine failure probability and machine operating status obtained from the workshop environment are used as input data for the reinforcement learning algorithm, and the corresponding optimal scheduling scheme conforming to the scheduling rules is output. The scheduling rules include five rules for minimizing delay time, as follows: Rule 1: Define reference time T as the current decision point time, and the average completion time of the last operation assigned to each machine is t; if a certain workpiece J i Delivery date D i If the time is earlier than the current time T, then it is added to the delayed workpiece set. middle, Select the process with the minimum redundancy time from the set of delayed workpieces. Represented as t i Indicates a certain workpiece J i The average completion time of the last process; Machines are assigned to processes based on the shortest completion time, with the earliest available machine selected for processing. Machine selection is represented as follows: T a The earliest available time for the current machine is determined. If several machines have the same earliest available time, the machine is randomly assigned to one of them. If the set of delayed workpieces is empty, the remaining processes for each workpiece are sorted according to the time remaining until the delivery date, and the process with the most urgent time is selected as the next processing process. Before assigning to the earliest available machine, the health status of the machine is checked. If the machine has a fault warning, other machines without fault warnings are given priority. If all machines have a fault probability, the machine with the lowest fault probability is selected. Rule 2: Based on the remaining delivery time and the remaining processing time t of the workpiece. r Sort by the ratios, and the ratios are calculated as follows: t r (O i,j ) indicates process O i,j The remaining processing time; select the workpiece operation with the smallest ratio to allocate the machine, and use the machine failure probability as a weighting factor during allocation, expressed as: P fault (M k ) represents machine M k The probability of failure; Rule 3: Select the next unfinished operation from the workpiece with the greatest risk of delay and assign it to the machine with the lowest utilization rate; the greatest risk of delay is defined as: J max =argmax{D i -(T+t r (J i The machine with the lowest utilization rate is represented as Where U(M) k ) for machine M k The utilization rate; before allocation, the probability of machine failure is assessed. If the machine with the lowest utilization rate is also the machine with the highest failure risk, then machine selection is expressed as... ω1 and ω2 are weighting coefficients for utilization and failure probability; Rule 4: Randomly select an incomplete process, prioritize excluding machines with a high probability of failure, and then assign it to the earliest available machine, represented as... And P fault (M k )≤P t P t The threshold for the maximum probability of failure; Rule 5: From the estimated incomplete workpiece process set Select the process with the shortest remaining processing time and assign it to the earliest available machine. Machine selection is represented as... S4: Execute the optimal scheduling scheme and monitor it, and reschedule when the triggering conditions are met.
2. The predictive scheduling method for dynamic flexible workshops as described in claim 1, characterized in that: In step S1, the machine operating status includes the machine's current load, idle time, and machine health status.
3. The predictive scheduling method for dynamic flexible workshops as described in claim 1, characterized in that: In step S2, predicting the failure probability of each machine includes: S2.1: Extract characteristic data of the machine's health status based on the machine's historical operating status data and real-time collected operating status data; S2.2: Principal component analysis is used to reduce the dimensionality of the extracted feature data; S2.3: The extracted feature data is used to train the random forest model to learn the relationship between feature data and faults, and then to predict the failure probability of the machine. S2.4: Input the machine's current feature data in real time, and calculate the machine's failure probability using the random forest model as follows: P fault (t)=f(X)=f(φ L ,f W ,f I ) In the formula, φ L For machine load, φ W For the machine's health status, φ I The idle time is denoted by f(·). The function f(·) is learned from the random forest model and is used to calculate the failure probability of the machine in a given state.
4. The predictive scheduling method for dynamic flexible workshops as described in claim 1, characterized in that: In step S3, the scheduling objective of the scheduling model is to minimize the delay time of all tasks, as shown below: In the formula, C i D represents the actual delivery time of the current workpiece. i This indicates the original delivery date of the current workpiece, and n represents the number of workpieces that will arrive in succession.
5. The predictive scheduling method for dynamic flexible workshops as described in claim 4, characterized in that: In step S3, the reinforcement learning algorithm uses DDQN, which consists of one input layer, multiple hidden layers, and one output layer. The input layer takes in a state vector, and the output layer outputs five actions that conform to the scheduling rules to minimize the delay time. The number of nodes in the input layer is equal to the number of state features in the state vector, and the number of nodes in the output layer is equal to the number of actions. The state vector is an input vector generated by vectorizing the state data of all machines and workpieces. The hidden layers use a fully connected network, with each layer containing multiple neurons and using the tanh activation function.
6. The predictive scheduling method for dynamic flexible workshops as described in claim 1, characterized in that: In step S4, the triggering conditions include: when a new task arrives at the workshop and when it is predicted that the machine will malfunction at a certain point in time.
7. The predictive scheduling method for dynamic flexible workshops as described in claim 1, characterized in that: In step S4, during the rescheduling, the priority of all workpieces is recalculated, and a maintenance window is reserved for the faulty machine; at the same time, the Q value of possible actions is recalculated based on the current operating status, and the optimal scheduling scheme is selected.
8. A dynamic flexible job shop predictive scheduling system, characterized in that, include: The data acquisition module is used to collect machine operating status data in real time and establish a mathematical model of the workshop environment; the mathematical model of the workshop environment satisfies the following constraints: C i,j,k >S i,j,k In the formula, i, j, and k represent the workpiece index, process index, and machine index, respectively, and the i-th workpiece is denoted as J. i O i,j C represents the j-th process of the i-th workpiece; i,0 Indicates workpiece J i The start time, C i,j Indicates process O i,j Completion time; C i,j,k and S i,j,k These represent process O respectively. i,j The completion time and start time on machine k; M i,j Indicates compatible process O i,j The set of machines, ζ i,j,k Indicates workpiece J i Whether the processing was completed on machine k; if yes, the value is 1; otherwise, the value is 0. i,1,k Indicates process Q i,1 The processing time on machine k, A i Indicates workpiece J i Arrival time; ε i,j_i’,j’ Indicates process O i,j Is it in process O? i’,j’ Previously, if yes, the value was 1; otherwise, it was 0. The prediction module is used to predict the failure probability of each machine by combining historical data and real-time collected data. The optimization module is used to establish a scheduling model consisting of the workshop environment and a scheduling agent employing a reinforcement learning algorithm. In this model, the machine failure probability and machine operating status obtained from the workshop environment are used as input data for the reinforcement learning algorithm, and the corresponding optimal scheduling scheme conforming to the scheduling rules is output. The scheduling rules include five rules for minimizing delay time, as follows: Rule 1: Define reference time T as the current decision point time, and the average completion time of the last operation assigned to each machine is t; if a certain workpiece J i Delivery date D i If the time is earlier than the current time T, then it is added to the delayed workpiece set. middle, Select the process with the minimum redundancy time from the set of delayed workpieces. Represented as t i Indicates a certain workpiece J i The average completion time of the last process; Machines are assigned to processes based on the shortest completion time, with the earliest available machine selected for processing. Machine selection is represented as follows: T a The earliest available time for the current machine is determined. If several machines have the same earliest available time, the machine is randomly assigned to one of them. If the set of delayed workpieces is empty, the remaining processes for each workpiece are sorted according to the time remaining until the delivery date, and the process with the most urgent time is selected as the next processing process. Before assigning to the earliest available machine, the health status of the machine is checked. If the machine has a fault warning, other machines without fault warnings are given priority. If all machines have a fault probability, the machine with the lowest fault probability is selected. Rule 2: Based on the remaining delivery time and the remaining processing time t of the workpiece. r Sort by the ratios, and the ratios are calculated as follows: t r (O i,j ) indicates process O i,j The remaining processing time; select the workpiece operation with the smallest ratio to allocate the machine, and use the machine failure probability as a weighting factor during allocation, expressed as: P fault (M k ) represents machine M k The probability of failure; Rule 3: Select the next unfinished operation from the workpiece with the greatest risk of delay and assign it to the machine with the lowest utilization rate; the greatest risk of delay is defined as: J max =argmax{D i -(T+t r (J i The machine with the lowest utilization rate is represented as Where U(M) k ) for machine M k The utilization rate; before allocation, the probability of machine failure is assessed. If the machine with the lowest utilization rate is also the machine with the highest failure risk, then machine selection is expressed as... ω1 and ω2 are weighting coefficients for utilization and failure probability; Rule 4: Randomly select an incomplete process, prioritize excluding machines with a high probability of failure, and then assign it to the earliest available machine, represented as... And P fault (M k )≤P t P t The threshold for the maximum probability of failure; Rule 5: From the estimated incomplete workpiece process set Select the process with the shortest remaining processing time and assign it to the earliest available machine. Machine selection is represented as... The execution module is used to execute the optimal scheduling scheme and monitor it, and reschedule when the triggering conditions are met.
Citation Information
Patent Citations
Production line polymorphic reliability analysis and evaluation method
CN110472196A
Dynamic multi-target flexible workshop job scheduling method based on deep Q learning
CN118536723A