Solving method for Chinese patent medicine production workshop scheduling problem

Through improved heuristic algorithms and active scheduling strategies, the scheduling problem of the traditional Chinese medicine production workshop is optimized, the complexity of reentrable and jumpable processes is solved, and the production efficiency and stability is improved.

CN120355180AActive Publication Date: 2025-07-22LIAOCHENG UNIV

Patent Information

Application Number
CN202510819571.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-07-22
Estimated Expiration
2045-06-19

AI Technical Summary

Technical Problem

The prior art is difficult to effectively solve the problem of scheduling of mixed flow workshops that consider reenterable and jumpable processes in traditional Chinese medicine production workshops, resulting in increased production scheduling complexity and difficulty in optimizing the maximum completion time.

Method used

The improved heuristic algorithm is used to generate the initial solution, and the complete scheduling scheme is generated by destroying reconstruction and local search, combined with the active scheduling strategy, and the maximum completion time is minimized through critical path analysis and four neighborhood structure optimization scheduling schemes.

Benefits of technology

It improves the production efficiency and stability of the production line of the traditional Chinese medicine production workshop, optimizes the machine allocation and sequence of workpieces at each stage, and reduces the maximum completion time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120355180A_ABST
    Figure CN120355180A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of flow shop scheduling, in particular to a Chinese patent medicine production workshop scheduling problem-oriented solving method, which comprises the following steps of: determining to take minimization of maximum completion time as a problem solving target, and initializing parameters; constructing an initial solution by using an improved heuristic algorithm, performing damage reconstruction on the initial solution, and selecting the initial solution with the minimum target value as an optimal initial solution; scheduling the current optimal initial solution based on an active scheduling strategy to generate a complete scheduling scheme; searching a key path, and determining a key block which affects the maximum completion time and a key workpiece contained in the key block; key workpieces in the identified key blocks are adjusted, four neighborhood structures are used for searching, neighborhood structure tailoring is executed, and an optimal scheduling scheme with the maximum completion time smaller than the optimal initial solution is output. According to the method, production scheduling is more reasonable, and the positive effect of effectively improving the production efficiency and the stability of a production line is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of flow shop scheduling, and in particular belongs to a method for solving the scheduling problem of a traditional Chinese medicine production workshop. Background Art

[0002] In the traditional Chinese medicine production and manufacturing industry, traditional Chinese medicine production workshops are usually arranged according to a flow production line, including multiple processes. Each process involves one or more parallel machines. This layout mode is called a hybrid flow shop. In the process of traditional Chinese medicine production, the smallest production unit is the raw materials for producing a batch of products, that is, workpieces. Its production process can be divided into seven or eight processes: drying, crushing, mixing, granulating, drying again, capsule filling (non-essential processing process), polishing, and sterilization. Due to different types of medicines, after a process is completed on the same machine, the machine needs to be cleaned to ensure the purity of the medicine. At this time, cleaning time is generated. The medicine is transferred between adjacent stages, and transfer time is generated at this time. In the process of traditional Chinese medicine production, the medicine needs to be dried repeatedly for the next stage of production; in addition, due to different types of medicines, the processing processes are also different. Taking capsules and granules as examples, capsules need to be processed by capsule filling, while granules do not need to go through this step. Considering the above factors, the production process of traditional Chinese medicine can be regarded as a hybrid flow shop scheduling problem considering reentrant and skippable processes. Reentrant processes refer to the situation where some workpieces need to return to a previous process for reprocessing after completing a certain process. Skippable processes mean that there is a transfer method that can be skipped between some processes, that is, not all workpieces must go through all processes in sequence, but can be flexibly adjusted according to specific production requirements. Although this flexibility improves the adaptability of the production line, it also greatly increases the complexity of the scheduling problem.

[0003] However, it is found by investigation and research that different from the traditional hybrid flow shop that only considers the process dependencies of adjacent stages, the hybrid flow shop scheduling problem considering reentrant and skippable processes needs to additionally handle the process dependencies across multiple stages, which undoubtedly exacerbates the difficulty of problem-solving. However, although many research progresses have been made in the hybrid flow shop scheduling problem, most of the current research ignores the influence of reentrant and skippable processes on the scheduling strategy, and the research on this problem is still relatively blank. Therefore, aiming at the scheduling optimization problem brought by the above cross-stage process dependencies, how to determine the machine allocation of workpieces at each stage and the execution order of workpieces on each machine, and then minimize the makespan has become a key research proposition for improving the production efficiency of pharmaceutical workshops. Summary of the Invention

[0004] The object of the present invention is to provide a solution method for the scheduling problem of a Chinese patent medicine production workshop, which solves the technical problem that the current research on the hybrid flow shop scheduling problem considering reentrant and jump does not conform to the actual Chinese patent medicine production scenario, so as to achieve the purpose of making production scheduling more reasonable on the premise of taking the actual production scenario as the research object, thereby effectively improving production efficiency and the stability of the production line.

