Hybrid intelligent control method and system for complex hierarchical scheduling in traditional Chinese medicine extraction workshops
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-24
- Publication Date
- 2026-08-14
AI Technical Summary
搜索方向依赖经验设计,难以精准识别导致系统性能恶化的少数关键瓶颈订单,导致搜索效率低下,容易陷入局部最优
[0157]本系统将上述方法集成于处理单元中,能够自动化地输出优化后的调度结果至车间控制端,实现从算法到工程应用的完整闭环,具备直接部署于实际中药提取生产线的能力。
Smart Images

Figure CN122569274A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent manufacturing technology and relates to a hybrid intelligent control method and system for complex hierarchical scheduling in traditional Chinese medicine extraction workshops. Background Technology
[0002] The pharmaceutical manufacturing process of traditional Chinese medicine is undergoing a profound transformation from "large-scale inventory production" to "agile order-based production." As a key hub connecting raw medicinal materials and finished preparations, the Chinese medicine extraction workshop is characterized by "multiple specifications, multiple processes, and parallel operations," which is essentially a complex flexible workshop scheduling problem.
[0003] However, the scheduling of traditional Chinese medicine extraction workshops has significant industry-specific characteristics, posing a serious challenge to traditional scheduling methods:
[0004] Unique Multi-Level Structure: Unlike typical flexible workshops that simplify tasks into single "workpieces," traditional Chinese medicine extraction workshops adhere to GMP quality traceability standards, exhibiting a strict multi-level structure of "product-batch-batch." Due to equipment capacity limitations, a single batch must be split into multiple "batches" for processing in different processes, resulting in a dynamic "split-merge" relationship driven by capacity differences between processes. Existing multi-level scheduling studies mostly address the static BOM assembly relationships in discrete manufacturing, failing to handle this dynamic binning process driven by capacity constraints. This invention defines this problem as a flexible workshop scheduling problem with capacity-constrained hierarchical division.
[0005] Extremely high combinatorial optimization complexity: This problem is tightly coupled with capacity-constrained batch splitting (a strongly NP-hard extended bin packing problem) and flexible job shop scheduling (a typical NP-hard problem). A complex bidirectional feedback mechanism exists between the two subproblems, leading to an exponential explosion in the feasible solution space. Traditional exact algorithms and general heuristics struggle to find high-quality solutions within a reasonable timeframe.
[0006] The hidden and dynamic nature of key bottlenecks: Existing intelligent optimization algorithms (such as genetic algorithms and meme algorithms) mostly rely on fixed neighborhood structures for local searches, lacking the ability to dynamically perceive micro-production states such as equipment waiting, process blockages, and logistics delays. The search direction depends on experience-based design, making it difficult to accurately identify the few key bottleneck orders that cause system performance degradation, resulting in low search efficiency and a tendency to get trapped in local optima.
[0007] In recent years, large language models have shown potential in knowledge induction and pattern discovery. However, existing research on LLM-assisted scheduling mainly focuses on online solution generation, which suffers from high inference costs and insufficient stability, making it difficult to apply directly to real-world industrial scenarios.
[0008] Therefore, how to fully consider the process rules of traditional Chinese medicine extraction workshops to compress the search space and build an intelligent search mechanism that can sense the micro-production status and accurately identify system bottlenecks is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0009] The purpose of this invention is to address the aforementioned problems in existing technologies by proposing a hybrid intelligent control method and system for complex hierarchical scheduling in traditional Chinese medicine extraction workshops.
[0010] To achieve the above objectives, the basic solution of this invention is: a hybrid intelligent control method for complex hierarchical scheduling in traditional Chinese medicine extraction workshops, comprising the following steps:
[0011] In view of the multi-level production characteristics of the Chinese medicine extraction workshop, the extraction tanks, concentrators and logistics equipment in the Chinese medicine extraction workshop are taken as the controlled objects. A mathematical model of flexible job shop scheduling (FJSP-CDHP) with capacity constraint hierarchy is constructed for products, batches and material batches. The optimization objective is to minimize the weighted total cost of advance / delay for all batches.
[0012] Based on the process rules of the Chinese medicine extraction workshop, we propose a deterministic material transformation topology mapping rule (D-MTTM) and a state-dependent earliest completion time equipment assignment rule (SD-ECT), and construct a hierarchical encoding and decoding mechanism to map high-order product order sequences into feasible scheduling schemes that satisfy all constraints.
[0013] Based on the micro-state-aware local search mechanism of the Large Language Model (LLM), an order evaluation function is generated, and a two-layer verification mechanism combining syntax verification and performance verification is constructed to complete local adjustment and optimization.
[0014] A collaborative optimization framework based on LLM-assisted microstate reasoning (LLM-MA) is constructed to perform global evolutionary search. When the algorithm stagnates, a microstate-aware local search mechanism is triggered to optimize the current optimal solution and return the optimized individual to the global population until the maximum number of iterations is reached. The final optimization result is then output to the workshop control terminal to control the start-up and shutdown of extraction tanks and concentrators, the processing sequence, and the flow of logistics equipment in the traditional Chinese medicine extraction workshop.
[0015] The working principle and beneficial effects of this basic solution are as follows: This technical solution constructs a complete hybrid intelligent optimization method framework, which organically combines mathematical models, process heuristic rules, LLM knowledge distillation and meme algorithms. For the first time, it systematically solves the scheduling problem of flexible operation workshops with capacity-constrained hierarchical division in traditional Chinese medicine extraction workshops, taking into account both global search capabilities and local bottleneck identification capabilities.
[0016] Furthermore, considering the multi-level production characteristics of traditional Chinese medicine extraction workshops, including products, batches, and material batches, a mathematical model for flexible job shop scheduling (FJSP-CDHP) with capacity-constrained hierarchical division is constructed. The optimization method, with the goal of minimizing the weighted total cost of advance / delay for all batches, is as follows:
[0017] According to Good Manufacturing Practices and Standard Processes for Pharmaceuticals Total demand Divided into Each production batch is independent: ;
[0018] Limited by the physical capacity of equipment at each stage The differences mean that the material flow within a single batch in each process is modeled as a capacity-constrained problem of disassembled and boxed materials: for batches Specific processes Based on the total quantity of materials in the batch With respect to the equipment capacity of this process Construct a set of processing materials ;
[0019] Processing material collection All output materials from each batch are considered as input sources, and are grouped and merged into subsequent sets. That is, in each batch of materials that are considered as "boxes", the loading amount of a single batch is prohibited from exceeding the upper limit of the equipment capacity;
[0020] Scheduling decisions need to be coupled with transportation time determined by the physical location of the equipment. And the sequential cleaning time required to prevent cross-contamination when switching between processing different products. ;
[0021] By jointly deciding on batch division, machine allocation, material packing and flow, and work sequencing, delivery time is balanced. Under constraints, minimize the sum of inventory holding costs and late payment penalty costs for all batches:
[0022] ,
[0023] ,
[0024] ,
[0025] ,
[0026] in, This indicates the optimization objective, which is to minimize the total weighted cost of order batches being ahead of or behind schedule; Where i represents the product index and j represents the batch index; Each product Inventory holding cost rate and delinquency penalty cost rate; For batch The advance time, For batch The delay time, For batch Overall completion time For products The number of processes, For material index, Indicates batch The final process The collection of materials, Indicates batch The final process material The completion time.
[0027] The objective function and key decision elements of the FJSP-CDHP mathematical model are clearly defined. By quantifying inventory holding costs and delinquency penalty costs, the scheduling results can directly reflect the economic benefits of actual production, and have strong engineering applicability.
[0028] Furthermore, it also includes constraints, namely:
[0029] Define the actual material requirements for each process after taking into account the volume change factor:
[0030] ,
[0031] in, Indicates batch In the process The total amount of material to be processed; This is the coefficient of volume change;
[0032] Determine the base number of material batches that must be broken down for each process based on the physical capacity of the equipment:
[0033] ,
[0034] in, The quantity of materials split into batches indicates the number of batches. In the process How many batches will it be split into; k is the machine index. For products In the process A collection of processable equipment, For products The process route and steps set, For product collection, ;
[0035] Ensure that the total amount of material in each batch of each process is completely allocated to each processing session of that process:
[0036] ,
[0037] in, For the second time Load capacity;
[0038] The loading volume of a single batch of materials must not exceed the physical capacity of the selected equipment.
[0039] ,
[0040] in, For the stage A collection of parallel devices, For the stage The number of devices, Indicates if the next time Distributed to equipment If the value is 1, then the value is 1; otherwise, the value is 0. For products In the process A collection of processable equipment;
[0041] Establish material flow balance between processes based on the law of conservation of mass:
[0042] ,
[0043] ,
[0044] in, To indicate from the preceding process material Flow into subsequent processes material The quantity of materials, All are material batch indexes;
[0045] The logical connection state is established only when there is a physical transfer between materials:
[0046] ,
[0047] in, For sufficiently large positive numbers, This indicates that if we consider the preceding sequence... To the next material sequence There is material flow (i.e.) ),but ;otherwise ;
[0048] Ensure that each batch of materials can be processed by only one machine in its corresponding process:
[0049] ,
[0050] Constrain the processing order of different tasks on the same device and include the sequence-related cleaning time:
[0051] ,
[0052] ,
[0053] in, For the second time The start time, For the same device from the product Switch to product The set time, if ,but ; For product indexing, For batch indexing, For products Process index, For material index, This indicates that if on the same equipment, the material... Prior to If processing is required, the value is 1; otherwise, it is 0. For the second time Start time; Indicates if the next time Distributed to equipment If it is true, then it is 1; otherwise, it is 0. For the second time The completion time, For the second time Completion time;
[0054] The completion time of a batch is defined as the sum of the start time and the dynamic processing time:
[0055] ,
[0056] in, For products In the stage Processing time for each batch of materials;
[0057] Ensure that the start time of subsequent material runs is no earlier than the completion time of any preceding material runs related to it:
[0058] ,
[0059] in, For equipment To the equipment The delivery time;
[0060] Define the value range and attribute constraints of various decision variables in the model:
[0061] ,
[0062] .
[0063] A complete system of constraints for the mathematical model is defined to ensure the feasibility of the generated scheduling scheme in terms of physical equipment and process specifications, and to provide a strict boundary of the feasible solution space for subsequent algorithm solutions.
[0064] Furthermore, the deterministic material transformation topology mapping rule (D-MTTM) is as follows:
[0065] Define the same batch in the process The preceding set of materials is In the process The set of subsequent material orders is , For capacity range index;
[0066] Using proportional scaling logic, the first in the preceding set Each item is projected into the subsequent set. Within each capacity range, its unique subsequent material order number By mapping function Decide:
[0067] ,
[0068] in, All are material batch indexes. The quantity of materials split into batches indicates the number of batches. In the process How many batches will it be divided into?
[0069] Process Each subsequent material All obtained the preceding material supply set :
[0070] .
[0071] By scaling the mapping function proportionally, the material flow relationship between the preceding and following processes is deterministically fixed, eliminating the binary decision variables of material splitting and merging in the original model, significantly compressing the solution space scale, and ensuring the continuity and capacity compliance of material flow.
[0072] Furthermore, the state-dependent earliest completion time (SD-ECT) equipment assignment rule is as follows:
[0073] For the process Subsequent materials to be processed Its optional set of parallel machines is Calculate the earliest estimated completion time for this batch of material on each candidate machine, and select the machine with the shortest completion time. Processing:
[0074] ,
[0075] Among them, the internal The function determines the arrival of all preceding materials at the machine. Logistics readiness time; external The function determines the ready time and the machine availability time. Determine the actual start time of each batch of materials; Indicates machine index; For products In the stage Processing time for each batch of materials; This refers to the moment when the candidate machine has no predetermined task and is in a processable state. For the preceding material sequence The completion time, For the preceding equipment To the current candidate device The delivery time For equipment In processing products Sequence-related cleaning time generated during subsequent product switching;
[0076] The machine with the earliest completion time was ultimately selected. As a subsequent material Processing machines.
[0077] By comprehensively evaluating logistics readiness time and equipment availability time, the optimal processing equipment for each batch of materials is determined definitively, eliminating blind searches in equipment selection dimensions, while minimizing the waiting time for semi-finished products, meeting the timeliness requirements of traditional Chinese medicine extracts, and reducing the risk of spoilage.
[0078] Furthermore, the hierarchical encoding and decoding mechanism includes one-dimensional order priority encoding and rule-driven hierarchical expansion decoding, with the following specific steps:
[0079] The one-dimensional order priority code is specifically as follows:
[0080] Obtain a set of multi-process product orders awaiting production scheduling, and map them into a one-dimensional product order index sequence according to order scheduling priority. Construct a single-layer chromosome structure as the outer evolutionary search carrier. ,in Indicates the first A scheduled order index; in the coding structure, all production batches under the same product order and the processing material sub-items split within each production batch are implicitly bound to their respective order index gene positions, without setting independent discrete sorting gene positions for batches and material sub-items in the chromosome;
[0081] The rule-driven hierarchical expansion decoding is specifically as follows:
[0082] Instead of searching for the sequence order of batches and material batches separately, all batches under the same order and each processing material batch within a batch are sequentially entered into the scheduling flow according to their natural number in ascending order; this transforms the one-dimensional order sequence chromosome. The mapping is to the specific physical device resource allocation result, and the specific decoding steps are as follows:
[0083] S1, initialize the available time of all machines to 0, clear the historical processing records of all machines, and use them as the basis for subsequent calculation of cleaning time;
[0084] S2, according to chromosomes The gene sequence is used to read the orders one by one. Based on the fixed logic of ascending natural numbering, the read orders are expanded into batch queues and material queues, thus establishing the processing order of all micro-tasks.
[0085] S3, extract the subsequent material orders to be scheduled from the queue. The deterministic material transformation topology mapping rule (D-MTTM) is invoked, and the subsequent material order is calculated using a proportionally scaled mapping function. Unique set of preceding material supplies Based on the completion time of each preceding material in the preceding material supply set and the inter-equipment transportation time, calculate the subsequent material supply. Physical readiness time;
[0086] S4, invoke the state-dependent earliest completion time (SD-ECT) equipment assignment rule, traverse the set of processable equipment for the current process, and comprehensively evaluate the subsequent material batches. By considering the physical readiness time and the real-time idle time of each candidate device, the estimated earliest completion time of each machine is calculated, and the optimal machine with the shortest completion time is selected. ;
[0087] S5, Repeat steps S2-S4 until all items in the queue have been traversed, output the complete solution containing all scheduling details, and calculate the total cost fitness value of the solution: ,in, Each product Inventory holding cost rate and delinquency penalty cost rate; , These represent the lead time and delay time for all order batches.
[0088] The complex multi-level scheduling problem is simplified into a one-dimensional order sequence optimization problem. Through deterministic decoding steps, the order sequence is mapped to a complete feasible scheduling scheme, enabling the outer optimization algorithm to concentrate computing power on sorting variables, which significantly reduces the difficulty of solving the problem and the computational cost.
[0089] Furthermore, a micro-state-aware local search mechanism based on Large Language Model (LLM) is proposed. The method for extracting micro-state information and the steps for constructing the state set are as follows:
[0090] Basic scheduling state set The structured reverse parsing extracts the complete scheduling scheme timetable generated after traversal decoding, and reverse extracts the processing metadata of each scheduled processing unit, constructing a structured tuple containing multi-dimensional time sequence and resource attributes. Each item represents the material batch number, the assigned physical equipment number, the absolute physical start time, the absolute physical completion time, the process index, the order number, and the corresponding product specification number, respectively. The tuples of all material batch units in the entire workshop are aggregated to construct a basic scheduling state set. ;
[0091] Based on sets Advanced workshop and order status set The feature matrix is used to extract the basic scheduling state set. This belongs to a specific order Material record subset The following rules are used to calculate and construct a set of workshop states that reflect the dynamic bottlenecks of the system. :
[0092] Equipment idle time Calculation: Filtering out the set The middle finger assigns physical equipment All material handling records, sorted by start time Sort in ascending order; define the sorted material sequence as... Through formula The cumulative idle time of the equipment is obtained by summing the absolute time difference between two adjacent processing tasks.
[0093] Process interval time Calculation for orders: Extract the current process from any batch of materials within the current process. start time And retrieve its upstream preceding process. Latest completion time of all related preceding material batches ; through formula The waiting time for all material shipments within an order is summarized as a metric for material timeliness and the risk of material delays.
[0094] Total cleaning time Calculation: Traverse the orders Each physical device assigned to a sub-process reads the product specification number of the preceding task processed on that device. If the product specification number of the preceding task is different from the product specification number of the current sub-process, the corresponding sequence-related cleaning time is read from the system's preset procedure switching matrix. And sum at the order level to obtain ;
[0095] Remaining time for delivery Calculation: Obtain the order Contractual delivery date and from subset The system identifies the latest completion time for all material deliveries in the order. ; through formula Calculate delivery headroom; a negative value indicates that the order has experienced physical delays. Direct extraction of queuing load and cost rates: Statistical subset. The total number of tuples in the queue is directly used as the number of times the order will be queued. Read the unit inventory holding cost rate corresponding to the order directly from the configuration data of the current production instance file. and the weight of unit delay penalty cost ;
[0096] Using LLM to generate order evaluation functions :
[0097] ,
[0098] in, For orders The Item index value, , For normalization or nonlinear transformation, Empirical weights are adaptively assigned to LLM based on problem characteristics.
[0099] By leveraging LLM to automatically extract correlation patterns from multidimensional micro-state features, an order bottleneck evaluation function is generated, enabling a shift from "experience-based design" to "knowledge-driven" approaches and improving the accuracy of key order identification.
[0100] Furthermore, a two-layer verification mechanism combining syntax verification and performance verification is constructed, and the method for completing local adjustments and optimizations is as follows:
[0101] Based on the syntax verification layer, the generated code is compiled and executed to check its syntax correctness and runtime integrity; if a syntax error or runtime exception occurs, the error message is fed back to LLM for regeneration until an executable function is obtained or the maximum number of iterations is reached;
[0102] After the order evaluation function passes syntax validation, it enters the performance validation phase. Once the order evaluation function passes syntax validation, it is embedded into the local search variable neighborhood descent (VND) process, and test iterations are performed on multiple representative historical Chinese medicine extraction instances. The total weighted cost optimization margin before and after extraction testing is measured. The search convergence algebra is used as a performance evaluation criterion.
[0103] A reflection and correction mechanism based on quantitative indicators: If the optimization magnitude does not reach the preset minimum decline threshold... Then, construct multi-dimensional performance feedback prompts; these prompts include: the key order number selected by the current order evaluation function, details of the actual deterioration of the target cost after applying the evaluation function (such as a surge in delay costs or an increase in equipment idle rate), and the expected direction of cost optimization; re-input these feedback prompts into the LLM to force it to reduce the corresponding feature weights that trigger negative optimization. Re-output the corrected order evaluation function;
[0104] When based on multidimensional performance feedback prompts consecutively If, after rounds of iterative optimization, the actual performance is still below the threshold... This will automatically block the LLM generation path and enable the underlying hard-coded backup order evaluation function. :
[0105] ,
[0106] After the order evaluation function is validated, it is embedded in the VND (Various Orbit Divergence) search framework to guide neighborhood selection. Five structured neighborhood operations are designed, and the search strategy follows the first-order improvement principle. The specific search and evaluation mechanism is as follows:
[0107] according to Blocking decoupling, The conflict is dispersed. : Delaying the deadline forward, LLM-guided insertion, The intervals are explored sequentially in reverse order. For each new candidate order sequence generated, the hierarchical decoder is immediately invoked to re-decode it and calculate the fitness. ;
[0108] The first one to be identified to improve fitness If a descending candidate sequence is found, the exhaustive search of the current neighborhood is immediately stopped, the sequence is accepted as the new current optimal solution, and the search process is forced to revert to the first neighborhood. Restart the iteration;
[0109] If all sequence adjustments in the current neighborhood fail to produce a lower-cost physical scheduling solution, then smoothly switch to the next neighborhood to continue exploring.
[0110] If and only if none of the five neighborhoods can further compress the fitness, then... When the local value is determined to be a local minimum, the current local search round is terminated.
[0111] If the LLM evaluation function fails the sandbox validation, then the neighborhood... This degenerates into an exhaustive search for key orders that remove recalculation costs.
[0112] By employing a two-layer mechanism of syntax verification and performance verification, the executability and optimization effectiveness of the LLM-generated evaluation function are guaranteed. Five structured neighborhoods and a first-order improvement strategy are designed to achieve bottleneck-driven variable neighborhood search, effectively improving the efficiency of local optimization and the quality of solutions.
[0113] Furthermore, a collaborative optimization framework based on LLM-assisted microstate reasoning (LLM-MA) is constructed to perform global evolutionary search. When the algorithm stagnates, a microstate-aware local search mechanism is triggered to optimize the current optimal solution, and the optimized individual is returned to the global population until the maximum number of iterations is reached. Finally, the optimization result is output to the workshop control terminal. The specific steps are as follows:
[0114] An initial population P is generated using a hybrid strategy with a preset population size. 30% of the individuals are generated using the critical ratio (CR) rule, which sorts individuals according to the urgency of order delivery to provide directional guidance for the initial population. The remaining 70% of the individuals are generated using a uniform random arrangement to ensure population diversity.
[0115] Physical feasibility verification and fitness assessment were performed on all individuals in population P. The specific process was as follows:
[0116] The hierarchical decoder is invoked to perform physical constraint verification and expansion on the individual one-dimensional order sequence through the deterministic material transformation topology mapping rule (D-MTTM) and the state-dependent earliest completion time equipment assignment rule (SD-ECT).
[0117] The order sequence is converted into a complete physical scheduling and control scheme that includes precise equipment number allocation for extraction tanks and concentrators, single feed loading capacity parameters, and absolute time sequence of equipment start-up and completion.
[0118] Based on the actual operating time nodes of each device in the physical scheduling and control scheme, the actual completion time of each order batch is extracted, and the total weighted cost fitness is calculated in combination with the delivery date constraint. ;
[0119] In the host computer's memory, the individual with the lowest cost in the current first-generation population is initialized and recorded as the globally optimal order sequence. and its corresponding minimum cost This serves as a global benchmark for subsequent evolutionary iterations;
[0120] Stasis counter stag count Initialize to 0 to monitor the stagnation of population evolution;
[0121] Calculate the dynamic mutation rate of the current generation: ,
[0122] When a population stagnates, the mutation rate gradually increases with the number of stagnant generations, up to a maximum of 0.6, thus enhancing population diversity.
[0123] Initialize the offspring population Q to an empty set;
[0124] The tournament selection method is adopted. Each time, k=2 individuals are randomly selected from the current population P, the fitness of the two individuals are compared, and the individual with lower cost is retained as parent 1. The operation is repeated to obtain parent 2.
[0125] With preset crossover probability Perform sequential crossover (OX1) on the two parent chromosomes; preset fixed values;
[0126] Randomly select a pair of cut points, copy the sub-fragments from parent generation 1 to the corresponding positions in the offspring, and then fill in the remaining loci according to the relative order of parent generation 2 to ensure that the generated offspring chromosomes are a valid order arrangement;
[0127] With dynamic variation rate The mutation operation is performed on the two offspring respectively, including three sub-modes: exchange mutation (35% probability), insertion mutation (35% probability), and reverse mutation (30% probability), which are randomly selected by roulette.
[0128] Add the two generated offspring individuals to the offspring population Q;
[0129] The parent population P is merged with the offspring population Q. An elite retention strategy is adopted to select the best P individuals from the merged population as the new generation population. At the same time, a deduplication operation is performed to avoid the recurrence of the same individuals.
[0130] Calculate the minimum cost C_gen_best in the next generation population P. If C_gen_best < C best That is, the current optimal solution is better than the historical global optimal solution:
[0131] Update the global optimal cost C_best to C_gen_best;
[0132] Update the globally optimal order sequence π best For the corresponding individuals;
[0133] Stasis counter stag count Reset to 0;
[0134] Otherwise, the current optimal solution is not improved:
[0135] Stasis counter stag count Add 1;
[0136] Introducing stagnation detection and adaptive mechanisms: Let the number of consecutive no-improvement algebras be denoted as . ,like This triggers a micro-state-aware local search mechanism, while adaptively increasing the global mutation probability. The bottom 20% of individuals in the population were replaced with randomly arranged individuals; among them Basic mutation probability;
[0137] The algorithm iterates through evolutionary crossover, mutation, and LLM local search processes until it reaches the maximum number of iterations. The algorithm then terminates and outputs the final optimization result to the workshop control terminal for physical execution.
[0138] The eventually converged globally optimal order sequence Synchronization is mapped to the optimal equipment control queue at the bottom layer of the physical workshop, specifically:
[0139] The final converged global optimal order sequence is parsed into the absolute action sequence of the feed valves for specific extraction tanks and concentrators, the physical timing of heating and stirring, and the trigger nodes of the in-place cleaning (CIP) system. The equipment action timing table is then written into the execution register of the workshop distributed control system (DCS) or programmable logic controller (PLC) to drive the underlying hardware operation.
[0140] The minimum cost recorded at this point This means that, under the control of the queue, the additional physical operating losses in the workshop caused by material retention, idling, and cleaning are minimized.
[0141] It achieves organic synergy between global evolutionary search and LLM local reinforcement. Through mechanisms such as adaptive mutation rate, stagnation detection, and diversity reset, it balances the exploration and development capabilities of the algorithm, avoids premature convergence, and can obtain a high-quality scheduling scheme within a reasonable time.
[0142] Furthermore, the final optimization results are output to the workshop control terminal to control the start-up, shutdown, and processing sequence of extraction tanks and concentrators in the traditional Chinese medicine extraction workshop, as well as the flow of logistics equipment. The specific conversion of decision variables into control commands and the closed-loop execution process are as follows:
[0143] Device allocation, adaptive path selection, and status verification:
[0144] Analyzing equipment allocation decision variables Read the target processing equipment through the data gateway The system monitors the online readiness status and residual detection data of the previous cleaning process. After confirming readiness, it locks the material conveying path according to the workshop pipeline topology, issues control commands to the pneumatic reversing valves and fluid distribution matrix on the corresponding pipelines, and uses valve position sensors to confirm that the valves are in place, thereby realizing the conversion of equipment allocation variables into precise material routing.
[0145] Dynamic volume control and multi-stage overflow prevention closed-loop control:
[0146] Analyze the load capacity variable With material flow variables The command is issued to start the conveying pump, and the high-precision mass flow meter on the conveying pipeline is used to accumulate the volume of material flowing through in real time, and the accumulated value is compared with the target loading capacity. Real-time PID closed-loop comparison is performed; when the cumulative amount reaches the first preset threshold of the target loading amount, the control system automatically reduces the output power of the conveying pump by frequency conversion; when the cumulative amount reaches 100% of the target value, the feed valve is automatically cut off and the conveying pump is shut down; at the same time, the radar level gauge on the top of the target equipment is linked to the high level switch for safety interlocking, and the feed valve is forcibly closed once the high level threshold is triggered.
[0147] Precise timing triggering, process parameter control, and absolute time alignment:
[0148] Analyze the start time variable of the material. With completion time variable : Ensures alignment of the underlying controller and upper-layer algorithm on the absolute time axis through an industrial clock synchronization protocol; at absolute time The control system automatically triggers the opening of the steam inlet regulating valve and the start of the agitator motor for the corresponding equipment; using the tank temperature transmitter, the system officially activates the processing time once the physical temperature inside the tank reaches the preset process temperature. The countdown begins; when the time is up... When the command is issued, the steam inlet valve will be automatically closed and the discharge pump will be activated to discharge the material.
[0149] Product specification adaptive recognition and intelligent in-place cleaning (CIP) linkage:
[0150] The control system analyzes the processing sequence variables. When generating the processing queue for the current equipment, if it identifies that the batches of materials produced on the same equipment before and after belong to different Chinese herbal medicine varieties, it automatically inserts and activates the control chain of the in-situ cleaning system within the absolute time interval between the two processing instructions. It then issues instructions in sequence to control the cleaning water valve, acid and alkali solution valve, and return water pump. The system also monitors the quality of the discharged wastewater online through a pipeline conductivity sensor. Only after the conductivity reaches the cleaning index and a cleaning completion signal is received is the feeding and processing of subsequent batches of materials allowed.
[0151] It is easy to control and use.
[0152] This invention also provides a hybrid intelligent control system for complex hierarchical scheduling in traditional Chinese medicine extraction workshops, comprising:
[0153] Data acquisition and sensing module: used to acquire real-time operating status of equipment in the Chinese medicine extraction workshop, equipment capacity constraints, and order demand information;
[0154] Intelligent scheduling and computation module: executes the method described in this invention to generate an optimal equipment scheduling scheme containing multidimensional decision variables based on the meme algorithm of LLM-assisted microstate reasoning;
[0155] Command parsing and physical mapping module: converts the multidimensional decision variables into underlying industrial protocol commands;
[0156] Equipment execution module: includes actuators and sensors distributed on the extraction tank and concentrator pipelines, used to receive the industrial protocol commands and execute the opening and closing of corresponding pneumatic valves, the start and stop of pumps, and CIP cleaning actions.
[0157] This system integrates the above methods into the processing unit, which can automatically output the optimized scheduling results to the workshop control terminal, realize a complete closed loop from algorithm to engineering application, and has the ability to be directly deployed in actual Chinese medicine extraction production lines. Attached Figure Description
[0158] Figure 1 This is a flowchart illustrating the hybrid intelligent control method for complex hierarchical scheduling in traditional Chinese medicine extraction workshops, as described in this invention.
[0159] Figure 2 This is a schematic diagram of the mathematical model of the flexible job shop scheduling (FJSP-CDHP) with capacity constraint hierarchical partitioning, which is a hybrid intelligent control method for complex hierarchical scheduling in traditional Chinese medicine extraction workshops according to the present invention.
[0160] Figure 3 This is a schematic diagram of the structure of the D-MTTM and SD-ECT heuristic rules of the hybrid intelligent control method for complex hierarchical scheduling in traditional Chinese medicine extraction workshops according to the present invention;
[0161] Figure 4 This is a flowchart illustrating the hierarchical encoding and decoding mechanism of the hybrid intelligent control method for complex hierarchical scheduling in traditional Chinese medicine extraction workshops, as described in this invention.
[0162] Figure 5 This is a schematic diagram of the collaborative optimization framework of the meme algorithm (LLM-MA) based on LLM-assisted microstate reasoning, which is a hybrid intelligent control method for complex hierarchical scheduling in traditional Chinese medicine extraction workshops according to the present invention.
[0163] Figure 6 This is a schematic diagram of the micro-state perception local search mechanism based on the Large Language Model (LLM) for the hybrid intelligent control method for complex hierarchical scheduling in traditional Chinese medicine extraction workshops, as described in this invention.
[0164] Figure 7 This is a schematic diagram of the execution mutation operation of the hybrid intelligent control method for complex hierarchical scheduling in traditional Chinese medicine extraction workshops according to the present invention. Detailed Implementation
[0165] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0166] In the description of this invention, it should be understood that the terms "longitudinal", "lateral", "up", "down", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting this invention.
[0167] In the description of this invention, unless otherwise specified and limited, it should be noted that the terms "installation", "connection" and "linking" should be interpreted broadly. For example, they can refer to mechanical or electrical connections, or internal connections between two components. They can be direct connections or indirect connections through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.
[0168] Table 1. FJSP-CDHP Symbol Definition Table
[0169] symbol Notes Sets and Indexes Product collection, product The sub-batch set, indexed as Size is determined by order requirements. The set of processing stages, indexed as , product The set of process routes and steps, indexed as , stage A set of parallel devices, indexed as , product sub-batch In the process The collection of materials, product In the process A collection of processable equipment, Product Index Batch index, Stage Index product Process index, Machine index, Material index, usually (Preface) (Postscript) parameter Product Quantity product Sub-batch quantity Number of process stages product Number of processes stage Number of devices product Total order demand product Standard process batch Volume change coefficient Total amount of materials used in the process. Indicates batch. In the process Total amount of materials to be processed Equipment capacity. Equipment Physical maximum processing capacity Quantity of material divided into batches. Indicates the batch size. In the process How many batches will it be divided into? Process-stage mapping parameters. Represents the product. The Each process corresponds to a physical stage in the workshop. product In the stage Processing time per batch From the same equipment to the product Switch to product Setting time (if) ,but ) From the stage equipment To the stage equipment Transportation time product Delivery period product Inventory holding cost rate and delinquency penalty cost rate Sufficiently large positive numbers Decision variables Indicates from the preceding process material Flow into subsequent processes material The quantity of materials. If we consider the previous material sequence To the next material sequence There is material flow (i.e.) ),but ;otherwise . If the material is of poor quality Distributed to equipment If it is 1, then it is 1; otherwise it is 0. If on the same equipment, the material batch Prior to If processing is required, the value is 1; otherwise, it is 0. Material Load capacity Material start time Material Completion time batch Overall completion time batch advance time batch Delay time
[0170] This invention discloses a hybrid intelligent control method for complex hierarchical scheduling in traditional Chinese medicine extraction workshops, such as... Figure 1 As shown, it includes the following steps:
[0171] Given the multi-level production characteristics of traditional Chinese medicine extraction workshops, the controlled objects are extraction tanks, concentrators, and logistics equipment within the workshops, targeting specific products, batches, and material quantities. Figure 2 As shown, a mathematical model of flexible job shop scheduling (FJSP-CDHP) with capacity constraint hierarchical partitioning is constructed, with the optimization objective of minimizing the weighted total cost of advance / delay for all batches;
[0172] Based on the process rules of the Chinese medicine extraction workshop, we propose a deterministic material transformation topology mapping rule (D-MTTM) and a state-dependent earliest completion time equipment assignment rule (SD-ECT), and construct a hierarchical encoding and decoding mechanism to map high-order product order sequences into feasible scheduling schemes that satisfy all constraints.
[0173] Based on the micro-state-aware local search mechanism of the Large Language Model (LLM), an order evaluation function is generated, and a two-layer verification mechanism combining syntax verification and performance verification is constructed to complete local adjustment and optimization.
[0174] A collaborative optimization framework based on LLM-assisted microstate reasoning (LLM-MA) is constructed to perform global evolutionary search. When the algorithm stagnates, a microstate-aware local search mechanism is triggered to optimize the current optimal solution and return the optimized individual to the global population until the maximum number of iterations is reached. The final optimization result is then output to the workshop control terminal to control the start-up and shutdown of extraction tanks and concentrators, the processing sequence, and the flow of logistics equipment in the traditional Chinese medicine extraction workshop. The final optimization result is output to the workshop distributed control system (DCS) or programmable logic controller (PLC). The workshop control system analyzes the multi-dimensional decision variables in the optimization result and transforms them into physical control commands for the underlying equipment. Specifically, this includes: controlling the opening and closing of pipeline pneumatic valves and the start and stop of conveying pumps based on material allocation variables and material flow variables to achieve physical introduction and volume control of materials to the target equipment; triggering the opening of the steam inlet valve of the target extraction tank or concentrator, the start of the stirring motor, and the action of the discharge valve at the corresponding time based on the start and end times of the material batch; and triggering the automatic execution of the equipment in-place cleaning (CIP) system based on the sequence changes of the equipment's processed product types to achieve precise physical control of the equipment operation in the traditional Chinese medicine extraction workshop.
[0175] The specific physical mapping and underlying control process are as follows:
[0176] Firstly, the traditional Chinese medicine extraction workshop mainly includes key physical stages such as extraction and concentration. Materials (raw medicinal materials, solvents, etc.) sequentially enter the extraction tank for decoction and extraction. The resulting intermediate (extract) is then transferred to the concentrator stage via pumps, pipelines, or AGVs for concentration into a paste. After receiving the optimized scheduling scheme, the workshop control system (such as DCS or PLC) analyzes the decision variables and transforms them into physical control commands for the underlying hardware.
[0177] Equipment start / stop and processing sequence control: Analysis of material batch start time variable With completion time variable The control system uses this to measure absolute time. Automatically triggers actions such as opening the steam inlet valve of the target extraction tank or concentrator and starting the stirring motor, and... The valve shut-off and material discharge commands are triggered at all times.
[0178] Machine allocation and material routing control: Analyzing equipment allocation decision variables The control system locks accordingly. (such as an extraction tank with a specific number), and automatically adjust the pneumatic reversing valve of the pipeline where the equipment is located to achieve precise introduction of materials into the designated equipment.
[0179] Processing sequence and cleaning switching control: Analysis of processing sequence decision variables The control system generates a processing queue for the equipment. When the system identifies that the materials in the preceding and following production runs belong to different product categories, it will automatically insert and trigger the Clean In-Place (CIP) system between the two processing instructions to prevent cross-contamination.
[0180] Loading volume and logistics flow control: Analyzing loading volume variables With material flow variables The control system links weighing sensors, flow meters, and delivery pumps (or AGV scheduling interfaces) within the workshop to accurately measure volume. The preceding extract is pumped into the corresponding subsequent concentrator strictly according to the predetermined flow logic, ensuring a single loading volume. The feed will be automatically cut off when the physical capacity limit of the equipment is reached.
[0181] The LLM-assisted microstate reasoning meme algorithm (LLM-MA) is based on a hierarchical scheduling encoding and decoding mechanism. It introduces microstate awareness and knowledge-driven search mechanisms into the traditional meme algorithm framework, constructing a closed-loop feedback channel between the macro-order sequence and the micro-production state. The algorithm consists of three parts: a global evolution layer, a hierarchical decoding layer, and an LLM-guided optimization layer. This forms a collaborative optimization mechanism of "global exploration—state awareness—local reinforcement," thereby improving the solution quality and search efficiency for complex hierarchical scheduling problems.
[0182] Make the following assumptions about the problem:
[0183] exist At that moment, all machines were idle and available; all ordered products had been released.
[0184] For a specific process of the same product, the following equipment sets are available. All machines within have the same physical capacity and processing efficiency.
[0185] Total order demand Compared with standard process batch It is known that the number of processing steps for each process is determined by the equipment capacity.
[0186] Each machine can only process one batch of materials at a time, and the processing cannot be interrupted.
[0187] When the equipment continuously processes different types of materials, it is necessary to perform sequence-related cleaning; when processing the same type of material continuously, cleaning is not required.
[0188] Each product must be executed strictly in the order defined by the process route, and the materials produced in the previous process must be completely allocated to the next process.
[0189] Each machine has a buffer zone of sufficient capacity to ignore the temporary storage space limitations for work-in-process.
[0190] Inter-stage transportation time depends only on the physical location of preceding and subsequent equipment, is considered a constant, and transportation capacity limitations are ignored.
[0191] Ignoring the uncertainties of equipment failure and maintenance, we assume that the equipment operates normally during the scheduling period.
[0192] In a preferred embodiment of the present invention, considering the multi-level production characteristics of a traditional Chinese medicine extraction workshop, including products, batches, and material batches, a mathematical model of flexible job shop scheduling (FJSP-CDHP) with capacity constraints is constructed. The method for minimizing the weighted total cost of advance / delay for all batches as the optimization objective is as follows:
[0193] FJSP-CDHP is a complex combinatorial optimization problem that integrates batch partitioning, batch splitting, cross-stage capacity-constrained packing, and flexible job shop scheduling. The classic FJSP has been widely proven to be an NP-hard problem. Furthermore, FJSP-CDHP also involves capacity-constrained batch splitting packing, thus reducing the problem to an NP-hard problem.
[0194] According to Good Manufacturing Practice (GMP) guidelines and standard process batches Total demand Divided into Each production batch is independent: ;
[0195] Limited by the physical capacity of equipment at each stage The differences mean that the material flow within a single batch in each process is modeled as a capacity-constrained problem of disassembled and boxed materials: for batches Specific processes Based on the total quantity of materials in the batch With respect to the equipment capacity of this process Construct a set of processing materials ;
[0196] Processing material collection All output materials from each batch are considered as input sources, and are grouped and merged into subsequent sets. That is, in each batch of materials that are considered as "boxes", the loading amount of a single batch is prohibited from exceeding the upper limit of the equipment capacity;
[0197] Scheduling decisions need to be coupled with transportation time determined by the physical location of the equipment. And the sequential cleaning time required to prevent cross-contamination when switching between processing different products. ;
[0198] By jointly deciding on batch division, machine allocation, material packing and flow, and work sequencing, delivery time is balanced. Under constraints, minimize the sum of inventory holding costs and late payment penalty costs for all batches:
[0199] ,
[0200] ,
[0201] ,
[0202] ,
[0203] in, This indicates the optimization objective, which is to minimize the total weighted cost of order batches being ahead of or behind schedule; Where i represents the product index and j represents the batch index; Each product Inventory holding cost rate and delinquency penalty cost rate; For batch The advance time, For batch The delay time, For batch Overall completion time For products The number of processes, For material index, Indicates batch The final process The collection of materials, Indicates batch The final process material The completion time.
[0204] To address the multi-level production characteristics of "product-batch-material batch" in traditional Chinese medicine extraction workshops, an FJSP-CDHP mathematical model was constructed to achieve unified modeling of dynamic material batch splitting under capacity constraints, cross-process material flow, and flexible equipment selection.
[0205] In a preferred embodiment of the present invention, the following constraint condition is further included:
[0206] Define the actual material requirements for each process after taking into account the volume change factor:
[0207] ,
[0208] in, Indicates batch In the process The total amount of material to be processed; This is the coefficient of volume change;
[0209] Determine the base number of material batches that must be broken down for each process based on the physical capacity of the equipment:
[0210] ,
[0211] in, The quantity of materials split into batches indicates the number of batches. In the process How many batches will it be split into; k is the machine index. For products In the process A collection of processable equipment, For products The process route and steps set, For product collection, ;
[0212] Ensure that the total amount of material in each batch of each process is completely allocated to each processing session of that process:
[0213] ,
[0214] in, For the second time Load capacity;
[0215] The loading volume of a single batch of materials must not exceed the physical capacity of the selected equipment.
[0216] ,
[0217] in, For the stage A collection of parallel devices, For the stage The number of devices, Indicates if the next time Distributed to equipment If the value is 1, then the value is 1; otherwise, the value is 0. For products In the process A collection of processable equipment;
[0218] Establish material flow balance between processes based on the law of conservation of mass:
[0219] ,
[0220] ,
[0221] in, To indicate from the preceding process material Flow into subsequent processes material The quantity of materials, All are material batch indexes;
[0222] The logical connection state is established only when there is a physical transfer between materials:
[0223] ,
[0224] in, For sufficiently large positive numbers, This indicates that if we consider the preceding sequence... To the next material sequence There is material flow (i.e.) ),but ;otherwise ;
[0225] Ensure that each batch of materials can be processed by only one machine in its corresponding process:
[0226] ,
[0227] Constrain the processing order of different tasks on the same device and include the sequence-related cleaning time:
[0228] ,
[0229] ,
[0230] in, For the second time The start time, For the same device from the product Switch to product The set time, if ,but ; For product indexing, For batch indexing, For products Process index, For material index, This indicates that if on the same equipment, the material... Prior to If processing is required, the value is 1; otherwise, it is 0. For the second time Start time; Indicates if the next time Distributed to equipment If it is true, then it is 1; otherwise, it is 0. For the second time The completion time, For the second time Completion time;
[0231] The completion time of a batch is defined as the sum of the start time and the dynamic processing time:
[0232] ,
[0233] in, For products In the stage Processing time for each batch of materials;
[0234] Ensure that the start time of subsequent material runs is no earlier than the completion time of any preceding material runs related to it:
[0235] ,
[0236] in, For equipment To the equipment The delivery time;
[0237] Define the value range and attribute constraints of various decision variables in the model:
[0238] ,
[0239] .
[0240] Traditional Chinese medicine extraction workshops are subject to strict constraints from Good Manufacturing Practices (GMP) and pharmacopoeia processes. This invention extracts the following three core process characteristics as the basis for constructing heuristic rules and encoding / decoding mechanisms:
[0241] 1) Batch independence and homogeneity with material unit
[0242] To ensure traceability of drug quality, mixing materials from different batches is strictly prohibited in the workshop. Furthermore, due to equipment capacity limitations, multiple processing units separated from the same batch within the same process must have identical physical properties and meet the requirements of subsequent processes.
[0243] 2) Machine isomorphism
[0244] Optional parallel equipment for the same product and the same process stage has the same maximum physical capacity and processing efficiency. Furthermore, the pharmacopoeia strictly specifies the standard processing time for each step; the processing time for a single operation is a fixed constant and will not be shortened or lengthened depending on the actual load of the processing unit.
[0245] 3) Limited supply of semi-finished products awaiting delivery.
[0246] Semi-finished Chinese medicine products (such as extracts and pastes) are highly susceptible to microbial growth and physicochemical deterioration at room temperature, exhibiting strict time-sensitivity. Although a brief buffer period is allowed after the completion of the preceding processing unit, the produced materials must be transferred to the next process within a specified safe time window, and there should be no long waiting time between processes.
[0247] The FJSP-CDHP model is coupled with multi-level scheduling and capacity-constrained dynamic material splitting. To address the complex logic of material splitting and connection between upstream and downstream processes, and to effectively eliminate the blind search space in equipment selection, this invention designs two heuristic rules based on process characteristics, such as... Figure 3 As shown.
[0248] In a preferred embodiment of the present invention, the deterministic material transformation topology mapping rule (D-MTTM) is specifically as follows:
[0249] In the continuous production of traditional Chinese medicine extraction, the transfer of materials between upstream and downstream processes involves changes in physicochemical states and a gradual reduction in volume during extraction, concentration, and other processes. This results in a reduction in the number of processing units required for the same batch in each subsequent process (i.e., ).
[0250] Therefore, this invention designs a deterministic material transformation topology mapping rule (D-MTTM).
[0251] Define the same batch in the process The preceding set of materials is In the process The set of subsequent material orders is , For capacity range index;
[0252] Using proportional scaling logic, the first in the preceding set Each item is projected into the subsequent set. Within each capacity range, its unique subsequent material order number By mapping function Decide:
[0253] ,
[0254] in, All are material batch indexes. The quantity of materials split into batches indicates the number of batches. In the process How many batches will it be divided into?
[0255] Process Each subsequent material All obtained the preceding material supply set :
[0256] .
[0257] Through this mapping calculation, the present invention clarifies the correspondence between material batches in the preceding and following processes.
[0258] In a preferred embodiment of the present invention, the state-dependent earliest completion time (SD-ECT) equipment assignment rule is specifically as follows:
[0259] To address the demanding process characteristic of limited waiting time for semi-finished products, this invention designs a State-Dependent Earliest Completion Time Machine Assignment Rule (SD-ECT) to minimize the material's dwell time in the workshop and mitigate the risk of spoilage.
[0260] In traditional parallel machine scheduling, equipment assignment often only considers the machine's idle time (i.e., assuming that materials are always ready).
[0261] When faced with a batch of materials to be processed, the SD-ECT rule needs to comprehensively evaluate two real-time states of the production system: first, the material logistics readiness status (i.e., all preceding materials constituting the processing unit have been processed and transferred); second, the real-time idle status of each candidate device (i.e., the device has no assigned task and is in a processable state).
[0262] For the process Subsequent materials to be processed Its optional set of parallel machines is Calculate the earliest estimated completion time for this batch of material on each candidate machine, and select the machine with the shortest completion time. Processing:
[0263] ,
[0264] Among them, the internal The function determines the arrival of all preceding materials at the machine. Logistics readiness time; external The function determines the ready time and the machine availability time. Determine the actual start time of each batch of materials; Indicates machine index; For products In the stage Processing time for each batch of materials; This refers to the moment when the candidate machine has no predetermined task and is in a processable state. For the preceding material sequence The completion time, For the preceding equipment To the current candidate device The delivery time For equipment In processing products Sequence-related cleaning time generated during subsequent product switching;
[0265] The machine with the earliest completion time was ultimately selected. As a subsequent material Processing machines.
[0266] Based on the extraction process of traditional Chinese medicine, a deterministic material transformation topology mapping rule (D-MTTM) and a state-dependent earliest completion time equipment assignment rule (SD-ECT) are proposed to construct a hierarchical encoding and decoding mechanism to achieve effective compression of the search space.
[0267] In a preferred embodiment of the present invention, such as Figure 4 As shown, constructing a hierarchical encoding and decoding mechanism includes one-dimensional order priority encoding and rule-driven hierarchical expansion decoding. The specific steps are as follows:
[0268] One-dimensional order priority encoding is as follows: Obtain a set of multi-process product orders to be scheduled for production, map them to a one-dimensional product order index sequence according to the order scheduling priority, and construct a single-layer structure chromosome as the outer evolutionary search carrier. ,in Indicates the first A scheduled order index; in the coding structure, all production batches under the same product order and the processing material sub-items split within each production batch are implicitly bound to their respective order index gene positions, without setting independent discrete sorting gene positions for batches and material sub-items in the chromosome;
[0269] To further improve the search efficiency of the algorithm in high-dimensional space, this invention adopts an implicit encoding method of one-dimensional order priority. Specifically, for example, if the workshop receives three product orders (Order 1, Order 2, Order 3), and the priority sequence generated by the outer genetic algorithm is [3, 1, 2], then the chromosome encoding corresponding to this solution is... At this point, the encoding process does not need to consider how many sub-batches or charges are contained within Order 3. These underlying complex timing relationships will all be left to the decoder to adaptively expand using a fixed logic of natural ascending numbering. This encoding method reduces the dimension of the solution space from... Forced compression to This eliminates the blind spots in the discrete search caused by batch disorder and cross-contamination of materials at the source.
[0270] Rule-driven hierarchical decomposition decoding means: no longer searching the sequence order of batches and material batches separately; all batches under the same order and each processing material batch within a batch enter the scheduling flow in ascending order of their natural numbers; the one-dimensional order sequence chromosome is transformed. The mapping is to the specific physical device resource allocation result, and the specific decoding steps are as follows:
[0271] S1, initialize the available time of all machines to 0, clear the historical processing records of all machines, and use them as the basis for subsequent calculation of cleaning time;
[0272] S2, according to chromosomes The gene sequence is used to read the orders one by one. Based on the fixed logic of ascending natural numbering, the read orders are expanded into batch queues and material queues, thus establishing the processing order of all micro-tasks.
[0273] S3, extract the subsequent material orders to be scheduled from the queue. The deterministic material transformation topology mapping rule (D-MTTM) is invoked, and the subsequent material order is calculated using a proportionally scaled mapping function. Unique set of preceding material supplies Based on the completion time of each preceding material in the preceding material supply set and the inter-equipment transportation time, calculate the subsequent material supply. Physical readiness time;
[0274] S4, invoke the state-dependent earliest completion time (SD-ECT) equipment assignment rule, traverse the set of processable equipment for the current process, and comprehensively evaluate the subsequent material batches. By considering the physical readiness time and the real-time idle time of each candidate device, the estimated earliest completion time of each machine is calculated, and the optimal machine with the shortest completion time is selected. ;
[0275] S5, Repeat steps S2-S4 until all items in the queue have been traversed, output the complete solution containing all scheduling details, and calculate the total cost fitness value of the solution: ,in, Each product Inventory holding cost rate and delinquency penalty cost rate; , These represent the lead time and delay time for all order batches.
[0276] Conventional binning decisions involve binary variables. The combined assignment, its search scale is based on dimensions. The decision matrix determines the process and is subject to strict constraints on equipment capacity and process logic.
[0277] Through the mapping function of rule one The present invention directly fixes The value of reduces the search space size of this dimension to 1. This mapping logic utilizes a proportional scaling mechanism, conforming to the physical characteristic of the progressively decreasing volume of Chinese herbal extracts. This method ensures that the boxing scheme meets the capacity limits of subsequent equipment while maintaining the continuity of flow, avoiding abnormal waiting of semi-finished products, and guaranteeing the physical quality of the extracted materials.
[0278] For machine-assigned dimensions, traditional solution methods require solving for dimensions of... binary decision matrix Combinatorial optimization is performed. Rule 2 uses a comprehensive decision formula to directly identify the target machine for each material processing cycle, thus reducing the search space size for this dimension to 1. The processing time of parallel machines in the same process is also considered. Under the same conditions, this rule achieves its effect by minimizing cross-device transit time. Sequence-related cleaning time This eliminates non-value-added device downtime and switching delays. This local optimization strategy significantly reduces computational dimensionality while maintaining the high quality of the global scheduling scheme.
[0279] fitness value The fitness value, as mentioned in modeling, is the sole quantitative indicator for evaluating the quality of a scheduling scheme. Within the algorithm framework, it is the objective function value. It is mainly used in the following four core optimization stages: In the global evolution stage of the MA algorithm, it is used for tournament selection and optimal solution update; at the same time, the stagnation state of this value is used as a threshold condition to trigger the local search of LLM; in VND search, this value is also used to evaluate whether the neighborhood solution has been substantially improved.
[0280] Through this deterministic traversal mechanism, the decoder can quickly generate a feasible scheduling scheme that satisfies all process constraints and is conflict-free.
[0281] In a preferred embodiment of the present invention, such as Figure 6 As shown, a microstate-aware local search mechanism based on a Large Language Model (LLM) is proposed.
[0282] The method for extracting microscopic state information and the steps for constructing the state set are as follows:
[0283] Basic scheduling state set The structured reverse parsing extracts the complete scheduling scheme timetable generated after traversal decoding, and reverse extracts the processing metadata of each scheduled processing unit, constructing a structured tuple containing multi-dimensional time sequence and resource attributes. Each item represents the material batch number, the assigned physical equipment number, the absolute physical start time, the absolute physical completion time, the process index, the order number, and the corresponding product specification number, respectively. The tuples of all material batch units in the entire workshop are aggregated to construct a basic scheduling state set. ;
[0284] Based on sets Advanced workshop and order status set The feature matrix is used to extract the basic scheduling state set. This belongs to a specific order Material record subset The following rules are used to calculate and construct a set of workshop states that reflect the dynamic bottlenecks of the system. :
[0285] Equipment idle time Calculation: Filtering out the set The middle finger assigns physical equipment All material handling records, sorted by start time Sort in ascending order; define the sorted material sequence as... Through formula The cumulative idle time of the equipment is obtained by summing the absolute time difference between two adjacent processing tasks.
[0286] Process interval time Calculation for orders: Extract the current process from any batch of materials within the current process. start time And retrieve its upstream preceding process. Latest completion time of all related preceding material batches ; through formula The waiting time for all material shipments within an order is summarized as a metric for material timeliness and the risk of material delays.
[0287] Total cleaning time Calculation: Traverse the orders Each physical device assigned to a sub-process reads the product specification number of the preceding task processed on that device. If the product specification number of the preceding task is different from the product specification number of the current sub-process, the corresponding sequence-related cleaning time is read from the system's preset procedure switching matrix. And sum at the order level to obtain ;
[0288] Remaining time for delivery Calculation: Obtain the order Contractual delivery date and from subset The system identifies the latest completion time for all material deliveries in the order. ; through formula Calculate delivery headroom; a negative value indicates that the order has experienced physical delays. Direct extraction of queuing load and cost rates: Statistical subset. The total number of tuples in the queue is directly used as the number of times the order will be queued. ; Directly read the unit inventory holding cost rate corresponding to the order from the configuration data of the current production instance file. and the weight of unit delay penalty cost ;
[0289] Using LLM to generate order evaluation functions :
[0290] ,
[0291] in, For orders The Item index value, , For normalization or nonlinear transformation, Empirical weights are adaptively assigned to LLM based on problem characteristics.
[0292] Weight The generation method is as follows: construct a system containing the current objective function value. Structured prompts (prompts) for average equipment utilization rates at each stage and historical bottleneck characteristic patterns.
[0293] The specific numerical values of the feature indicators and the physical constraint rules are embedded in the prompt words and input into the LLM;
[0294] LLM's built-in inference mechanism adaptively outputs a floating-point vector with 7 weights based on the sensitivity contribution ratio of each indicator in the current scheduling state to the weighted total cost of early / late scheduling. And directly assign the vector to the evaluation function. middle.
[0295] A higher score indicates a more significant impact of the order on the performance of the current scheduling scheme, and its associated processes are more likely to become system bottlenecks. Compared to traditional manually designed heuristic rules, this evaluation function can simultaneously integrate multiple state information, improving the accuracy of key order identification.
[0296] Considering that the evaluation logic needs to be called frequently in the subsequent search process, this invention further requires the LLM to convert the generated results into standard Python function form to achieve automatic mapping from state information to search guidance information.
[0297] The microstate-aware local search mechanism based on LLM achieves intelligent identification and knowledge-driven optimization of system bottlenecks through scheduling state modeling, automatic generation of evaluation functions, and a two-layer verification closed loop.
[0298] In a preferred embodiment of the present invention, a two-layer verification mechanism combining syntax verification and performance verification is constructed, and the method for completing local adjustment and optimization is as follows:
[0299] Since the LLM generation results have a certain degree of randomness, in order to ensure that the evaluation function can be stably applied to the optimization process, this invention constructs a two-layer verification mechanism that combines syntax verification and performance verification.
[0300] Based on the syntax verification layer, the generated code is compiled and executed to check its syntax correctness and runtime integrity; if a syntax error or runtime exception occurs, the error message is fed back to LLM for regeneration until an executable function is obtained or the maximum number of iterations is reached;
[0301] After the order evaluation function passes syntax validation, it enters the performance validation phase. Once the order evaluation function passes syntax validation, it is embedded into the local search variable neighborhood descent (VND) process, and test iterations are performed on multiple representative historical Chinese medicine extraction instances. The total weighted cost optimization before and after the extraction test is measured. The search convergence algebra is used as a performance evaluation criterion.
[0302] A reflection and correction mechanism based on quantitative indicators: If the optimization magnitude does not reach the preset minimum decline threshold... Then, construct multi-dimensional performance feedback prompts; these prompts include: the key order number selected by the current order evaluation function, details of the actual deterioration of the target cost after applying the evaluation function (such as a surge in delay costs or an increase in equipment idle rate), and the expected direction of cost optimization; re-input these feedback prompts into the LLM to force it to reduce the corresponding feature weights that trigger negative optimization. Re-output the corrected order evaluation function;
[0303] When based on multidimensional performance feedback prompts consecutively If, after rounds of iterative optimization, the actual performance is still below the threshold... This will automatically block the LLM generation path and enable the underlying hard-coded backup order evaluation function. :
[0304] ,
[0305] After the order evaluation function is validated, it is embedded in the VND (Various Orbit Divergence) search framework to guide neighborhood selection. Five structured neighborhood operations are designed, and the search strategy follows the first-order improvement principle. The specific search and evaluation mechanism is as follows:
[0306] according to Blocking decoupling, The conflict is dispersed. : Delaying the deadline forward, LLM-guided insertion, The intervals are explored sequentially in reverse order. For each new candidate order sequence generated, the hierarchical decoder is immediately invoked to re-decode it and calculate the fitness. ;
[0307] The first one to be identified to improve fitness If a descending candidate sequence is found, the exhaustive search of the current neighborhood is immediately stopped, the sequence is accepted as the new current optimal solution, and the search process is forced to revert to the first neighborhood. Restart the iteration;
[0308] If all sequence adjustments in the current neighborhood fail to produce a lower-cost physical scheduling solution, then smoothly switch to the next neighborhood to continue exploring.
[0309] If and only if none of the five neighborhoods can further compress the fitness, then... When the local value is determined to be a local minimum, the current local search round is terminated.
[0310] If the LLM evaluation function fails the sandbox validation, then the neighborhood... The search for key orders degenerates into an exhaustive search for removing and recalculating costs, as shown in Table 2.
[0311] Table 2 Definition of Structured Orbit Change Neighborhood
[0312] Neighborhood Triggering conditions Operation method Blocking decoupling The largest Top-3 orders In the permutation, the target order is tried at all insertion positions in turn, and the first improvement is accepted. Conflict Dispersion Top 3 orders In the arrangement, swap the target order with the positions within three places before and after it, and accept the first improvement. : Shifting the deadline forward The three most negative orders In the permutation, try swapping the target order up to 5 steps forward, accepting the first improvement. LLM bootstrap insertion LLM rating Top 3 orders After retrieving the target order, try all insertion positions and accept the first improvement. : Interval Reversal General Reservation Operation Randomly select continuous intervals for reversal
[0313] The above-mentioned two-layer verification mechanism ensures that the final deployed evaluation function meets both the requirements of executability and optimization effectiveness, thereby improving the reliability of LLM knowledge in scheduling optimization scenarios.
[0314] In a preferred embodiment of the present invention, a collaborative optimization framework based on LLM-Assisted Memetic Algorithm with Micro-State Reasoning (LLM-MA) is constructed to perform a global evolutionary search. When the algorithm stagnates, a micro-state-aware local search mechanism is triggered to optimize the current optimal solution, and the optimized individual is returned to the global population until the maximum number of iterations is reached. Finally, the optimization result is output to the workshop control terminal. The specific steps are as follows:
[0315] Based on a hierarchical encoding and decoding mechanism, this algorithm introduces micro-state perception and knowledge-driven search mechanisms into the traditional meme algorithm framework, constructing a closed-loop feedback channel between macro-order sequences and micro-production states. The algorithm as a whole consists of three parts: a global evolution layer, a hierarchical decoding layer, and an LLM-guided optimization layer. Figure 5 As shown.
[0316] An initial population P is generated using a hybrid strategy with a preset population size. 30% of the individuals are generated using the critical ratio (CR) rule, which sorts individuals according to the urgency of order delivery to provide directional guidance for the initial population. The remaining 70% of the individuals are generated using a uniform random arrangement to ensure population diversity.
[0317] Physical feasibility verification and fitness assessment are performed on all individuals in population P. The specific process is as follows: A hierarchical decoder is invoked to sequentially verify and expand the one-dimensional order sequence of each individual using deterministic material transformation topology mapping rules (D-MTTM) and state-dependent earliest completion time equipment assignment rules (SD-ECT). The order sequence is then converted into a complete physical scheduling and control scheme, including precise equipment number allocation for extraction tanks and concentrators, single-feed loading capacity parameters, and the absolute time sequence of equipment start-up and completion. Subsequently, based on the actual operating time nodes of each device in this physical scheduling and control scheme, the actual completion time of each order batch is extracted, and the total weighted cost fitness is calculated in conjunction with delivery date constraints. ;
[0318] In the host computer's memory, the individual with the lowest cost in the current first-generation population is initialized and recorded as the globally optimal order sequence. and its corresponding minimum cost This serves as a global benchmark for subsequent evolutionary iterations;
[0319] Stasis counter stag count Initialize to 0 to monitor the stagnation of population evolution;
[0320] Calculate the dynamic mutation rate of the current generation: ,
[0321] When a population stagnates, the mutation rate gradually increases with the number of stagnant generations, up to a maximum of 0.6, thus enhancing population diversity.
[0322] Initialize the offspring population Q to an empty set;
[0323] The tournament selection method is adopted. Each time, k=2 individuals are randomly selected from the current population P, the fitness of the two individuals are compared, and the individual with lower cost is retained as parent 1. The operation is repeated to obtain parent 2.
[0324] With preset crossover probability Perform sequential crossover (OX1) on the two parent chromosomes; preset fixed values;
[0325] Randomly select a pair of cut points, copy the sub-fragments from parent generation 1 to the corresponding positions in the offspring, and then fill in the remaining loci according to the relative order of parent generation 2 to ensure that the generated offspring chromosomes are a valid order arrangement;
[0326] like Figure 7 As shown, the dynamic variation rate The mutation operation is performed on the two offspring respectively, including three sub-modes: exchange mutation (35% probability), insertion mutation (35% probability), and reverse mutation (30% probability), which are randomly selected by roulette.
[0327] Add the two generated offspring individuals to the offspring population Q;
[0328] The parent population P is merged with the offspring population Q. An elite retention strategy is adopted to select the best P individuals from the merged population as the new generation population. At the same time, a deduplication operation is performed to avoid the recurrence of the same individuals.
[0329] Calculate the minimum cost C_gen_best in the next generation population P. If C_gen_best < C best That is, the current optimal solution is better than the historical global optimal solution:
[0330] Update the global optimal cost C_best to C_gen_best;
[0331] Update the globally optimal order sequence π best For the corresponding individuals;
[0332] Stasis counter stag count Reset to 0;
[0333] Otherwise, the current optimal solution is not improved:
[0334] Stasis counter stag count Add 1;
[0335] Introducing stagnation detection and adaptive mechanisms: Let the number of consecutive no-improvement algebras be denoted as . ,like This triggers a micro-state-aware local search mechanism, while adaptively increasing the global mutation probability. The bottom 20% of individuals in the population were replaced with randomly arranged individuals; among them Basic mutation probability;
[0336] The algorithm iterates through evolutionary crossover, mutation, and LLM local search processes until it reaches the maximum number of iterations. The algorithm then terminates and outputs the final optimization result to the workshop control terminal for physical execution.
[0337] The eventually converged globally optimal order sequence Synchronization is mapped to the optimal equipment control queue at the bottom layer of the physical workshop, specifically:
[0338] The final converged global optimal order sequence is parsed into the absolute action sequence of the feed valves for specific extraction tanks and concentrators, the physical timing of heating and stirring, and the trigger nodes of the in-place cleaning (CIP) system. The equipment action timing table is then written into the execution register of the workshop distributed control system (DCS) or programmable logic controller (PLC) to drive the underlying hardware operation.
[0339] The minimum cost recorded at this point This means that, under the control of the queue, the additional physical operating losses in the workshop caused by material retention, idling, and cleaning are minimized.
[0340] In a preferred embodiment of the present invention, the final optimization result is output to the workshop control terminal to control the start-up, shutdown, and processing sequence of the extraction tanks and concentrators in the traditional Chinese medicine extraction workshop, as well as the flow of logistics equipment. The specific conversion of decision variables to control commands and the closed-loop execution process are as follows:
[0341] Device allocation, adaptive path selection, and status verification:
[0342] Analyzing equipment allocation decision variables Read the target processing equipment through the data gateway The system monitors the online readiness status and residual detection data of the previous cleaning process. After confirming readiness, it locks the material conveying path according to the workshop pipeline topology, issues control commands to the pneumatic reversing valves and fluid distribution matrix on the corresponding pipelines, and uses valve position sensors to confirm that the valves are in place, thereby realizing the conversion of equipment allocation variables into precise material routing.
[0343] Dynamic volume control and multi-stage overflow prevention closed-loop control:
[0344] Analyze the load capacity variable With material flow variables The command is issued to start the conveying pump, and the high-precision mass flow meter on the conveying pipeline is used to accumulate the volume of material flowing through in real time, and the accumulated value is compared with the target loading capacity. Real-time PID closed-loop comparison is performed; when the cumulative amount reaches the first preset threshold of the target loading amount, the control system automatically reduces the output power of the conveying pump by frequency conversion; when the cumulative amount reaches 100% of the target value, the feed valve is automatically cut off and the conveying pump is shut down; at the same time, the radar level gauge on the top of the target equipment is linked to the high level switch for safety interlocking, and the feed valve is forcibly closed once the high level threshold is triggered.
[0345] Precise timing triggering, process parameter control, and absolute time alignment:
[0346] Analyze the start time variable of the material. With completion time variable : Ensures alignment of the underlying controller and upper-layer algorithm on the absolute time axis through an industrial clock synchronization protocol; at absolute time The control system automatically triggers the opening of the steam inlet regulating valve and the start of the agitator motor for the corresponding equipment; using the tank temperature transmitter, the system officially activates the processing time once the physical temperature inside the tank reaches the preset process temperature. The countdown begins; when the time is up... When the command is issued, the steam inlet valve will be automatically closed and the discharge pump will be activated to discharge the material.
[0347] Product specification adaptive recognition and intelligent in-place cleaning (CIP) linkage:
[0348] The control system analyzes the processing sequence variables. When generating the processing queue for the current equipment, if it identifies that the batches of materials produced on the same equipment before and after belong to different Chinese herbal medicine varieties, it automatically inserts and activates the control chain of the in-situ cleaning system within the absolute time interval between the two processing instructions. It then issues instructions in sequence to control the cleaning water valve, acid and alkali solution valve, and return water pump, and monitors the quality of the discharged wastewater online through the pipeline conductivity sensor. Once the conductivity reaches the cleaning index and a cleaning completion signal is received, the feeding and processing of subsequent batches of materials are allowed.
[0349] The microstate-aware local search mechanism based on LLM achieves intelligent identification and knowledge-driven optimization of system bottlenecks through scheduling state modeling, automatic generation of evaluation functions, and a two-layer verification closed loop.
[0350] The global evolution layer is responsible for the wide-area exploration of the order sequence space, maintaining population diversity and continuously searching for potential high-quality areas through operations such as selection, crossover, and mutation; the hierarchical decoding layer maps the order sequence into a complete scheduling scheme that meets complex process constraints based on the hierarchical encoding and decoding mechanism, and generates micro-scheduling information that reflects the workshop operation status; the LLM-guided optimization layer uses the micro-state information generated during the scheduling process to construct a state representation, identifies key bottlenecks in the system through knowledge generation and knowledge application mechanisms, and further guides local searches to strengthen and optimize key areas.
[0351] Unlike traditional meme algorithms that primarily rely on fixed neighborhood rules for local development, LLM-MA introduces micro-state information into the search decision-making process, achieving a shift from "experience-driven search" to "state-aware search." In this framework, the global evolution layer is responsible for macroscopic exploration of the solution space, the hierarchical decoding layer is responsible for scheduling scheme generation and state feedback, and the LLM-guided optimization layer is responsible for state analysis, knowledge generation, and local reinforcement. These three layers together form a collaborative optimization mechanism of "global exploration—state awareness—local reinforcement," thereby improving the solution quality and search efficiency of complex hierarchical scheduling problems.
[0352] To verify the effectiveness of LLM-MA, 12 different test scales were designed based on combinations of three dimensions: number of products, number of batches, and number of machines. These scales considered different machine combinations under different product and batch combinations, making the test data more comprehensive and universal. Each test scale was run independently 10 times, and the mean objective function value, standard deviation, and coefficient of variation were calculated. The results for the 12 test scales are shown in Table 3.
[0353] Table 3. 12 Test Scales and Calculation Results
[0354] Size type Scale details (product / batch / material quantity_machine) P G single run time / s Number of runs Average objective function value Standard deviation Coefficient of variation (CV) / % Small 3 / 36 / 653_21 machine 30 100 37 10 93861.84 0 0 Small 4 / 45 / 686_21 machine 30 100 43 10 128597.2 0 0 Small 4 / 47 / 815_21 machine 40 120 77 10 176692.3 3652.98 2.07 Small Machine 6 / 62 / 1646_21 40 120 158 10 261128.3 8248.65 3.16 middle 6 / 81 / 2318_21 machine 50 150 343 10 278676.5 2977.7 1.07 middle 8 / 75 / 1967_21 machine 50 150 278 10 367842.7 18100.24 4.92 middle Machine 8 / 109 / 2604_21 60 200 555 10 531062.7 47602.58 8.96 middle Machine 8 / 112 / 1787_34 60 200 438 10 225793.2 12303.92 5.45 big 10 / 131 / 2033_34 machine 70 250 708 10 369464.5 5299.11 1.43 big 10 / 141 / 3116_34 machine 70 250 1042 10 407454.8 20100.47 4.93 big 10 / 185 / 4832_34 machine 80 300 2232 10 687835.9 18793.8 2.73 big 12 / 218 / 4811_34 machine 100 300 5800 10 767086.4 45637.61 5.95
[0355] As shown in Table 3, LLM-MA performed stably across all 12 test scales. At small scales (1-4), LLM-MA achieved optimal solutions within 36.6–158.2 seconds with extremely low coefficients of variation (0%–3.2%), indicating stable convergence. At medium scales (5-8), the solution time ranged from 277.8 to 555.2 seconds, with coefficients of variation from 1.1% to 9.0%, showing a slight increase in solution quality fluctuations as the scale increased. At the largest scale, s12 (12 / 218 / 4811_34 machines), the average objective function value was 767086.44, with a coefficient of variation of 5.9%, maintaining good stability. Overall, the solution time of LLM-MA increased approximately linearly with the number of batches and materials, indicating good scalability and the ability to effectively handle large-scale production scheduling problems.
[0356] This invention also provides a hybrid intelligent control system for complex hierarchical scheduling in traditional Chinese medicine extraction workshops, comprising:
[0357] Data acquisition and sensing module: used to acquire real-time operating status of equipment in the Chinese medicine extraction workshop, equipment capacity constraints, and order demand information;
[0358] Intelligent scheduling and computation module: executes the method described in this invention to generate an optimal equipment scheduling scheme containing multidimensional decision variables based on the meme algorithm of LLM-assisted microstate reasoning;
[0359] Command parsing and physical mapping module: converts the multidimensional decision variables into underlying industrial protocol commands;
[0360] Equipment execution module: includes actuators and sensors distributed on the extraction tank and concentrator pipelines, used to receive the industrial protocol commands and execute the opening and closing of corresponding pneumatic valves, the start and stop of pumps, and CIP cleaning actions.
[0361] The specific embodiments described herein are merely illustrative examples of the present invention. Those skilled in the art can make various modifications or additions to the described embodiments or use similar methods to substitute them, without departing from the technology of the present invention or exceeding the scope defined by the appended claims.
[0362] Furthermore, the selection of materials and strength limitations for all components in this application can be made and arranged by those skilled in the art based on the site environment and the requirements of relevant national or industry standards, and are not within the scope of protection of this application. Therefore, this application will not elaborate on these points.
Claims
1. A hybrid intelligent control method for complex hierarchical scheduling in traditional Chinese medicine extraction workshops, characterized in that, Includes the following steps: In view of the multi-level production characteristics of the Chinese medicine extraction workshop, the extraction tanks, concentrators and logistics equipment in the Chinese medicine extraction workshop are taken as the controlled objects. A mathematical model of flexible job shop scheduling (FJSP-CDHP) with capacity constraint hierarchy is constructed for products, batches and material batches. The optimization objective is to minimize the weighted total cost of advance / delay for all batches. Based on the process rules of the Chinese medicine extraction workshop, we propose a deterministic material transformation topology mapping rule (D-MTTM) and a state-dependent earliest completion time equipment assignment rule (SD-ECT), and construct a hierarchical encoding and decoding mechanism to map high-order product order sequences into feasible scheduling schemes that satisfy all constraints. Based on the micro-state-aware local search mechanism of the Large Language Model (LLM), an order evaluation function is generated, and a two-layer verification mechanism combining syntax verification and performance verification is constructed to complete local adjustment and optimization. A collaborative optimization framework based on LLM-assisted microstate reasoning (LLM-MA) is constructed to perform global evolutionary search. When the algorithm stagnates, a microstate-aware local search mechanism is triggered to optimize the current optimal solution and return the optimized individual to the global population until the maximum number of iterations is reached. The final optimization result is then output to the workshop control terminal to control the start-up and shutdown of extraction tanks and concentrators, the processing sequence, and the flow of logistics equipment in the traditional Chinese medicine extraction workshop.
2. The hybrid intelligent control method for complex hierarchical scheduling in traditional Chinese medicine extraction workshops according to claim 1, characterized in that, For the multi-level production characteristics of traditional Chinese medicine extraction workshops, including products, batches, and material batches, a mathematical model of flexible job shop scheduling (FJSP-CDHP) with capacity-constrained hierarchical division is constructed. The optimization method with minimizing the weighted total cost of advance / delay for all batches is as follows: According to Good Manufacturing Practices and Standard Processes for Pharmaceuticals Total demand Divided into Each production batch is independent: ; Limited by the physical capacity of equipment at each stage The differences mean that the material flow within a single batch in each process is modeled as a capacity-constrained problem of disassembled and boxed materials: for batches Specific processes Based on the total quantity of materials in the batch With respect to the equipment capacity of this process Construct a set of processing materials ; Processing material collection All output materials from each batch are considered as input sources, and are grouped and merged into subsequent sets. That is, in each batch of materials that are considered as "boxes", the loading amount of a single batch is prohibited from exceeding the upper limit of the equipment capacity; Scheduling decisions need to be coupled with transportation time determined by the physical location of the equipment. And the sequential cleaning time required to prevent cross-contamination when switching between processing different products. ; By jointly deciding on batch division, machine allocation, material packing and circulation, and work sequencing, delivery time is balanced. Under constraints, minimize the sum of inventory holding costs and late payment penalty costs for all batches: , , , , in, This indicates the optimization objective, which is to minimize the total weighted cost of order batches being ahead of or behind schedule; For product quantity, Indicates product index, Indicates batch index; Each product Inventory holding cost rate and delinquency penalty cost rate; For batch The advance time, For batch The delay time, For batch Overall completion time For products The number of processes, For material index, Indicates batch The final process The collection of materials, Indicates batch The final process material The completion time.
3. The hybrid intelligent control method for complex hierarchical scheduling in traditional Chinese medicine extraction workshops according to claim 2, characterized in that, It also includes constraints, namely: Define the actual material requirements for each process after taking into account the volume change factor: , in, Indicates batch In the process The total amount of material to be processed; This is the coefficient of volume change; Determine the base number of material batches that must be broken down for each process based on the physical capacity of the equipment: , in, The quantity of materials split into batches indicates the number of batches. In the process How many batches will it be divided into? For machine indexing, For products In the process A collection of processable equipment, For products The process route and steps. For product collection, ; Ensure that the total amount of material in each batch of each process is completely allocated to each processing session of that process: , in, For the second time Load capacity; The loading volume of a single batch of materials must not exceed the physical capacity of the selected equipment. , in, For the stage A collection of parallel devices, For the stage The number of devices, Indicates if the next time Distributed to equipment If the value is 1, then the value is 1; otherwise, the value is 0. For products In the process A collection of processable equipment; Establish material flow balance between processes based on the law of conservation of mass: , , in, To indicate from the preceding process material Flow into subsequent processes material The quantity of materials, All are material batch indexes; The logical connection state is established only when there is a physical transfer between materials: , in, For sufficiently large positive numbers, This indicates that if we consider the preceding sequence... To the next material sequence There is material flow (i.e.) ),but ;otherwise ; Ensure that each batch of materials can be processed by only one machine in its corresponding process: , Constrain the processing order of different tasks on the same device and include the sequence-related cleaning time: , , in, For the second time The start time, For the same device from the product Switch to product The set time, if ,but ; For product indexing, For batch indexing, For products Process index, For material index, This indicates that if on the same equipment, the material... Prior to If processing is required, the value is 1; otherwise, it is 0. For the second time The start time; Indicates if the next time Distributed to equipment If it is 1, then it is 1; otherwise it is 0. For the second time The completion time, For the second time Completion time; The completion time of a batch is defined as the sum of the start time and the dynamic processing time: , in, For products In the stage Processing time for each batch of materials; Ensure that the start time of subsequent material runs is no earlier than the completion time of any preceding material runs related to it: , in, For equipment To the equipment The delivery time; Define the value range and attribute constraints of various decision variables in the model: , 。 4. The hybrid intelligent control method for complex hierarchical scheduling in traditional Chinese medicine extraction workshops according to claim 1, characterized in that, The deterministic material transformation topology mapping rule (D-MTTM) is as follows: Define the same batch in the process The preceding set of materials is In the process The set of subsequent material orders is , For capacity range index; Using proportional scaling logic, the first in the preceding set Each item is projected into the subsequent set. Within each capacity range, its unique subsequent material order number By mapping function Decide: , in, All are material batch indexes. The quantity of materials split into batches indicates the number of batches. In the process How many batches will it be divided into? Process Each subsequent material All obtained the preceding material supply set : 。 5. The hybrid intelligent control method for complex hierarchical scheduling in traditional Chinese medicine extraction workshops according to claim 4, characterized in that, The state-dependent earliest completion time (SD-ECT) device assignment rule is as follows: For the process Subsequent materials to be processed Its optional set of parallel machines is Calculate the earliest estimated completion time for this batch of material on each candidate machine, and select the machine with the shortest completion time. Processing: , Among them, the internal The function determines the arrival of all preceding materials at the machine. Logistics readiness time; external The function determines the ready time and the machine availability time. Determine the actual start time of each batch of materials; Indicates machine index; For products In the stage Processing time for each batch of materials; This refers to the moment when the candidate machine has no predetermined task and is in a processable state. For the preceding material sequence The completion time, For the preceding equipment To the current candidate device The delivery time For equipment In processing products Sequence-related cleaning time generated during subsequent product switching; The machine with the earliest completion time was ultimately selected. As a subsequent material Processing machines.
6. The hybrid intelligent control method for complex hierarchical scheduling in traditional Chinese medicine extraction workshops according to claim 5, characterized in that, The hierarchical encoding and decoding mechanism includes one-dimensional order priority encoding and rule-driven hierarchical expansion decoding. The specific steps are as follows: The one-dimensional order priority code is specifically as follows: Obtain a set of multi-process product orders awaiting production scheduling, and map them into a one-dimensional product order index sequence according to order scheduling priority. Construct a single-layer chromosome structure as the outer evolutionary search carrier. ,in Indicates the first A scheduled order index; in the coding structure, all production batches under the same product order and the processing material sub-items split within each production batch are implicitly bound to their respective order index gene positions, without setting independent discrete sorting gene positions for batches and material sub-items in the chromosome; The rule-driven hierarchical expansion decoding is specifically as follows: All batches under the same order, and each processing batch within a batch, are sequentially processed according to their natural numbers in ascending order; this forms a one-dimensional order sequence chromosome. The mapping is to the specific physical device resource allocation result, and the specific decoding steps are as follows: S1, initialize the available time of all machines to 0, clear the historical processing records of all machines, and use them as the basis for subsequent calculation of cleaning time; S2, according to chromosomes The gene sequence is used to read the orders one by one. Based on the fixed logic of ascending natural numbering, the read orders are expanded into batch queues and material queues, thus establishing the processing order of all micro-tasks. S3, extract the subsequent material orders to be scheduled from the queue. The deterministic material transformation topology mapping rule (D-MTTM) is invoked, and the subsequent material order is calculated using a proportionally scaled mapping function. Unique set of preceding material supplies Based on the completion time of each preceding material in the preceding material supply set and the inter-equipment transportation time, calculate the subsequent material supply. Physical readiness time; S4, invoke the state-dependent earliest completion time (SD-ECT) equipment assignment rule, traverse the set of processable equipment for the current process, and comprehensively evaluate the subsequent material batches. By considering the physical readiness time and the real-time idle time of each candidate device, the earliest estimated completion time of each machine is calculated, and the optimal machine with the shortest completion time is selected. ; S5, Repeat steps S2-S4 until all items in the queue have been traversed, output the complete solution containing all scheduling details, and calculate the total cost fitness value of the solution: ,in, Each product Inventory holding cost rate and delinquency penalty cost rate; , These represent the lead time and delay time for all order batches.
7. The hybrid intelligent control method for complex hierarchical scheduling in traditional Chinese medicine extraction workshops according to claim 1, characterized in that, A micro-state-aware local search mechanism based on Large Language Model (LLM) is proposed. The method for extracting micro-state information and the steps for constructing the state set are as follows: Basic scheduling state set The structured reverse parsing extracts the complete scheduling scheme timetable generated after traversal decoding, and reverse extracts the processing metadata of each scheduled processing unit, constructing a structured tuple containing multi-dimensional time sequence and resource attributes. Each item represents the material batch number, the assigned physical equipment number, the absolute physical start time, the absolute physical completion time, the process index, the order number, and the corresponding product specification number, respectively. The tuples of all material batch units in the entire workshop are aggregated to construct a basic scheduling state set. ; Based on sets Advanced workshop and order status set The feature matrix is used to extract the basic scheduling state set. This belongs to a specific order Material record subset The following rules are used to calculate and construct a set of workshop states that reflect the dynamic bottlenecks of the system. : Filter out the set The middle finger assigns physical equipment All material handling records, sorted by start time Sort in ascending order; define the sorted material sequence as... The idle time of the equipment is determined by the formula. The cumulative idle time of the equipment is obtained by summing the absolute time difference between two adjacent processing tasks. For orders Extract the current process from any batch of materials within the current process. start time And retrieve its upstream preceding process. Latest completion time of all related preceding material batches ; the time interval between processes is determined by the formula. The waiting time for all material shipments within an order is summarized as a metric for material timeliness and the risk of material delays. Traverse orders Each physical device assigned to a sub-process reads the product specification number of the preceding task processed on that device. If the product specification number of the preceding task is different from the product specification number of the current sub-process, the corresponding sequence-related cleaning time is read from the system's preset procedure switching matrix. The cumulative cleaning time is obtained by summing and accumulating the results at the order level. ; Obtain the order Contractual delivery date and from subset The system identifies the latest completion time for all material deliveries in the order. ; remaining delivery time according to the formula Calculate delivery headroom; a negative value indicates that the order has experienced physical delays. Direct extraction of queuing load and cost rates: Statistical subset. The total number of tuples in the queue is directly used as the number of times the order will be queued. Read the unit inventory holding cost rate corresponding to the order directly from the configuration data of the current production instance file. and the weight of unit delay penalty cost ; Using LLM to generate order evaluation functions : , in, For orders The Item index value, , For normalization or nonlinear transformation, Empirical weights are adaptively assigned to LLM based on problem characteristics.
8. The hybrid intelligent control method for complex hierarchical scheduling in traditional Chinese medicine extraction workshops according to claim 7, characterized in that, The following method is used to construct a two-layer verification mechanism that combines syntax verification and performance verification, and to complete local adjustments and optimizations: Based on the syntax verification layer, the generated code is compiled and executed to check its syntax correctness and runtime integrity; if a syntax error or runtime exception occurs, the error message is fed back to LLM for regeneration until an executable function is obtained or the maximum number of iterations is reached; After the order evaluation function passes syntax validation, it enters the performance validation phase. Once the order evaluation function passes syntax validation, it is embedded into the local search variable neighborhood descent (VND) process, and test iterations are performed on multiple representative historical Chinese medicine extraction instances. The total weighted cost optimization before and after the extraction test is measured. The search convergence algebra is used as a performance evaluation criterion. A reflection and correction mechanism based on quantitative indicators: If the optimization magnitude does not reach the preset minimum decline threshold... Then construct multi-dimensional performance feedback prompts; Multidimensional performance feedback prompts include: the key order number selected by the current order evaluation function, details of the actual deterioration in target costs after applying the order evaluation function (such as a surge in delay costs or an increase in equipment idle rate), and the expected direction for cost optimization; these feedback prompts are then re-inputted into the LLM to force it to reduce the weights of the corresponding features that trigger negative optimization. Re-output the corrected order evaluation function; When based on multidimensional performance feedback prompts consecutively If, after rounds of iterative optimization, the actual performance is still below the threshold... This will automatically block the LLM generation path and enable the underlying hard-coded backup order evaluation function. : , After the order evaluation function is validated, it is embedded in the VND (Various Orbit Divergence) search framework to guide neighborhood selection. Five structured neighborhood operations are designed, and the search strategy follows the first-order improvement principle. The specific search and evaluation mechanism is as follows: according to Blocking decoupling, The conflict is dispersed. : Delaying the deadline forward, LLM-guided insertion, The intervals are explored sequentially in reverse order. For each new candidate order sequence generated, the hierarchical decoder is immediately invoked to re-decode it and calculate the fitness. ; The first one to be identified to improve fitness If a descending candidate sequence is found, the exhaustive search of the current neighborhood is immediately stopped, the sequence is accepted as the new current optimal solution, and the search process is forced to revert to the first neighborhood. Restart the iteration; If all sequence adjustments in the current neighborhood fail to produce a lower-cost physical scheduling solution, then smoothly switch to the next neighborhood to continue exploring. If and only if none of the five neighborhoods can further compress the fitness, then... When the local value is determined to be a local minimum, the current local search round is terminated. If the LLM evaluation function fails the sandbox validation, then the neighborhood... This degenerates into an exhaustive search for key orders that remove recalculation costs.
9. The hybrid intelligent control method for complex hierarchical scheduling in traditional Chinese medicine extraction workshops according to claim 1, characterized in that, A collaborative optimization framework based on LLM-assisted microstate reasoning (LLM-MA) is constructed to perform global evolutionary search. When the algorithm stagnates, a microstate-aware local search mechanism is triggered to optimize the current optimal solution, and the optimized individual is returned to the global population until the maximum number of iterations is reached. Finally, the optimization result is output to the workshop control terminal. The specific steps are as follows: An initial population P is generated using a hybrid strategy with a preset population size. 30% of the individuals are generated using the critical ratio (CR) rule, which sorts individuals according to the urgency of order delivery to provide directional guidance for the initial population. The remaining 70% of the individuals are generated using a uniform random arrangement to ensure population diversity. Physical feasibility verification and fitness assessment were performed on all individuals in population P. The specific process was as follows: The hierarchical decoder is invoked to perform physical constraint verification and expansion on the individual one-dimensional order sequence through the deterministic material transformation topology mapping rule (D-MTTM) and the state-dependent earliest completion time equipment assignment rule (SD-ECT). The order sequence is converted into a complete physical scheduling and control scheme that includes precise equipment number allocation for extraction tanks and concentrators, single feed loading capacity parameters, and absolute time sequence of equipment start-up and completion. Based on the actual operating time nodes of each device in the physical scheduling and control scheme, the actual completion time of each order batch is extracted, and the total weighted cost fitness is calculated in combination with the delivery date constraint. ; In the host computer's memory, the individual with the lowest cost in the current first-generation population is initialized and recorded as the globally optimal order sequence. and its corresponding minimum cost This serves as a global benchmark for subsequent evolutionary iterations; Stasis counter stag count Initialize to 0 to monitor the stagnation of population evolution; Calculate the dynamic mutation rate of the current generation: , When a population stagnates, the mutation rate gradually increases with the number of stagnant generations, up to a maximum of 0.6, thus enhancing population diversity. Initialize the offspring population Q to an empty set; The tournament selection method is adopted. Each time, k=2 individuals are randomly selected from the current population P, the fitness of the two individuals are compared, and the individual with lower cost is retained as parent 1. The operation is repeated to obtain parent 2. With preset crossover probability Perform sequential crossover (OX1) on the two parent chromosomes; preset fixed values; Randomly select a pair of cut points, copy the child fragments from parent generation 1 to the corresponding positions in the offspring, and then fill in the remaining loci according to the relative order of parent generation 2 to ensure that the generated offspring chromosomes are a valid order arrangement; With dynamic variation rate The mutation operation is performed on the two offspring respectively, including three sub-modes: exchange mutation (35% probability), insertion mutation (35% probability), and reverse mutation (30% probability), which are randomly selected by roulette. Add the two generated offspring individuals to the offspring population Q; The parent population P is merged with the offspring population Q. An elite retention strategy is adopted to select the best P individuals from the merged population as the new generation population. At the same time, a deduplication operation is performed to avoid the recurrence of the same individuals. Calculate the minimum cost C_gen_best in the next generation population P. If C_gen_best < C best That is, the current optimal solution is better than the historical global optimal solution: Update the global optimal cost C_best to C_gen_best; Update the globally optimal order sequence π best For the corresponding individuals; Stasis counter stag count Reset to 0; Otherwise, the current optimal solution is not improved: Stasis counter stag count Add 1; Introducing stagnation detection and adaptive mechanisms: Let the number of consecutive no-improvement algebras be denoted as . ,like This triggers a micro-state-aware local search mechanism, while adaptively increasing the global mutation probability. The bottom 20% of individuals in the population were replaced with randomly arranged individuals; among them Basic mutation probability; The algorithm iterates through evolutionary crossover, mutation, and LLM local search processes until it reaches the maximum number of iterations. The algorithm then terminates and outputs the final optimization result to the workshop control terminal for physical execution. The eventually converged globally optimal order sequence Synchronization is mapped to the optimal equipment control queue at the bottom layer of the physical workshop, specifically as follows: The final converged global optimal order sequence is parsed into the absolute action sequence of the feed valves for specific extraction tanks and concentrators, the physical timing sequence of heating and stirring, and the trigger nodes of the in-place cleaning (CIP) system. The equipment action timing table is then written into the execution register of the workshop distributed control system (DCS) or programmable logic controller (PLC) to drive the underlying hardware operation. The minimum cost recorded at this point This means that, under the control of the queue, the additional physical operating losses in the workshop caused by material retention, idling, and cleaning are minimized.
10. The hybrid intelligent control method for complex hierarchical scheduling in traditional Chinese medicine extraction workshops according to claim 9, characterized in that, The final optimization results are output to the workshop control terminal to control the start-up, shutdown, and processing sequence of extraction tanks and concentrators in the traditional Chinese medicine extraction workshop, as well as the flow of logistics equipment. The specific conversion of decision variables into control commands and the closed-loop execution process are as follows: Device allocation, adaptive path selection, and status verification: Analyzing equipment allocation decision variables Read the target processing equipment through the data gateway The system monitors the online readiness status and residual detection data of the previous cleaning process. After confirming readiness, it locks the material conveying path according to the workshop pipeline topology, issues control commands to the pneumatic reversing valves and fluid distribution matrix on the corresponding pipelines, and uses valve position sensors to confirm that the valves are in place, thereby realizing the conversion of equipment allocation variables into precise material routing. Dynamic volume control and multi-stage overflow prevention closed-loop control: Analyze the load capacity variable With material flow variables The command is issued to start the conveying pump, and the high-precision mass flow meter on the conveying pipeline is used to accumulate the volume of material flowing through in real time, and the accumulated value is compared with the target loading capacity. Real-time PID closed-loop comparison is performed; when the cumulative amount reaches the first preset threshold of the target loading amount, the control system automatically reduces the output power of the conveying pump by frequency conversion; when the cumulative amount reaches 100% of the target value, the feed valve is automatically cut off and the conveying pump is shut down; at the same time, the radar level gauge on the top of the target equipment is linked to the high level switch for safety interlocking, and the feed valve is forcibly closed once the high level threshold is triggered. Timing triggering, process parameter control, and absolute time alignment: Analyze the start time variable of the material. With completion time variable : Ensures alignment of the underlying controller and upper-layer algorithm on the absolute time axis through an industrial clock synchronization protocol; at absolute time The control system automatically triggers the opening of the steam inlet regulating valve and the start of the agitator motor for the corresponding equipment; using the tank temperature transmitter, the system officially activates the processing time once the physical temperature inside the tank reaches the preset process temperature. The countdown begins; when the time is up... When the command is issued, the steam inlet valve will be automatically closed and the discharge pump will be activated to discharge the material. Product specification adaptive recognition and intelligent in-place cleaning (CIP) linkage: When the control system generates the processing queue for the current equipment, if it identifies that the batches of materials produced on the same equipment before and after belong to different Chinese medicine varieties, it will automatically insert and activate the control chain of the in-situ cleaning system within the absolute time interval between the two processing instructions. It will issue instructions in sequence to control the cleaning water valve, acid and alkali valve and return water pump, and monitor the quality of the discharged water online through the pipeline conductivity sensor. After the conductivity reaches the cleaning index and the cleaning completion signal is received, the feeding and processing of subsequent batches of materials are allowed.
11. A hybrid intelligent control system for complex hierarchical scheduling in traditional Chinese medicine extraction workshops, characterized in that, include: The data acquisition and sensing module is used to obtain real-time operating status, equipment capacity constraints, and order demand information of the equipment in the traditional Chinese medicine extraction workshop. The intelligent scheduling and computing module executes the method described in any one of claims 1-10 to generate an optimal equipment scheduling scheme containing multi-dimensional decision variables based on the meme algorithm of LLM-assisted microstate reasoning. The instruction parsing and physical mapping module converts the multidimensional decision variables into underlying industrial protocol instructions; The equipment execution module includes actuators and sensors distributed on the extraction tank and concentrator pipelines, used to receive the industrial protocol commands and execute the opening and closing of corresponding pneumatic valves, the start and stop of pumps, and CIP cleaning actions.