Distributed job shop scheduling workpiece insertion algorithm based on idle time
By using a distributed job shop scheduling algorithm based on idle time for job insertion, the problems of local optima and insufficient resource utilization in existing job insertion algorithms are solved. This algorithm achieves global optima for job insertion and efficient resource utilization, thereby improving the scheduling efficiency of multi-factory collaborative production.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-04-07
AI Technical Summary
In the existing distributed job shop scheduling problem, the job insertion algorithm suffers from local optima, high computational cost, and insufficient utilization of idle time, making it difficult to achieve global Makespan optimization and efficient resource utilization.
The distributed job shop scheduling algorithm based on idle time achieves efficient job migration and insertion by screening potential insertion positions and combining them with an idle time evaluation function, thereby optimizing factory load balancing and resource utilization.
It effectively avoids local optima, reduces the increase in completion time after workpiece insertion, improves overall scheduling quality and resource utilization efficiency, and is suitable for rapid response needs in multi-factory collaborative production scenarios.
Smart Images

Figure CN121809922A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of distributed job shop scheduling, in particular to a heuristic algorithm for quickly realizing cross-factory optimization insertion of workpieces based on idle time, which is suitable for scheduling and optimization in a multi-factory collaborative production scene and can be integrated into various intelligent optimization algorithms to improve the quality and solution efficiency of the overall scheduling scheme. BACKGROUND
[0002] Distributed Job Shop Scheduling Problem (DJSP) is a core optimization problem in global production environment, and an important extension of traditional Job Shop Scheduling Problem (JSP). The core of this problem is to reasonably allocate a number of jobs to geographically dispersed factories for processing, and to solve the two sub-problems of "job-factory allocation" and "process-machine sequencing" at the same time. The former determines which factory a job is processed in, and the latter needs to arrange the specific processing machine and sequence for each process of the job in the selected factory, and each factory is a typical JSP problem. The optimization goal is usually to minimize the maximum completion time (Makespan) of all factories, i.e. the completion time of the critical factory. In actual scheduling, the load imbalance of the critical factory is the core bottleneck that restricts the overall scheduling performance, so the migration of jobs in the critical factory to other factories for optimized insertion has become an effective way to reduce the global Makespan. However, some existing job insertion strategies still have certain limitations in the distributed scheduling scenario. In terms of methods, most researches use insertion methods based on simple scheduling rules. The literature "Modeling and heuristics for scheduling of distributed job shops, Expert Systems With Applications, 2014, vol41(17), p7754-7763" proposes three heuristic rules (SPT, LPT, LRPT) and greedy insertion algorithms (GH1, GH2, GH3), which insert each process one by one in the partial schedule and select the position that minimizes the increase in the target value. Although this method is computationally efficient, it only considers the local optimum of the current process of the job to be inserted in the optimization process, ignoring the influence on the scheduling space of subsequent processes, which is prone to local optimization and difficult to effectively reduce the Makespan. Secondly, in response to dynamic events such as new job insertion, existing methods tend to fully reschedule all processes in the target factory, i.e. by completely redistributing and sequencing all jobs to seek optimization. Although this strategy may obtain a high-quality scheduling scheme, it has high computational cost and is difficult to meet the rapid response requirements in large-scale scheduling problems. At the same time, this method does not fully utilize the effective information in the existing scheduling scheme, degrading the problem to a complex classic JSP, which not only wastes computational resources, but also makes it difficult to meet the real-time adjustment requirements of actual production. In addition, in the scheduling process, equipment idle time is also an important indicator of measuring the efficiency of workshop resource utilization, which directly affects production efficiency and manufacturing cost.The existing insertion algorithm generally lacks systematic analysis and intelligent matching mechanism for machine idle window. The document "Cloud manufacturing job shop scheduling method with idle time, control and decision, 2017, vol32 (05), p811-816" points out that due to the complex process constraints between processes in DJSP and the difficulty of cross-factory coordination, some existing algorithms only use idle time as the basis for "insertion feasibility" judgment, and fail to optimize from the perspective of how to most efficiently and globally occupy the idle time, resulting in insufficient utilization of idle time and inability to effectively release resource redundancy capacity, thereby limiting further optimization of global Makespan. SUMMARY
[0003] In view of the problems of local optimization, high cost, insufficient utilization of idle time and the like in the existing workpiece insertion algorithm in the distributed scheduling problem, the present application specifically proposes a distributed job shop scheduling workpiece insertion algorithm based on idle time, which aims to realize efficient migration and low-amplitude insertion of key factory workpieces to other factories, effectively guarantee the stability of global scheduling quality, and provide a lightweight and high-performance integrated module for intelligent scheduling algorithms such as iterative greedy, thereby helping to improve the overall scheduling optimization efficiency.
[0004] The technical scheme of the present application is as follows:
[0005] The distributed job shop scheduling workpiece insertion algorithm based on idle time comprises the following steps:
[0006] Step 1: read the problem data, initialize the factory set Factory{}, the machine set Machine{}, the workpiece set Job{}, the total number of workpieces n, the operation set Operation{} consisting of all operations of each workpiece, and the total number of operations OperaNum;
[0007] Step 2: based on the factory load balancing principle, use a random allocation strategy to disperse all workpieces to different factories for processing; then generate an operation sequence OS{} based on the operation set Operation{}, and give a processing time vector ProcTime{} of each operation on the candidate machine. Based on the given workpiece-factory allocation, operation sequence and processing time settings, an initial scheduling scheme is decoded, the completion time of each factory is calculated, and the maximum value among them is recorded as the initial maximum completion time C;
[0008] Step 3: select the key information from the initial scheduling scheme: obtain the completion time C' of the key factory F c , the operation set {O i1 , O i2 , …, O ik} of the workpiece i to be inserted, and the factory Fw Current scheduling information;
[0009] Step 4: Delete the critical factory F c For workpiece i to be inserted during scheduling, perform left shift scheduling on the remaining processes in the factory; simultaneously determine the target insertion factory F. w The current maximum completion time C0;
[0010] Step 5: For the current process O to be inserted ij Based on the current process O to be inserted ij The existing schedule of the processing machine is used to list all possible insertion positions, forming a candidate insertion position set CandPosi{};
[0011] Step 6: For each position in the candidate insertion position set CandPosi{}, calculate the core parameters:
[0012] 1) Current process O ij The available free time for inserting at this position;
[0013] 2) Current process O ij The subsequent process following the insertion at this position {O i(j+1) ,…, k} Valid insertion range;
[0014] Step 7: Based on the available idle time determined in Step 6 and the corresponding subsequent processes {O i(j+1) ,…, k The effective insertion range index is used to filter potential insertion positions from the candidate insertion position set CandPosi{}, forming a potential position set PotePosi{}.
[0015] Step 8: Calculate the evaluation value f of each position in the potential position set PotePosi{} based on the idle time evaluation function, where x represents the process, [s, e] represents the insertion position, g(x[s, e]) is the actual idle time occupied by the preceding process, and h(x[s, e]) is the maximum expected idle time that the subsequent process can occupy.
[0016] Step 9: Select the position with the largest evaluation value f from the potential position set PotePosi{}, and use it as the current process O. ij The final insertion position is used to guide the insertion of the next process, and the position information is recorded and the position is removed from the potential position set.
[0017] Step 10: Determine the current process to be inserted. ij Is this the last process for workpiece i? If not, proceed to the next process O. i(j+1)The effective insertion range of the current process is updated to [0, C0] and the step 5 is returned; if not, the step 11 is executed. ij The processing end time of the process Oi, C0, is obtained, and the step 5 is returned; if not, the step 11 is executed.
[0018] Step 11: The insertion position information of all processes of the workpiece i is traced back to generate a complete insertion plan InsePlan, and the workpiece i is inserted into the target factory F w The completion time of the factory F w and the overall maximum completion time are recalculated, and the optimized scheduling scheme is output.
[0019] Further, the critical factory F c in step 2 is the factory with the longest current completion time.
[0020] Further, in step 4, in order to minimize the increase of the Makespan, it is set that all processes are inserted before the Makespan, and the effective insertion range of the first process O i1 of the workpiece i is set to [0, C0].
[0021] Further, the idle time that can be occupied by the insertion of the current process O ij in this position is defined as the length of the time window that does not produce additional delay.
[0022] Further, the effective insertion range of the subsequent processes {O i(j+1) , k} corresponding to the current process O ij after the insertion of the current process O ij in this position is the interval [the processing end time of the current process O ij , C0].
[0023] Further, the greater the evaluation value f in step 8 is, the more optimal the position is.
[0024] Further, the evaluation function is f = C0.
[0025] Advantages:
[0026] This invention employs a job insertion algorithm based on idle time. Through collaborative screening using dual evaluation metrics and combined with a globally oriented idle time evaluation function, it balances the insertion efficiency of the current process with the scheduling flexibility of subsequent processes, effectively avoiding the local optimum trap and achieving global optimum for job insertion. Simultaneously, the algorithm fully utilizes existing scheduling information and maximizes the idle time of occupied machines, minimizing the increase in completion time after job insertion and effectively balancing factory load. The algorithm yielded 80 new solutions in 240 experimental benchmark examples, demonstrating significant superiority compared to several state-of-the-art algorithms in the current research field. Furthermore, this method exhibits high integration and adaptability, and can be embedded as a core functional module into metaheuristic frameworks such as genetic algorithms and iterative greedy algorithms, providing efficient job insertion decision support. This is of great significance for balancing resource allocation and achieving good scheduling optimization in distributed workshop static / dynamic scheduling scenarios. Attached Figure Description
[0027] Figure 1 Flowchart of specific embodiments of the present invention;
[0028] Figure 2 : A schematic diagram of the initial scheduling scheme of an embodiment of the present invention;
[0029] Figure 3 The key factory left-shift scheduling Gantt chart in this embodiment of the invention;
[0030] Figure 4 : A schematic diagram of the workpiece to be inserted into the insertion factory according to an embodiment of the present invention;
[0031] Figure 5 This is a schematic diagram of the scheduling scheme after the workpiece to be inserted is inserted into the insertion factory according to an embodiment of the present invention. Detailed Implementation
[0032] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0033] This application provides a distributed job shop scheduling algorithm for job insertion based on idle time, including the following steps:
[0034] Step 1: Read the problem data and initialize the factory set Factory{}, machine set Machine{}, job set Job{}, total number of jobs n, operation set Operation{} consisting of all operations of each job, and total number of operations OperaNum;
[0035] Step 2: Based on the factory load balancing principle, a random allocation strategy is adopted to distribute all workpieces to different factories for processing; then, a process sequence OS is randomly generated according to the process set Operation{}, and the processing time vector ProcTime{} for each process on the candidate machines is given. Given the above workpiece-factory allocation, process sequence, and processing time settings, a set of initial scheduling schemes is decoded, the completion time of each factory is calculated, and the maximum value is recorded as the initial maximum completion time C;
[0036] Step 3: Filter key information from the initial scheduling plan: Obtain the key factory F in the current scheduling plan. c The completion time C', the set of operations to be inserted into workpiece i {O i1 O i2 , …, O ik}、 Factory F to be inserted w Current scheduling information;
[0037] Step 4: Delete the critical factory F c For workpiece i to be inserted during scheduling, perform left shift scheduling on the remaining processes in the factory; simultaneously determine the target insertion factory F. w The current maximum completion time C0;
[0038] Step 5: For the current process O to be inserted ij Based on the current process O to be inserted ij The existing schedule of the processing machine is used to list all possible insertion positions, forming a candidate insertion position set CandPosi{};
[0039] Step 6: For each position in the candidate insertion position set CandPosi{}, calculate the core parameters:
[0040] 1) Current process O ij The available free time for inserting at this position;
[0041] 2) Current process O ij The subsequent process following the insertion at this position {O i(j+1) ,…, k} Valid insertion range;
[0042] Step 7: Based on the available idle time determined in Step 6 and the corresponding subsequent processes {O i(j+1) ,…, k The effective insertion range index is used to filter potential insertion positions from the candidate insertion position set CandPosi{}, forming a potential position set PotePosi{}.
[0043] Step 8: Calculate the evaluation value f of each position in the potential position set PotePosi{} based on the idle time evaluation function, where x represents the process, [s, e] represents the insertion position, g(x[s, e]) is the actual idle time occupied by the preceding process, and h(x[s, e]) is the maximum expected idle time that the subsequent process can occupy.
[0044] Step 9: Select the position with the largest evaluation value f from the potential position set PotePosi{}, and use it as the current process O. ij The final insertion position is used to guide the insertion of the next process, and the position information is recorded and the position is removed from the potential position set.
[0045] Step 10: Determine the current process to be inserted. ij Is this the last process for workpiece i? If not, proceed to the next process O. i(j+1) Set as the current insertion operation, and update its effective insertion range to [O]. ij If the processing end time is [C0], return to step 5; if so, proceed to step 11.
[0046] Step 11: Backtrack the insertion position information of all processes for workpiece i, generate a complete insertion plan (InsePlan), and insert workpiece i into target factory F. w In the middle, recalculate F w The completion time and the overall maximum completion time are calculated, and the optimized scheduling scheme is output.
[0047] Furthermore, the key plant F mentioned in step 2 c It is currently the factory with the longest completion time.
[0048] Furthermore, in step 4, to minimize the increase in Makespan, it is effective to set all operations to be inserted before Makespan, and the first operation O of workpiece i is set. i1 The valid insertion range is [0, C0].
[0049] Furthermore, the current process O ij The idle time that can be occupied at this position is defined as the length of the time window that does not produce additional delay.
[0050] Furthermore, the current process O ij The subsequent process following the insertion at this position {O i(j+1) ,…, k The valid insertion range is the interval [current process O]. ij The processing end time, C0].
[0051] Furthermore, the larger the evaluation value f in step 8, the better the location.
[0052] Furthermore, the evaluation function is: .
[0053] This invention considers two sub-problems in distributed job shop scheduling: "factory allocation" and "process sequencing." It focuses on the critical factory as the optimization core for job allocation and migration. When a process for a job to be inserted is moved to another factory, the first and last processes of the job are considered the start and end points of the insertion process. The selection of the insertion position is seen as an extension of the node. Two evaluation metrics are designed to construct a job insertion scheme that maximizes the use of scheduling idle time. Potential insertion positions are screened, and for these potential positions, an idle time evaluation function is designed to further screen for the globally optimal insertion position. Finally, through iteration until the optimization of the last process is completed, the insertion position information of all processes is backtracked to generate the globally optimal insertion scheme, achieving efficient utilization of idle time and global optimization of scheduling performance.
[0054] The flowchart of the distributed job shop scheduling algorithm based on idle time for this invention is attached. Figure 1 The present invention will now be described in conjunction with specific embodiments:
[0055] This embodiment takes the 2×5×3 distributed job shop scheduling problem shown in Table 1 as an example. It includes 2 factories, 5 jobs, each job has 3 processes, and each factory has 3 machines. It also gives the machines that can process each process of each job in each factory and the corresponding processing time.
[0056] Table 1. Examples of 2×5×3 Distributed Job Shop Scheduling Problems
[0057]
[0058] The distributed job shop scheduling algorithm based on idle time described in this embodiment of the invention includes the following steps:
[0059] Step 1: Read the 2×5×3 distributed job shop scheduling problem example from Table 1, and initialize the factory set Factory{F1, F2}, machine set Machine{F1—M1, M2, M3, F2—M1, M2, M3}, job set Job{J1, J2, J3, J4, J5}, total number of jobs n = 5, and operation set Operation{O 1,1 O 1,2 O 1,3 O 2,1 O 2,2 O 2,3 O 3,1 O 3,2O 3,3 O 4,1 O 4,2 O 4,3 O 5,1 O 5,2 O 5,3 Total number of processes OperaNum = 15.
[0060] Step 2: Based on the factory load balancing principle, randomly assign the 5 workpieces to two factories for processing, i.e., workpieces 1 and 3 are assigned to factory 1, and workpieces 2, 4, and 5 are assigned to factory 2; according to the operation set Operation{O 1,1 O 1,2 O 1,3 O 2,1 O 2,2 O 2,3 O 3,1 O 3,2 O 3,3 O 4,1 O 4,2 O 4,3 O 5,1 O 5,2 O 5,3 Randomly generate the process sequence OS() and the corresponding processing time sequence ProcTime() for the processing machine. The process sequence and processing time are shown in Table 2, where the process sequence number represents the workpiece number and the machine sequence number represents the processing machine number. Use this to generate the initial scheduling scheme, as follows: Figure 2 As shown, the current maximum completion time is C = 18.
[0061] Table 2. Process sequence and corresponding processing time sequence of the processing machine
[0062]
[0063] Step 3: From Figure 2 In the initial scheduling plan, key information was selected: Factory 1's completion time is 15, and Factory 2's completion time is 18; therefore, Factory 2 is the critical factory (F). c At this point, C' = 18. Taking the insertion of workpiece 2 into factory 1 as an example, the set of processes for inserting workpiece 2 is {O}. 2,1 O 2,2 O 2,3 At this time, factory 1 is the factory F to be inserted. w .
[0064] Step 4: Delete the critical factory F c For workpiece 2 to be inserted, a left shift scheduling is performed on the remaining processes in the factory without changing their process sequence, such as...Figure 3 As shown, at this time, the critical factory F c The completion time has been reduced to 12, pending insertion into factory F. w The initial completion time C0 = 15. To minimize the increase in Makespan, it is effective to set all operations to be inserted before Makespan; therefore, the first operation O of workpiece 2 to be inserted is set. 2,1 The valid insertion range is [0, 15].
[0065] Step 5: For the current process O to be inserted 2,1 It can be inserted at the factory F w Processing is performed on machine M1, with a processing time of 4 seconds. Figure 4 As shown in a, based on the current machine scheduling, all possible insertion positions are listed to form a candidate insertion position set CandPosi{[0, 4], [6, 7], [10, 15]}.
[0066] Step 6: For each position in the candidate insertion position set CandPosi{[0, 4], [5, 9], [10, 15]}, calculate two core parameters, namely operation O. 2,1 Idle time occupied and subsequent process set {O 2,2 O 2,3 The effective insertion range, i.e., the length of the time window and the interval [O] that does not produce additional delay. 2,1 The processing end time, 15], is shown in Table 3.
[0067] Table 3 Current Process O 2,1 Two evaluation values
[0068]
[0069] Step 7: Based on the two indicators "current process idle time" and "effective insertion range of subsequent processes" from the previous step, select "potential insertion positions" from the candidate insertion position set CandPosi{[0, 4], [5, 9], [10, 15]} to form the potential position set PotePosi{[0, 4], [10, 15]}.
[0070] Step 8: Evaluate the function based on idle time (Where x represents the process, [s,e] represents the insertion position, g(x[s,e]) is the actual idle time occupied by the preceding process, and h(x[s,e]) is the estimated maximum idle time that the subsequent process can occupy.) Calculate the evaluation value f for each position in the potential position set PotePosi{[0, 4], [10, 15]}, that is, for position [0, 4], the idle time occupied is 4, and the remaining process insertion range is [4, 15]. Since O 2,1 It is the first process, therefore g(O) 2,1 [0, 4])=4. Remaining operations for workpiece 2 (O 2,2 and O 2,3 The total processing time is 6, and the remaining insertion range length is known to be 11. Therefore, the remaining operations are expected to occupy a maximum idle time h(O). 2,1 [0, 3])=min[6, 11]=6, finally f(O 2,1 [0, 4]) = 4 + 6 = 10. The data at position [10, 15] can be obtained similarly. Store the information in the data table TAB (as shown in Table 5, first search).
[0071] Step 9: Based on the evaluation values in the data table, select the position [0, 4] with the largest f value in the potential position set PotePosi{[0, 4], [10, 15]} as the current process O. 2,1 The final insertion position is determined and used to guide the insertion of the next process, while recording the relevant position O. 2,1 The information of [0, 4] is removed from the potential position set PotePosi{} to avoid subsequent duplicate selections.
[0072] Step 10: Determine if the current process to be inserted is the last process of the workpiece: If not, proceed to the next search and return to step 5; if yes, proceed to step 11. From the first search, we know that the current process to be inserted is O. 2,1 For the first process of workpiece 2, a second search is performed to find the next process O. 2,2 Let O be the current insertion operation. 2,1 The insertion range is [0, 4], therefore O 2,2 The remaining valid insertion range is [4, 15]. Return to step 5.
[0073] During the second search, for the current process O to be inserted... 2,2 It can be inserted into the factory F w Processing is done on machine M3, with a processing time of 2 seconds, such as Figure 4As shown in b, based on the current machine schedule, all possible insertion positions are listed to form a candidate insertion position set CandPosi{[4, 6], [11, 11], [15, 15]}. The process O at each candidate insertion position is then calculated. 2,2 The idle time occupied by each position and subsequent processes {O 2,3 The valid insertion range is shown in Table 4.
[0074] Table 4 Current Process O 2,2 Two evaluation values
[0075]
[0076] Based on two indicators, "current process idle time" and "effective insertion range of subsequent processes," potential insertion positions are selected, resulting in a unique potential insertion position [4, 6] with an idle time of 2. The remaining process insertion range is [6, 15], which, together with the previous search, forms the potential position set PotePosi{[4, 6], [10, 15]}. Next, based on the idle time evaluation function... Calculate the evaluation value f(O) 2,2 [4, 6]), due to O 2,2 [4,6] is O 2,1 [0, 4] guides the insertion, therefore, g(O) 2,2 [4, 6])=2+g(O 2,1 [0, 4]) = 6. Given that workpiece 2 has 0 remaining operations. 2,3 The processing time is 4 seconds, and the remaining insertion range length is 15 - 6 = 9 seconds. Therefore, h(O) 2,2 [4, 6])=min[4, 9]=4, finally f(O 2,2 [4, 6]) = 6 + 4 = 10. Store the information in the data table TAB (as shown in Table 5, second search).
[0077] Based on the evaluation values in the data table, the position [4, 6] with the largest f-value in the potential position set is selected as the current process O. 2,2 The insertion position guides the insertion of the next process, and at the same time, it sets the relevant O... 2,2 The information for [4, 6] is removed from the potential position set PotePosi{[4, 6], [10, 15]} to avoid subsequent duplicate selections.
[0078] Determine if the current process to be inserted is the last process of the workpiece: if not, proceed to the next search and return to step 5; if yes, proceed to step 11. From the second search, we know that the current process to be inserted is O. 2,2This is the second process for workpiece 2, therefore a third search is performed to find the next process O. 2,2 Let O be the current insertion operation. 2,1 The insertion range is [0, 4], therefore O 2,2 The remaining valid insertion range is [6, 15].
[0079] During the third search, for the current process O to be inserted... 2,3 It can be inserted into the factory F w Processing is done on machine M2, with a processing time of 4 seconds. Figure 4 As shown in c, based on the current machine schedule, list all candidate insertion positions CandPosi{[7,11]}, and calculate the process O at each candidate insertion position. 2,2 The idle time occupied by each position and subsequent processes {O 2,3 The effective insertion range of} is such that there is only one candidate insertion position. Therefore, for [7, 11], the idle time occupied is 4, and the remaining insertion range of the process is [11, 15]. Together with the previous search, they form the potential position set PotePosi{[7, 11], [10, 15]}.
[0080] Next, based on the idle time evaluation function Calculate the evaluation value f(O) 2,3 [7,11]), due to O 2,3 [7, 11] is O 2,2 [4, 6] guides the insertion, therefore, g(O 2,3 [7, 11])=4+g(O 2,2 [4,6])=10. Given that workpiece 2 has only three processes, the remaining processing time is 0, and the remaining process insertion range length is 15-11 = 4. Therefore, h(O 2,3 [7, 11])=min[0, 4]=0, ultimately f(O 2,3 [7, 11])=10+0=10. Store the information in the data table TAB (as shown in the third search in Table 5).
[0081] Based on the evaluation values in the data table, the position [7, 11] with the largest f-value in the potential position set is selected as the current process O. 2,3 The insertion position guides the insertion of the next process, and at the same time, it sets the relevant O... 2,3 The information for [7, 11] is removed from the potential location set PotePosi{[7, 11], [10, 15]} to avoid subsequent duplicate selections.
[0082] Determine if the current process to be inserted is the last process of the workpiece: if not, proceed to the next search and return to step 5; if yes, proceed to step 11. From the third search, we know that the current process to be inserted is O. 2,3 This is the third and final process for workpiece 2; therefore, step 11 is executed.
[0083] Step 11: The program stops running, traces back the insertion positions of all processes, and generates a complete insertion plan for workpiece 2. InsePlan: O 2,3 [7, 11]→O 2,2 [4, 6]→O 2,1 [0, 4], insert it into the target factory and update the schedule, outputting the optimized scheduling scheme. It can be seen that after several iterations, the program obtains the insertion scheme of workpiece 2 in factory 1, decoded as follows: Figure 5 As shown. Since the total delay of the insertion scheme is 1 (O 2,1 There is a delay of 1 unit), so C1 changes from 15 to 16. Ultimately, C... max The number has been reduced from 18 to 16.
[0084] Table 5 Workpiece Insertion Data Table (TAB)
[0085]
[0086] The algorithm of this invention yielded 80 new solutions in 240 experimental benchmark examples, demonstrating significant superiority compared to several state-of-the-art algorithms in the current research field. In practical applications, this algorithm can rapidly and efficiently insert critical factory workpieces into other factories, effectively reducing the maximum completion time. Furthermore, it can be integrated into intelligent algorithms such as iterative greedy algorithms to further improve solution efficiency. This invention can also be applied to various distributed scheduling scenarios requiring a balance between resource load and insertion efficiency.
[0087] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. In particular, for the device embodiments, the above descriptions are merely preferred embodiments of the present invention. Since they are fundamentally similar to the method embodiments, the descriptions are relatively simple, and relevant parts can be referred to the descriptions of the method embodiments. The above descriptions are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention, without departing from the principle of the present invention, should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A distributed job shop scheduling algorithm for workpiece insertion based on idle time, characterized in that: Includes the following steps: Step 1: Read the problem data and initialize the factory set Factory{}, machine set Machine{}, job set Job{}, total number of jobs n, operation set Operation{} consisting of all operations of each job, and total number of operations OperaNum; Step 2: Based on the factory load balancing principle, a random allocation strategy is adopted to distribute all workpieces to different factories for processing; then, a process sequence OS is randomly generated according to the process set Operation{}, and the processing time vector ProcTime{} for each process on the candidate machines is given. Given the above workpiece-factory allocation, process sequence, and processing time settings, a set of initial scheduling schemes is decoded, the completion time of each factory is calculated, and the maximum value is recorded as the initial maximum completion time C; Step 3: Filter key information from the initial scheduling plan: Obtain the key factory F in the current scheduling plan. c The completion time C', the set of operations to be inserted into workpiece i {O i1 O i2 , …, O ik }、 Factory F to be inserted w Current scheduling information; Step 4: Delete the critical factory F c For workpiece i to be inserted during scheduling, perform left shift scheduling on the remaining processes in the factory; simultaneously determine the target insertion factory F. w The current maximum completion time C0; Step 5: For the current process O to be inserted ij Based on the current process O to be inserted ij The existing schedule of the processing machine is used to list all possible insertion positions, forming a candidate insertion position set CandPosi{}; Step 6: For each position in the candidate insertion position set CandPosi{}, calculate the core parameters: 1) Current process O ij The available free time for inserting at this position; 2) Current process O ij The subsequent process following the insertion at this position {O i(j+1) ,…, k } Valid insertion range; Step 7: Based on the available idle time determined in Step 6 and the corresponding subsequent processes {O i(j+1) ,…, k The effective insertion range index is used to filter potential insertion positions from the candidate insertion position set CandPosi{}, forming a potential position set PotePosi{}. Step 8: Calculate the evaluation value f of each position in the potential position set PotePosi{} based on the idle time evaluation function, where x represents the process, [s, e] represents the insertion position, g(x[s, e]) is the actual idle time occupied by the preceding process, and h(x[s, e]) is the maximum expected idle time that the subsequent process can occupy. Step 9: Select the position with the largest evaluation value f from the potential position set PotePosi{}, and use it as the current process O. ij The final insertion position is used to guide the insertion of the next process, and the position information is recorded and the position is removed from the potential position set. Step 10: Determine the current process to be inserted. ij Is this the last process for workpiece i? If not, proceed to the next process O. i(j+1) Set as the current insertion operation, and update its effective insertion range to [O]. ij If the processing end time is [C0], return to step 5; if so, proceed to step 11. Step 11: Backtrack the insertion position information of all processes for workpiece i, generate a complete insertion plan (InsePlan), and insert workpiece i into target factory F. w In the middle, recalculate F w The completion time and the overall maximum completion time are calculated, and the optimized scheduling scheme is output.
2. The distributed job shop scheduling workpiece insertion algorithm based on idle time according to claim 1, characterized in that: The key plant F mentioned in step 2 c It is currently the factory with the longest completion time.
3. The distributed job shop scheduling workpiece insertion algorithm based on idle time according to claim 1, characterized in that: In step 4, to minimize the increase in Makespan, it is effective to set all operations to be inserted before Makespan. The first operation O of workpiece i is set. i1 The valid insertion range is [0, C0].
4. The distributed job shop scheduling workpiece insertion algorithm based on idle time according to claim 1, characterized in that: The current process O ij The idle time that can be occupied at this position is defined as the length of the time window that does not produce additional delay.
5. The distributed job shop scheduling workpiece insertion algorithm based on idle time according to claim 1, characterized in that: The current process O ij The subsequent process following the insertion at this position {O i(j+1) ,…, k The valid insertion range is the interval [current process O]. ij Processing end time, C0].
6. The distributed job shop scheduling workpiece insertion algorithm based on idle time according to claim 1, characterized in that: The larger the evaluation value f in step 8, the better the location.
7. The distributed job shop scheduling workpiece insertion algorithm based on idle time according to any one of claims 1 to 6, characterized in that: The evaluation function is: .