[0005] A solution method for the scheduling problem of a Chinese patent medicine production workshop provided by the present invention is characterized by including the following steps: S1. Analyze the problem characteristics of the hybrid flow shop scheduling problem in Chinese patent medicine production and manufacturing, determine the problem-solving objective of minimizing the makespan, and initialize parameters, including the destruction size of the initial solution α , the number of destruction and reconstruction iterations T ; S2. Use an improved heuristic algorithm to construct an initial solution, and then perform destruction and reconstruction on the initial solution. The destruction size is the length of the initial solution multiplied by α , and when the iteration number T is reached, select the initial solution with the smallest objective value as the optimal initial solution; S3. Schedule the current optimal initial solution based on the active scheduling strategy to generate a complete scheduling plan; S4. Based on the complete scheduling plan, find the critical path, and determine the critical blocks affecting the makespan and the critical workpieces included in the critical blocks; S5. Adjust the critical workpieces in the identified critical blocks. According to the reentrant attribute, define four neighborhood structures, use the four neighborhood structures for search, and perform neighborhood structure pruning to output an optimized scheduling plan with a makespan less than that of the optimal initial solution.

[0006] Furthermore, the implementation process of the improved heuristic algorithm for generating the initial solution includes: (a) Define the following parameters: represents a workpiece, represents the set of workpieces, , represents the number of workpieces, represents the number of times a workpiece appears, taking values of 0 or 1. When the value is 0, it represents that the workpiece appears for the first time, and when the value is 1, it represents that the workpiece appears for the second time. represents a stage, represents the set of stages, represents the reentrant stage, represents the jumpable stage, , represents the total number of stages, represents the sequence of workpieces, A workpiece in the sequence representing the workpiece, Representing the workpiece The processing time at the stage ; (b) Each workpiece appears twice in the initial solution. Each workpiece uses two ways of calculating indicators. For the first appearance of the workpiece, calculate the sum of the processing times from the first stage to the reentrant stage. For the second appearance of the workpiece, calculate the sum of the processing times from the reentrant stage to the last stage. Representing the calculation of the workpiece The index value of, and the calculation formula is ; (c) Sort the index values in ascending order. Each index value corresponds to a workpiece, and thus obtain the corresponding sequence of workpieces ; (d) Take out the first two workpieces , , and then select the one with the smaller target value from or as the current partial sequence Z ; (e) Starting from the third workpiece in , successively take The th workpiece, , and insert it into all positions in the current partial sequence Z . A total of partial sequences are obtained. Evaluate each of the obtained partial sequences, and take the partial sequence with the minimum makespan as Z ; (f) Return to step (e) until The last workpiece in is inserted, and the complete initial solution is obtained.

[0007] Furthermore, the process of destroying and reconstructing the initial solution is as follows. (1). Randomly delete workpieces with a number equal to the length of the initial solution multiplied by α , and insert the deleted workpieces one by one into the sequence composed of the undeleted workpieces; (2). After each insertion of a workpiece, search the workpiece sequence by the local search method, that is, successively exchange two adjacent workpieces to obtain an improved sequence. Take the improved sequence with the minimum makespan as the optimal partial sequence, and use the current optimal partial sequence when inserting the next workpiece until all the deleted workpieces are inserted, and obtain the optimal initial solution; (3) Perform T rounds of iteration on steps (1) and (2), and output the obtained optimal initial solution.

[0008] Furthermore, the implementation process of constructing a complete scheduling scheme includes the following steps. Define the following parameters. flag represents the number of processing times of the workpiece in the reentrant stage. flag = 0 represents the first processing. flag = 1 represents performing reentrant processing. For the first processing, that is flag = 0 , the workpieces are processed in sequence from the first stage to the previous stage of the reentrant stage. Select an earliest idle machine for processing. The start time of the workpiece is determined by the larger value among the sum of the completion time of the previous process plus the transfer time and the machine idle time. The end time of the workpiece is the start time plus the processing duration of the current stage. The calculation formula is: ; Among them, represents the workpiece at stage the start time of processing, represents the workpiece at stage the end time of processing completion, represents the workpiece at stage to stage the transfer time between, represents the machine idle time, represents the workpiece at stage processing time. After the workpiece is processed on the machine, flag is set to 1; If the workpiece appears non-first time, that is flag = 1, directly select an idle machine for processing in the reentrant stage, and update the start time and end time of the workpiece in the reentrant stage; For the subsequent stages of the reentrant stage, adopt a phased active scheduling strategy for scheduling. The operation process includes: Step 1, perform stage screening. If the current stage is not a jumpable stage or the workpiece does not have the jumpable attribute, add it to the candidate sequence . If the current stage is a jumpable stage and the workpiece has the jumpable attribute, the workpiece does not need to be processed in the current stage. At this time, synchronize the end time of the current workpiece in the previous stage to the start time and end time of the current stage, and directly use it as the start time of the next stage; Step 2, select an earliest idle machine ; Step 3, calculate the start time and end time for each workpiece to be processed on the selected machine, and update the earliest start time of the workpieces processed on the selected machine and the latest end time ; Step 4, determine the effective processing time window through , and the non-delay factor to screen and add eligible workpieces to the set through the effective processing time window constraint. The formula for calculating the effective processing time window is: ; Step 5, select the workpiece with the longest processing time in the current stage from the set and assign it to the machine , update the start time and end time of the workpiece, and remove the already scheduled workpiece from and empty ; ; Step 6, return to Step 1 until all stages are traversed to obtain a complete scheduling plan.

