Generative scheduling method for dynamic wait-free replacement flow shop
By adopting a generative scheduling method in the dynamic wait-free replacement flow workshop, using the encoding and decoding network combined with historical scheduling information to make decisions, the efficiency and response speed problems of optimization algorithms in the prior art are solved in the face of frequent order updates, and efficient and fast scheduling decisions are achieved.
Patent Information
- Application Number
- CN202411923647.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-25
AI Technical Summary
In the prior art, when facing frequently updated orders, optimization algorithms need to constantly insert and modify existing scheduling schemes, resulting in high computational complexity, huge resource consumption, and scheduling efficiency and response speed cannot meet the actual needs of workshop scheduling, resulting in system performance degradation and resource waste.
The generational scheduling method of the dynamic waiting-free replacement flow workshop is adopted. By obtaining job information, using the coding network to extract job characteristics, generate job status, and calculate the selection probability distribution through the decoding network combined with historical scheduling information to generate scheduling decisions. This method is based on the generative single-step decision scheduling of the Markov process, and uses attention mechanism and two-stage reward strategy to improve the efficiency and response speed of scheduling.
It realizes fast response and efficient scheduling for frequently updated orders, reduces computing complexity and resource consumption, improves scheduling efficiency and system performance, and meets the actual needs of workshop scheduling.
Smart Images

