Intelligent order distribution and production line distribution method and system for fresh stewed bird's nest C2M order
Patent Information
- Application Number
- CN202611247459.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-18
- Publication Date
- 2026-09-22
AI Technical Summary
[0007]为了解决现有技术中的上述问题,即现有排产方式难以协同考虑订单交付时限、泡发物料有效期、产线容量及口味清洗时长,导致排产方案可执行性不足的问题
本发明通过根据订单交付要求、泡发物料批次有效截止时刻、产线状态和口味清洗时长表形成各订单在各产线上的有效生产时段,使订单的可排产时间范围同时受到交付时间、泡发物料有效期和产线初始清洗时间的约束。相比仅依据订单交付时间进行排产的方式,该处理能够在候选批次生成前剔除不满足物料时效或产线时间条件的订单、泡发物料批次和产线组合,减少后续生成不可执行排产结果的情况。
Smart Images

Figure CN122798104A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of food processing scheduling and intelligent manufacturing technology, specifically involving an intelligent order splitting and production line allocation method and system for fresh stewed bird's nest C2M orders. Background Technology
[0002] Freshly stewed bird's nest is typically produced to order and delivered under refrigerated conditions. The finished product has a short shelf life, making it unsuitable for manufacturers to maintain large inventories. In actual production, orders are characterized by small batches, multiple flavors, and significant variations in delivery times. Furthermore, bird's nest raw materials usually undergo pre-processing steps such as soaking, feather removal, cleaning, weighing, and bottling before stewing. The soaked material has a limited effective usage period; using it beyond this deadline can easily affect product quality. Therefore, when scheduling the production of freshly stewed bird's nest, it is necessary to consider not only order delivery times but also the effective deadline and remaining usable quantity of each batch of soaked material.
[0003] Existing order splitting and production line allocation methods typically involve first merging orders based on flavor, delivery time, or product quantity, and then allocating the merged batches to idle production lines. While this approach can reduce capacity waste caused by independent scheduling of individual orders to some extent, it usually treats order merging and production line allocation as two relatively independent stages. It is difficult to simultaneously consider the coupling relationship between the shelf life of the foaming materials, the current flavor of the production line, the cleaning time for flavor switching, and the production line capacity during the batch merging stage.
[0004] In the production of freshly stewed bird's nest, a single production line typically processes only one flavor of product at a time. When switching from one flavor to another, the pipelines, hoppers, and stewing-related components need to be cleaned and disinfected. The cleaning time may differ between flavors, and the cleaning time required to switch from one flavor to another may also differ from the cleaning time required to switch from the second flavor to the first. If the production scheduling only considers whether the production line is idle, without taking into account the cleaning time between consecutive candidate batches, the completion time and cleaning time of the previous batch will delay the start time of the next batch, potentially causing the soaking material required for the next batch to exceed the effective deadline.
[0005] Furthermore, multiple candidate batches may compete for the same batch of foaming material simultaneously. If the material quantity is only checked during the final production execution stage, it is easy for the same batch of foaming material to be repeatedly used by multiple batches or for the cumulative usage to exceed the available quantity. For dynamic events such as new order insertions, production line failures, foaming materials nearing their expiration date, or production execution feedback, traditional static scheduling methods also find it difficult to make rolling adjustments to orders that have not yet started processing while retaining batches that have already started processing.
[0006] Therefore, it is necessary to provide an intelligent order splitting and production line allocation method and system for fresh stewed bird's nest C2M orders, so that it can simultaneously consider constraints such as order delivery requirements, effective deadline of soaking material batches, current production line status, flavor cleaning time and material availability during order merging and production line allocation, so as to reduce the generation of unexecutable production scheduling plans. Summary of the Invention
[0007] To address the aforementioned problems in existing technologies—namely, the difficulty in comprehensively considering order delivery deadlines, the shelf life of soaking materials, production line capacity, and flavor-specific cleaning times, leading to insufficient feasibility of production scheduling schemes—this invention provides an intelligent order allocation and production line distribution method and system for fresh-stewed bird's nest C2M orders.
[0008] The first aspect of this invention proposes an intelligent order splitting and production line allocation method for fresh stewed bird's nest C2M orders, comprising:
[0009] Get the order, soaking material batch, production line status and flavor cleaning time table; based on the latest completion time of the order, the effective end time of the soaking material batch, the stewing processing time, the available time of the production line and the flavor cleaning time, form the effective production time of each order on each production line, and delete the combination where the lower boundary of the interval is later than the upper boundary of the interval. Orders with the same type and flavor of bird's nest, whose total quantity does not exceed the production line capacity, and whose effective production time intervals on the same production line are not empty are merged into candidate batches. The intersection of the effective production time intervals is recorded as the feasible start interval of the candidate batch on each production line. Candidate batches and soaking material batches are combined into state nodes. Directed edges are established based on the flavor washing time between state nodes, the feasible start interval of candidate batches, and the effective cutoff time of soaking material batches to form a production line state transition diagram. Under the constraints that each order with candidate batches is covered by only one selected candidate batch and the cumulative usage of the same foaming material batch does not exceed the available quantity, the candidate batch sequence, start time and foaming material batch used for each production line are output based on the production line state transition diagram.
[0010] Furthermore, the effective production periods for each order on each production line include: Read the latest completion time from the order delivery requirements or shipping requirements, and subtract the stewing and cooking time to get the latest start time for delivery; Subtract the cooking time from the effective cut-off time of the batch of soaked materials to obtain the latest start time of the materials. The earlier of the latest start time for delivery and the latest start time for materials shall be taken as the overall latest start time. The sum of the available time of the production line and the flavor cleaning time is taken as the earliest start time of the production line. The earliest start time of the production line is used as the lower limit of the interval, and the latest start time is used as the upper limit of the interval to form an effective production period. When an order has multiple available foaming material batches, the effective production time period for each foaming material batch is calculated on each production line. Combinations where the lower bound of the interval is later than the upper bound of the interval are deleted. The foaming material batch used in the effective production time period with the longest interval length on each production line is selected as the foaming material batch to participate in the generation of candidate batches.
[0011] Furthermore, the method for determining the earliest start time of the production line includes: Read the production line availability time and current flavor from the production line status; read the order flavor from the order. Find the flavor cleaning time in the flavor cleaning time table when the production line switches from the current flavor to the order flavor, add the available time of the production line to the flavor cleaning time to get the earliest start time of the production line; If the earliest start time of the production line is later than the latest start time of the overall process, delete the combination of the order, the batch of foaming material, and the production line. When the earliest start time of the production line is no later than the latest start time of the overall time, the earliest start time of the production line is used as the lower limit of the interval and the latest start time of the overall time is used as the upper limit of the interval to form an effective production period.
[0012] Furthermore, the process of merging orders into candidate batches includes: Orders are grouped according to type and flavor of bird's nest, and subsets of orders are enumerated within the same group; For each order subset, calculate the intersection of the effective production periods of the order subset on the same production line, and sum the product quantities of the order subset; When the sum of the product quantities does not exceed the production line capacity and the intersection of the effective production time periods is not empty, a candidate batch is generated, and the intersection of the effective production time periods is taken as the feasible starting interval of the candidate batch on the same production line. When the sum of the product quantities exceeds the production line capacity or the intersection of effective production periods is empty, no candidate batches of order subsets and production line combinations will be generated.
[0013] Furthermore, combining the candidate batch and the foaming material batch into a state node includes: Match the types of bird's nest in the candidate batch with the types of bird's nest in the soaking material batch, and read the product quantity of the candidate batch and the available quantity of the soaking material batch. A state node is generated when the types of bird's nest are consistent, the quantity of products does not exceed the available quantity, and there is an optional start time in the feasible start interval of the candidate batch, and the sum of the optional start time and the stewing processing time is not later than the effective end time of the soaked material batch. If the types of bird's nest are inconsistent, the quantity of products exceeds the available quantity, or there is no optional start time that meets the time conditions in the feasible start interval of the candidate batch, a state node for the combination of candidate batch and soaking material batch will not be generated.
[0014] Furthermore, the formation of the production line state transition diagram includes: The initial state of the production line is used as the source node, the available time of the production line is used as the completion time of the source node, and the current flavor of the production line is recorded. The combination of candidate batch and foaming material batch is used as the state node; For the previous state node and the next state node, read the flavor cleaning time according to the production line flavor of the previous state node and the candidate batch flavor of the next state node. Take the later of the sum of the completion time of the previous state node and the flavor cleaning time and the lower bound of the feasible start interval of the next state node as the start time of the next state node, and take the sum of the start time and the stewing processing time as the completion time. A directed edge is established when the start time is no later than the upper bound of the feasible start interval and the completion time is no later than the effective cutoff time of the foamed material batch. Edge weights are formed based on the flavor cleaning time and the difference between the upper bound of the feasible start interval and the start time, and the feasible state transition path with the smallest sum of edge weights is selected.
[0015] Furthermore, the output of the candidate batch sequence, start time, and batch of foaming material used for each production line based on the production line state transition diagram includes: Select candidate batches and assign production lines in the main problem; In the subproblem, check the production line state transition diagram along the assigned production line to see if the selected candidate batches have a processing sequence that satisfies the feasible start interval, flavor washing time, and effective cutoff time of the soaking material batch; If no feasible processing sequence exists, extract the set of candidate batches that cause conflict, add the constraint that prohibits all candidate batches in the candidate batch set from being assigned to the same production line at the same time, and return to the main problem to solve it again; When the cumulative usage of the same batch of foaming material exceeds the available amount, a constraint limiting the cumulative usage to not exceeding the available amount is added, and the problem is returned to be solved again. If a feasible processing sequence exists and the cumulative usage of each batch of foaming material does not exceed the available amount, output the candidate batch sequence, start time, and batch of foaming material used for each production line.
[0016] Furthermore, the condition that each order with a candidate batch is covered by only one selected candidate batch includes: Establish the inclusion relationship between orders and candidate batches, and select multiple candidate batches that contain the same order mutually exclusively; When a candidate batch is selected, the orders within the candidate batch are marked as covered, and any remaining candidate batches containing the same order are prevented from being selected. If the current candidate batch set cannot satisfy the condition that each order with a candidate batch is covered by only one selected candidate batch, the orders not covered by the selected candidate batch are identified as uncovered orders. The effective production period, the available quantity of foaming material batch, and the idle interval of the production line are read for the uncovered orders. Candidate batches containing uncovered orders are regenerated, the regenerated candidate batches are added to the candidate batch set, and the solution is returned. If a candidate batch containing uncovered orders cannot be generated, output the exception handling result containing the uncovered orders and the time or material constraints that caused the uncovering.
[0017] Furthermore, after outputting the candidate batch sequence, start time, and batch of foaming material used for each production line, the method further includes: Receive new order insertion events, production line failure events, events where the remaining validity period of a batch of foamed material is lower than the preset near-expiration threshold, or production execution feedback events; Fix the candidate batches that have already started processing, and update the production line status, available quantity of foaming material batches, and effective cut-off time of foaming material batches according to event type; Candidate batches that have not yet started processing are split into orders contained in the candidate batches, and then reassembled into an order set with orders not covered by the selected candidate batches and new orders; For the reorganized order set, determine the latest start time for delivery. Based on the updated production line status, the available quantity of foaming material batches, and the effective cut-off time of foaming material batches, recalculate the effective production period and candidate batches, solve the production line status transition diagram, and output the updated candidate batch sequence, start time, and foaming material batches used.
[0018] In a second aspect, this invention proposes an intelligent order allocation and production line distribution system for freshly stewed bird's nest C2M orders, comprising: The data acquisition module is configured to acquire order data, batch data of soaked materials, production line status data, and flavor washing time tables. The window calculation module is configured to calculate the effective production time of each order on each production line based on the latest completion time of the order, the effective cut-off time of the batch of soaked materials, the stewing processing time, the available time of the production line, and the flavor washing time, and delete combinations where the lower bound of the interval is later than the upper bound of the interval. The candidate batch generation module is configured to merge orders with the same type and flavor of bird's nest, whose total product quantity does not exceed the production line capacity, and whose effective production time intersection on the same production line is not empty into candidate batches, and record the intersection of the effective production time as the feasible start interval of the candidate batch on each production line. The state transition diagram construction module is configured to combine candidate batches and foaming material batches into state nodes, and establish directed edges based on the flavor washing time between state nodes, the feasible start interval of candidate batches, and the effective end time of foaming material batches to form a production line state transition diagram. The collaborative solution module is configured to output the candidate batch sequence, start time, and foaming material batch used for each production line based on the production line state transition diagram, under the constraints that each order with candidate batches is covered by only one selected candidate batch and the cumulative usage of the same foaming material batch does not exceed the available quantity.
[0019] The beneficial effects of this invention are: This invention determines the effective production timeframe for each order on each production line based on order delivery requirements, the effective deadline of the foaming material batch, production line status, and flavor cleaning time schedules. This ensures that the available production time for each order is simultaneously constrained by delivery time, foaming material expiration date, and initial production line cleaning time. Compared to scheduling based solely on order delivery time, this process can eliminate orders, foaming material batches, and production line combinations that do not meet material expiration or production line time conditions before candidate batches are generated, reducing the likelihood of generating unexecutable scheduling results later.
[0020] This invention uses the type of bird's nest, flavor, product quantity, production line capacity, and whether the intersection of effective production time periods on the same production line is non-empty as batching conditions when generating candidate batches. This ensures that orders within the same candidate batch not only meet the processing requirements of the same type and flavor but also share a common usable start time interval. This avoids the problem of merging orders solely based on flavor or similar delivery times while ignoring the shelf life of soaking materials and production line cleaning time, thus improving the feasibility of the candidate batches themselves.
[0021] This invention combines candidate batches and soaking material batches into state nodes, and establishes a production line state transition diagram based on flavor cleaning time, feasible start interval, lead time, and effective end time of the soaking material batch. This allows the continuous processing sequence, flavor switching cleaning time, and time constraints of the soaking material to be verified within the same diagram structure. This method can reflect the impact of the completion time of the previous candidate batch and flavor switching on the start time of the next candidate batch, thereby reducing the scheduling risk of subsequent soaking materials exceeding their expiration date due to the accumulation of continuous cleaning time.
[0022] This invention sets constraints during the solution process, stipulating that each order with candidate batches is covered by only one selected candidate batch, and the cumulative usage of the same foaming material batch does not exceed its available quantity. It also re-solves when processing sequence conflicts or foaming material batch usage exceeds limits. This enables collaborative allocation among multiple production lines, multiple candidate batches, and multiple foaming material batches, preventing the same order from being repeatedly scheduled or the same foaming material batch from being overused.
[0023] This invention can also fix candidate batches that have already started processing when new orders are inserted, production line failures occur, batches of soaked materials are nearing their expiration date, or production execution feedback occurs. For orders that have not yet started processing, the effective production period is recalculated, candidate batches are regenerated, and the production line state transition diagram is resolved. This process can adjust the unexecuted portions while retaining the already executed production arrangements, adapting to production scenarios involving small batches of freshly stewed bird's nest with multiple flavors and significant differences in delivery times. Attached Figure Description
[0024] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is the overall flowchart of the intelligent order splitting and production line allocation method for fresh stewed bird's nest C2M orders provided in the first embodiment of the present invention; Figure 2 This is a flowchart of the effective production period calculation process in the first embodiment of the present invention; Figure 3 This is a flowchart of candidate batch selection based on the production line state transition diagram in the first embodiment of the present invention; Figure 4 This is a structural block diagram of the intelligent order splitting and production line allocation system for fresh stewed bird's nest C2M orders provided in the second embodiment of the present invention. Detailed Implementation
[0025] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, it should be noted that, for ease of description, only the parts relevant to the present invention are shown in the accompanying drawings.
[0026] It should be noted that, unless otherwise specified, the embodiments and technical features described in this application can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0027] This application applies to C2M production scenarios where production tasks are directly driven by customer orders during the production of freshly stewed bird's nest. A C2M order must include at least the order number, bird's nest type, order flavor, product quantity, and latest order completion time. The production process is also constrained by the effective cutoff time of the soaking material batch, the available quantity of the soaking material batch, the available time of the production line, the current flavor of the production line, the production line capacity, and the cleaning time required for flavor switching.
[0028] In this embodiment, order data comes from the order management system or production planning system; batch data of soaking materials comes from the material management system; production line status comes from the manufacturing execution system or stewing equipment control system; and the flavor cleaning time table is stored in the production scheduling server or the parameter database of the manufacturing execution system. The above data form a production scheduling data snapshot at the same scheduling time point to avoid inconsistencies in the calculation basis due to changes in orders, soaking materials, or production line status during candidate batch generation and production line allocation.
[0029] In this embodiment, the effective production period is the time interval within which the stewing process is allowed to begin under a specific batch of foaming materials and a specific production line combination, rather than the duration of the stewing process. The upper limit of the effective production period interval has been adjusted forward based on the stewing process duration. Therefore, as long as the lower limit of the effective production period interval is not later than the upper limit, it means that there is at least one time when the stewing process is allowed to begin, and it is not necessary to require that the length of the effective production period interval be no less than the stewing process duration.
[0030] The available quantity of soaking material in a batch uses the same unit of measurement as the product quantity in orders and candidate batches. When recording the soaking material batch by weight, the remaining weight of the soaking material is converted into the number of products that can be produced, based on the standard material usage per bottle corresponding to the type and specification of bird's nest. For example, if the remaining weight of the soaking material is 1500g and the standard material usage per bottle is 50g, the available quantity of the soaking material batch is recorded as 30 bottles; the remaining weight less than the standard material usage per bottle is not included in the allocable quantity for this round. This conversion is only used for comparison units to unify production scheduling constraints and does not change the weight measurement method used when actually requisitioning materials.
[0031] This embodiment converts all times onto a unified timeline. For example, when 00:00 on the production scheduling day is taken as the starting point of the timeline, 08:00 is recorded as the 480th minute, and 13:30 is recorded as the 810th minute. For orders spanning multiple days, the production date is recorded simultaneously, ensuring that the time value corresponding to the next day's time is greater than the time value corresponding to the current day's time.
[0032] The first embodiment of this invention proposes an intelligent order splitting and production line allocation method for C2M orders of freshly stewed bird's nest. See also... Figure 1 The method includes the following steps: S10: Order acquisition, batch of soaked materials, production line status, and flavor cleaning time table; S20: Based on the latest completion time of the order, the effective cut-off time of the batch of soaked materials, the stewing processing time, the available time of the production line, and the flavor washing time, the effective production time of each order on each production line is formed, and combinations where the lower boundary of the interval is later than the upper boundary of the interval are deleted. S30: Merge orders with the same type and flavor of bird's nest, whose total quantity does not exceed the production line capacity, and whose effective production time intervals on the same production line are not empty into candidate batches, and record the intersection of the effective production time intervals as the feasible start interval of the candidate batch on each production line. S40: Combine candidate batches and foaming material batches into state nodes. Based on the flavor washing time between state nodes, the feasible start interval of candidate batches, and the effective cutoff time of foaming material batches, a directed edge is established to form a production line state transition diagram. S50: Under the constraint that each order with candidate batches is covered by only one selected candidate batch and the cumulative usage of the same foaming material batch does not exceed the available quantity, output the candidate batch sequence, start time and foaming material batch used for each production line based on the production line state transition diagram.
[0033] The following is combined with Figures 1 to 3 Each step is explained in detail.
[0034] S10: Order acquisition, batch of soaked materials, production line status, and flavor cleaning time table.
[0035] In this embodiment, step S10 includes: Step S11: Read the order number, type of bird's nest, flavor of the order, quantity of products, and latest completion time of the order; Step S12: Read the batch number of the soaking material, the type of bird's nest, the effective deadline, and the available quantity; Step S13: Read the production line number, production line availability time, current flavor of the production line, and production line capacity, and read the flavor cleaning time from the previous flavor to the next flavor in the flavor cleaning time table.
[0036] The latest completion time of an order is the latest allowed time for the corresponding product to complete the stewing process. When the order involves a delivery process, the latest completion time is obtained by subtracting the time required for packaging, quality inspection, and transportation from the latest departure time in the delivery requirements; if the order has already specified the latest production completion time, that latest production completion time is read directly.
[0037] If an order lacks a latest completion time, mark the order as an order with a missing time limit field, record the order number and the missing field, and do not directly input the order into step S20. If the product quantity of an order is empty, zero, or negative, mark the order as an order with an abnormal quantity field. If the type of bird's nest or flavor of an order is not configured, record the corresponding missing field, and re-enter step S10 after the field is filled in.
[0038] The effective cutoff time for a batch of soaked materials represents the latest allowed time to complete the stewing process using that batch of soaked materials. The available quantity of a batch of soaked materials represents the quantity that has not yet been actually consumed by candidate batches that have already started processing and has not yet been occupied by fixed production tasks at the current production scheduling snapshot time. The quantity that has been occupied by fixed production tasks but has not yet been actually used is deducted in advance from the remaining quantity of the batch of soaked materials to prevent duplicate allocation during rolling scheduling.
[0039] Production line availability time indicates the moment when the production line completes its current processing task and is ready to proceed to the next flavor washing or stewing process. The current flavor is the last flavor processed by the production line before the stated availability time, used to determine the required flavor washing time before processing the next flavor. Production line capacity indicates the maximum number of products the production line can accommodate in a single stewing process. When different product specifications occupy different amounts of equipment space, the quantities of different specifications are converted into a uniform capacity unit before being compared with the production line capacity.
[0040] The flavor cleaning time table records the directional flavor cleaning time according to the preceding and following flavors. The flavor cleaning time when switching from the first flavor to the second flavor does not need to be the same as the flavor cleaning time when switching from the second flavor to the first flavor. When the same flavor is processed continuously, the flavor cleaning time is recorded as zero.
[0041] If a flavor switch record is missing in the flavor cleaning time table, the missing value is not treated as zero. Instead, the order, batch of soaking material and production line combination involving the flavor switch are not generated temporarily. The previous flavor, the next flavor and the production line number are recorded. The cleaning time will be recalculated after the flavor is added.
[0042] Step S10 outputs a production scheduling data snapshot consisting of order records, batch records of soaking materials, production line status records, and flavor cleaning time tables, and inputs the production scheduling data snapshot into step S20.
[0043] S20: Based on the latest completion time of the order, the effective cut-off time of the batch of soaked materials, the stewing processing time, the available time of the production line, and the flavor cleaning time, the effective production time of each order on each production line is determined, and combinations where the lower boundary of the interval is later than the upper boundary of the interval are deleted.
[0044] See Figure 2 In this embodiment, the effective production time for forming each order on each production line includes: Step S21: Read the latest completion time from the order delivery requirements or delivery requirements, and subtract the stewing processing time to obtain the latest start time for delivery; Step S22: Subtract the cooking time from the effective cut-off time of the batch of soaked materials to obtain the latest start time of the materials. Step S23: Take the earlier of the latest start time of delivery and the latest start time of materials as the combined latest start time; Step S24: The sum of the available time of the production line and the flavor cleaning time is taken as the earliest start time of the production line. The earliest start time of the production line is used as the lower limit of the interval, and the latest start time is used as the upper limit of the interval to form an effective production period. Step S25: When an order has multiple available foaming material batches, calculate the effective production time of each foaming material batch on each production line, delete combinations where the lower boundary of the interval is later than the upper boundary of the interval, and use the foaming material batch with the longest effective production time of each production line as the foaming material batch participating in the generation of candidate batches.
[0045] In step S21, the stewing time is the continuous time occupied by the corresponding product in the stewing equipment during the stewing process. The order data records the product specification or process formula number, and the corresponding stewing time is read according to the product specification or process formula number.
[0046] In this embodiment, orders with the same type and flavor of bird's nest correspond to the same stewing time. When a manufacturer has products with the same type and flavor of bird's nest but different stewing times, it further records process specification identifiers in the order data, and divides orders that can be processed with the same stewing time according to the process specification identifiers before generating candidate batches. Thus, orders included in the same candidate batch adopt the same stewing time, and the same stewing time is used as the stewing time of the candidate batch.
[0047] For example, if the latest completion time for an order is 13:30 and the stewing time is 40 minutes, subtract 40 minutes from 13:30 to get the latest delivery start time of 12:50.
[0048] In step S22, the cooking time is subtracted backward from the effective cutoff time of the soaked material batch to ensure that the soaked material batch used when the candidate batch completes the cooking process has not exceeded the effective cutoff time. For example, if the effective cutoff time of the soaked material batch is 09:30 and the cooking time is 40 minutes, the latest start time of the material is 08:50.
[0049] In step S23, when the latest start time for delivery is earlier than the latest start time for materials, the latest start time for delivery is used as the overall latest start time; when the latest start time for materials is earlier than the latest start time for delivery, the latest start time for materials is used as the overall latest start time. Therefore, the overall latest start time is simultaneously limited by both the order delivery deadline and the effective cutoff time for the batch of foamed materials.
[0050] In step S24, the method for determining the earliest start time of the production line includes: Step S241: Read the production line availability time and current flavor from the production line status, and read the order flavor from the order. Step S242: Find the flavor cleaning time in the flavor cleaning time table when the current flavor of the production line is switched to the flavor of the order, add the available time of the production line to the flavor cleaning time to get the earliest start time of the production line; Step S243: When the earliest start time of the production line is later than the latest start time of the overall process, delete the combination of order, foaming material batch and production line. Step S244: When the earliest start time of the production line is not later than the latest start time of the overall process, an effective production period is formed with the earliest start time of the production line as the lower bound of the interval and the latest start time of the overall process as the upper bound of the interval.
[0051] In step S242, the earliest start time of the production line is used to process the flavor cleaning time required for switching from the initial state of the production line to the order flavor in the current production scheduling data snapshot. When candidate batches are processed sequentially on the same production line, the flavor cleaning time between adjacent candidate batches is calculated during the state node transition in step S40 to avoid counting the same flavor cleaning time repeatedly.
[0052] For example, if the production line is available from 08:00, the current flavor is rock sugar, the order flavor is red dates, and the flavor cleaning time table records that it takes 20 minutes to switch from rock sugar to red dates, then the earliest start time for the production line is 08:20. If the order flavor is also rock sugar, and the flavor cleaning time is zero, then the earliest start time for the production line is 08:00.
[0053] In step S244, the effective production period expresses the range of start times that can be selected. If the earliest start time of the production line is 08:20 and the latest start time is 08:50, then the effective production period is [08:20, 08:50]. Although the interval length is 30 minutes, which is less than the 40-minute stewing process duration, if the stewing process starts at 08:50, it can be completed by 09:30, which is not later than the effective end time of the soaked material batch at 09:30. Therefore, the effective production period is retained.
[0054] When the earliest start time of the production line is the same as the latest start time of the overall process, the effective production period is a closed interval containing only one allowed start time, and the corresponding combination remains valid. When the earliest start time of the production line is later than the latest start time of the overall process, it means that after the production line completes the necessary flavor cleaning, there is no start time that simultaneously meets the delivery time limit and material expiration date requirements, and the corresponding combination is deleted.
[0055] In step S25, for the same order, the same production line, and different batches of foaming materials, the corresponding valid production time periods are saved separately. The valid production time periods used for candidate batch generation are selected from largest to smallest in terms of interval length. When multiple batches of foaming materials correspond to the same valid production time interval length, the batch with the earlier valid cut-off time is selected first; when the valid cut-off times are still the same, the batch with the larger available quantity is selected first.
[0056] Orders, foaming material batches, and valid combinations of production lines that were not selected for candidate batch generation are still saved and used as backup combinations when candidate batches and foaming material batches form a status node in step S40. Therefore, the selection of foaming material batches in step S25 is only used to determine the valid production period used for candidate batch generation, and does not ultimately limit candidate batches to using only the selected foaming material batches.
[0057] Step S20 outputs the order number, foaming material batch number, production line number, lower bound of the effective production time interval, upper bound of the effective production time interval, and combination retention flag. The effective production time intervals selected for candidate batch generation are entered into step S30, and other effective combinations are entered into step S40 for later use. Orders without any effective combinations are marked as orders with no current effective production time intervals, and are entered into the uncovered order processing procedure in step S50.
[0058] S30: Merge orders with the same type and flavor of bird's nest, whose total quantity does not exceed the production line capacity, and whose effective production time intervals on the same production line are not empty into candidate batches, and record the intersection of the effective production time intervals as the feasible start interval of the candidate batch on each production line.
[0059] In this embodiment, merging orders into candidate batches includes: Step S31: Group the orders according to the type and flavor of bird's nest, and enumerate the order subsets within the same group; Step S32: For each order subset, calculate the intersection of the effective production time periods of the order subset on the same production line, and count the sum of the product quantities of the order subset; Step S33: When the sum of the product quantities does not exceed the production line capacity and the intersection of the effective production time periods is not empty, a candidate batch is generated, and the intersection of the effective production time periods is taken as the feasible starting interval of the candidate batch on the same production line. In step S34, if the sum of the product quantities exceeds the production line capacity or the intersection of the effective production time periods is empty, no candidate batch of order subset and production line combination will be generated.
[0060] In step S31, orders with the same type of bird's nest but different flavors are not included in the same order subset, nor are orders with the same flavor but different types of bird's nest included in the same order subset. An order subset can contain multiple orders or only one order. Therefore, orders that cannot be merged with other orders but can be produced independently can still form a single order candidate batch.
[0061] For orders of the same type and flavor of bird's nest but with different processing specifications and therefore cannot be processed using the same stewing time, each order subset is enumerated separately. Orders that cannot be processed using the same stewing process are not merged into the same candidate batch. The stewing time of a candidate batch is the common stewing time of the orders it contains.
[0062] When there are many orders, they are first sorted by their latest completion time from earliest to latest, and the order subset is expanded starting with the orders with the earliest delivery deadlines. When the expanded product quantity exceeds the maximum production line capacity of all applicable production lines, adding more orders to this subset is stopped. This process only excludes order subsets that definitely do not meet the capacity requirements; it does not change the range of candidate batches that do meet the requirements.
[0063] In step S32, the intersection of the effective production time periods of the order subset on the same production line is determined as follows: the lower bounds of the effective production time period intervals of each order in the order subset on the production line are compared, and the latest interval lower bound is taken as the lower bound of the intersection; the upper bounds of each effective production time period interval are compared, and the earliest interval upper bound is taken as the upper bound of the intersection.
[0064] When the lower bound of the intersection is not later than the upper bound of the intersection, the intersection of effective production time periods is non-empty; when the lower bound and the upper bound of the intersection are the same, the intersection contains only one feasible start time, and is still considered as a non-empty intersection of effective production time periods; when the lower bound of the intersection is later than the upper bound of the intersection, the intersection of effective production time periods is empty.
[0065] For example, the effective production time period for order O1 on the second production line is [08:00, 10:20], and the effective production time period for order O4 on the second production line is [08:10, 09:50]. The later time of the lower bound of the two intervals is 08:10, and the earlier time of the upper bound of the two intervals is 09:50. Therefore, the intersection of the effective production time periods is [08:10, 09:50].
[0066] The system simultaneously accumulates the product quantity of each order in the order subset. When order O1 and order O4 contain 10 bottles and 8 bottles respectively, and the production line capacity is 30 bottles, the sum of the product quantities is 18 bottles, which does not exceed the production line capacity. Orders O1 and O4 have the same type of bird's nest, flavor, and stewing processing time, and the overlap of their effective production time periods on the corresponding production lines is not empty. Therefore, orders O1 and O4 can be merged into a candidate batch.
[0067] Since the stewing and cooking time has already been included in the upper limit of the interval when the effective production time periods for each order are formed, there is no need to require the length of the interval where the effective production time periods intersect to be no less than the stewing and cooking time again during the candidate batch generation process.
[0068] The same candidate batch can have different feasible start ranges on different production lines. The candidate batch record includes the candidate batch number, the set of order numbers it contains, the type of bird's nest, the flavor, the quantity of the product, the stewing and processing time, and the feasible start range distinguished by production line. Step S30 only forms the candidate batch and the range of available production lines for the candidate batch; it does not finalize the production line to which the candidate batch belongs or the batch of soaking materials used at this time.
[0069] Step S30 outputs the candidate batch set, the inclusion relationship between candidate batches and orders, and the feasible start range of candidate batches on each production line. The candidate batch set and feasible start range are input into step S40, and the inclusion relationship between candidate batches and orders is input into step S50.
[0070] S40: Combine candidate batches and foaming material batches into state nodes. Based on the flavor washing time between state nodes, the feasible start interval of candidate batches, and the effective cutoff time of foaming material batches, a directed edge is established to form a production line state transition diagram.
[0071] In this embodiment, combining the candidate batch and the foaming material batch into a state node includes: Step S41: Match the types of bird's nest in the candidate batch with the types of bird's nest in the soaking material batch, and read the product quantity of the candidate batch and the available quantity of the soaking material batch. Step S42: When the types of bird's nests are consistent, the quantity of products does not exceed the available quantity, and there is an optional start time in the feasible start interval of the candidate batch, and the sum of the optional start time and the stewing processing time is not later than the effective end time of the soaked material batch, a state node is generated. In step S43, if the types of bird's nest are inconsistent, the quantity of products exceeds the available quantity, or there is no optional start time that meets the time conditions in the feasible start interval of the candidate batch, a state node for the combination of candidate batch and soaking material batch is not generated.
[0072] In steps S41 and S42, the quantity of candidate batch products and the available quantity of soaking material batches are compared using the unified unit of measurement established in step S10. For candidate batches generated using the effective production period of a certain soaking material batch, these candidate batches are also combined with other soaking material batches of the same type of bird's nest saved in step S20.
[0073] When combining a candidate batch with a batch of soaked materials, first subtract the cooking time of the candidate batch from the effective cutoff time of the batch of soaked materials to obtain the latest allowed start time of the batch of soaked materials; then compare the upper limit of the feasible start interval of the candidate batch on the corresponding production line with the latest start time, and take the earlier time as the upper limit of the feasible start interval of the state node, while the lower limit of the feasible start interval of the candidate batch remains unchanged.
[0074] If the adjusted feasible start interval of the state node is not empty, it means that there is at least one optional start time that allows the candidate batch to be completed before the effective deadline of the foaming material batch, and a state node corresponding to the candidate batch and the foaming material batch is generated. If the adjusted feasible start interval of the state node is empty, the state node is not generated. If the quantity of the candidate batch exceeds the available quantity of the foaming material batch, the state node is not generated even if the time condition is met.
[0075] The status node records the candidate batch number, the batch number of the soaked material, the type of bird's nest, the flavor of the candidate batch, the product quantity, the stewing and processing time, the production line it belongs to, and the feasible start interval of the status node. The start and finish times of the status node are not fixed and unique before a specific path is added to it; when the path search reaches the current status node from a previous status node, the start and finish times under this path are determined based on the previous status node.
[0076] After the state nodes are generated, the process of forming the production line state transition diagram includes: Step S44: Take the initial state of the production line as the source node, take the available time of the production line as the completion time of the source node, and record the current flavor of the production line. Step S45: Use the combination of candidate batch and foaming material batch as the state node; Step S46: For the previous state node and the next state node, read the flavor cleaning time according to the production line flavor of the previous state node and the candidate batch flavor of the next state node. Take the later time between the sum of the completion time of the previous state node and the flavor cleaning time and the lower bound of the feasible start interval of the next state node as the start time of the next state node, and take the sum of the start time and the stewing processing time as the completion time. Step S47: When the start time is no later than the upper bound of the feasible start interval and the completion time is no later than the effective cutoff time of the foamed material batch, a directed edge is established. Step S48: Based on the flavor cleaning time and the difference between the upper bound of the feasible start interval and the start time, edge weights are formed, and the feasible state transition path with the smallest sum of edge weights is selected.
[0077] In steps S44 and S45, the production line flavor of the source node is the current production line flavor of the corresponding production line. The production line flavor of the normal state node is the flavor of the candidate batch after processing, i.e., the candidate batch flavor.
[0078] Therefore, when the previous state node is the source node, the flavor cleaning time is read according to the current flavor of the production line and the flavor of the candidate batch corresponding to the next state node; when the previous state node is a normal state node, the flavor cleaning time is read according to the flavor of the candidate batch corresponding to the previous state node and the flavor of the candidate batch corresponding to the next state node.
[0079] In step S46, the completion time of the previous state node is first added to the flavor cleaning time to obtain the start time after flavor cleaning is completed; then the start time after flavor cleaning is completed is compared with the lower bound of the feasible start interval of the next state node, and the later time is taken as the start time of the next state node; the start time is added to the stewing processing time of the candidate batch corresponding to the next state node to obtain the completion time of the next state node.
[0080] For example, if the previous state node completes at 08:40, and the flavor of the production line at that previous state node was rock sugar, while the flavor of the candidate batch corresponding to the next state node is red dates, and switching from rock sugar to red dates takes 20 minutes, then the feasible start interval for the next state node is [08:20, 10:20]. Adding 20 minutes to the completion time of the previous state node (08:40) gives 09:00, which is later than the lower limit of the interval (08:20). Therefore, the start time for the next state node is 09:00. When the stewing process takes 40 minutes, the completion time is 09:40.
[0081] In step S47, if the calculated start time is later than the upper bound of the feasible start interval of the next state node, no directed edge is established; if the calculated completion time is later than the effective cutoff time of the corresponding foamed material batch of the next state node, no directed edge is established either. If the previous state node and the next state node contain the same candidate batch, no directed edge is established to prevent the same candidate batch from appearing repeatedly in the same path.
[0082] The calculated start and finish times are first used to determine the establishment of directed edges. After the corresponding directed edge enters the final feasible path, the start and finish times are respectively used as the candidate batch start and finish times output in step S50.
[0083] In step S48, to ensure that the edge weights have a uniform and reproducible calculation method, the edge weights are determined according to the following formula: ; in, Indicates the state from the previous state node Transition to the next state node Edge weights; This indicates the flavor cleaning time required to switch the production line flavor from the previous state node to the corresponding candidate batch flavor in the next state node. This indicates the upper bound of the feasible starting interval for the next state node; Indicates the start time of the next state node; This represents the time interval between the start time of the next state node and the upper bound of the feasible start interval. This represents the first non-negative weighting coefficient corresponding to the flavor washing time; This represents the second non-negative weighting coefficient corresponding to the time interval.
[0084] The flavor cleaning time and the time interval use the same time unit. The first and second non-negative weighting coefficients are set according to the manufacturer's priority of reducing cleaning time and avoiding premature production. In one example, the first non-negative weighting coefficient... Set to 1, the second non-negative weighting coefficient. Take 0.5. If the flavor washing time is 40 minutes and the start time is equal to the upper bound of the feasible start interval, then the edge weight is 40; if the flavor washing time is 20 minutes and the time interval between the start time and the upper bound of the feasible start interval is 80 minutes, then the edge weight is 60.
[0085] Edge weights are used only to select among paths that satisfy the constraints of the feasible start interval of the candidate batch, the effective cutoff time of the foamed material batch, and the material availability, without changing the aforementioned hard constraints. All edge weights contained in a feasible state transition path are summed, and the feasible state transition path with the smallest sum of edge weights is selected.
[0086] Step S40 outputs a production line state transition diagram divided by production line. Each directed edge records the previous state node, the next state node, the flavor cleaning time, the start time of the next state node, the completion time, and the edge weight. If there is no state node originating from the source node, the corresponding production line is recorded as an empty graph. If a candidate batch has no state nodes on all production lines, the orders contained in that candidate batch are input into the uncovered order processing procedure in step S50.
[0087] S50: Under the constraint that each order with candidate batches is covered by only one selected candidate batch and the cumulative usage of the same foaming material batch does not exceed the available quantity, output the candidate batch sequence, start time and foaming material batch used for each production line based on the production line state transition diagram.
[0088] See Figure 3 In step S50, the condition that each order with a candidate batch is covered by only one selected candidate batch includes: Step S51: Establish the inclusion relationship between orders and candidate batches, and perform mutual exclusion selection on multiple candidate batches that contain the same order; Step S52: When a candidate batch is selected, the orders within the candidate batch are marked as covered, and the remaining candidate batches containing the same order are prevented from being selected. Step S53: If the current candidate batch set cannot satisfy the condition that each order with a candidate batch is covered by only one selected candidate batch, the orders not covered by the selected candidate batch are determined as uncovered orders. The effective production period, the available quantity of foaming material batch, and the idle interval of the production line are read for the uncovered orders. Candidate batches containing uncovered orders are regenerated, the regenerated candidate batches are added to the candidate batch set, and the solution is returned. Step S54: If a candidate batch containing uncovered orders cannot be generated, output the exception handling result containing uncovered orders and the time or material constraints that caused the uncovering.
[0089] In step S51, the set of order numbers recorded in the candidate batch is used to establish the inclusion relationship between orders and candidate batches. If order O1 is included in candidate batches B1, B6, and B7, then candidate batches B1, B6, and B7 constitute a mutually exclusive candidate set for order O1.
[0090] Once candidate batch B1 is selected, order O1 is marked as covered, and candidate batches B6 and B7 can no longer be selected. For orders currently having candidate batches, normal scheduling requires each order to be covered once, without duplicate or missed coverage.
[0091] In step S53, if there are uncovered orders, first attempt is made to generate a single order candidate batch for the uncovered orders, and then attempt is made to merge the uncovered orders with other uncovered orders that have the same type of bird's nest, order flavor, and stewing processing time. When regenerating, the effective production period, the current available quantity of soaking material batch, and the idle interval of the production line outside the fixed task output in step S20 are used.
[0092] The newly generated candidate batches must still meet the following conditions: the bird's nest types and flavors are the same, the sum of the product quantities does not exceed the production line capacity, and the intersection of the effective production time periods on the same production line is not empty. After the new candidate batch is added to the candidate batch set, the state node generation, production line state transition diagram update, and the solving of the main problem and sub-problems are re-executed.
[0093] In step S54, if a candidate batch cannot be generated or no feasible state transition path exists after generation, the anomaly handling result should include at least the following: uncovered order number, bird's nest type, order flavor, product quantity, currently available batch of soaking material, insufficient material quantity, available production line idle interval, and delivery time constraint or material expiration constraint that would render the process infeasible. The anomaly handling result is used to prompt for replenishing soaking material, adjusting order delivery time, or increasing production line idle interval; it does not generate scheduling results that violate hard constraints.
[0094] After the order coverage constraint is established, the output of the candidate batch sequence, start time, and batch of foaming material used for each production line based on the production line state transition diagram includes: Step S55: Select candidate batches and allocate production lines in the main problem; Step S56: In the subproblem, check the production line state transition diagram along the allocated production line to see if the selected candidate batch has a processing sequence that satisfies the feasible start interval, flavor cleaning time and effective cut-off time of the soaking material batch. Step S57: If no feasible processing sequence exists, extract the set of candidate batches that cause conflict, add the constraint that prohibits all candidate batches in the set of candidate batches from being assigned to the same production line at the same time, and return to the main problem to solve it again. Step S58: When the cumulative usage of the same batch of foaming material exceeds the available amount, add a constraint that limits the cumulative usage to the available amount, and return to the main problem to solve it again. Step S59: When there is a feasible processing sequence and the cumulative usage of each batch of foaming material does not exceed the available amount, output the candidate batch sequence, start time and batch of foaming material used for each production line.
[0095] In step S55, the main problem receives the candidate batch set, the inclusion relationship between orders and candidate batches, and the available production lines for each candidate batch. A candidate batch selection flag is set for each candidate batch, and a production line allocation flag is set for each combination of candidate batch and production line.
[0096] When a candidate batch is selected, it can only be assigned to a production line with a feasible start range; when a candidate batch is not selected, no production line is assigned to it. The main problem uses the order coverage constraint established in steps S51 to S54 as the candidate batch selection constraint.
[0097] The core decision of the main problem is to select candidate batches and assign production lines to the selected candidate batches. The batch of foaming material ultimately used by the candidate batches is not fixed during the initial solution. The batch of foaming material is determined when the subproblem selects a specific state node in the production line state transition diagram.
[0098] The main problem can be solved using integer programming, constrained programming, branch and bound, or other discrete solution methods that satisfy the same constraints. This invention does not limit the specific solver, as long as the solution method can output the selected candidate batches and their assigned production lines.
[0099] In step S56, the main problem does not directly determine the specific processing order of each candidate batch on the same production line. Instead, it inputs the set of selected candidate batches on the same production line into the corresponding sub-problem. The sub-problem starts from the source node of the production line state transition diagram and searches for a directed path that passes through the state nodes corresponding to all selected candidate batches.
[0100] The same candidate batch can only appear once in the path, and each selected candidate batch can only use the state node corresponding to one batch of foaming material. Therefore, the sub-problem determines the batch of foaming material used for each candidate batch while determining the processing order.
[0101] For each new state node added to the subproblem, the start and end times of that state node are determined according to step S46. The start time is verified to be no later than the upper bound of the feasible start interval, and the end time is verified to be no later than the valid cutoff time of the foamed material batch. If any condition is not met, the current path is stopped from being expanded, and the process returns to the previous state node, attempting other state nodes, other foamed material batches, or other processing sequences.
[0102] The subproblems can be solved using depth-first search, branch and bound search, dynamic programming, or shortest path search with a set of visited candidate batches. When multiple feasible paths exist, the path with the smallest sum of edge weights is selected as the candidate batch sequence for the corresponding production line.
[0103] In step S57, if after a complete path search, there is still no feasible path covering all selected candidate batches of the production line, then all selected candidate batches of the production line are taken as the initial conflict set.
[0104] For each candidate batch in the initial conflict set, temporarily remove the candidate batch from the initial conflict set, and re-perform path search for the candidate batch set after removal. If no feasible path exists after removal, it means that the removed candidate batch is not a necessary member causing the current infeasibility, and the candidate batch is permanently removed from the conflict set; if a feasible path exists after removal, it means that the removed candidate batch is related to the formation of the conflict, and the candidate batch is retained in the conflict set.
[0105] Repeat the process of removing candidate batches and searching paths until a feasible path can be formed after removing any candidate batch from the conflict set, thus obtaining the candidate batch set that caused the conflict. The candidate batch set is the set of candidate batches that cannot be simultaneously arranged on the production line under the conditions of the current production line status, feasible start interval, flavor washing time, and effective cutoff time of the soaking material batch.
[0106] Add a constraint to the main problem prohibiting all candidate batches in the candidate batch set from being simultaneously assigned to the same production line where a conflict has occurred, and return to step S55 to solve again. The constraint only prohibits the candidate batch set from being simultaneously assigned to the production line in its entirety, allowing some candidate batches to continue to be assigned to the production line, and also allowing some candidate batches to be reassigned to other production lines.
[0107] For example, candidate batches B2, B1, and B3 are assigned to the second production line. If B2 starts at 08:20 and finishes at 09:00, switching from the jujube flavor of B2 to the rock sugar flavor of B1 takes 25 minutes, and B1 starts at 09:25 and finishes at 10:05; switching from the rock sugar flavor of B1 to the ginseng flavor of B3 takes 30 minutes, and B3 starts at 10:35 and finishes at 11:15 at the earliest. If the effective cutoff time for the batch of soaking materials used in B3 is 11:00, then this sequence is not feasible.
[0108] The subproblem also requires searching for other orders of B1, B2, and B3. Only when all possible combinations of state nodes and processing orders cannot form a feasible path is the corresponding candidate batch set confirmed as infeasible, and the candidate batch set causing the conflict is extracted according to the above conflict set reduction process. The entire candidate batch set is not directly excluded because a single permutation is infeasible.
[0109] In step S58, after each production line completes the path search for its sub-problems, the batches of foaming materials and the quantities of products corresponding to the selected state nodes in all feasible paths are summarized. The cumulative usage of the same batch of foaming material is the sum of the quantities of products corresponding to the selected state nodes using that batch of foaming material in all production lines.
[0110] When the cumulative usage of the same batch of foaming material does not exceed its available quantity, the batch of foaming material meets the usage constraint. When the cumulative usage exceeds its available quantity, the scheduling result for the batch that occupies too much foaming material is not output.
[0111] For batches of foaming material whose cumulative usage exceeds the available amount, the candidate batches that use this batch of foaming material in the current feasible paths of each production line are combined with the foaming material batch to determine the initial material conflict combination set.
[0112] One candidate batch and one foaming material batch are temporarily removed from the initial material conflict combination set, and the product quantity corresponding to the remaining combination is re-accumulated. If the accumulated usage still exceeds the available quantity after removal, the combination is permanently removed from the material conflict combination set; if the accumulated usage does not exceed the available quantity after removal, the combination is retained in the material conflict combination set. The above process is repeated to obtain the material conflict combination set that causes the foaming material batch to be overused.
[0113] The constraint prohibiting the simultaneous selection of all candidate batches in the material conflict combination set with foaming material batches is added to the overall solution process, and the problem is returned to be solved again. During the re-solution, the corresponding candidate batches are allowed to use the status nodes corresponding to other foaming material batches, be reassigned to other production lines, or have their corresponding orders covered by other candidate batches that do not conflict with the order unique coverage constraint.
[0114] For example, candidate batches B1, B2, and B3 contain 18, 8, and 6 bottles of product, respectively. If all three candidate batches select batch S2, which has an available quantity of 20 bottles, the total demand would be 32 bottles, exceeding the available quantity of S2. If B1 still has a state node that uses batch S1, and B1 can complete its use of S1 before S1's effective deadline, then B1 can be reassigned to S1 during the re-solution. After reassignment, the total demand for S2 is 14 bottles, satisfying the available quantity constraint.
[0115] When resolving the problem, priority is given to candidate batches with a small time interval between the current start time and the upper limit of the feasible start interval, an early latest delivery start time, or no other batches of the same type of bird's nest soaking material. For candidate batches with a large time interval between the current start time and the upper limit of the feasible start interval and other available soaking material batches, priority is given to trying to change the soaking material batch or adjust the production line. The priority order is only used to improve the solution speed and does not change the hard constraints of order coverage, time feasibility, and material availability.
[0116] In step S59, the main problem and sub-problems are executed repeatedly until a production schedule result that simultaneously satisfies the order unique coverage constraint, the production line state transition constraint, and the batch availability constraint of the foaming material is obtained, or it is confirmed that the remaining orders cannot form an executable production schedule result.
[0117] When an executable production schedule is obtained, candidate batch sequences are output for each production line. The final production schedule output should at least record the production line number, candidate batch number, order number included in the candidate batch, type of bird's nest, flavor, product quantity, stewing time, start time, finish time, and batch number of the soaking materials used.
[0118] The completion time of a candidate batch serves as the completion time of the preceding state node for subsequent candidate batches on the same production line, and the flavor of a candidate batch serves as the preceding flavor when querying the flavor cleaning time later. The output of step S59 can be converted by the manufacturing execution system into a production task, a material requisition task, and a flavor cleaning task.
[0119] After outputting the candidate batch sequence, start time and batch of foaming material used for each production line in step S59, the method further includes a rolling update step S60.
[0120] S60: Update production scheduling results on a rolling basis.
[0121] In this embodiment, the rolling update includes: Step S61: Receive new order insertion event, production line failure event, event that the remaining valid time of the foaming material batch is lower than the preset near-expiration threshold, or production execution feedback event; Step S62: Fix the candidate batches that have already started processing, and update the production line status, the available quantity of foaming material batches, and the effective cutoff time of foaming material batches according to the event type; Step S63: Split the candidate batches that have not yet started processing into orders contained in the candidate batches, and reassemble them into an order set with orders not covered by the selected candidate batches and new orders; Step S64: Determine the latest start time for delivery for the reorganized order set. Based on the updated production line status, available quantity of foaming material batches, and effective cut-off time of foaming material batches, recalculate the effective production period and candidate batches, solve the production line status transition diagram, and output the updated candidate batch sequence, start time, and foaming material batches used.
[0122] In step S61, the new order insertion event includes the new order number, bird's nest type, order flavor, product quantity, process specification identifier, and latest order completion time. The production line failure event includes the failure production line number, failure occurrence time, and expected recovery time. The near-expiration event for soaking material batches includes the soaking material batch number, current time, effective expiration time, and preset near-expiration threshold. The production execution feedback event includes candidate batch start information, candidate batch completion information, actual completion time, actual material consumption, and actual flavor cleaning completion time.
[0123] The remaining valid time for a batch of soaked materials is the time difference between the valid expiration time of the batch and the current time. The preset near-expiration threshold is determined based on the stewing and cooking time, the possible flavor washing time, and the control lead time required for recalculation.
[0124] For example, if the stewing process takes 40 minutes and the potential flavor cleanup takes 20 minutes, the preset near-expiration threshold can be set to 60 minutes. The preset near-expiration threshold is only used to trigger an early recalculation; whether the batch of soaked material can actually be used still depends on whether the candidate batch's completion time is later than the effective deadline.
[0125] In step S62, the production line, start time, and batch of foaming material used for candidate batches that have already started processing are not changed due to new orders or other tasks that have not yet been performed. When a candidate batch is being processed, the production line availability time is updated with the expected completion time; when a candidate batch has been completed, the production line availability time is updated with the actual completion time, and the current flavor of the production line is updated with the flavor of the completed candidate batch.
[0126] The available quantity of foaming material in a batch is reduced based on the actual consumption. If the actual consumption of a foaming material batch differs from the planned consumption, the available quantity is updated based on the actual consumption reported in production execution feedback. If the effective shelf life of a foaming material batch is shortened due to quality inspection, the updated effective end-of-life time replaces the original effective end-of-life time.
[0127] If a production line malfunctions before a candidate batch begins, the candidate batch is moved to a set of batches that have not yet started processing. If a production line malfunctions during the processing of a candidate batch, the already started state of the candidate batch is maintained, and the estimated completion time is updated based on the malfunction feedback. If the estimated recovery time of the production line is later than the original available time, the estimated recovery time is used as the updated available time.
[0128] In step S63, candidate batches that have not yet started processing are split back into their constituent orders to avoid limiting the scope of re-merging after dynamic events occur due to the original candidate batch combination. The split orders retain the original order number, bird's nest type, order flavor, product quantity, processing specification identifier, and latest order completion time.
[0129] When a new order insertion event is received, the new order is added to the reconstructed order set. When the triggering event is a production line failure event, a near-expiration event for foaming material batches, or a production execution feedback event, and there are no new orders, the new order item is empty, and the reconstructed order set consists of orders split from candidate batches that have not yet started processing and orders not covered by the selected candidate batch.
[0130] In step S64, the latest start time for delivery is re-determined for the reorganized order set, and steps S20 to S50 are re-executed with the updated production line availability time, current production line flavor, available quantity of foaming material batch, and effective cut-off time of foaming material batch.
[0131] The re-solution results replace the parts of the original production schedule that have not yet started processing, while the candidate batches that have already started processing continue to be executed according to the fixed production tasks.
[0132] The first embodiment will be described below with reference to specific examples.
[0133] A fresh-stewed bird's nest production workshop schedules production at 08:00, with a first production line M1 and a second production line M2, each with a capacity of 30 bottles. In this example, all orders correspond to the same stewing time of 40 minutes.
[0134] The current flavor of production line M1 is original, and the production line is available from 08:00. The current flavor of production line M2 is rock sugar, and the production line is available from 08:00.
[0135] Orders awaiting production include: Order O1, rock sugar flavor, Class A bird's nest, 10 bottles, latest completion time 13:30; Order O2, red date flavor, Class A bird's nest, 8 bottles, latest completion time 11:50; Order O3, American ginseng flavor, Class A bird's nest, 6 bottles, latest completion time 15:00; Order O4, rock sugar flavor, Class A bird's nest, 8 bottles, latest completion time 14:00; Order O5, original flavor, Class B bird's nest, 12 bottles, latest completion time 12:40; Order O6, red date flavor, Class B bird's nest, 5 bottles, latest completion time 13:00.
[0136] The batches of soaking materials include: S1, Class A bird's nest, valid deadline 09:30, usable quantity 30 bottles; S2, Class A bird's nest, valid deadline 11:00, usable quantity 20 bottles; and S3, Class B bird's nest, valid deadline 10:30, usable quantity 25 bottles.
[0137] In the flavor cleaning time table, the cleaning time for flavors with the same flavor is zero; for the second production line M2, it takes 20 minutes to switch from rock sugar to red date, 40 minutes to switch from red date to ginseng, 25 minutes to switch from red date to rock sugar, and 30 minutes to switch from rock sugar to ginseng; for the first production line M1, it takes 25 minutes to switch from original flavor to red date, and 25 minutes to switch from red date to original flavor.
[0138] In step S20, the latest start time for the materials in batch S1 is 08:50, the latest start time for batch S2 is 10:20, and the latest start time for batch S3 is 09:50. Combining the latest delivery start time for each order, the available production line time, and the flavor washing time, the effective production time for each order under each production line and each batch of materials is determined.
[0139] In step S30, orders O1 and O4 are merged to form candidate batch B1, which is rock sugar flavor, type A bird's nest, 18 bottles; order O2 forms candidate batch B2, which is red date flavor, type A bird's nest, 8 bottles; order O3 forms candidate batch B3, which is American ginseng flavor, type A bird's nest, 6 bottles; order O5 forms candidate batch B4, which is original flavor, type B bird's nest, 12 bottles; and order O6 forms candidate batch B5, which is red date flavor, type B bird's nest, 5 bottles.
[0140] The feasible start interval for candidate batch B1 on the second production line M2 is [08:00, 10:20]; the feasible start interval for candidate batch B2 on the second production line M2 is [08:20, 10:20]; the feasible start interval for candidate batch B3 on the second production line M2 is [08:30, 10:20]; the feasible start interval for candidate batch B4 on the first production line M1 is [08:00, 09:50]; and the feasible start interval for candidate batch B5 on the first production line M1 is [08:25, 09:50].
[0141] In step S40, when candidate batch B1 is combined with foaming material batch S1, the feasible start interval of the state node is limited to [08:00, 08:50]. B1 can be completed by 08:40 if it starts at 08:00, which is not later than the effective deadline of S1 at 09:30, therefore the B1-S1 state node is generated. When B1 is combined with S2, there is also a start time that meets the time condition, therefore the B1-S2 state node is generated.
[0142] When candidate batches B2 and S1 are combined, the feasible start interval for the state node is [08:20, 08:50]. Starting at 08:20, it can be completed by 09:00, which is not later than the effective deadline of S1, 09:30. Therefore, the B2-S1 state node is generated. A state node is also generated when B2 and S2 are combined.
[0143] When candidate batches B3 and S1 are combined, the feasible start interval for the state node is [08:30, 08:50]; when B3 and S2 are combined, the feasible start interval for the state node is [08:30, 10:20]. Both combinations have an allowed start time. Candidate batches B4 and B5 generate state nodes with the foaming material batch S3, respectively.
[0144] The source node of the second production line M2 has a flavor of rock sugar, and the source node completes at 08:00. When transitioning from the source node to the B1-S1 state node, the flavor cleaning time is zero, and B1 starts at 08:00 and completes at 08:40.
[0145] When transitioning from state node B1-S1 to state node B2-S2, the switch from rock sugar to red dates takes 20 minutes. B2 starts at 09:00 and completes at 09:40. When transitioning from state node B2-S2 to state node B3-S2, the switch from red dates to American ginseng takes 40 minutes. B3 starts at 10:20 and completes at 11:00, which is no later than the effective deadline of 11:00 for S2.
[0146] When transitioning from state node B2-S2 to state node B3-S2, the flavor cleaning time is 40 minutes. The start time of B3 is equal to the upper bound of its feasible start interval. The first non-negative weight coefficient is 1, the second non-negative weight coefficient is 0.5, and the edge weight of the corresponding directed edge is 40.
[0147] In step S50, an executable production schedule is obtained: the second production line M2 processes B1, B2 and B3 in sequence, where B1 uses S1, with a start time of 08:00 and a finish time of 08:40; B2 uses S2, with a start time of 09:00 and a finish time of 09:40; and B3 uses S2, with a start time of 10:20 and a finish time of 11:00.
[0148] S1 has used a total of 18 bottles, not exceeding the available quantity of 30 bottles for S1; S2 has used a total of 14 bottles, not exceeding the available quantity of 20 bottles for S2.
[0149] Production line M1 processes B5 and B4 sequentially. Switching from plain to red date flavor on production line M1 takes 25 minutes, with B5 starting at 08:25 and completing at 09:05. Switching back from red date to plain flavor takes another 25 minutes, with B4 starting at 09:30 and completing at 10:10. B4 and B5 together use a total of 17 bottles of S3, not exceeding the usable quantity of S3 (25 bottles), and the completion times of both B4 and B5 are no later than the effective cutoff time of S3 at 10:30.
[0150] In the production scheduling results, orders O1 and O4 are covered by B1, order O2 is covered by B2, order O3 is covered by B3, order O5 is covered by B4, and order O6 is covered by B5. Each order is covered once.
[0151] If another candidate solution allocates all B1, B2, and B3 to S2, then the cumulative demand for S2 is 32 bottles, exceeding the available quantity of S2 by 20 bottles. The overall solution process treats the combination of the candidate batches with S2 as a material conflict combination and re-solves the problem.
[0152] Since B1 also has a state node that uses the foaming material batch S1, and B1 can complete its use of S1 before the effective deadline of S1, resolving the problem allows B1 to be reassigned to S1. After reassignment, the cumulative usage of S2 is reduced to 14 bottles, satisfying the available quantity constraint.
[0153] If the processing sequence B2, B1, and B3 is adopted, B2 starts at 08:20 and finishes at 09:00; B1 starts at 09:25 and finishes at 10:05 after completing a 25-minute flavor wash; and B3 starts at 10:35 and finishes at 11:15 after completing a 30-minute flavor wash. Since the completion time of B3 is later than the effective deadline of S2 at 11:00, this processing sequence is not feasible.
[0154] The subproblem continues to examine other combinations of state nodes and processing sequences. When there are feasible processing sequences of B1, B2, and B3 as mentioned above, B1, B2, and B3 are not identified as candidate batches that cause conflict; only when all possible combinations of state nodes and processing sequences are infeasible, the candidate batch set that causes conflict is extracted according to the conflict set reduction method in step S57.
[0155] In step S60, if a new Class A rock candy flavor order is received at 09:15, the completed B1, the B2 currently being processed, and the completed B5 are fixed. The available quantities of S1, S2, and S3 are updated according to the actual material consumption. The B3 and B4, which have not yet started processing, are split back into the order and reassembled with the new order to form a new order set. Subsequently, steps S20 to S50 are re-executed according to the updated production line status, the available quantity of the foaming material batch, and the effective cutoff time of the foaming material batch, outputting the updated candidate batch sequence, start time, and batch of foaming material used.
[0156] In this embodiment, a running record can also be generated for each round of solving. The running record includes the production scheduling data snapshot time, order number, candidate batch number, foaming material batch number, production line number, effective production period, feasible start interval of status node, start time, completion time, flavor cleaning time, edge weight, cumulative usage of foaming material batch, time conflict set, material conflict combination set, uncovered orders, and adjustment results.
[0157] The operation record is stored in the production scheduling task record of the manufacturing execution system. It is used to verify order coverage, batch consumption of foaming materials, and production line processing sequence, but does not participate in changing production scheduling constraints.
[0158] See Figure 4 The second embodiment of the present invention proposes an intelligent order allocation and production line distribution system for fresh stewed bird's nest C2M orders, including: The data acquisition module is configured to acquire order data, batch data of soaked materials, production line status data, and flavor washing time tables. The window calculation module is configured to calculate the effective production time of each order on each production line based on the latest completion time of the order, the effective cut-off time of the batch of soaked materials, the stewing processing time, the available time of the production line, and the flavor washing time, and delete combinations where the lower bound of the interval is later than the upper bound of the interval. The candidate batch generation module is configured to merge orders with the same type and flavor of bird's nest, whose total product quantity does not exceed the production line capacity, and whose effective production time intersection on the same production line is not empty into candidate batches, and record the intersection of the effective production time as the feasible start interval of the candidate batch on each production line. The state transition diagram construction module is configured to combine candidate batches and foaming material batches into state nodes, and establish directed edges based on the flavor washing time between state nodes, the feasible start interval of candidate batches, and the effective end time of foaming material batches to form a production line state transition diagram. The collaborative solution module is configured to output the candidate batch sequence, start time, and foaming material batch used for each production line based on the production line state transition diagram, under the constraints that each order with candidate batches is covered by only one selected candidate batch and the cumulative usage of the same foaming material batch does not exceed the available quantity.
[0159] The above embodiments illustrate the technical solution of the present invention, but the present invention is not limited to the specific data, solver types, or system deployment methods described above. Any adjustments made by those skilled in the art to the data storage method, path search method, main problem solving method, or module deployment location without departing from the technical concept of the present invention are all implementation forms of the technical solution of the present invention.
[0160] The above description is merely a specific embodiment of this application and is not intended to limit this application. For those skilled in the art, equivalent substitutions or adjustments can be made to the relevant technical features without departing from the inventive concept of this application, and the resulting technical solutions should still fall within the scope of protection claimed in this application.
[0161] The terms "first" and "second" are used only to distinguish the corresponding objects and do not imply a specific order between the objects. The term "comprising" indicates non-exclusive inclusion, which means that a process, method, or system that includes a series of elements can also include other inherent elements not explicitly listed.
Claims
1. A method for intelligent order splitting and production line allocation of freshly stewed bird's nest C2M orders, characterized in that, include: Obtain order information, batch number of soaked materials, production line status, and flavor cleaning time table; Based on the latest completion time of the order, the effective cut-off time of the batch of soaked materials, the stewing and cooking time, the available time of the production line, and the flavor washing time, the effective production time of each order on each production line is determined, and combinations where the lower bound of the interval is later than the upper bound of the interval are deleted. Orders with the same type and flavor of bird's nest, whose total quantity does not exceed the production line capacity, and whose effective production time intervals on the same production line are not empty are merged into candidate batches. The intersection of the effective production time intervals is recorded as the feasible start interval of the candidate batch on each production line. Candidate batches and soaking material batches are combined into state nodes. Directed edges are established based on the flavor washing time between state nodes, the feasible start interval of candidate batches, and the effective cutoff time of soaking material batches to form a production line state transition diagram. Under the constraints that each order with candidate batches is covered by only one selected candidate batch and the cumulative usage of the same foaming material batch does not exceed the available quantity, the candidate batch sequence, start time and foaming material batch used for each production line are output based on the production line state transition diagram.
2. The method according to claim 1, characterized in that, The effective production periods for each order on each production line include: Read the latest completion time from the order delivery requirements or shipping requirements, and subtract the stewing and cooking time to get the latest start time for delivery; Subtract the cooking time from the effective cut-off time of the batch of soaked materials to obtain the latest start time of the materials. The earlier of the latest start time for delivery and the latest start time for materials shall be taken as the overall latest start time. The sum of the available time of the production line and the flavor cleaning time is taken as the earliest start time of the production line. The earliest start time of the production line is used as the lower limit of the interval, and the latest start time is used as the upper limit of the interval to form an effective production period. When an order has multiple available foaming material batches, the effective production time period for each foaming material batch is calculated on each production line. Combinations where the lower bound of the interval is later than the upper bound of the interval are deleted. The foaming material batch used in the effective production time period with the longest interval length on each production line is selected as the foaming material batch to participate in the generation of candidate batches.
3. The method according to claim 2, characterized in that, The method for determining the earliest start time of the production line includes: Read the production line availability time and current flavor from the production line status; read the order flavor from the order. Find the flavor cleaning time in the flavor cleaning time table when the production line switches from the current flavor to the order flavor, add the available time of the production line to the flavor cleaning time to get the earliest start time of the production line; If the earliest start time of the production line is later than the latest start time of the overall process, delete the combination of the order, the batch of foaming material, and the production line. When the earliest start time of the production line is no later than the latest start time of the overall time, the earliest start time of the production line is used as the lower limit of the interval and the latest start time of the overall time is used as the upper limit of the interval to form an effective production period.
4. The method according to claim 1, characterized in that, Consolidating orders into candidate batches includes: Orders are grouped according to type and flavor of bird's nest, and subsets of orders are enumerated within the same group; For each order subset, calculate the intersection of the effective production periods of the order subset on the same production line, and sum the product quantities of the order subset; When the sum of the product quantities does not exceed the production line capacity and the intersection of the effective production time periods is not empty, a candidate batch is generated, and the intersection of the effective production time periods is taken as the feasible starting interval of the candidate batch on the same production line. When the sum of the product quantities exceeds the production line capacity or the intersection of effective production periods is empty, no candidate batches of order subsets and production line combinations will be generated.
5. The method according to claim 1, characterized in that, The step of combining candidate batches and foaming material batches into a state node includes: Match the types of bird's nest in the candidate batch with the types of bird's nest in the soaking material batch, and read the product quantity of the candidate batch and the available quantity of the soaking material batch. A state node is generated when the types of bird's nest are consistent, the quantity of products does not exceed the available quantity, and there is an optional start time in the feasible start interval of the candidate batch, and the sum of the optional start time and the stewing processing time is not later than the effective end time of the soaked material batch. If the types of bird's nest are inconsistent, the quantity of products exceeds the available quantity, or there is no available start time that meets the time conditions in the feasible start interval of the candidate batch, a state node for the combination of candidate batch and soaking material batch will not be generated.
6. The method according to claim 1, characterized in that, The process of forming the production line state transition diagram includes: The initial state of the production line is used as the source node, the available time of the production line is used as the completion time of the source node, and the current flavor of the production line is recorded. The combination of candidate batch and foaming material batch is used as the state node; For the previous state node and the next state node, read the flavor cleaning time according to the production line flavor of the previous state node and the candidate batch flavor of the next state node. Take the later of the sum of the completion time of the previous state node and the flavor cleaning time and the lower bound of the feasible start interval of the next state node as the start time of the next state node, and take the sum of the start time and the stewing processing time as the completion time. A directed edge is established when the start time is no later than the upper bound of the feasible start interval and the completion time is no later than the effective cutoff time of the foamed material batch. Edge weights are formed based on the flavor cleaning time and the difference between the upper bound of the feasible start interval and the start time, and the feasible state transition path with the smallest sum of edge weights is selected.
7. The method according to claim 1, characterized in that, The output of the candidate batch sequence, start time, and batch of foaming material used for each production line based on the production line state transition diagram includes: Select candidate batches and assign production lines in the main problem; In the subproblem, check the production line state transition diagram along the assigned production line to see if the selected candidate batches have a processing sequence that satisfies the feasible start interval, flavor washing time, and effective cutoff time of the soaking material batch; If no feasible processing sequence exists, extract the set of candidate batches that cause conflict, add the constraint that prohibits all candidate batches in the candidate batch set from being assigned to the same production line at the same time, and return to the main problem to solve it again; When the cumulative usage of the same batch of foaming material exceeds the available amount, a constraint limiting the cumulative usage to not exceeding the available amount is added, and the problem is returned to be solved again. If a feasible processing sequence exists and the cumulative usage of each batch of foaming material does not exceed the available amount, output the candidate batch sequence, start time, and batch of foaming material used for each production line.
8. The method according to claim 1, characterized in that, Each order with a candidate batch is covered by only one selected candidate batch, including: Establish the inclusion relationship between orders and candidate batches, and select multiple candidate batches that contain the same order mutually exclusively; When a candidate batch is selected, the orders within the candidate batch are marked as covered, and any remaining candidate batches containing the same order are prevented from being selected. If the current candidate batch set cannot satisfy the condition that each order with a candidate batch is covered by only one selected candidate batch, the orders not covered by the selected candidate batch are identified as uncovered orders. The effective production period, the available quantity of foaming material batch, and the idle interval of the production line are read for the uncovered orders. Candidate batches containing uncovered orders are regenerated, the regenerated candidate batches are added to the candidate batch set, and the solution is returned. If a candidate batch containing uncovered orders cannot be generated, output the exception handling result containing the uncovered orders and the time or material constraints that caused the uncovering.
9. The method according to claim 1, characterized in that, After outputting the candidate batch sequence, start time, and batch of foaming material used for each production line, the following is also included: Receive new order insertion events, production line failure events, events where the remaining validity period of a batch of foamed material is lower than the preset near-expiration threshold, or production execution feedback events; Fix the candidate batches that have already started processing, and update the production line status, available quantity of foaming material batches, and effective cut-off time of foaming material batches according to event type; Candidate batches that have not yet started processing are split into orders contained in the candidate batches, and then reassembled into an order set with orders not covered by the selected candidate batches and new orders; For the reorganized order set, determine the latest start time for delivery. Based on the updated production line status, the available quantity of foaming material batches, and the effective cut-off time of foaming material batches, recalculate the effective production period and candidate batches, solve the production line status transition diagram, and output the updated candidate batch sequence, start time, and foaming material batches used.
10. A smart order allocation and production line distribution system for C2M orders of freshly stewed bird's nest, characterized in that, include: The data acquisition module is configured to acquire order data, batch data of soaked materials, production line status data, and flavor washing time tables. The window calculation module is configured to calculate the effective production time of each order on each production line based on the latest completion time of the order, the effective cut-off time of the batch of soaked materials, the stewing processing time, the available time of the production line, and the flavor washing time, and delete combinations where the lower bound of the interval is later than the upper bound of the interval. The candidate batch generation module is configured to merge orders with the same type and flavor of bird's nest, whose total product quantity does not exceed the production line capacity, and whose effective production time intersection on the same production line is not empty into candidate batches, and record the intersection of the effective production time as the feasible start interval of the candidate batch on each production line. The state transition diagram construction module is configured to combine candidate batches and foaming material batches into state nodes, and establish directed edges based on the flavor washing time between state nodes, the feasible start interval of candidate batches, and the effective end time of foaming material batches to form a production line state transition diagram. The collaborative solution module is configured to output the candidate batch sequence, start time, and foaming material batch used for each production line based on the production line state transition diagram, under the constraints that each order with candidate batches is covered by only one selected candidate batch and the cumulative usage of the same foaming material batch does not exceed the available quantity.