[0009] Furthermore, in the production scheduling problem, the critical path refers to the sequence of workpieces that determines the maximum completion time of the entire production process. The critical workpiece is the one whose execution time delay will directly cause the maximum completion time of the entire scheduling plan to extend and is located on the critical path; the non-critical workpiece is the one whose execution time delay will not directly affect the maximum completion time and is not on the critical path; the critical block is a sequence of inseparable workpieces composed of consecutive operations on the critical path in the scheduling problem. The critical block appears in a certain section of the critical path, rather than the entire critical path.

[0010] Furthermore, based on the complete scheduling plan, the implementation process of finding the critical path is as follows. First, find the maximum completion time L , traverse each workpiece. If the completion time of the workpiece in the last stage is equal to L , then record the workpiece and the stage where the workpiece is located , and search forward from the current workpiece in turn; if a jumpable operation is encountered and the current workpiece has the jumpable attribute, skip the current stage; if a re-entrant operation is encountered, search for the critical workpiece in the re-entrant stage, otherwise search in the previous operation; find the machine processing the workpiece , record the machine The position of the upper key workpiece. Look forward from the current position to find the adjacent workpiece and determine whether the following conditions are met: Workpiece Start time of the - immediately previous workpiece End time of = machine cleaning time Record the workpiece that meets the conditions And the stage where it is located Otherwise, it is necessary to search across stages and determine whether the following conditions are met: Workpiece Start time of the - workpiece in the previous stage End time of = transfer time If the condition is met, record the workpiece And the stage where it is located until the workpiece that starts processing earliest in the first stage is found. At this time ; After the above process is completed, the complete critical path is found, and all the found key workpieces and the stages where they are located are recorded.

[0011] Furthermore, four neighborhood structures are used for searching, and the scheduling scheme is optimized through the four neighborhood structures. The four neighborhood structures include the destruction and reconstruction of key and non - key workpieces within the critical block executed in sequence, the internal exchange within the critical block, the exchange between the critical block and the outside, and the two - point exchange between the critical block and the outside. Use the current neighborhood structure for searching. If the objective value of the new initial solution is smaller than the original optimal initial solution, then update the original optimal initial solution to the new initial solution. If no new initial solution smaller than the original optimal initial solution is obtained after executing the current neighborhood structure, then sequentially use the next neighborhood structure as the current neighborhood structure until all neighborhood structures cannot update the current optimal initial solution, and then output the optimal initial solution after searching, where For the destruction and reconstruction of key and non - key workpieces within the critical block, extract the key workpieces in the optimal initial solution, and then sequentially insert each key workpiece into all positions in the sequence composed of the remaining non - key workpieces; For the internal exchange within the critical block, select a key workpiece from the critical block of the optimal initial solution, and then select another key workpiece from the critical block for exchange; For the exchange between the critical block and the outside, select a key workpiece from the critical block of the optimal initial solution, and then select a non - key workpiece from outside the critical block for exchange; Exchange two points inside and outside the critical block. First, select a critical workpiece inside the critical block that first appears in the optimal initial solution and a non-critical workpiece outside the critical block that first appears in the optimal initial solution, and exchange them. Then, locate the positions where they secondarily appear in the optimal initial solution, and synchronously exchange the secondarily appearing positions of the critical workpiece and the non-critical workpiece.

[0012] Furthermore, the execution of the neighborhood structure pruning process includes For the destruction and reconstruction of critical workpieces and non-critical workpieces inside the critical block, after each insertion operation, determine whether the critical workpiece after insertion and the workpiece at the adjacent position are the same workpiece. If they are the same workpiece, no further operations are performed, and continue to search for the next position to perform the insertion operation. If the adjacent position after insertion is not the same workpiece, calculate the makespan of the sequence of workpieces after insertion, and retain the insertion position that minimizes the makespan until all critical workpieces are inserted, and retain the scheduling scheme that minimizes the objective value. For internal exchange within the critical block, exchange inside and outside the critical block, and two-point exchange inside and outside the critical block, traverse the initial solution to determine the positions of the critical workpieces, and in the same way, find the positions of the next critical workpiece or non-critical workpiece in the initial solution, and perform the exchange operation. If the workpiece at the adjacent position after the exchange is the same workpiece, it is an invalid exchange and no further operations are required; if they are not the same workpiece, calculate the makespan after the exchange, and retain the scheduling scheme that minimizes the objective value.

[0013] A solution method for the scheduling problem of a Chinese patent medicine production workshop provided by the present invention innovatively proposes an optimization method based on a heuristic framework to address the challenge of cross-stage process dependencies in the pharmaceutical workshop. By designing an improved heuristic algorithm to generate a high-quality initial solution, a phased active scheduling strategy is adopted for scheduling to obtain a complete scheduling scheme. In addition, by performing critical path search, the critical workpieces in the identified critical blocks are adjusted, and the scheduling scheme is updated through the search and pruning of four neighborhood structures to achieve local optimization. All in all, the application of the present invention can effectively solve the scheduling problem of the Chinese patent medicine production workshop. By optimizing the machine selection of workpieces at each stage and the sequence of workpieces on each machine in the Chinese patent medicine production scheduling process, the objective value can be continuously reduced, and it has the positive effect of effectively improving production efficiency and the stability of the production line. Brief Description of the Drawings