Figure CN119849831A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of production scheduling, and in particular to a generative scheduling method for a dynamic non-waiting replacement flow shop. Background Art
[0002] Permutation Flowshop Scheduling Problem (PFSP) is a classic problem in production scheduling, which is widely used in many fields such as manufacturing and logistics. FSP involves allocating a series of tasks among multiple machines or workstations to optimize specific goals, such as minimizing completion time, maximizing equipment utilization, or minimizing total delay. 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 workshop tasks between machines.
[0003] In the related art, when solving the dynamic no-wait replacement flow shop scheduling problem, commonly used algorithms include exact algorithms, heuristic algorithms, meta-heuristic algorithms, and graph generation networks. Exact algorithms use exhaustive or mathematical programming methods to accurately solve scheduling problems and can ensure that the optimal solution is found. Its advantages lie in the guarantee of certainty and optimal solutions. Heuristic algorithms quickly solve scheduling problems based on empirical rules or simple strategies. Although it cannot guarantee the optimal solution, it can find a feasible solution in a relatively short time. Meta-heuristic algorithms include genetic algorithms, particle swarm optimization, etc., which use random search and global optimization strategies to find solutions close to the optimal solution. Its advantages lie in its strong global search capabilities and adaptability, and its ability to handle different types of problems. Graph generation networks use graph structured data to process scheduling problems through deep learning models. Graph generation networks have strong learning capabilities and advantages in handling complex relationships, and are particularly suitable for dynamic environments.
[0004] However, the precise algorithms in the related technologies are very time-consuming and resource-intensive when dealing with large-scale problems due to their high computational complexity, and are less efficient in dynamic environments because they need to be recalculated every time a change occurs, making it difficult to quickly adapt to dynamic changes. Heuristic algorithms are simple to implement and fast to calculate, but the quality of the solution depends on the design of the heuristic rules, and they are less adaptable to changes in the problem, and often require the redesign of rules for specific problems. Metaheuristic algorithms take a long time to calculate, and their parameter tuning is complex. Different problems may require different parameter settings, which increases the difficulty of use. The training process of the graph generation network is complex and time-consuming, requiring a large amount of data support, and its internal working mechanism is difficult to explain, which increases the inexplicability and transparency of the results. That is, when faced with frequently updated orders, the optimization algorithms in the related technologies usually need to continuously insert and modify the existing scheduling plans. This process involves a large number of mathematical operations and complex global solutions, and the consumption of computing power and time will increase dramatically. The scheduling efficiency and response speed often cannot meet the actual needs of workshop scheduling, and cause system performance degradation and resource waste, which needs to be solved urgently. Summary of the invention
[0005] The present application provides a generative scheduling method for a dynamic, wait-free replacement assembly line workshop to solve the problem that the optimization algorithm in the related technology usually needs to continuously insert and modify the existing scheduling plan when facing frequently updated orders. This process involves a large number of mathematical operations and complex global solutions, and the consumption of computing power and time will increase sharply. 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.
[0006] The first aspect of the present application provides a generative scheduling method for a dynamic no-wait replacement assembly line shop, comprising the following steps: obtaining job information of the dynamic no-wait replacement assembly line shop; inputting the job information into a preset encoding network to extract at least one job feature of each job of the dynamic no-wait replacement assembly line shop, so as to generate a corresponding job state according to the at least one job feature; decoding the job state using a preset decoding network, and calculating a selection probability distribution of each job in combination with the historical scheduling information of each job, so as to generate a scheduling decision for each job at the current moment according to the selection probability distribution.
[0007] Optionally, in one embodiment of the present application, the decoding of the job status also includes: based on a pre-established knowledge-guided two-stage reward strategy, capturing local feedback information and global feedback information of the historical scheduling decisions of each job; optimizing the initial encoding network and the initial decoding network through the local feedback information and the global feedback information to determine the preset encoding network and the preset decoding network.
[0008] Optionally, in one embodiment of the present application, 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 assembly line to generate a corresponding job status based on the at least one job feature, including: collecting the historical processing time of each job in the job information; based on the processing time, capturing the interdependence between each job; based on the interdependence, extracting the at least one job feature to generate a corresponding job status based on the at least one job feature.
[0009] Optionally, in one embodiment of the present 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, including: based on the preset decoding network and the historical scheduling information, obtaining the status of the previous job of the current job and the average status of unscheduled jobs; linearly mapping the status of the previous job and the average status of the unscheduled jobs to generate the current environmental state; and calculating the probability distribution of each job based on the job status and the environmental state.
[0010] Optionally, in one embodiment of the present application, the job status includes at least one of the processing time, current dependency and priority information of each job.
[0011] A second aspect of the present application provides a computer program product, including a computer program, which, when executed, is used to implement the above-mentioned generative scheduling method for the dynamic no-wait replacement flow shop.
[0012] The embodiment of the present application can obtain the job information of the dynamic no-wait replacement flow shop, and use a certain encoding network and decoding network to extract features from the current list of workpieces to be processed at each decision moment, calculate the environmental features at the current moment, and use the environmental features to calculate the selection probability distribution of the next processed part through the attention mechanism, and finally generate the scheduling decision of the job according to the selection probability distribution. Thus, the scheduling process of the dynamic no-wait replacement flow shop scheduling problem based on the arrival of orders is modeled as a generative single-step decision scheduling based on the Markov process, so as to achieve a rapid response to the arriving orders, and based on the characteristics of the no-wait replacement flow shop, a codec network based on the attention mechanism is designed, and based on the existing knowledge, a two-stage reward is designed to guide the codec network in stages, which accelerates the training efficiency of the codec network, and then realizes efficient feature extraction and representation of job information, so as to combine historical status and global information for efficient dynamic decision adjustment. This solves the problem that when faced with frequently updated orders, the optimization algorithms in related technologies usually need to continuously insert and modify existing scheduling plans. This process involves a large number of mathematical operations and complex global solutions, and the consumption of computing power and time will increase dramatically. 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 the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0015] Figure 1 A Gantt diagram of a no-wait replacement flow shop scheduling problem according to an embodiment of the present application;
[0016] Figure 2 A schematic diagram of a framework of a generative single-step scheduling algorithm based on a reinforcement learning method of a Markov decision process according to an embodiment of the present application;
[0017] Figure 3 A flowchart of a generative scheduling method for a dynamic non-waiting replacement flow shop provided according to an embodiment of the present application;
[0018] Figure 4 A schematic diagram of the structure of a coding network according to an embodiment of the present application;
[0019] Figure 5 A schematic diagram of the structure of a decoding network according to an embodiment of the present application;
[0020] Figure 6 A schematic diagram of a loss function change curve of an encoding / decoding network in a training process under different reward settings according to an embodiment of the present application;
[0021] Figure 7 It is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present application.
[0022] Reference numerals:
[0023] 701 - memory, 702 - processor and 703 - communication interface. DETAILED DESCRIPTION
[0024] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0025] The following describes the generative scheduling method of the dynamic non-waiting replacement flow shop of the embodiment of the present application with reference to the accompanying drawings. In view of the optimization algorithm in the related technology mentioned in the above background technology, when facing frequently updated orders, it is usually necessary to continuously insert and modify the existing scheduling scheme. This process involves a large number of mathematical operations and complex global solutions, and the consumption of computing power and time will increase sharply. The scheduling efficiency and response speed often cannot meet the actual needs of workshop scheduling, and cause the performance degradation and resource waste of the system. The present application provides a generative scheduling method of the dynamic non-waiting replacement flow shop. In this method, the job information of the dynamic non-waiting replacement flow shop can be obtained, and a certain encoding network and decoding network are used to extract features of the current list of workpieces to be processed at each decision moment, and the environmental features at the current moment are calculated, and the selection probability distribution of the next processing part is calculated by the environmental features through the attention mechanism, and finally the scheduling decision of the job is generated according to the selection probability distribution. As a result, the scheduling process of the dynamic no-wait replacement flow shop scheduling problem considering the arrival of orders is modeled as a generative single-step decision scheduling based on the Markov process, which realizes a rapid response to the arriving orders. Based on the characteristics of the no-wait replacement flow shop, an attention-based encoder-decoder network is designed, and a two-stage reward is designed based on the existing knowledge to guide the encoder-decoder network in stages, which accelerates the training efficiency of the encoder-decoder network, and then realizes efficient feature extraction and representation of job information, so as to combine historical status and global information for efficient dynamic decision adjustment. As a result, the optimization algorithm in the relevant technology is solved. When facing frequently updated orders, it is usually necessary to continuously insert and modify the existing scheduling scheme. This process involves a large number of mathematical operations and complex global solutions, and the consumption of computing power and time will increase sharply. 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.
[0026] Before explaining the generative scheduling method of the dynamic no-wait replacement flow shop in the embodiment of the present application, the dynamic no-wait replacement flow shop problem and the generative scheduling method considering the arrival of orders involved in the embodiment of the present application are first explained.
[0027] Figure 1 This is a Gantt chart diagram of a no-wait replacement flow shop scheduling problem according to an embodiment of the present application. Figure 1 As shown, the dynamic non-waiting replacement flow shop problem considering order arrival in the embodiment of the present application can be described as follows but not limited to:
[0028] N workpieces need to be processed, and each workpiece needs to be processed on M machines in turn. The processing order of all workpieces is the same. The processing time required for the i-th workpiece on the j-th machine is Tij. All machines are continuously available and will not fail. Each job can only be processed on one machine at a time, and each machine can only process one job at a time. Once a given job is processed on a given machine, it cannot be interrupted until the processing is completed. All workpieces cannot have idle time during the processing process, that is, after the processing is completed on the previous machine, the next processing must be started immediately on the next machine. Considering the dynamic scenario of order arrival, N1 workpieces are available at the initial time 0, and the remaining N2=N-N1 workpieces will be available after the order arrives. Specifically, each workpiece has an arrival time Tarri. Each workpiece can only know the specific processing time on each machine after arrival, and can start processing. The optimization goal of this problem is the maximum completion time Cmax, which is calculated as follows: Among them, C ij is the completion time of the i-th job on the j-th machine.
[0029] No waiting replacement flow shop tasks are not allowed to wait during the transfer process between machines, which means that once the task starts processing on the first machine, it must be processed continuously on the subsequent machines until it is completed. This scheduling method is particularly important in industries such as chemical and food processing, because once some production processes start, they cannot be interrupted in the middle, otherwise it will affect product quality or increase production costs.
[0030] Based on this, the embodiment of the present application can combine the no-wait flow shop scheduling with the generative scheduling method, and provide an efficient, flexible and robust solution by combining the strict requirements of no-wait scheduling with the dynamic optimization capabilities of the generative algorithm. By improving the automation and intelligence level of the production system, the market demand for high-efficiency and low-cost production can be met, the competitiveness of enterprises in the market can be improved, and economic development and industrial upgrading can be promoted. Thereby improving the response speed and resource utilization of the production system, reducing waste and delays in the production process, thereby reducing the production cost of the workshop and improving product quality and market competitiveness.
[0031] Among them, the generative scheduling method mainly uses deep learning technology to generate optimized scheduling plans based on the current production status and historical data. Compared with traditional optimization methods, the generative algorithm can dynamically adjust the scheduling plan based on real-time data, adapt to changes in the production environment, and has strong fault tolerance when dealing with complex and changeable scheduling scenarios. In the context of dynamic order arrival, the generative algorithm can quickly respond to the arrival of new orders, update the scheduling plan in real time, and ensure the continuity and efficiency of the production process.
[0032] Furthermore, the embodiment of the present application combines the reinforcement learning method of Markov decision process (MDP) with the basic method of generative scheduling to achieve generative single-step scheduling of dynamic no-wait replacement flow shop operations. Under the MDP framework, the embodiment of the present application can regard the scheduling process of the dynamic no-wait replacement flow shop as a series of state transfers, evaluate the current state at each decision time point, take corresponding actions, and select the workpiece to be processed in the next step. This method avoids the complexity of global scheduling and decomposes the problem into continuous small-scale decisions, and only needs to select one workpiece to be processed each time. This can reduce the frequency and complexity of global optimization and effectively reduce the amount of calculation.
[0033] Figure 2 This is a schematic diagram of a framework of a generative single-step scheduling algorithm based on a Markov decision process reinforcement learning method according to an embodiment of the present application. Figure 2 As shown in the figure, under this algorithm, since the subsequent scheduling plan has not been fully determined, the orders that arrive in real time can be temporarily placed in the waiting list and wait for the system to process them at the appropriate time, without having to readjust the entire scheduling plan every time. Through reinforcement learning, the system can autonomously learn from past scheduling experience and gradually optimize the decision-making process, so that it can quickly and flexibly generate scheduling plans when facing new orders, and achieve efficient dynamic response.
[0034] Specifically, Figure 3 A flow chart of a generative scheduling method for a dynamic, no-wait replacement flow shop provided in an embodiment of the present application.
[0035] like Figure 3 As shown, the generative scheduling method of the dynamic non-waiting replacement flow shop includes the following steps:
[0036] In step S301, the operation information of the dynamic no-wait replacement flow shop is obtained.
[0037] In the actual execution process, the production tasks of the workshop are not all known at the beginning, but arrive dynamically over time, which makes the scheduling problem more complicated. The dynamic arrival of orders requires the scheduling algorithm to respond to the emergence of new tasks in real time and adjust and optimize based on the existing scheduling plan. In this dynamic scenario, factors such as task arrival time, task priority, and machine status will constantly change, bringing higher difficulty and challenges to scheduling.
[0038] Therefore, when scheduling the jobs of the dynamic no-wait replacement flow shop, the embodiment of the present application can obtain the information of each job in the shop, for example, which job is the current job, which workpieces are required for the job, the total number of workpieces to be processed, the number of processing machines that the workpieces need to pass through in sequence, the job sequence, that is, the processing sequence of the workpieces on the machines, etc.
[0039] The embodiment of the present application can further process these operation information.
[0040] Step S302, inputting the operation information into a preset coding network to extract at least one operation feature of each operation of the dynamic no-wait replacement flow shop, so as to generate a corresponding operation state according to the at least one operation feature.
[0041] In some embodiments, in order to solve the problem of dynamic non-waiting replacement of assembly line operations, when generating a scheduling strategy for dynamic non-waiting replacement of assembly line workshops based on the acquired operation information, the present application is mainly but not limited to using an encoding and decoding network based on an attention mechanism. The encoding and decoding network is mainly but not limited to being composed of an encoding network and a decoding network. The preset encoding network here can be understood as a pre-built and trained network for processing input operation information.
[0042] After obtaining the job information, the embodiment of the present application mainly inputs the job information into a certain encoding network, and then extracts at least one job feature of each job based on the job information.
[0043] Optionally, in one embodiment of the present application, the job information is input into a preset coding network to extract at least one job feature of each job in the dynamic non-waiting replacement flow shop, so as to generate a corresponding job status according to the at least one job feature, including: collecting the historical processing time of each job in the job information; based on the processing time, capturing the interdependence between each job; based on the interdependence, extracting at least one job feature, so as to generate a corresponding job status according to the at least one job feature. The job status includes at least one of the processing time, current dependency and priority information of each job.
[0044] As a possible implementation method, the embodiment of the present application can use a certain coding network to efficiently extract and represent the input job information. First, the present application can collect the historical processing time of each job in the job information, thereby capturing the interdependence between each job, and then based on the interdependence between each job, extract the features of the job and generate the corresponding job status.
[0045] Figure 4 FIG. 1 is a schematic diagram of the structure of a coding network according to an embodiment of the present application. Figure 4 As shown, the present application can use a certain coding network to extract the job processing time (Job Processing Time), and use [x1, x2, ..., x n ], and then embed the processing time of each job into a high-dimensional space through linear transformation to generate an embedded representation [h1,h2,…,hn ], giving it rich expressive power, which allows 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 the self-attention mechanism to capture the interdependencies between jobs. Specifically, the encoding network can better encode the job status by calculating the correlation between all jobs and assigning different weights to each job. After each self-attention mechanism, the result passes through the residual connection (Add&Norm) and is normalized to prevent the gradient from disappearing or exploding. Then, the output of this step is further extracted through a feedforward neural network (Feed Forward), and finally passes through the residual connection and normalization operation again to obtain the job features of each job.
[0047] Furthermore, the encoding network can continuously extract and process the features of the input job through multi-layer stacking, so that the local and global information of the job can be fully expressed in the deep structure of the network, and finally generate the job state after the kth encoding
[0048] The final output of the encoding network in the embodiment of the present application is the job status representation after multi-layer encoding, which contains information such as the processing time of each job, the dependencies between jobs, and the priority of the job. These extracted job statuses will be passed to the decoding network for subsequent decision-making.
[0049] Step S303, using a preset decoding network to decode the job status, and calculating the selection probability distribution of each job in combination with the historical scheduling information of each job, so as to generate a scheduling decision for each job at the current moment according to 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, and the decoding network can 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, the present application is mainly but not limited to decoding the job status output by a certain encoding network through a certain decoding network, calculating the environmental characteristics at the current moment, and then using the environmental characteristics to query the list of workpieces to be processed in the job through the attention mechanism, and calculating the selection probability distribution of the next processed part, 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 a scheduling decision for each job at the current moment based on the probability historical scheduling information.
[0052] Optionally, in one embodiment of the present application, a preset decoding network is used to decode the job status, and the selection probability distribution of each job is calculated in combination with the historical scheduling information of each job, including: based on the preset decoding network and the historical scheduling information, obtaining the status of the previous job of the current job and the average status of unscheduled jobs; linearly mapping the status of the previous job and the average status of the unscheduled jobs to generate the current environmental state; and calculating the probability distribution of each job based on the job status and the environmental state.
[0053] Based on the relevant description of other embodiments, it can be understood that the encoding and decoding network in the embodiment of the present application includes two parts: an encoding network and a decoding network. Among them, the preset encoding network here can be understood as a pre-built and trained network for processing the output information of the preset encoding network.
[0054] In other embodiments, the present application decodes the job status through a certain decoding network, obtains the selection probability distribution of each job in combination with historical scheduling information, and then generates a scheduling decision for each job at the current moment. It mainly obtains the status of the previous job of the current 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 in combination with the job status.
[0055] Figure 5 FIG. 1 is a schematic diagram of the structure of a decoding network according to an embodiment of the present application. Figure 5 As shown, the input of the decoding network in the embodiment of the present application includes but is not limited to the status of the previous job. and the average status of the remaining unscheduled jobs Expressing the two in the form of vectors and then linearly mapping the two vectors can get the current environment state h ctx =σ([h last ;h left ]). The current environment state includes but is not limited to information about scheduled jobs and remaining jobs, which helps the decoder to make more reasonable scheduling decisions at the current moment.
[0056] Furthermore, the decoding network in the embodiment of the present application can also, but is not limited to, use a multi-head attention mechanism to simultaneously consider all the job states output by the encoder. That is, each job state is used as the key vector of the attention mechanism, and combined with the current environment state to generate the query vector h query , thereby calculating the probability of each job being selected at the current moment [p1,p2,…,p n ] and make scheduling decisions (Action) based on these probabilities.
[0057] In the embodiment of the present application, by utilizing historical scheduling information and global information of remaining jobs, the decoding network can dynamically adjust the scheduling order of each job, thereby avoiding excessive waiting time between jobs and improving the overall efficiency of scheduling.
[0058] Optionally, in one embodiment of the present application, it also includes: based on a pre-established knowledge-guided two-stage reward strategy, capturing local feedback information and global feedback information of the historical scheduling decisions of each job; optimizing the initial encoding network and the initial decoding network through the local feedback information and the global feedback information to determine the preset encoding network and the preset decoding network.
[0059] In the actual execution process, in order to effectively improve the solving ability of the encoding network and the decoding network in the process of solving the dynamic wait-free replacement assembly line problem, the embodiment of the present application can also set up a knowledge-guided two-stage reward optimization encoding network and decoding network, and combine the attention mechanism to better capture the dependencies between tasks.
[0060] For example, the training process of the encoding network and the decoding network in the embodiment of the present application can be divided into two stages, each stage is based on a different reward strategy, so as to achieve a more effective training effect. Among them, the reward calculation formula can be but is not limited to the following:
[0061]
[0062] In the initial stage of codec network training, the embodiment of the present application may adopt a single-step reward mechanism. Specifically, the reward is based on the sum of the waiting time between the processed workpiece selected in the current step and the previous workpiece. That is, each time the codec network makes a decision, it provides feedback based on the immediate impact of the decision on the current system state (i.e., the waiting time between workpieces). Such a design helps to refine the sparse feedback of the problem (such as completion time) to each local decision, so that the codec network can learn rules from local information faster and accumulate experience.
[0063] Through such single-step rewards, the encoder-decoder network can quickly master basic job scheduling strategies, especially in avoiding excessive waiting times between artifacts. The advantage of this approach in the early stages is that it can accelerate the network's understanding of the nature of the problem and shorten the network's learning curve.
[0064] After the codec network has learned a relatively robust scheduling strategy through the single-step reward mechanism in the first phase, the training process enters the second phase. At this point, the design of reward feedback is changed to be based on the completion time of the entire task, that is, the goal that the problem itself needs to minimize. Compared with the local feedback in the first phase, 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 performance of the overall system.
[0065] Although splitting a single sparse reward into each step will introduce a certain amount of error, this approach significantly enhances the feedback the network receives at each decision moment, making the training process more stable and efficient. The network can quickly learn from local feedback first, and then further optimize under the guidance of the global goal, thereby ensuring better convergence within a limited training time.
[0066] The embodiment of the present application can introduce a two-stage reward mechanism based on knowledge guidance, which combines the rapid learning ability of local feedback with the fine tuning ability of global feedback, greatly improving the training efficiency and convergence speed of the codec network. Among them, the setting of single-step rewards helps the network to quickly obtain a preliminary understanding of the problem in the early stages and lays the foundation for the fine optimization of the overall reward. Subsequently, guided by the overall reward, the codec network can further optimize the overall strategy based on the knowledge learned and achieve a more efficient and accurate scheduling solution.
[0067] Additionally, in order to verify the performance of the generative scheduling method of the dynamic no-wait replacement flow shop in the embodiment of the present application on the no-wait replacement flow shop scheduling problem, the present application generates 10 groups of test cases at 20 different scales to test the method. Table 1 is a test case parameter setting table of an embodiment of the present application, which can be expressed 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)]]> Inter-arrival time <![CDATA[arr i ~E(0.02)]]>
[0070] In order to verify the effectiveness of the generative scheduling method for the dynamic non-waiting replacement flow shop, the embodiment of the present application can be, but is not limited to, using several commonly used scheduling rules (Rule) in the same scenario, and using reinforcement learning for rule scheduling (RL) and other algorithms for comparison. Among them, the comparison index uses the maximum completion time Cmax. Table 2 is a comparison result table of the Cmax index of each algorithm on different scale test problems in one embodiment of the present application, which can be expressed 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 can be seen from Table 2, the generative scheduling method for the dynamic non-waiting replacement flow shop of the embodiment of the present application has achieved better indicators in each test problem, proving the effectiveness of the method. And, Figure 6 This is a schematic diagram of a loss function change curve of an encoding / decoding network in a training process under different reward settings according to an embodiment of the present application. Figure 6 As shown, it can be seen that the knowledge-guided two-stage reward in the embodiment of the present application significantly accelerates the convergence process of the codec network, proving the effectiveness of the reward setting in the embodiment of the present application.
[0074] According to the generative scheduling method of the dynamic no-wait replacement flow shop proposed in the embodiment of the present application, the job information of the dynamic no-wait replacement flow shop can be obtained, and a certain encoding network and decoding network are used to extract features of the current list of workpieces to be processed at each decision moment, and the environmental features at the current moment are calculated, and the selection probability distribution of the next processed part is calculated by using the environmental features through the attention mechanism, and finally the scheduling decision of the job is generated according to the selection probability distribution. Thus, the scheduling process of the dynamic no-wait replacement flow shop scheduling problem based on the arrival of orders is modeled as a generative single-step decision scheduling based on the Markov process, so as to achieve a rapid response to the arriving orders, and based on the characteristics of the no-wait replacement flow shop, an encoding and decoding network based on the attention mechanism is designed, and based on the existing knowledge, a two-stage reward is designed to guide the encoding and decoding network in stages, which accelerates the training efficiency of the encoding and decoding network, and then realizes efficient feature extraction and representation of the job information, so as to combine the historical state and global information for efficient dynamic decision adjustment. This solves the problem that when faced with frequently updated orders, the optimization algorithms in related technologies usually need to continuously insert and modify existing scheduling plans. This process involves a large number of mathematical operations and complex global solutions, and the consumption of computing power and time will increase dramatically. 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 the present application. The electronic device may include:
[0076] A memory 701 , a processor 702 , and a computer program stored in the memory 701 and executable on the processor 702 .
[0077] When the processor 702 executes the program, the generative scheduling method for the dynamic no-wait replacement flow shop provided in the above embodiment is implemented.
[0078] Furthermore, the electronic device further comprises:
[0079] The communication interface 703 is used for communication between the memory 701 and the processor 702 .
[0080] The memory 701 is used to store computer programs that can be executed on the processor 702 .
[0081] The memory 701 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0082] If the memory 701, the processor 702 and the communication interface 703 are implemented independently, the communication interface 703, the memory 701 and the processor 702 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0083] Optionally, in a specific implementation, if the memory 701, the processor 702 and the communication interface 703 are integrated on a chip, the memory 701, the processor 702 and the communication interface 703 can communicate with each other through an internal interface.
[0084] The processor 702 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0085] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned generative scheduling method for a dynamic, wait-free replacement flow shop.
[0086] An embodiment of the present application also provides a computer program product, including a computer program, which can run computer instructions. When the computer instructions are executed by a processor, the generative scheduling method for the dynamic wait-free replacement flow shop provided in the embodiment of the present application is implemented.
[0087] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0088] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0089] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0090] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or N wirings (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways as necessary and then storing it in a computer memory.
[0091] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented by hardware, as in another embodiment, it can be implemented by any one or a combination of multiple of the following technologies known in the art: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0092] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0093] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0094] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A generative scheduling method for a dynamic non-waiting replacement flow shop, characterized in that: The following steps are involved: Obtain the operation information of the dynamic no-wait replacement flow shop; Inputting the operation information into a preset coding network to extract at least one operation feature of each operation of the dynamic non-waiting replacement flow shop to generate a corresponding operation state according to the at least one operation feature; 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, so as to generate a scheduling decision for each job at the current moment according to the selection probability distribution.
2. The method according to claim 1, characterized in that: Also includes: Based on a pre-established knowledge-guided two-stage reward strategy, local feedback information and global feedback information of historical scheduling decisions of each job are captured; An initial encoding network and an initial decoding network are optimized by using the local feedback information and the global feedback information to determine the preset encoding network and the preset decoding network.
3. The method according to claim 1, characterized in that The step of inputting the operation information into a preset coding network to extract at least one operation feature of each operation of the dynamic non-waiting replacement flow shop to generate a corresponding operation state according to the at least one operation feature includes: Collecting the historical processing time of each job in the job information; capturing the interdependencies between each of the operations based on the processing time; Based on the interdependence, the at least one operation feature is extracted to generate a corresponding operation state according to the at least one operation feature.
4. The method according to claim 1, characterized in that The step of decoding the job status by using a preset decoding network and calculating the selection probability distribution of each job in combination with the historical scheduling information of each job includes: Based on the preset decoding network and the historical scheduling information, obtaining the status of the previous job of the current job and the average status of unscheduled jobs; Performing linear mapping on the state of the previous job and the average state of the unscheduled jobs to generate a current environment state; The probability distribution of each job is calculated based on the job state and the environment state.
5. The method according to claim 1, characterized in that: The job status includes at least one of processing time, current dependency, and priority information of each job.
6. 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 the dynamic no-wait replacement flow shop as described in any one of claims 1-5.
Citation Information
Patent Citations
Flow shop scheduling method based on deep reinforcement learning
CN112987664A
Job-shop adaptive scheduling method based on deep reinforcement learning
CN114707881A
Distributed job shop scheduling method based on end-to-end deep reinforcement learning
CN117057528A
Crown block scheduling method, device and equipment and storage medium
CN117764293A
Workshop scheduling method considering AGV transportation time based on near-end strategy optimization algorithm
CN119151227A