Generative scheduling method for dynamic no-wait permutation flow shop
By using an attention-based encoding/decoding network and a Markov decision process, the problem of frequent scheduling adjustments in dynamic, wait-free replacement flow shop scheduling was solved, achieving efficient and rapid scheduling decisions and improving the efficiency and resource utilization of the production system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TSINGHUA UNIVERSITY
- Filing Date
- 2024-12-25
- Publication Date
- 2026-06-02
AI Technical Summary
When faced with frequently updated orders, existing technologies require constant adjustments to the scheduling scheme for the dynamic, no-wait replacement flow shop scheduling problem. This results in a large number of mathematical operations and complex global solutions, consuming a lot of computing power and time. It cannot meet the actual requirements for scheduling efficiency and response speed, leading to a decline in system performance and a waste of resources.
By employing an attention-based encoder-decoder network, combined with a Markov decision process and a two-stage reward strategy, a generative single-step decision scheduling method is used to extract job features in real time and generate scheduling decisions, enabling rapid response to order changes and reducing the frequency and computational load of global optimization.
It enables efficient scheduling of dynamic, wait-free replacement flow workshops, improves the response speed and resource utilization of the production system, reduces production costs, and enhances the continuity of the production process and product quality.
Smart Images

Figure CN119849831B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of production scheduling technology, and in particular to a generative scheduling method for a dynamic, wait-free replacement flow shop. Background Technology
[0002] The Permutation Flowshop Scheduling Problem (PFSP) is a classic problem in production scheduling, widely used in manufacturing, logistics, and other fields. PFSP involves allocating a series of tasks among multiple machines or workstations to optimize for specific objectives, such as minimizing completion time, maximizing equipment utilization, or minimizing total latency. PFSP assumes that the processing order of each task on each machine is fixed. No-Wait Permutation Flowshop Scheduling Problem (NWFSP) is a special case of PFSP where no waiting time is allowed during the transfer of tasks between machines.
[0003] In related technologies, commonly used algorithms for solving the dynamic no-wait replacement flow shop scheduling problem include exact algorithms, heuristic algorithms, metaheuristic algorithms, and graph generative networks. Exact algorithms, through exhaustive search or mathematical programming, precisely solve the scheduling problem, guaranteeing the finding of the optimal solution. Their advantage lies in determinism and the guarantee of an optimal solution. Heuristic algorithms, based on empirical rules or simple strategies, quickly solve the scheduling problem. While they cannot guarantee finding the optimal solution, they can find feasible solutions in a relatively short time. Metaheuristic algorithms, including genetic algorithms and particle swarm optimization, utilize random search and global optimization strategies to find near-optimal solutions. Their advantage lies in their strong global search capability and adaptability, enabling them to handle different types of problems. Graph generative networks, through deep learning models, utilize graph-structured data to process the scheduling problem. Graph generative networks possess powerful learning capabilities and the ability to handle complex relationships, making them particularly suitable for dynamic environments.
[0004] However, precise algorithms in related technologies suffer from high computational complexity, making them extremely time-consuming and resource-intensive when handling large-scale problems. They also exhibit low efficiency in dynamic environments because recalculation is required for each change, hindering rapid adaptation. Heuristic algorithms are simple to implement and fast, but the quality of their solutions depends heavily on the design of the heuristic rules, and they are poorly adaptable to problem changes, often requiring rule redesign for specific problems. Metaheuristic algorithms have long computation times and complex parameter tuning; different problems may require different parameter settings, increasing their difficulty of use. Graph generation networks have complex and time-consuming training processes, require large amounts of data, and their internal mechanisms are difficult to interpret, increasing the uninterpretability and transparency of the results. In short, when faced with frequently updated orders, optimization algorithms in related technologies typically require continuous insertion and modification of existing scheduling schemes. This process involves numerous mathematical operations and complex global solutions, drastically increasing computational and time consumption. Scheduling efficiency and response speed often fail to meet the actual needs of workshop scheduling, leading to system performance degradation and resource waste, which urgently needs to be addressed. Summary of the Invention
[0005] This application provides a generative scheduling method for dynamic, wait-free replacement flow shop to address the problem that optimization algorithms in related technologies often need to continuously insert and modify existing scheduling schemes when faced with frequently updated orders. This process involves a large number of mathematical operations and complex global solutions, which will drastically increase the consumption of computing power and time. The scheduling efficiency and response speed often cannot meet the actual needs of shop scheduling, and will cause problems such as system performance degradation and resource waste.
[0006] The first aspect of this application provides a generative scheduling method for a dynamic no-wait replacement flow shop, comprising the following steps: acquiring job information of the dynamic no-wait replacement flow shop; inputting the job information into a preset encoding network to extract at least one job feature of each job in the dynamic no-wait replacement flow shop, and generating a corresponding job state based on the at least one job feature; decoding the job state using a preset decoding network, and calculating the selection probability distribution of each job in combination with the historical scheduling information of each job, and generating a scheduling decision for each job at the current time based on the selection probability distribution.
[0007] Optionally, in one embodiment of this application, decoding the job state further includes: capturing local and global feedback information of the historical scheduling decisions of each job based on a pre-established knowledge-guided two-stage reward strategy; and optimizing the initial encoding network and the initial decoding network through the local and global feedback information to determine the preset encoding network and the preset decoding network.
[0008] Optionally, in one embodiment of this application, the step of inputting the job information into a preset coding network to extract at least one job feature of each job in the dynamic no-wait replacement assembly line to generate a corresponding job state based on the at least one job feature includes: collecting the historical processing time of each job in the job information; capturing the interdependencies between each job based on the processing time; and extracting the at least one job feature based on the interdependencies to generate a corresponding job state based on the at least one job feature.
[0009] Optionally, in one embodiment of this application, the step of decoding the job status using a preset decoding network and calculating the selection probability distribution of each job in conjunction with the historical scheduling information of each job includes: obtaining the status of the previous job and the average status of unscheduled jobs based on the preset decoding network and the historical scheduling information; performing a linear mapping between the status of the previous job and the average status of unscheduled jobs to generate the current environment status; and calculating the probability distribution of each job based on the job status and the environment status.
[0010] Optionally, in one embodiment of this application, the job status includes at least one of the processing time, current dependencies, and priority information of each job.
[0011] A second aspect of this application provides a computer program product, including a computer program that, when executed, is used to implement the above-described generative scheduling method for a dynamic, wait-free replacement flow shop.
[0012] This application embodiment can acquire the operation information of a dynamic, no-wait replacement flow shop, and use a certain encoding and decoding network to extract features from the list of workpieces to be processed at each decision time, calculate the environmental features at the current time, and use the environmental features to calculate the selection probability distribution of the next part to be processed through an attention mechanism. Finally, the scheduling decision of the operation is generated based on the selection probability distribution. Thus, the scheduling process of the dynamic, no-wait replacement flow shop scheduling problem based on order arrival is modeled as a generative single-step decision scheduling based on Markov process, realizing a rapid response to arriving orders. Based on the characteristics of the no-wait replacement flow shop, an encoding and decoding network based on an attention mechanism is designed, and a two-stage reward is designed based on existing knowledge to guide the encoding and decoding network in stages, accelerating the training efficiency of the encoding and decoding network, thereby realizing efficient feature extraction and representation of operation information, so as to combine historical state and global information for efficient dynamic decision adjustment. This solves the problem that optimization algorithms in related technologies often need to constantly insert and modify existing scheduling schemes when faced with frequently updated orders. This process involves a large number of mathematical operations and complex global solutions, which will drastically increase the consumption of computing power and time. The scheduling efficiency and response speed often cannot meet the actual needs of workshop scheduling, and cause problems such as system performance degradation and resource waste.
[0013] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0014] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0015] Figure 1 This is a Gantt diagram illustrating a wait-free replacement flow shop scheduling problem according to an embodiment of this application;
[0016] Figure 2 This is a schematic diagram of the framework of a generative single-step scheduling algorithm based on a reinforcement learning method using Markov decision processes, according to one embodiment of this application.
[0017] Figure 3 This is a flowchart of a generative scheduling method for a dynamic, wait-free replacement flow shop according to an embodiment of this application;
[0018] Figure 4 This is a schematic diagram of the structure of an encoding network according to an embodiment of this application;
[0019] Figure 5 This is a schematic diagram of the structure of a decoding network according to an embodiment of this application;
[0020] Figure 6 This is a schematic diagram showing the loss function variation curves of a codec network under different reward settings during the training process of an embodiment of this application.
[0021] Figure 7 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of this application.
[0022] Figure label:
[0023] 701 - Memory, 702 - Processor, and 703 - Communication interface. Detailed Implementation
[0024] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0025] The following describes a generative scheduling method for a dynamic, wait-free replacement flow shop according to embodiments of this application, with reference to the accompanying drawings. Regarding the optimization algorithms in the related technologies mentioned in the background section, when faced with frequently updated orders, they typically require continuous insertion and modification of existing scheduling schemes. This process involves a large number of mathematical operations and complex global solutions, drastically increasing computational power and time consumption. Scheduling efficiency and response speed often fail to meet the actual needs of flow shop scheduling, leading to system performance degradation and resource waste. This application provides a generative scheduling method for a dynamic, wait-free replacement flow shop. In this method, the operation information of the dynamic, wait-free replacement flow shop can be obtained. At each decision moment, features are extracted from the list of workpieces to be processed using a certain encoding and decoding network to calculate the environmental features at the current moment. The selection probability distribution of the next workpiece to be processed is then calculated using an attention mechanism based on the environmental features. Finally, a scheduling decision for the operation is generated based on the selection probability distribution. Therefore, this paper models the scheduling process of the dynamic no-wait permutation flow shop scheduling problem, which considers order arrival, as a generative single-step decision scheduling based on Markov processes. This enables rapid response to arriving orders. Based on the characteristics of the no-wait permutation flow shop, an attention-based encoder-decoder network is designed. A two-stage reward system is implemented to guide the encoder-decoder network in stages, accelerating its training efficiency. This allows for efficient feature extraction and representation of job information, enabling efficient dynamic decision adjustments by combining historical states and global information. This solves the problem that optimization algorithms in related technologies often require continuous insertion and modification of existing scheduling schemes when facing frequently updated orders. This process involves a large amount of mathematical computation and complex global solutions, drastically increasing computational and time consumption. The scheduling efficiency and response speed often fail to meet the actual needs of flow shop scheduling, leading to system performance degradation and resource waste.
[0026] Before explaining the generative scheduling method for the dynamic no-wait replacement flow shop in the embodiments of this application, the dynamic no-wait replacement flow shop problem and generative scheduling method considering order arrival involved in the embodiments of this application will be explained first.
[0027] Figure 1 This is a Gantt chart diagram illustrating a wait-free replacement flow shop scheduling problem according to an embodiment of this application. Figure 1 As shown, the dynamic no-wait replacement flow shop problem considering order arrival in the embodiments of this application can be described, but is not limited to, as follows:
[0028] There are N workpieces to be processed, each requiring processing sequentially on M machines. The processing order is the same for all workpieces, and the processing time Tij for the i-th workpiece on the j-th machine is given by Tij. All machines are continuously available and will not fail. Each job can be processed on one machine at a time, and each machine can only process one job at a time. Once a given job begins processing on a given machine, it cannot be interrupted until completion. No workpiece can be idle during processing; that is, after processing on one machine, it must immediately begin processing on the next machine. Considering the dynamic scenario of order arrival, N1 workpieces are available at initial time 0, and the remaining N2 = N - N1 workpieces become available after the order arrives. Specifically, each workpiece has an arrival time Tarri, and each workpiece only knows its specific processing time on each machine after arrival and can then begin processing. The optimization objective of this problem is the maximum completion time Cmax, which is calculated as follows: Among them, C ij It is the completion time of the i-th workpiece on the j-th machine.
[0029] In a no-wait replacement assembly line, tasks cannot be transferred between machines without any waiting time. This means that once a task begins processing on the first machine, it must be processed continuously on subsequent machines until completion. This scheduling method is particularly important in industries such as chemical and food processing, because some production processes cannot be interrupted once started, otherwise it will affect product quality or increase production costs.
[0030] Based on this, the embodiments of this application combine wait-free flow shop scheduling with generative scheduling methods. By combining the stringent requirements of wait-free scheduling with the dynamic optimization capabilities of generative algorithms, a highly efficient, flexible, and robust solution is provided. This improves the automation and intelligence level of the production system, meets market demands for high-efficiency, low-cost production, enhances the competitiveness of enterprises in the market, and contributes to economic development and industrial upgrading. Consequently, it improves the response speed and resource utilization of the production system, reduces waste and delays in the production process, thereby lowering workshop production costs and improving product quality and market competitiveness.
[0031] Generative scheduling methods primarily utilize deep learning technology to generate optimized scheduling schemes based on current production status and historical data. Compared to traditional optimization methods, generative algorithms can dynamically adjust scheduling schemes based on real-time data, adapting to changes in the production environment and exhibiting strong fault tolerance when handling complex and dynamic scheduling scenarios. In scenarios with dynamically arriving orders, generative algorithms can quickly respond to the arrival of new orders, updating the scheduling scheme in real time to ensure the continuity and efficiency of the production process.
[0032] Furthermore, this embodiment of the application, based on the generative scheduling method, combines a reinforcement learning method using Markov Decision Process (MDP) to achieve generative single-step scheduling of dynamic no-wait replacement flow shop operations. Within the MDP framework, this embodiment views the scheduling process of the dynamic no-wait replacement flow shop as a series of state transitions. At each decision point, the current state is evaluated, and corresponding actions are taken to select the next workpiece to be processed. This method avoids the complexity of global scheduling, decomposing the problem into continuous small-scale decisions, requiring only one workpiece to be selected each time. This reduces the frequency and complexity of global optimization, effectively lowering the computational load.
[0033] Figure 2 This is a schematic diagram illustrating the framework of a generative single-step scheduling algorithm based on a Markov decision process reinforcement learning method, according to one embodiment of this application. Figure 2 As shown, under this algorithm, since the subsequent scheduling scheme is not yet fully determined, orders arriving in real time can be temporarily placed in a waiting list, waiting for the system to process them at an appropriate time, without having to readjust the entire scheduling scheme each time. Through reinforcement learning, the system can learn autonomously from past scheduling experience and gradually optimize the decision-making process, thereby quickly and flexibly generating scheduling schemes when faced with new orders, achieving efficient dynamic response.
[0034] Specifically, Figure 3 The flowchart illustrates a generative scheduling method for a dynamic, wait-free replacement flow shop provided in this application embodiment.
[0035] like Figure 3 As shown, the generative scheduling method for the dynamic, wait-free replacement flow shop includes the following steps:
[0036] In step S301, the operation information of the dynamic no-wait replacement flow workshop is obtained.
[0037] In actual execution, the production tasks in the workshop are not all known from the beginning, but arrive dynamically over time, which makes the scheduling problem more complex. The dynamic arrival of orders requires the scheduling algorithm to respond to the emergence of new tasks in real time and to adjust and optimize the existing scheduling scheme. In this dynamic scenario, factors such as task arrival time, task priority, and machine status are constantly changing, bringing greater difficulty and challenges to scheduling.
[0038] Therefore, when scheduling operations in a dynamic, no-wait replacement flow shop, the embodiments of this application can obtain information about each operation in the shop. For example, which operations are currently being performed, which workpieces are required for the operation, the total number of workpieces to be processed, the number of processing machines that the workpieces need to pass through sequentially, and the operation sequence, i.e., the processing sequence of the workpieces on the machines.
[0039] This application embodiment can further process this job information.
[0040] Step S302: Input the job information into the preset coding network to extract at least one job feature of each job in the dynamic no-wait replacement flow workshop, so as to generate the corresponding job status based on at least one job feature.
[0041] In some embodiments, to address the problem of dynamic, wait-free replacement flow operations, this application primarily, but is not limited to, utilizing an attention-based encoder-decoder network when generating a scheduling strategy for the dynamic, wait-free replacement flow shop based on the acquired job information. This encoder-decoder network primarily, but is not limited to, consists of an encoding network and a decoding network. The pre-built encoding network can be understood here as a pre-constructed and trained network used to process the input job information.
[0042] After obtaining the job information, the embodiments of this application mainly involve first inputting the job information into a certain coding network, and then extracting at least one job feature for each job based on the job information.
[0043] Optionally, in one embodiment of this application, job information is input into a preset coding network to extract at least one job feature for each job in a dynamic, wait-free replacement assembly line, and to generate a corresponding job state based on the at least one job feature. This includes: collecting the historical processing time of each job from the job information; capturing the interdependencies between each job based on the processing time; and extracting at least one job feature based on the interdependencies to generate a corresponding job state. The job state includes at least one of the following: processing time, current dependency, and priority information for each job.
[0044] As one possible approach, embodiments of this application can utilize a certain coding network to efficiently extract and represent features from the input job information. First, this application can collect the historical processing time of each job in the job information, thereby capturing the interdependencies between each job. Then, based on the interdependencies between each job, the features of the jobs are extracted and the corresponding job status is generated.
[0045] Figure 4 This is a schematic diagram of the structure of an encoding network according to an embodiment of this application. Figure 4 As shown, this application can extract the job processing time using a certain coding network, and use [x1,x2,…,x] to represent the processing time. n The processing time of each task is then embedded into a high-dimensional space through a linear transformation to generate the embedded representation [h1, h2, ..., h].n This gives it rich expressive power, allowing the network to better handle and understand the complex relationships between tasks.
[0046] Next, the encoding network repeats the encoding process k times. In each layer, the input vector passes through a self-attention mechanism to capture the dependencies between tasks. Specifically, the encoding network can better encode the task state by calculating the correlations between all tasks and assigning different weights to each task. After each pass through the self-attention mechanism, the result is passed through residual connections (Add & Normal) and normalized to prevent gradient vanishing or exploding. Then, the output of this step is passed through a feedforward neural network to further extract features, and finally, it passes through residual connections and normalization again to obtain the task features for each task.
[0047] Furthermore, the encoding network can continuously extract and process the features of the input job through multi-layer stacking, allowing the local and global information of the job to be fully expressed in the deep structure of the network, ultimately generating the job state after the k-th encoding.
[0048] The final output of the encoding network in this embodiment is a multi-layered encoding representation of job states. These states include information such as the processing time of each job, the dependencies between jobs, and the priority of the jobs. These extracted job states are then passed to the decoding network for subsequent decision-making.
[0049] Step S303: Decode the job status using a preset decoding network, calculate the selection probability distribution of each job in combination with the historical scheduling information of each job, and generate the scheduling decision of each job at the current moment based on the selection probability distribution.
[0050] In other embodiments, after obtaining the job status of each job through a certain encoding network, the encoding network can output it to a certain decoding network. The decoding network can then generate a scheduling decision for each job at the current moment based on the output of the encoding network and historical scheduling information.
[0051] For example, this application mainly, but not limited to, decoding the job status output by a certain encoding network through a certain decoding network, calculating the environmental features at the current moment, and then using the environmental features to query the list of workpieces to be processed in the job through an attention mechanism to calculate the selection probability distribution of the next part to be processed, thereby obtaining the selection probability distribution of each job, that is, the probability of each job being selected at the current moment, and finally generating the scheduling decision of each job at the current moment based on the probability and historical scheduling information.
[0052] Optionally, in one embodiment of this application, the job status is decoded using a preset decoding network, and the selection probability distribution of each job is calculated in combination with the historical scheduling information of each job. This includes: obtaining the status of the previous job and the average status of unscheduled jobs based on the preset decoding network and historical scheduling information; performing a linear mapping between the status of the previous job and the average status of unscheduled jobs to generate the current environment status; and calculating the probability distribution of each job based on the job status and the environment status.
[0053] Based on the descriptions of other embodiments, it will be understood that the encoding / decoding network in this application embodiment comprises two parts: an encoding network and a decoding network. Here, the preset encoding network can be understood as a pre-built and trained network used to process the output information of the preset encoding network.
[0054] In other embodiments, in the process of decoding the job status through a certain decoding network, obtaining the selection probability distribution of each job by combining historical scheduling information, and then generating the scheduling decision of each job at the current moment, this application mainly obtains the status of the previous job and the average status of unscheduled jobs based on a certain decoding network, obtains the current environmental status based on the two, and then obtains the probability distribution of each job by combining the job status.
[0055] Figure 5 This is a schematic diagram of the structure of a decoding network according to an embodiment of this application. Figure 5 As shown, in this embodiment of the application, the input to the decoding network includes, but is not limited to, the state of the previous job. and the average state of remaining unscheduled jobs Expressing both as vectors and then performing a linear mapping between the two vectors yields the current environment state h. ctx =σ([h last h left The current environmental state includes, but is not limited to, information about scheduled jobs and remaining jobs, which helps the decoder make more reasonable scheduling decisions at the current moment.
[0056] Furthermore, the decoding network in this embodiment can also, but is not limited to, employ a multi-head attention mechanism to simultaneously consider all job states output by the encoder. Each job state is used as a key vector for the attention mechanism, and combined with the current environment state to generate a query vector h. query This allows us to calculate the probability [p1, p2, ..., p] of each job being selected at the current time. n ], and make scheduling decisions (Actions) based on these probabilities.
[0057] This application embodiment can dynamically adjust the scheduling order of each job by utilizing historical scheduling information and global information of remaining jobs, thereby avoiding excessive waiting time between jobs and improving the overall scheduling efficiency.
[0058] Optionally, in one embodiment of this application, the method further includes: capturing local and global feedback information of historical scheduling decisions for each job based on a pre-established knowledge-guided two-stage reward strategy; and optimizing the initial encoding network and the initial decoding network using the local and global feedback information to determine the preset encoding network and the preset decoding network.
[0059] In actual implementation, in order to effectively improve the solving capabilities of the encoding and decoding networks in solving the dynamic no-wait permutation pipeline problem, the embodiments of this application can also set up a knowledge-guided two-stage reward optimization for the encoding and decoding networks, and combine an attention mechanism to better capture the dependencies between tasks.
[0060] For example, in this embodiment, the training process of the encoding and decoding networks can be divided into two stages, each based on a different reward strategy, thereby achieving more effective training results. The reward calculation formula can be, but is not limited to, expressed as follows:
[0061]
[0062] In the initial stage of training the encoder-decoder network, this embodiment can employ a single-step reward mechanism. Specifically, the reward is the sum of the waiting times between the currently selected workpiece and the previous workpiece. That is, each time the encoder-decoder network makes a decision, it provides feedback based on the immediate impact of that decision on the current system state (i.e., the waiting time between workpieces). This design helps to refine the sparse feedback of the problem (such as completion time) to each local decision, thereby enabling the encoder-decoder network to learn patterns and accumulate experience more quickly from local information.
[0063] Through this single-step reward system, the encoder-decoder network can quickly master basic job scheduling strategies, especially in avoiding excessively long waiting times between jobs. The advantage of this method in the early stages is that it accelerates the network's understanding of the problem's essence and shortens the network's learning curve.
[0064] After the encoder-decoder network learns a relatively robust scheduling strategy through the single-step reward mechanism in the first stage, the training process enters the second stage. At this point, the reward feedback design shifts to being based on the completion time of the entire task, i.e., the objective that the problem itself needs to minimize. Compared to the local feedback in the first stage, the overall reward can better guide the network to perform global optimization, ensuring that the final scheduling strategy is not only locally optimal but also improves the overall system performance.
[0065] While splitting the sparse reward into each step introduces some error, this approach significantly enhances the feedback the network receives at each decision point, making the training process more stable and efficient. The network can learn quickly from local feedback first, and then further optimize under the guidance of the global objective, thereby ensuring better convergence within a limited training time.
[0066] This application's embodiments can introduce a knowledge-guided two-stage reward mechanism, combining the rapid learning capability of local feedback with the fine-tuning capability of global feedback, greatly improving the training efficiency and convergence speed of the encoder-decoder network. Specifically, the single-step reward helps the network quickly acquire an initial understanding of the problem in the early stages, laying the foundation for fine-tuning the overall reward. Subsequently, guided by the overall reward, the encoder-decoder network can further optimize the overall strategy based on the learned knowledge, achieving a more efficient and accurate scheduling scheme.
[0067] Additionally, to verify the performance of the generative scheduling method for dynamic no-wait replacement flow shop in this application embodiment on the no-wait replacement flow shop scheduling problem, this application generated 10 sets of test cases at 20 different scales to test the method. Table 1 is a test case parameter setting table for one embodiment of this application, which can be represented as follows:
[0068] Table 1
[0069] Number of workpieces n∈{20,50,100,200,500} Number of machines m∈{5,10,15,20} Processing time <![CDATA[t ij ~U(1,100)]]> arrival time interval <![CDATA[arr i ~E(0.02)]]>
[0070] To verify the effectiveness of the generative scheduling method for dynamic no-wait replacement flow shop, embodiments of this application may, but are not limited to, employ several commonly used scheduling rules in the same scenario, as well as algorithms such as rule-based scheduling using reinforcement learning (RL) for comparison. The maximum completion time Cmax is used as the comparison metric. Table 2 shows the comparison results of the Cmax metrics of various algorithms on different scale test problems in one embodiment of this application, as follows:
[0071] Table 2
[0072] N M SIT SCTF SCTL RL ATTN 20 5 1926.8 2478.4 2630.5 2478.4 2337.7 20 10 2655.5 3146.9 3269.8 3149.7 2928.6 20 15 3434.2 3660 3783.1 3614.3 3417.7 20 20 4005.7 4032.1 4160.3 4006.6 3654.6 50 5 4421.6 5424.4 5425.1 5196.7 4855.7 50 10 5862.5 6578.6 6525.7 6320.7 5864.3 50 15 7374.2 7504.4 7447.2 7237.3 6835.2 50 20 8345.2 7836.2 7879.9 7716.8 6810.6 100 5 8416.8 10040.6 10026.3 9654.5 8968.2 100 10 11077 11586.4 11547.1 11219.8 10637.5 100 15 13295.2 13261 13211.1 12875.6 12224.3 100 20 15329.3 15117.7 15133.8 14858.7 13024.8 200 5 16326.6 18741.4 18718.6 18145.3 16919.6 200 10 20983.8 21629.2 21605.9 20901.9 20046.3 200 15 25099.8 24312.4 24279.2 23676.4 22861.8 200 20 28634.2 36447 36468.5 35694.6 31243.4 500 5 39015.5 43945 43915.2 43254 40243 500 10 49411.6 50504 50480.5 49115.7 47508.5 500 15 58376.1 55961.9 55937 54552.5 53474.9 500 20 66174.7 2478.4 2630.5 2478.4 2337.7
[0073] As shown in Table 2, the generative scheduling method for the dynamic no-wait replacement flow shop in this application embodiment achieves better performance metrics across all test problems, demonstrating the effectiveness of the method. Furthermore, Figure 6 This is a schematic diagram showing the loss function variation curves of an encoder-decoder network under different reward settings during the training process of an embodiment of this application, as shown below. Figure 6 As shown, the knowledge-guided two-stage reward in this embodiment significantly accelerates the convergence process of the encoding / decoding network, proving the effectiveness of the reward setting in this embodiment.
[0074] The generative scheduling method for a dynamic no-wait replacement flow shop proposed in this application can acquire the job information of the dynamic no-wait replacement flow shop, and use a certain encoding and decoding network to extract features from the list of workpieces to be processed at each decision time to calculate the environmental features at the current time. Then, using the environmental features and an attention mechanism, the selection probability distribution of the next workpiece to be processed is calculated, and finally, the scheduling decision for the job is generated based on the selection probability distribution. Thus, the scheduling process of the dynamic no-wait replacement flow shop scheduling problem considering order arrival is modeled as a generative single-step decision scheduling based on a Markov process, achieving rapid response to arriving orders. Based on the characteristics of the no-wait replacement flow shop, an encoding and decoding network based on an attention mechanism is designed, and a two-stage reward system is designed based on existing knowledge to guide the encoding and decoding network in stages, accelerating the training efficiency of the encoding and decoding network. This enables efficient feature extraction and representation of job information, allowing for efficient dynamic decision adjustments by combining historical states and global information. This solves the problem that optimization algorithms in related technologies often need to constantly insert and modify existing scheduling schemes when faced with frequently updated orders. This process involves a large number of mathematical operations and complex global solutions, which will drastically increase the consumption of computing power and time. The scheduling efficiency and response speed often cannot meet the actual needs of workshop scheduling, and cause problems such as system performance degradation and resource waste.
[0075] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include:
[0076] The memory 701, the processor 702, and the computer program stored on the memory 701 and executable on the processor 702.
[0077] When the processor 702 executes the program, it implements the generative scheduling method for the dynamic, wait-free replacement flow shop provided in the above embodiments.
[0078] Furthermore, electronic devices also include:
[0079] Communication interface 703 is used for communication between memory 701 and processor 702.
[0080] The memory 701 is used to store computer programs that can run on the processor 702.
[0081] The memory 701 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0082] If the memory 701, processor 702, and communication interface 703 are implemented independently, then the communication interface 703, memory 701, and processor 702 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 7 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0083] Optionally, in a specific implementation, if the memory 701, processor 702, and communication interface 703 are integrated on a single chip, then the memory 701, processor 702, and communication interface 703 can communicate with each other through an internal interface.
[0084] The processor 702 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0085] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described generative scheduling method for a dynamic, wait-free replacement flow shop.
[0086] This application also provides a computer program product, including a computer program that can run computer instructions. When the computer instructions are executed by a processor, they implement the generative scheduling method for dynamic, wait-free replacement flow shop provided in this application.
[0087] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0088] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0089] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0090] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0091] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, it can be implemented using any one or more of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0092] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0093] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0094] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. A generative scheduling method for a dynamic, wait-free replacement flow shop, characterized in that, Includes the following steps: Obtain operational information from the dynamic, no-wait replacement flow workshop; The job information is input into a preset coding network to extract at least one job feature of each job in the dynamic no-wait replacement flow workshop, so as to generate a corresponding job status based on the at least one job feature; The job status is decoded using a preset decoding network, and the selection probability distribution of each job is calculated by combining the historical scheduling information of each job, so as to generate a scheduling decision for each job at the current time based on the selection probability distribution; The step of inputting the job information into a preset coding network to extract at least one job feature of each job in the dynamic no-wait replacement assembly line, and generating a corresponding job status based on the at least one job feature, includes: collecting the historical processing time of each job in the job information; capturing the interdependencies between each job based on the processing time; and extracting the at least one job feature based on the interdependencies, and generating a corresponding job status based on the at least one job feature. The step of decoding the job status using a preset decoding network and calculating the selection probability distribution of each job in conjunction with the historical scheduling information of each job includes: obtaining the status of the previous job and the average status of unscheduled jobs based on the preset decoding network and the historical scheduling information; performing a linear mapping between the status of the previous job and the average status of unscheduled jobs to generate the current environment status; and calculating the probability distribution of each job based on the job status and the environment status. Based on a pre-established knowledge-guided two-stage reward strategy, local and global feedback information of the historical scheduling decisions of each job is captured; the initial encoding network and the initial decoding network are optimized through the local and global feedback information to determine the preset encoding network and the preset decoding network.
2. The method according to claim 1, characterized in that, The job status includes at least one of the following: processing time, current dependencies, and priority information for each job.
3. A computer program product, comprising a computer program, characterized in that, When the computer program is executed, it is used to implement the generative scheduling method for a dynamic, wait-free replacement flow shop as described in any one of claims 1-2.