[0014] Figure 1 is the implementation flowchart of the present invention; Figure 2 is the active scheduling strategy flowchart of the present invention; Figure 3It is the destruction and reconstruction flowchart of the key workpieces and non-key workpieces within the key blocks of the present invention; Figure 4 It is the one-way analysis of variance chart of the present invention and existing comparative algorithms under large-scale examples; Figure 5 It is the violin chart of the present invention and existing comparative algorithms under large-scale examples. Specific implementation manners

[0015] As Figures 1 - 3 shown, a solution method for the scheduling problem of a Chinese patent medicine production workshop provided by the present invention is mainly implemented through the following steps.

[0016] S1: Analyze the problem characteristics of the mixed flow shop scheduling problem in the production and manufacturing of Chinese patent medicines, determine the problem-solving objective of minimizing the makespan, and initialize parameters, including the destruction size of the initial solution α , the number of destruction and reconstruction iterations T .

[0017] S2: Use an improved heuristic algorithm to construct an initial solution, which is achieved through the following process.

[0018] (a) Define the following parameters, represents a workpiece, represents the set of workpieces, , represents the number of workpieces, represents the number of times a workpiece appears, taking a value of 0 or 1. When the value is 0, it represents that the workpiece appears for the first time. When the value is 1, it represents that the workpiece appears for the second time. represents a stage, represents the set of stages, represents a reentrant stage, represents a jumpable stage, , represents the total number of stages, represents the sequence of workpieces, represents a workpiece in the sequence of workpieces, represents the workpiece at the stage processing time on; (b) Each workpiece appears twice in the initial solution. Each workpiece adopts two ways of calculating indicators. For the workpiece that appears for the first time, calculate the sum of the processing times from the first stage to the reentrant stage. For the workpiece that appears for the second time, calculate the sum of the processing times from the reentrant stage to the last stage. represents calculating the index value of the workpiece , and the calculation formula is, ; (c) Sort the index values in ascending order, with each index value corresponding to a workpiece, thus obtaining the sequence of corresponding workpieces ; (d) Take the first two workpieces in Π , , and then select the one with the smaller target value from or as the current partial sequence Z ; (e) Starting from the third workpiece in , successively take out the th workpiece in , and insert it into all positions in the current partial sequence Z . A total of partial sequences are obtained. Evaluate each of the obtained partial sequences, and take the partial sequence with the minimum makespan as Z ; (f) Return to step (e) until the last workpiece in

[0019] is inserted, obtaining a complete initial solution. α Then, disrupt and reconstruct the initial solution. The disruption size is the length of the initial solution multiplied by T , reaching the iteration number

[0020] (1) Randomly delete workpieces with a number equal to the length of the initial solution multiplied by α , and insert the deleted workpieces one by one into the sequence composed of the undeleted workpieces.

[0021] (2) After each insertion of a workpiece, search the workpiece sequence using the local search method, that is, successively swap two adjacent workpieces to obtain an improved sequence. Take the improved sequence with the minimum makespan as the optimal partial sequence, and use the current optimal partial sequence when inserting the next workpiece until all the deleted workpieces are inserted, obtaining the optimal initial solution.

[0022] (3) Perform T rounds of iteration on steps (1) and (2), and output the obtained optimal initial solution.

[0023] S3: Scheduling the current optimal initial solution based on the active scheduling strategy to generate a complete scheduling plan. The implementation process includes the following steps. Define the following parameters.flag Indicates the number of processing times of the workpiece in the re - entry stage, flag = 0 Indicates the first processing, flag = 1 Indicates that re - entry processing is carried out; For the first processing, that is flag = 0 , the workpiece is processed in sequence according to the order from the first stage to the previous stage of the re - entry stage. Select an earliest idle machine for processing. The start time of the workpiece is determined by the larger value among the sum of the completion time of the previous process plus the transfer time and the machine idle time. The end time of the workpiece is the start time plus the processing duration of the current stage. The calculation formula is: ; Among them, Indicates the workpiece At the start time of processing in stage , Indicates the workpiece At the end time of processing completion in stage , Indicates the workpiece At the transfer time between stage To stage , Indicates the machine Idle time of Indicates the workpiece At the processing time in stage . After the workpiece is processed on the machine, flag Is set to 1; If the workpiece appears not for the first time, that is flag = 1, then directly select an idle machine for processing in the re - entry stage, and update the start time and end time of the workpiece in the re - entry stage; For the subsequent stages of the re - entry stage, a phased active scheduling strategy is adopted for scheduling. The operation process includes, Step 1, perform stage screening. If the current stage is not a jump - able stage or the workpiece does not have the jump - able attribute, add it to the candidate sequence . If the current stage is a jump - able stage and the workpiece has the jump - able attribute, the workpiece does not need to be processed in the current stage. At this time, synchronize the end time of the current workpiece in the previous stage to the start time and end time of the current stage, and directly use it as the start time of the next stage.

[0024] Step 2, select an earliest idle machine .

[0025] Step 3, calculate the start time and end time of each workpiece processed on the selected machine, and update the earliest start time And the latest end time 。

[0026] Step 4: Determine the effective processing time window through 、 and the non-delay factor to determine the effective processing time window, and filter out the eligible workpieces through the effective processing time window constraint and add them to the set . The formula for calculating the effective processing time window is: ; Step 5: Select the workpiece with the longest processing time in the current stage from the set and assign it to the machine . Update the start time and the end time of the workpiece , remove the scheduled workpiece from , and clear .

[0027] Step 6: Return to Step 1 until all stages are traversed to obtain a complete scheduling plan.

[0028] S4: Based on the complete scheduling plan, find the critical path, and determine the critical blocks that affect the maximum completion time and the critical workpieces included in the critical blocks. The implementation process of finding the critical path is as follows. First, find the maximum completion time L . Traverse each workpiece. If the completion time of the workpiece in the last stage is equal to L , then record the workpiece and the stage where the workpiece is located, and search forward from the current workpiece in turn; if a jump operation is encountered and the current workpiece has the jump attribute, skip the current stage; if a re-entrant operation is encountered, search for the critical workpiece in the re-entrant stage, otherwise search in the previous operation; find the machine processing the workpiece , record the position of the critical workpiece on the machine , search for the adjacent workpiece forward at the current position, and judge whether the following conditions are met: The start time of workpiece - The end time of the previous adjacent workpiece = Machine cleaning time Record the workpiece that meets the conditions and the stage where it is located. Otherwise, it is necessary to search across stages and judge whether the following conditions are met: The start time of workpiece - The end time of the workpiece in the previous stage = Transfer time If the conditions are met, the workpiece and its current stage are recorded until the workpiece that starts processing earliest in the first stage is found. At this time ; after the above process is completed, the complete critical path is found, and all the identified critical workpieces and their corresponding stages are recorded.

[0029] S5: Adjust the critical workpieces in the identified critical blocks. According to the reentrant attribute, four neighborhood structures are defined and used to search. The scheduling scheme is optimized through the four neighborhood structures. The four neighborhood structures include the disruption and reconstruction of critical and non-critical workpieces within the critical block executed in sequence, the internal exchange within the critical block, the exchange between the critical block and the outside, and the two-point exchange between the critical block and the outside. Use the current neighborhood structure to search. If the objective value of the new initial solution is smaller than that of the original optimal initial solution, then update the original optimal initial solution to the new initial solution. If no new initial solution smaller than the original optimal initial solution is obtained after executing the current neighborhood structure, then sequentially use the next neighborhood structure as the current neighborhood structure until all neighborhood structures cannot update the current optimal initial solution. Then output the optimal initial solution after the search. Among them, The first neighborhood structure is: the disruption and reconstruction of critical and non-critical workpieces within the critical block. Extract the critical workpieces in the optimal initial solution, and then sequentially insert each critical workpiece into all positions in the sequence composed of the remaining non-critical workpieces.

[0030] The second neighborhood structure is: the internal exchange within the critical block. Select a critical workpiece from the critical block of the optimal initial solution, and then select another critical workpiece from the critical block for exchange.

[0031] The third neighborhood structure is: the exchange between the critical block and the outside. Select a critical workpiece from the critical block of the optimal initial solution, and then select a non-critical workpiece outside the critical block for exchange.

[0032] The fourth neighborhood structure is: the two-point exchange between the critical block and the outside. First, select a critical workpiece within the critical block that appears for the first time in the optimal initial solution and a non-critical workpiece outside the critical block that appears for the first time in the optimal initial solution, and exchange them. Then locate the positions where they appear for the second time in the optimal initial solution, and synchronously exchange the positions where the critical workpiece appears for the second time and the positions where the non-critical workpiece appears for the second time.

[0033] Then perform neighborhood structure pruning and output an optimized scheduling scheme with a makespan less than the optimal initial solution. The process of neighborhood structure pruning is as follows: For the destruction and reconstruction of critical workpieces and non-critical workpieces within the critical block, after each insertion operation, it is determined whether the critical workpiece after insertion and the workpiece at the adjacent position are the same workpiece. If they are the same workpiece, no subsequent operations are performed, and the search continues for the next position to perform the insertion operation. If the adjacent position after insertion is not the same workpiece, calculate the makespan of the sequence of workpieces after insertion, and retain the insertion position that minimizes the makespan until all critical workpieces are inserted, and retain the scheduling plan that minimizes the target value.

[0034] For the internal exchange within the critical block, the exchange between the inside and outside of the critical block, and the two-point exchange inside and outside the critical block, traverse the initial solution to determine the position of the critical workpiece, and in the same way, find the position of the next critical workpiece or non-critical workpiece in the initial solution and perform the exchange operation. If the workpiece at the adjacent position after the exchange is the same workpiece, it is an invalid exchange and no subsequent operations are required; if they are not the same workpiece, calculate the makespan after the exchange, and retain the scheduling plan that minimizes the target value.

[0035] To better prove the effectiveness of the present invention, the following will further describe and explain the present invention through the experimental analysis of a series of examples of the present invention.

[0036] The test data includes 400 large-scale instances, which are created based on the parameters 、 and the machine layout. For large-scale instances, , . The processing time of the workpieces is uniformly distributed within the range of [50, 200], the machine cleaning time is uniformly distributed within the range of [10, 20], and the workpiece transfer time is uniformly distributed within the range of [5, 15]. To simulate the actual workshop situation, four different types of machine layouts are considered as follows: Type 1: In the production workshop, there are three machines in the first stage and two machines in other stages.

[0037] Type 2: In the production workshop, there is one machine in the middle stage and three machines in other stages.

[0038] Type 3: In the production workshop, there are two machines in the middle stage and three machines in other stages.

[0039] Type 4: In the production workshop, there are three machines in each stage.

[0040] To evaluate the performance of the algorithm, for each instance, it is independently run 10 times, and the overall average relative percentage growth value (average value, AVG) and the running time (Time) are calculated as the evaluation criteria.

[0041] In terms of parameter settings, in order to better solve and optimize the hybrid flow shop group scheduling problem based on traditional Chinese medicine production, the current destruction size is set to 0.7, and the number of destruction and reconstruction iterations is set to 4, and the non-delay factor is set to 0.5.

[0042] The experimental results and analysis of this embodiment are as follows. After parameter settings are made for the algorithm (CP-CPS) that solves and optimizes the hybrid flow shop scheduling problem based on traditional Chinese medicine production of the present invention, experimental comparisons are made with the existing improved genetic algorithm (CAGA), improved memetic algorithm (IMA), and improved heuristic algorithm (NEH2E). In order to make these algorithms adapt to the problems to be solved, necessary modifications are required, including using unified instances and adopting the same total target processing time. During the adaptation process, the details of their respective original algorithms are followed. Finally, the comparison results of their overall average relative percentage growth values and running times are recorded, as shown in Table 1: Table 1 Average relative percentage growth values (AVG) and running time tables of each algorithm under large-scale examples

[0043] As can be seen from Table 1, in terms of the quality of the solution, the CP-CPS algorithm of the present invention has obtained the optimal AVG value in the vast majority of examples. CAGA obtained the optimal AVG value in the two examples of 40×12 and 80×5, and IMA obtained the optimal AVG value in the three examples of 40×5, 40×10, and 100×8. This shows that under specific conditions, the CAGA algorithm and the IMA algorithm perform better, while the solution effect of NEH2E is inferior to that of CP-CPS in each example. In terms of time efficiency, for each type of example, CAGA and IMA generally take more time than CP-CPS. Although NEH2E has a certain advantage in terms of time, its solution effect is far inferior to that of CP-CPS. In summary, the CP-CPS of the present invention obtains a better quality solution at a controllable time cost.

[0044] Figure 4 The single-factor variance analysis chart of the present invention and the existing comparative algorithms under large-scale examples clearly presents the hierarchical differences in the performance of the present invention and the existing comparative algorithms. The CP-CPS of the present invention is in the optimal position with the lowest mean value and the smallest error range, showing excellent stability and effectiveness. The mean values of CAGA and IMA are at a medium level, but the lengths of their error bars are longer, indicating that there are obvious abnormal extreme values in these two groups of data and the data is not stable enough. The mean value of NEH2E is higher than that of CP-CPS, and the error range is larger, indicating that the results have greater volatility. In summary, the CP-CPS of the present invention is superior to the comparative algorithms in terms of optimization effect and stability.

[0045] Figure 5 is the violin plot of the present invention and existing comparative algorithms under large-scale examples, which shows the performance distribution of each algorithm in terms of the AVG index through the violin plot. The CP-CPS has obvious advantages: the median is the lowest and the distribution range is the narrowest, and the data is highly concentrated in the median region, indicating that the data volatility is relatively low. Among the comparative algorithms, the medians of CAGA and IMA are relatively low, but the distribution ranges are larger, and the neck of the IMA algorithm is more prominent, indicating that there are some extreme values in the data concentration. To sum up, the CP-CPS algorithm is superior to other algorithms in terms of data concentration.

[0046] Generally speaking, the CP-CPS algorithm of the present invention performs excellently and successfully solves the complex scheduling problem involving reentrant and jump characteristics in the hybrid flow shop. Experiments prove that the low volatility characteristic and fast response ability of CP-CPS precisely meet the core requirements of the pharmaceutical industry for the stability and real-time performance of the scheduling system. The application of the present invention provides an innovative solution idea and practical support for solving the scheduling problems across stages. The application of the present invention lays a foundation for future research and practical applications in the scheduling field, and provides a feasible method for improving efficiency and reducing costs.

Claims

1. A solution method for the scheduling problem of the Chinese patent medicine production workshop, characterized in that including the following steps, S1. Analyze the problem characteristics of the mixed flow shop scheduling problem in the production and manufacturing of Chinese patent medicines, determine the problem-solving objective of minimizing the makespan, and initialize the parameters, including the destruction size for the initial solution α , the number of destruction and reconstruction iterations T ; S2. Use an improved heuristic algorithm to construct an initial solution, and then perform destruction and reconstruction on the initial solution. The destruction size is the length of the initial solution multiplied by α , until the iteration number T is reached, and select the initial solution with the smallest objective value as the optimal initial solution; S3. Schedule the current optimal initial solution based on the active scheduling strategy to generate a complete scheduling plan; S4. Based on the complete scheduling plan, find the critical path, determine the critical blocks that affect the makespan and the critical workpieces included in the critical blocks; S5. Adjust the critical workpieces in the identified critical blocks, define four neighborhood structures according to the reentrant attribute, search using the four neighborhood structures, and perform neighborhood structure pruning to output an optimized scheduling plan with a makespan less than the optimal initial solution.

2. The solution method for the scheduling problem of a traditional Chinese medicine production workshop according to claim 1, wherein, The implementation process of generating the initial solution by the improved heuristic algorithm includes, (a) Define the following parameters, represents a workpiece, represents a set of workpieces, , represents the number of workpieces, represents the number of times a workpiece appears, with a value of 0 or 1. When the value is 0, it represents the first appearance of the workpiece; when the value is 1, it represents the second appearance of the workpiece, represents a stage, represents a set of stages, represents a re - entry stage, represents a jumpable stage, , represents the total number of stages, represents the sequence of workpieces, represents a workpiece in the sequence of workpieces, represents the workpiece at stage processing time; (b) Each workpiece appears twice in the initial solution. Each workpiece adopts two ways of calculating indicators. For the workpiece that appears for the first time, calculate the sum of the processing times from the first stage to the reentrant stage. For the workpiece that appears for the second time, calculate the sum of the processing times from the reentrant stage to the last stage. represents calculating the workpiece indicator value, and the calculation formula is ; (c) Arrange the index values in ascending order, with each index value corresponding to a workpiece, thereby obtaining the corresponding sequence of workpieces ; (d) Take out the first two workpieces in Π , , and then select the one with the smaller target value from { or as the current partial sequence Z ; (e) Starting from the third workpiece in , sequentially take out the th workpiece, , and insert it into all positions in the current partial sequence Z to obtain a total of partial sequences. Evaluate each of the obtained partial sequences, and take the partial sequence with the minimum makespan as Z ; (f) Return to step (e) until the last workpiece in is inserted completely, and a complete initial solution is obtained.

3. The solution method for the scheduling problem of a Chinese patent medicine production workshop according to claim 2, wherein, The process of destroying and reconstructing the initial solution is as follows, (1) Randomly delete the workpieces whose number is the length of the initial solution multiplied by α and insert the deleted workpieces into the sequence composed of the undeleted workpieces one by one; (2)After each workpiece is inserted, the workpiece sequence is searched by the local search method, that is, two adjacent workpieces are exchanged in turn to obtain an improved sequence. The improved sequence with the minimum makespan is used as the optimal partial sequence, and the current optimal partial sequence is used when the next workpiece is inserted until all the deleted workpieces are inserted to obtain the optimal initial solution; (3) Perform T the iterations of steps (1) and (2), and output the obtained optimal initial solution.

4. The solution method for the scheduling problem of a traditional Chinese medicine production workshop according to claim 3, wherein The implementation process of constructing a complete scheduling plan includes the following steps, Define the following parameters, flag indicating the number of machining times of the workpiece in the reentrant stage, flag = 0 indicating the first machining, flag = 1 indicating reentrant machining; For the first processing, that is flag = 0 , the workpieces are processed in sequence from the first stage to the stage immediately preceding the re-entrant stage. An earliest available machine is selected for processing. The start time of the workpiece is determined by the larger value between the sum of the completion time of the previous process and the transfer time, and the machine idle time. The end time of the workpiece is the start time plus the processing duration of the current stage. The calculation formula is: ; Among them, represents the start time of processing the workpiece in stage ; represents the end time of processing the workpiece in stage ; represents the transfer time of the workpiece from stage to stage ; represents the idle time of the machine ; represents the processing time of the workpiece in stage . After the workpiece is processed on the machine, flag is set to 1. If the workpiece appears not for the first time, that is flag = 1, directly select an idle machine for processing in the reentrant stage, and update the start time and end time of the workpiece in the reentrant stage; For the subsequent stages of the reentrant stage, adopt a phased active scheduling strategy for scheduling. The operation process includes, Step 1, perform phase screening. If the current phase is not a jumpable phase or the workpiece does not have the jumpable attribute, add it to the candidate sequence , if the current phase is a jumpable phase and the workpiece has the jumpable attribute, the workpiece does not need to be processed in the current phase. At this time, synchronize the end time of the current workpiece in the previous phase as the start time and end time of the current phase, and directly use it as the start time of the next phase; Step 2, select the earliest available machine ; Step 3, calculate the start time and end time of each workpiece processed on the selected machine, and update the earliest start time of the workpiece processed on the selected machine and the latest end time ; Step 4, through , and non-delay factor to determine the effective processing time window, and screen the eligible workpieces through the effective processing time window constraint to add them to the set , and the formula for calculating the effective processing time window is: ; Step 5, select the workpiece with the longest processing time at the current stage from the set and assign it to the machine . Update the start time and end time of the workpiece . Remove the already scheduled workpiece from and empty ; Step 6. Return to Step 1 until all stages are traversed to obtain a complete scheduling plan.

5. The solution method for the scheduling problem of a Chinese patent medicine production workshop according to claim 4, wherein, In the production scheduling problem, the critical path refers to the sequence of workpieces that determines the makespan of the entire production process. The critical workpiece refers to the workpiece whose execution time delay will directly cause the makespan of the entire scheduling plan to extend and is located on the critical path; the non-critical workpiece refers to the workpiece whose execution time delay will not directly affect the makespan and is not on the critical path; The critical block is an indivisible sequence of workpieces composed of consecutive operations on the critical path in the scheduling problem. The critical block appears in a certain section of the critical path, rather than the entire critical path.

6. The solution method for the scheduling problem of a traditional Chinese medicine production workshop according to claim 5, characterized in that, Based on the complete scheduling scheme, the implementation process of finding the critical path is as follows. First, find the maximum completion time L , traverse each workpiece. If the completion time of the workpiece in the last stage is equal to L , then record the workpiece and the stage where the workpiece is located , and search forward sequentially from the current workpiece; if a jumpable operation is encountered and the current workpiece has the jumpable attribute, skip the current stage; if a reentrant operation is encountered, search for the critical workpiece in the reentrant stage, otherwise search in the previous operation; find the machine processing the workpiece , record the position of the critical workpiece on the machine , search for the adjacent workpiece forward from the current position, and determine whether the following conditions are met Workpiece Start time of - the immediately preceding workpiece End time of = Machine cleaning time Workpieces that meet the conditions and the stage where they are located Record them. Otherwise, it is necessary to search across stages to determine whether the following conditions are met Workpiece Start time of - workpiece in the previous stage End time of = Transfer time If the conditions are met, the workpiece and the stage where it is located are recorded until the workpiece that starts processing earliest in the first stage is found. At this time ; after the above process is completed, the complete critical path is found, and all the critical workpieces found and the stages where they are located are recorded.

7. A solution method for the scheduling problem of a traditional Chinese medicine production workshop according to claim 6, characterized in that, Search is performed using four neighborhood structures to optimize the scheduling scheme. The four neighborhood structures include the disruption and reconstruction of critical and non-critical jobs within a critical block, the in-block exchange, the in-out block exchange, and the two-point in-out block exchange, which are executed in sequence. When using the current neighborhood structure for search, if the objective value of the new initial solution is smaller than that of the original optimal initial solution, then the original optimal initial solution is updated to the new initial solution. If no new initial solution with a smaller objective value than the original optimal initial solution is obtained after executing the current neighborhood structure, then the next neighborhood structure is sequentially used as the current neighborhood structure until all neighborhood structures cannot update the current optimal initial solution, and the optimal initial solution after search is output. Among them, for the disruption and reconstruction of critical and non-critical jobs within a critical block, the critical jobs in the optimal initial solution are extracted, and then each critical job is sequentially reinserted into all positions in the sequence composed of the remaining non-critical jobs; for the in-block exchange, a critical job is selected from the critical block of the optimal initial solution, and then another critical job is selected from the critical block for exchange; for the in-out block exchange, a critical job is selected from the critical block of the optimal initial solution, and then a non-critical job outside the critical block is selected for exchange; for the two-point in-out block exchange, first, a critical job within a critical block that appears for the first time in the optimal initial solution and a non-critical job outside the critical block that appears for the first time in the optimal initial solution are selected for exchange, and then the positions where they appear for the second time in the optimal initial solution are located, and the second appearance positions of the critical job and the non-critical job are synchronously exchanged.

8. A solution method for the scheduling problem of a traditional Chinese medicine production workshop according to claim 7, characterized in that The execution of the neighborhood structure pruning process includes, for the disruption and reconstruction of critical and non-critical jobs within a critical block, after each insertion operation, it is judged whether the inserted critical job and the job at the adjacent position are the same job. If they are the same job, no subsequent operation is performed, and the search for the next position to perform the insertion operation continues. If the adjacent position after insertion is not the same job, the makespan of the sequence of the inserted jobs is calculated, and the insertion position that minimizes the makespan is retained until all critical jobs are inserted, and the scheduling scheme that minimizes the objective value is retained; for the in-block exchange, the in-out block exchange, and the two-point in-out block exchange, the positions of the critical jobs are determined by traversing the initial solution, and the positions of the next critical job or non-critical job in the initial solution are found in the same way for the exchange operation. If the jobs at the adjacent positions after the exchange are the same job, it is an invalid exchange and no subsequent operation is required; if they are not the same job, the makespan after the exchange is calculated, and the scheduling scheme that minimizes the objective value is retained.

Citation Information

Patent Citations

  • Hybrid flow shop scheduling method and system based on neighborhood structure

    CN116449780A

  • Solving method for batch scheduling of distributed reentrant heterogeneous hybrid flow shop

    CN117829550A

  • Production scheduling method and system for two-stage hybrid flow shop

    CN118244716A

  • Method and device for scheduling job shop

    JP1996315028A

Cited By

  • Full-active-scheduling multi-workshop combined scheduling method and system and storage medium

    CN122219381A