A production scheduling method and system for multi-order process routes in discrete manufacturing
Patent Information
- Application Number
- CN202611206336.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-10
- Publication Date
- 2026-11-03
AI Technical Summary
[0005]本方案中,通过将订单按产品工艺路线拆解为工序级任务,使排产粒度从订单级细化至工序级,解决了传统方案中订单整体排产无法准确反映车间实际加工过程的问题,为后续精细化调度提供了数据结构基础
[0020]基于同一技术构思,设计一种存储器,所述存储器存储有计算机程序或指令,所述计算机程序或指令在被处理器调用和运行时,所述计算机程序或指令促使所述处理器执行上述的排产方法。
Smart Images

Figure CN123032065A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of production scheduling technology, and in particular to a scheduling method and system for multi-order process routes in discrete manufacturing. Background Technology
[0002] In the production sites of discrete manufacturing enterprises, such as metalworking workshops and assembly workshops, production scheduling is typically carried out by planners based on basic data provided by ERP, MES, and other systems, including orders, product process routes, equipment resources, and personnel skills, using manual experience or simple dispatch rules. Common dispatch rules include first-come, first-served, earliest delivery date priority, shortest processing time priority, inserting tasks according to equipment idle time, and dispatching tasks according to personnel idle time. These methods are simple to implement and can maintain basic operations in small-batch, single-product production scenarios. However, as the market shifts towards multi-variety, small-batch, and customized production, enterprises face the complex situation of multiple orders, multiple products, and multiple process routes operating in parallel. In such scenarios, existing production scheduling solutions reveal several shortcomings. First, planners find it difficult to accurately break down a large number of orders into process-level tasks according to their respective process routes, and there are dependencies between multiple processes, making manual maintenance prone to errors or omissions. Second, traditional solutions often focus on equipment utilization or order delivery dates, which can easily lead to long periods of personnel idleness and uneven workloads, failing to reflect the on-site management requirements centered on personnel utilization. Summary of the Invention
[0003] To address the aforementioned technical problems, this application provides a scheduling method, system, and memory for multi-order process routes in discrete manufacturing.
[0004] A scheduling method for multi-order process routes in discrete manufacturing is provided, comprising: decomposing each order into multiple process-level tasks based on the process route of the product corresponding to each order; constructing a directed acyclic graph (DAG) with each process-level task as a node and the pre-dependencies between processes within the same order as directed edges; determining nodes that satisfy the pre-dependencies based on the DAG and designating the process-level tasks corresponding to those nodes as ready tasks; for each ready task, screening candidate personnel and equipment; for each pair of candidate personnel and equipment, jointly searching feasible time windows in the personnel timelines and equipment timelines to obtain several candidate scheduling schemes, wherein the feasible time windows must simultaneously satisfy personnel time conflicts, equipment time conflicts, daily work hour limits for personnel, and work calendar constraints; scoring the candidate scheduling schemes according to a composite scoring function with personnel utilization rate as the first priority, and selecting the candidate scheduling scheme with the best score as the scheduling scheme for the ready task; updating the personnel timelines and equipment timelines based on the scheduling schemes; completing the scheduling of all process-level tasks and outputting the scheduling results.
[0005] This solution breaks down orders into process-level tasks according to the product's technological route, refining the scheduling granularity from the order level to the process level. This solves the problem in traditional solutions where overall order scheduling cannot accurately reflect the actual processing in the workshop, providing a data structure foundation for subsequent refined scheduling. By constructing a directed acyclic graph to maintain the pre-dependencies between processes and dynamically releasing ready tasks that meet the dependency conditions, the solution ensures that multiple processes within the same order are scheduled sequentially according to the technological order, and that subsequent processes never start before preceding processes, completely avoiding sequence errors and technological conflicts caused by manually maintaining dependencies. By jointly searching for feasible time windows in the timelines of each candidate personnel and equipment, and mandating that personnel time, equipment time, daily working hour limits, and work calendars simultaneously meet constraints, this solution changes the traditional phased decision-making model of determining equipment first and then finding personnel, or vice versa. It avoids repeated adjustments caused by inconsistencies in personnel and equipment matching, and a feasible scheduling solution that simultaneously meets both personnel and machine constraints can be obtained in a single search. The composite scoring and selection mechanism with personnel utilization rate as the core prioritizes solutions that allow personnel to have continuous tasks, reduce long periods of idle time, and achieve a more balanced workload, while ensuring compliance with all production constraints. This effectively improves the overall utilization rate of workshop personnel.
[0006] Furthermore, before breaking down the order into multiple process-level tasks, the method also includes: in response to a production scheduling request, verifying the production scheduling input data; the verification of the production scheduling input data includes at least: verifying whether the order status is pending production, verifying whether the product in the order has a corresponding process route, and verifying whether each process has at least one available piece of equipment and at least one skilled person.
[0007] This solution incorporates a pre-process data verification mechanism before production scheduling breakdown, screening input data for compliance across four core dimensions: order status, process route, equipment resources, and human skills. Compared to traditional scheduling methods that rely solely on raw data without pre-process verification, this approach proactively intercepts invalid orders, requests lacking process support, or those without matching production resources. It prevents subsequent process breakdowns, scheduling calculations from becoming invalid, generating errors, or resulting in ineffective scheduling results. This effectively avoids wasted scheduling resources, unimplemented production plans, and distorted scheduling results caused by abnormal basic data, significantly improving the overall success rate of scheduling, reducing unnecessary computational power consumption, ensuring the orderly and efficient execution of the entire scheduling process, and enhancing the stability and usability of the scheduling system.
[0008] Furthermore, the step of determining nodes that satisfy prerequisite dependencies based on the directed acyclic graph and treating the corresponding process-level tasks of the nodes as ready tasks includes: maintaining the task state of each node, where the task state includes pending, ready, scheduled, and completed; when all the prerequisite nodes of a node in the pending state are in the completed or scheduled state, and the end time of the prerequisite nodes satisfies the time constraint, the node state is set to the ready state, and the corresponding process-level tasks of the node are treated as ready tasks.
[0009] This solution maintains four states for each process-level task node: pending, ready, scheduled, and completed. It dynamically determines whether a node meets the ready condition based on both the completion status and end time of the preceding node, achieving refined and dynamic management of process dependencies. Compared to traditional solutions that simply determine whether the preceding process is completed, this solution also incorporates whether the end time of the preceding process meets the start time constraint of the subsequent process into the ready determination condition. This explicitly considers time-related dependencies, further ensuring that tasks entering the ready pool are scheduled in both time and process dimensions, effectively avoiding the hidden problem of tasks meeting process sequence requirements but still having time conflicts.
[0010] Furthermore, the feasible time window in the joint search of personnel timelines and equipment timelines includes: incrementally searching for candidate start times from the earliest feasible start time with a preset time step, skipping start times on non-working days, start times during non-working hours, and start times during lunch breaks; calculating candidate end times based on the effective working hours required for the task, deducting lunch breaks during the calculation process and allowing for extensions across days; and using the candidate start time and candidate end time that simultaneously satisfy the following conditions: no overlap between personnel timelines, no overlap between equipment timelines, the cumulative effective working hours of personnel on the same day do not exceed the daily working hour limit, and the start time is not earlier than the end time of all preceding processes as the feasible time window.
[0011] This solution searches for candidate start times incrementally from the earliest feasible start time using a preset time step. During the search, it actively skips start times for non-working days, non-working hours, and lunch breaks, directly embedding the workshop's real calendar constraints into the time window search process. This eliminates invalid solutions that schedule tasks at invalid start times from the source, reducing the computational overhead of subsequent verification and backtracking. By calculating candidate end times based on the required effective working hours of the task, and deducting lunch breaks and allowing for cross-day continuation during the calculation, the working hour calculation accurately reflects the workshop's actual working time system—tasks can start before lunch breaks and continue after lunch breaks, or be processed continuously across days, with effective working hours automatically deducted for lunch breaks and non-working hours. This approach makes the production scheduling results more closely match the actual production rhythm of the workshop, avoiding errors caused by simply accumulating processing time based on natural time. By requiring candidate time windows to simultaneously meet four hard conditions—non-overlapping personnel timelines, non-overlapping equipment timelines, personnel's cumulative effective working hours not exceeding the daily working hour limit, and start time not earlier than the end time of all preceding processes—the legality of personnel scheduling, equipment occupancy, labor law constraints, and process sequence constraints are all verified in a single joint search, ensuring that the candidate production scheduling schemes for time windows are compliant in both resource and institutional dimensions.
[0012] Furthermore, the composite scoring function is: Score = α × IdleGapScore + β × DayFillScore + γ × LoadBalanceScore + δ × DueDateScore + ε × ContinuityScore, where IdleGapScore is the personnel idle time score, DayFillScore is the personnel daily work hour fill rate score, LoadBalanceScore is the personnel load balancing score, DueDateScore is the order delivery date risk score, and ContinuityScore is the equipment continuous processing score; α, β, γ, δ, and ε are the weight coefficients of each item, and the weights of α, β, and γ are all greater than the weights of δ and ε.
[0013] Furthermore, before outputting the production scheduling results, a local search optimization is performed on the generated feasible production schedule. The local search optimization includes: performing an idle compression operation and / or a personnel switching operation on the generated production schedule results without breaking constraints. The idle compression operation is to move the subsequent tasks of the same personnel forward to the idle period after the previous task is completed. The personnel switching operation is to transfer the task from a high-load personnel to a low-load personnel with the same skills.
[0014] This solution introduces local search optimization after coarse scheduling, performing two types of repair operations on the generated feasible scheduling results: idle time compression and personnel switching. This further reduces redundant idle time and load imbalances in the scheduling plan without violating any hard constraints. Specifically, idle time compression moves subsequent tasks for the same personnel to the idle period after the previous task ends, filling in any time fragments that may have been left over from the coarse scheduling stage. Personnel switching transfers tasks from high-load personnel to low-load personnel with similar skills, improving load balance among personnel. These two operations complement each other, jointly achieving redundancy removal and rebalancing of the coarse scheduling results. Any adjustments are made without violating hard constraints, ensuring the safety of the optimization process.
[0015] Furthermore, after the local search optimization, tail segment optimization is performed, which includes: identifying the tail segment intervals in the feasible production schedule where the personnel utilization rate is lower than a preset threshold or the load is unbalanced; establishing a constrained programming sub-model for the tasks in the tail segment interval and resolving it; and replacing the original tail segment production schedule with the solution result.
[0016] This solution introduces tail-end optimization after local search optimization. It establishes a constrained programming sub-model for the tail-end intervals in the scheduling results where personnel utilization is consistently low or load is unbalanced, and then performs an exact resolution. This achieves a layered optimization architecture where heuristic coarse scheduling lays the foundation, local search refines details, and exact solution tackles the final challenges. Compared to existing solutions that directly use an exact solver for the entire scheduling task, resulting in excessively long solution times and inability to meet real-time requirements, this solution only performs small-scale exact modeling and solving for the undesirable tail-end intervals in the scheduling results. This achieves a better local scheduling solution than pure heuristic methods within the tail-end intervals while keeping the computation time within an acceptable range, thus balancing scheduling quality and computational efficiency.
[0017] Furthermore, the method also includes: performing hard constraint verification on the production scheduling plan, wherein the hard constraints include at least the following: verification of dependencies between preceding and subsequent processes, verification of personnel skills, verification of equipment capabilities, verification of non-overlapping personnel timelines, verification of non-overlapping equipment timelines, verification of daily working hour limits, and verification of work calendar.
[0018] This solution employs a hard constraint check on all processes before and after the production scheduling plan, including dependencies between processes, personnel skills, equipment capabilities, no overlap in personnel timelines, no overlap in equipment timelines, daily work hour limits, and work calendars. This hard gate mechanism ensures that any production scheduling plan that fails to meet any of these constraints is blocked and prohibited from output. This mechanism guarantees, from a system architecture perspective, that the final production scheduling results sent to the workshop meet 100% of the on-site executable conditions, preventing unexecutable schedules due to algorithm defects or data anomalies from flowing into the production process, significantly improving the reliability and on-site implementation of the scheduling results. Furthermore, this check is performed after coarse scheduling, local optimization, and tail-end optimization, forming a multi-layered safety net. Any optimization operation that violates hard constraints can be immediately rolled back, ensuring that the production scheduling results always remain within safe boundaries.
[0019] Based on the same technical concept, a production scheduling system is designed, including a processor and a memory storing computer programs or instructions that can run on the processor, wherein the computer programs or instructions are executed by the processor to implement the above-mentioned production scheduling method.
[0020] Based on the same technical concept, a memory is designed that stores computer programs or instructions. When the computer programs or instructions are called and run by a processor, the computer programs or instructions cause the processor to execute the above-mentioned scheduling method.
[0021] Compared with existing technologies, the beneficial effects of this application are as follows: By breaking down orders into process-level tasks according to the product process route, the granularity of production scheduling is refined from the order level to the process level, solving the problem that the overall production scheduling of orders in traditional solutions cannot accurately reflect the actual processing process in the workshop, and providing a data structure foundation for subsequent refined scheduling. By constructing a directed acyclic graph to maintain the pre-dependencies between processes and dynamically releasing ready tasks that meet the dependency conditions, the mechanism ensures that multiple processes within the same order are scheduled in the process sequence, and that the later process never starts before the earlier process, completely avoiding sequence errors and process conflicts caused by manually maintaining dependencies. By jointly searching for feasible time windows in the timelines of each group of candidate personnel and equipment, and forcing that personnel time, equipment time, daily working hour limit, and work calendar simultaneously meet the constraints, this changes the phased decision-making mode of the traditional solution of determining equipment first and then finding personnel or determining personnel first and then finding equipment, avoiding repeated adjustments caused by inconsistent personnel and equipment matching, and obtaining a feasible production scheduling solution that simultaneously meets both personnel and machine constraints in a single search. The composite scoring and selection mechanism with personnel utilization rate as the core prioritizes solutions that allow personnel to have continuous tasks, reduce long periods of idle time, and achieve a more balanced workload, while ensuring compliance with all production constraints. This effectively improves the overall utilization rate of workshop personnel. Attached Figure Description
[0022] Figure 1 This is a flowchart illustrating the scheduling method for multi-order process routes in discrete manufacturing proposed in this application.
[0023] Figure 2 This is a flowchart illustrating the feasible time windows in the joint search personnel timeline and equipment timeline of this application.
[0024] Figure 3 This is a schematic block diagram of the production scheduling system of this application. Detailed Implementation
[0025] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0026] Example 1:
[0027] In the production sites of discrete manufacturing enterprises, such as metalworking workshops and assembly workshops, production scheduling is typically carried out by planners based on basic data provided by ERP, MES, and other systems, including orders, product process routes, equipment resources, and personnel skills, using manual experience or simple dispatch rules. Common dispatch rules include first-come, first-served, earliest delivery date priority, shortest processing time priority, inserting tasks according to equipment idle time, and dispatching tasks according to personnel idle time. These methods are simple to implement and can maintain basic operations in small-batch, single-product production scenarios. However, as the market shifts towards multi-variety, small-batch, and customized production, enterprises face the complex situation of multiple orders, multiple products, and multiple process routes operating in parallel. In such scenarios, existing production scheduling solutions reveal several shortcomings. First, planners find it difficult to accurately break down a large number of orders into process-level tasks according to their respective process routes, and there are dependencies between multiple processes, making manual maintenance prone to errors or omissions. Second, traditional solutions often focus on equipment utilization or order delivery dates, which can easily lead to long periods of personnel idleness and uneven workloads, failing to reflect the on-site management requirements centered on personnel utilization.
[0028] To address the aforementioned issues, this embodiment provides a scheduling method for multi-order process routes in discrete manufacturing. Under the premise of ensuring that constraints cannot be violated, it prioritizes improving personnel utilization, reducing mold changes and unnecessary waiting, while also taking into account delivery risks, equipment continuity, and overall completion time.
[0029] like Figure 1 As shown, this embodiment provides a scheduling method for multi-order process routes in discrete manufacturing, including the following steps S100 to S400.
[0030] S100 breaks down orders into multiple process-level tasks based on the process route of the product corresponding to each order.
[0031] Before breaking down an order into multiple process-level tasks, scheduling inputs are read from various data sources, including front-end scheduling requests, order pools, product master data, product process routes, process dependencies, equipment capabilities, personnel skills, equipment status, mold change rules, shift calendars, and workshop work calendars. The input data is then thoroughly validated and cleaned to filter out unusable resources and invalid data, standardize data formats, and supplement default parameters. This ensures that only data that passes validation and meets the scheduling requirements can proceed to the subsequent scheduling process.
[0032] Specifically, the process begins by receiving and parsing production scheduling requests to form standardized request objects. Production scheduling input data must include at least the following information: Production scheduling baseline parameters: Production scheduling baseline date, which is the starting date of production scheduling calculation; Start time, which is the clock time when production scheduling begins each day; End time, which is the clock time when production scheduling ends each day; Lunch break start and end time, used to deduct invalid time periods in work hour calculation.
[0033] Filtering parameters: Workshop filtering conditions, which limit the production scheduling range to a specified workshop; Shift filtering conditions, which limit the types of shifts participating in production scheduling; Specified orders, which can limit production scheduling to specific orders only, and support partial rescheduling scenarios.
[0034] Time and penalty parameters: Time margin coefficient, used to add buffer margin to the standard working hours; Overdue penalty coefficient, used to quantify the cost of delay in the scoring function; Maximum search days, limiting the time boundary of the time window search.
[0035] Basic data includes: order information pending production in the order pool, product master data, complete process routes for each product (including process number, process name, process sequence number, and dependencies of preceding processes), equipment capacity mapping table, personnel skill matrix, equipment status information, mold change rule configuration, workshop work calendar, etc.
[0036] Before production scheduling calculation, in response to the production scheduling request, multi-dimensional validation is performed on the above production scheduling input data, specifically including the following operations: The system validates the production scheduling input data, including at least the following: First, it verifies whether the order status is "pending scheduling." Orders that are scheduled, closed, canceled, or have an abnormal status are not included in the scheduling pool. Second, it verifies whether the product in the order has a corresponding process route. If a product lacks a process route definition, the order cannot be broken down into processes, the system marks the order as having a missing process route and generates an error list, preventing it from being included in subsequent scheduling calculations. Third, it verifies whether each process has at least one available piece of equipment and at least one skilled worker. For the equipment type required for a process, the system queries the equipment master data to confirm whether there is at least one piece of equipment that is available and has the processing capability for that process. For the personnel skills required for a process, the system queries the personnel skill matrix to confirm whether there is at least one worker who belongs to the target workshop and target shift, is not out of service, and possesses the skills required for that process.
[0037] A pre-process data verification mechanism is added before the production scheduling breakdown operation to screen the compliance of input data from four core dimensions: order status, process route, equipment resources, and human skills. Compared with the traditional production scheduling method that directly arranges based on raw data without pre-process verification, this method can intercept invalid orders, abnormal production scheduling requests without process support, or without matching production resources in advance. It eliminates problems such as invalid calculations, errors, and invalid production scheduling results in subsequent process breakdown and scheduling calculations from the source. It effectively avoids the waste of scheduling resources, the inability to implement production plans, and the distortion of scheduling results caused by abnormal basic data, significantly improves the overall success rate of production scheduling, reduces the consumption of ineffective computing power, ensures the orderly and efficient operation of subsequent production scheduling work, and enhances the stability and practicality of the production scheduling system.
[0038] Simultaneously, the production scheduling input data is cleaned, including at least the following: Equipment filtering: Based on equipment status information, equipment in unavailable states such as downtime, maintenance, and malfunction is filtered out, retaining only equipment whose status allows for production scheduling. Personnel filtering: Personnel are screened according to workshop and shift filtering conditions, excluding personnel who do not belong to the target workshop, shift, are on leave, or are in an unavailable state. Data format standardization and parameter completion: The system standardizes date format, working hour unit, quantity unit, and delivery date expression format to ensure that all data has consistent units of measurement when entering production scheduling calculations. For default parameters such as standard working hours, efficiency coefficient, and time margin coefficient, default values are automatically filled according to preset rules. For data with missing process routes, missing equipment capabilities, missing personnel skills, or abnormal delivery dates, error lists or warning lists are generated and output along with the reasons for non-scheduling, for verification and data correction.
[0039] After the above preprocessing, a standardized production scheduling request object is output. This object contains all validated order data, product data, process route data, available equipment set, available personnel set, and various production scheduling parameters.
[0040] After data preprocessing, the process enters the work-level task decomposition stage. The core function of this step is to decompose the order into work-level tasks according to the process route of the product corresponding to each order, and according to the process sequence and prerequisite dependencies, forming the smallest independently schedulable computing unit. Among them, prerequisite dependencies refer to the objectively existing sequential execution order constraints between processes within the same order and the same product process route.
[0041] For each order, perform the following breakdown operations: determine the production quantity, read the process route, and generate tasks for each process.
[0042] To determine the production schedule quantity, first read the production schedule quantity of the order, which will be used as the total quantity that needs to be produced for that order.
[0043] Read the process route. Based on the product number of the order, read the complete process route corresponding to the product from the product master data, including all process nodes of the product, process number of each process, process name, process sequence and predecessor process dependencies.
[0044] Tasks are generated step by step. For each step in the process route, one or more step-level tasks are generated. Each step-level task contains at least the following fields: task index, order index, order number, product number, step number, step name, step sequence, preceding step, batch number, batch quantity, standard single-piece working hours, total standard working hours, candidate equipment set, and candidate personnel set.
[0045] It should be noted that if the order quantity exceeds the preset batch granularity, the same process will be split into multiple sub-batch tasks according to the preset batch granularity or the planned granularity. Specifically: first, determine the batch granularity, such as 100 pieces per batch, and divide the order quantity into several complete batches according to this granularity; for the last batch, take the remaining quantity and treat each sub-batch as an independent process-level task to participate in subsequent production scheduling.
[0046] The process task decomposition step outputs a complete process-level task network—each task retains complete information such as its order, product, process, quantity, working hours, and candidate resource set, while also preserving the internal process sequence relationship within the order through the process sequence number and the dependency field of the preceding process. These process-level tasks will serve as input nodes for the subsequent directed acyclic graph (DAG) dependency construction step.
[0047] S200: Using process-level tasks as nodes and the pre-dependencies between processes within the same order as directed edges, construct a directed acyclic graph. Based on the directed acyclic graph, determine the nodes that satisfy the pre-dependencies and designate the process-level tasks corresponding to those nodes as ready tasks.
[0048] Each process-level task generated in step S100 is used as a node in the DAG. Each node carries complete task attribute information, including at least: task index, order index, order number, product number, process number (process_no), process name, process sequence number, predecessor process dependencies, batch number, batch quantity, total standard working hours, candidate equipment set, and candidate personnel set.
[0049] The process dependencies within the same order, product, and batch are used as directed edges in the Directed Acyclic Graph (DAG). For each process node, its predecessor process dependency field is read. If this field is empty or 0, it means that the process does not depend on any predecessor process, and this node is the starting node (source node) of the DAG. If this field points to a process sequence number, a directed edge is established from the pointed-to predecessor process node to the current process node, with the direction from the predecessor process to the subsequent process. The semantics are that the preceding process must be completed before the subsequent process can begin.
[0050] After the DAG is constructed, the task status is maintained for each node. The task status includes pending, ready, scheduled, and completed.
[0051] The pending state indicates that the task at this work stage has not yet met all its prerequisites and cannot be scheduled at this time. A node in the pending state has at least one of its prerequisite nodes that has not yet been completed, or the completion time of a prerequisite node does not yet meet the time constraint. The pending state is the initial state of each node.
[0052] The ready state indicates that all preceding nodes of the task at this process level are in the completed or scheduled state, and the end time of the preceding nodes meets the time constraint. The task has met all the conditions for scheduling and can be added to the ready task pool to wait for scheduling.
[0053] The "Scheduled" status indicates that the task at this work process level has been selected and the scheduling plan has been finalized. This means that the personnel, equipment, and specific time window for executing the task have been determined, but the task has not yet been completed on the actual timeline. The "Scheduled" status is used in dependency propagation to indicate that resources have been allocated to this node, and subsequent nodes can begin checking whether the readiness conditions are met.
[0054] The completion status indicates that the task at this work process level has not only been scheduled in the production plan, but its production time window has also actually ended (it has ended on the timeline of the production schedule results). The completion status is the final state of a node, indicating that the work process task corresponding to this node no longer occupies any resources on the timeline.
[0055] A polling and scanning mechanism is used to dynamically determine and release ready tasks. At the start of each scheduling round, the system traverses all nodes currently in a pending state and performs a ready condition check on each pending node. For any pending node, if all its predecessor nodes are in a completed or scheduled state (meaning that all predecessor processes that the node depends on have been scheduled or actually completed on the timeline), and the end times of the predecessor nodes meet the time constraints (i.e., the earliest feasible start time of the node is not earlier than the end times of all its predecessor nodes), then the node does not meet the time-dimensional ready condition. If the end time of any predecessor node is later than the planned start time of the current node, then the node does not meet the time-dimensional ready condition.
[0056] When both of the above conditions are met, the node's state is switched from pending to ready, and the corresponding process-level task is added to the ready task pool, that is, the corresponding process-level task is treated as a ready task.
[0057] In each round of scheduling, after a ready task is selected from the ready task pool and completed, its status changes from ready to scheduled, and then to completed after the round of scheduling ends. Updates to node status may trigger new nodes to meet the ready conditions, as the completion of one node may become a prerequisite for another pending node. After each round of scheduling, a new scan is performed, adding newly met nodes to the ready task pool. This iterative process continues until all process-level tasks have been scheduled and completed.
[0058] During DAG construction, the system synchronously performs anomaly detection to ensure the correctness and production scheduleability of the DAG structure. Anomaly detection includes cyclic dependency detection, missing predecessor node detection, and process sequence anomaly detection. Circular dependency detection checks for directed cycles in a Directed Acyclic Graph (DAG), specifically, whether process A depends on process B, and process B directly or indirectly depends on process A. If a circular dependency is detected, it means that two or more processes are waiting for each other to complete, logically constituting a deadlock. Such process routing data itself contains errors, making it impossible to generate an executable scheduling plan. Upon detecting a circular dependency, an error message is immediately returned, and scheduling is terminated.
[0059] For missing prerequisite node detection, the system checks whether the prerequisite dependency (depends_on_sort) of each node points to an actual existing process node. If the value of a node does not have a corresponding process sequence number in the process route, the dependency relationship cannot be resolved, the system returns a missing prerequisite node error and terminates production scheduling.
[0060] The system detects logical contradictions between the process sequence and its dependencies, such as a subsequent process having a lower process sequence number than a preceding process. If such an anomaly is detected, the system returns a process sequence error message and terminates production scheduling.
[0061] By maintaining four states—pending, ready, scheduled, and completed—for each process-level task node, and dynamically determining whether a node meets the ready condition based on both the completion status and end time of the preceding node, this approach achieves refined and dynamic management of process dependencies. Compared to traditional solutions that simply determine whether the preceding process is completed, this solution also incorporates whether the end time of the preceding process meets the start time constraint of the subsequent process into the ready determination condition. This explicitly considers time-related dependencies, further ensuring that tasks entering the ready pool are scheduled in both time and process dimensions, effectively avoiding the implicit problem of tasks meeting the process sequence but still having time conflicts.
[0062] Furthermore, before constructing the directed acyclic graph, the process-level tasks output in step S100 can be aggregated and identified without disrupting order process dependencies and batch relationships. Aggregation criteria include: identical process numbers, overlapping sets of available equipment, identical mold numbers or tooling fixtures, similar processing parameters or product families, consistent workshop and shift, and task delivery windows allowing for continuous processing. Process-level tasks meeting all of the above conditions are grouped into the same task group, i.e., the same process-level aggregation group.
[0063] After tasks are grouped into the same aggregation group, the system does not merge multiple tasks into a single indivisible task. Each task retains its own independent order attribution, batch identity, process attribute, quantity, working hours, and resource set information. The essence of the aggregation operation is simply to add or associate an aggregation group ID tag to the data structure of each task, which is used to identify the priority condition of continuous processing in terms of processing attributes.
[0064] The utility of the aggregation group label is mainly reflected in the subsequent scheme scoring and selection steps. When calculating the continuity score in the composite scoring function, it checks whether the current task to be scheduled and the previously scheduled task on the same equipment belong to the same aggregation group: if the current task and the previous task belong to the same aggregation group (i.e., the same process, the same equipment, the same mold, or the same mold change attribute), then continuous processing is allowed, and the system assigns a lower continuity penalty (i.e., a scoring bonus). If the current task and the previous task do not belong to the same aggregation group, i.e., it is necessary to switch from one process / mold to another, the system includes the mold change preparation time and assigns a higher continuity penalty. Preferably, when the equipment switches from the previous task to a different process, a different mold, or a different processing attribute, the mold change preparation time can be preset to 120 minutes. This mold change time is included in the total working hours as an additional time cost or as a scoring penalty item; if the same process or the same mold change attribute is processed continuously, the mold change time penalty is reduced or waived.
[0065] S300, for each ready task, filters candidate personnel and equipment, and for each group of candidate personnel and equipment, jointly searches for feasible time windows in the personnel timeline and equipment timeline, thereby obtaining several candidate production scheduling solutions. Feasible time windows must simultaneously satisfy personnel time without conflict, equipment time without conflict, personnel daily working hour limit and work calendar constraints.
[0066] The joint time window search changes the traditional phased decision-making model of first determining equipment and then finding people or vice versa. By searching the timelines of both personnel and equipment simultaneously, it ensures that candidate solutions meet all hard constraints at the time of generation, such as no personnel conflicts, no equipment conflicts, no daily working hour limits, and compliance with work calendars. This fundamentally avoids repeated backtracking and adjustments caused by inconsistent resource matching.
[0067] Before starting the time window search, candidates for the corresponding currently ready tasks are first filtered. The filtering rules include the following necessary conditions: the workshop to which the personnel belong meets the workshop filtering conditions in the production scheduling request; the shift to which the personnel belong meets the shift filtering conditions in the production scheduling request; the personnel are not deactivated, that is, the personnel are in an active state in the system that can participate in production scheduling; the personnel have the skills corresponding to the current process in the personnel skill matrix; the personnel are not on leave or unavailable on the target date, that is, the personnel are marked as available for attendance in the work calendar; the personnel's remaining available working hours for the day are greater than 0, that is, the working hours used that day have not reached the daily working hour limit. The candidate personnel are no longer simply sorted in descending order of efficiency, but are sorted by a combination of the following factors: the personnel's working hours used that day (prioritizing personnel who have a certain workload but have not exceeded the limit), the cumulative workload (prioritizing personnel with a lower cumulative workload), the time of the most recent task completion (prioritizing personnel who have just completed the previous task), the current idle time (prioritizing personnel who are about to enter idle time), the remaining available working hours (prioritizing personnel with sufficient remaining working hours), and the process efficiency (prioritizing personnel with high proficiency in the process). The ranking factors mentioned above are used to calculate a comprehensive score, which is then ranked in descending order. This ranking strategy ensures that, all other things being equal, the system prioritizes personnel combinations that can fill time gaps, improve the utilization rate of working hours for the day, and avoid long periods of idleness.
[0068] Candidate equipment corresponding to the currently ready tasks is selected synchronously. The selection rules include the following necessary conditions: the equipment status is in an allowed state, excluding unavailable equipment such as those that are down, under maintenance, or faulty; the workshop to which the equipment belongs matches the workshop filtering conditions in the production scheduling request; there is a machine-process mapping relationship between the equipment and the current process, that is, the equipment has the ability to process the current process; the equipment timeline has no conflict within the candidate time window, that is, the equipment is in an idle state during the intended time period.
[0069] The selected candidates are combined with candidate devices to form several candidate personnel-device resource combinations. Each candidate combination is in the form of a personnel ID-device ID, indicating that the current task can be assigned to that personnel on that device. Each candidate combination will be used as independent input in the subsequent time window search process. There is no restriction on fixing personnel first and then searching for devices, or fixing devices first and then searching for personnel; instead, time window searches are performed on all candidate combinations in parallel.
[0070] For a currently ready task and a set of candidate personnel-device combinations, the system first determines the starting time point of the search, i.e., the earliest feasible start time. The earliest feasible start time is the maximum value of the following three time points.
[0071] DAG Pre-Task End Time: The end time of the latest node among all the pre-task nodes of the current task. If the current task is the starting node, this value is the start time of the production scheduling base date.
[0072] Personnel's Existing Task End Time: The end time of the last segment of time occupied by this candidate on the current timeline. If the personnel's timeline is empty, this value is the start time of the production scheduling base date.
[0073] Equipment Existing Task End Time: The end time of the last segment of time occupied by this candidate equipment on the current timeline. If the equipment timeline is empty, this value is the start time of the production scheduling base date.
[0074] The maximum value of the above three time points is taken as the earliest feasible start time. The technical meaning is that the start time of the current task must not be earlier than the actual completion time of the previous process (to ensure the process sequence), must not be earlier than the time when the person completes all previous tasks (to ensure no personnel conflict), and must not be earlier than the time when the equipment completes all previous tasks (to ensure no equipment conflict).
[0075] The personnel timeline uses personnel ID as the key and a list of time periods as the value, and is stored and retrieved using a range tree or ordered list. Each time period record includes: Task ID: The process-level task identifier occupying this time period. Start Time: The planned start time of the task on the personnel timeline. End Time: The planned end time of the task on the personnel timeline (including the actual end time of effective working time, excluding lunch breaks). Effective Working Minutes: The actual effective working minutes of the personnel within this time period (excluding non-working time such as lunch breaks).
[0076] The equipment timeline uses equipment IDs as keys and a list of time periods as values, with the same storage structure as the personnel timeline. Each time period record includes: Task ID, the process-level task identifier occupying that time period; Start Time, the planned start time of the task on the equipment timeline; End Time, the planned end time of the task on the equipment timeline; and Preparation Time, the mold change or preparation time before the task begins.
[0077] like Figure 2 As shown, the feasible time windows in the joint search personnel timeline and equipment timeline include the following steps S310 to S320.
[0078] S310 searches for candidate start times incrementally from the earliest feasible start time with a preset time step, skipping start times on non-working days, start times during non-working hours, and start times during lunch breaks.
[0079] In this embodiment, the preset time step is 10 minutes. The specific search method is as follows: starting from the earliest feasible start time, try time points T0, T0+10 minutes, T0+20 minutes, T0+30 minutes, etc., until the first feasible time window that satisfies all hard constraints is found, or the search range exceeds the maximum number of search days, and then terminate.
[0080] For each candidate start time, a time validity check is required to ensure that subsequent work hour calculations and constraint checks are performed only at valid, workable time points. This avoids invalid calculations at invalid time points and improves search efficiency. The system checks whether the start time falls on a non-working day (such as weekends or public holidays). If so, it skips that time point and all time points on that day, and the search jumps to the start time of the next working day. It also checks whether the start time falls during a non-working period (i.e., earlier than the start time of the day or later than the end time of the day). If so, it skips that time point and the search jumps to the start time of the current day or the start time of the next working day. Finally, it checks whether the start time falls during lunch break (e.g., 12:00 to 13:00). If so, it skips that time point and the search jumps to the end time of the lunch break.
[0081] S320 calculates candidate end times based on the effective working hours required for the task, deducting lunch breaks during the calculation process and allowing extensions across days.
[0082] The effective working hours required for the task, i.e., the effective number of minutes that personnel actually need to work in their positions, are calculated using the following formula: Effective working hours required for the task = Batch quantity × Standard single-piece working hours × Efficiency coefficient × Time margin coefficient.
[0083] The standard single-piece working time is derived from the process route definition; the efficiency coefficient reflects the worker's proficiency in the process and is a configurable parameter; the time margin coefficient is a configurable parameter used to add buffer margin to the standard working time.
[0084] When calculating the candidate end time, starting from the candidate start time, accumulate the effective working hours required for the task, and perform the following operations during the accumulation process: If the accumulated time spans the lunch break (e.g., 12:00 to 13:00), the duration of the lunch break will be deducted from the accumulated time. In other words, the accumulated work hours will pause at the start of the lunch break and resume at its end. For example, if a task starts at 11:30 and requires 90 minutes of effective work time, the actual end time will be 13:30 (30 minutes of work from 11:30 to 12:00, 60 minutes deducted from the lunch break, no work time from 12:00 to 13:00, and another 60 minutes of work from 13:00 to 13:30, totaling 90 minutes of effective work, ending at 13:30).
[0085] If the required working hours for the task have not been fully accumulated by the end of the workday, the remaining unfinished working hours will be carried over to the next workday for further accumulation, starting from the start time of the next workday. During this process, non-working hours (between the end of the workday and the start of the next workday) will not be counted as valid working hours.
[0086] S330 defines a feasible time window as the candidate start time and candidate end time that simultaneously meet the following conditions: no overlap between personnel timelines, no overlap between equipment timelines, personnel's cumulative effective working hours on the same day do not exceed the daily working hour limit, and the start time is not earlier than the end time of all preceding processes.
[0087] For the calculated candidate start time and candidate end time, perform the following constraint checks: Personnel timeline overlap check: Check whether the time period from the candidate's start time to the candidate's end time overlaps with the time period of an existing task on the candidate's timeline (including endpoint contact). If there is an overlap, the candidate time window is invalid.
[0088] Device timeline overlap check: This checks whether the time interval from the candidate start time to the candidate end time overlaps with the time interval of existing tasks on the candidate device's timeline. Simultaneously, it checks whether the time interval from the candidate start time minus the mold change preparation time to the candidate start time overlaps with the time interval of existing tasks on the candidate device's timeline. If any of these time intervals overlap, the candidate time window is invalid. It should be noted that the mold change preparation time is dynamically determined based on whether the current task and the previous task on the same device belong to the same aggregation group: if they belong to the same aggregation group and the devices are identical, the mold change time is zero or extremely short; if not, a preset value is used according to the mold change rules. Including the mold change preparation time interval in the device occupancy check ensures sufficient physical switching time between the actual end of the previous task and the actual start of the current task, avoiding actual device conflicts caused by neglecting the mold change time.
[0089] Verification of whether the cumulative effective working hours of personnel do not exceed the daily working hour limit: This involves checking whether the sum of the candidate's existing effective working hours on the current workday (for cross-day tasks involving multiple workdays, each workday must be checked separately) and the effective working hours occupied by the current task on that workday does not exceed the daily working hour limit. In a preferred embodiment of this invention, the daily working hour limit is 480 minutes (i.e., 8 hours). If the cumulative effective working hours on any workday exceed the limit, the candidate time window is invalid.
[0090] Check if the start time is not earlier than the end time of all preceding steps: Check if the candidate start time is not earlier than the end time of all preceding steps of the current task. If the candidate start time is earlier than the end time of any preceding step, the candidate time window is invalid.
[0091] A candidate time window is accepted as feasible only if it simultaneously meets the above hard constraint checks. Based on the feasible time window, a complete candidate production scheduling plan is confirmed, including the following information: Personnel ID and personnel name, equipment ID and equipment name, candidate start time, candidate end time, effective working minutes (effective working hours required for the task), cross-day details (if the task is executed across days, record the working hours and effective minutes for each day), mold change time (if the equipment needs to switch from the previous task to the current task, record the mold change time required for the switch), and various intermediate indicators required for scoring calculation (personnel idle time, daily working hour fill rate, load balancing deviation, delivery deviation, continuity indicators, etc.).
[0092] For each candidate personnel-equipment combination, the above time window search process is executed to generate several candidate production scheduling plans for subsequent composite scoring and selection steps.
[0093] By incrementally searching for candidate start times from the earliest feasible start time using a preset time step, and actively skipping start times for non-working days, non-working hours, and lunch breaks during the search process, the actual calendar constraints of the workshop are directly embedded into the time window search process. This eliminates invalid solutions that schedule tasks to start at illegal times from the source of the search, reducing the computational overhead of subsequent verification and backtracking. By calculating candidate end times based on the effective working hours required for the task, and deducting lunch breaks and allowing for cross-day continuation during the calculation process, the working hour calculation accurately reflects the actual working time system of the workshop—tasks can start before lunch breaks and continue after lunch breaks, or be processed continuously across days, with effective working hours automatically deducted for lunch breaks and non-working hours. This approach makes the production scheduling results more closely match the actual production rhythm of the workshop, avoiding errors caused by simply accumulating processing time based on natural time. By requiring candidate time windows to simultaneously meet four hard conditions—non-overlapping personnel timelines, non-overlapping equipment timelines, personnel's cumulative effective working hours not exceeding the daily working hour limit, and start time not earlier than the end time of all preceding processes—the legality of personnel scheduling, equipment occupancy, labor law constraints, and process sequence constraints are all verified in a single joint search, ensuring that the candidate production scheduling schemes for time windows are compliant in both resource and institutional dimensions.
[0094] S400: For candidate scheduling schemes, a composite scoring function with personnel utilization rate as the first priority is used to score them, and the candidate scheduling scheme with the best score is selected as the scheduling scheme for the ready task.
[0095] The composite scoring function is: Score=α×IdleGapScore+β×DayFillScore+γ×LoadBalanceScore+δ×DueDateScore+ε×ContinuityScore.
[0096] The scoring system comprises four sub-scores: IdleGapScore (personnel idle time score), DayFillScore (personnel daily work hour fill rate score), LoadBalanceScore (personnel load balancing score), DueDateScore (order delivery date risk score), and ContinuityScore (equipment continuous processing score). α, β, γ, δ, and ε are the weighting coefficients for each sub-item, with α, β, and γ having greater weights than δ and ε. The technical implication is that the three objectives directly related to personnel utilization—minimizing personnel idle time, maximizing daily work hour fill rate, and balancing personnel load—are prioritized, while delivery date risk and equipment continuous processing are given secondary importance. In any candidate solution, if a solution performs better in the personnel utilization dimension, even if it is slightly inferior to other solutions in the delivery date or equipment continuity dimensions, that solution will still receive a lower overall score (this scoring function follows a lower-than-ideal approach) and will therefore be prioritized by the system.
[0097] The IdleGapScore is used to evaluate the duration of idle time between the end of the previous task and the start of the current task. The IdleGapScore is calculated by comparing the idle time to a preset idle threshold (e.g., 120 minutes) and taking the smaller value between the ratio of idle minutes to the preset threshold and 1. That is: IdleGapScore = min(Idle minutes / Preset idle threshold, 1). A lower score is better. Technically, when the idle time is less than the preset threshold, the score is the ratio of idle minutes to the threshold; the longer the idle time, the higher the score. When the idle time exceeds the preset threshold, the score reaches its maximum of 1, indicating that the idle time is long enough and requires severe penalty. The weighting coefficient α of the IdleGapScore is the highest among all sub-items, reflecting the highest priority objective of reducing long periods of idle time.
[0098] The DayFillScore is used to evaluate the degree to which a person's remaining available working hours are filled within the given day. The DayFillScore is calculated as follows: DayFillScore = max(0, remaining available minutes for the day - effective minutes for this task) / daily working hour limit for the workday. A lower score is better. If the current task is executed across multiple days (i.e., the effective working hours of the task are distributed across more than one workday), the score is calculated daily based on the effective working hours occupied by the task on each workday, and the maximum score among all workdays is taken as the DayFillScore for the candidate solution. The technical implication is that using the day with the worst personnel working hour filling as the evaluation value ensures that cross-day tasks do not mask the low filling rate problem of a particular day by spreading effective working hours across multiple days. This guides the system to prioritize filling cross-day tasks more evenly into the remaining working hours of each day during scheduling, avoiding large fragmentation of working hours on any single day. If the task is executed only within a single day, the score is calculated directly based on the data for that day.
[0099] The personnel load balancing score is used to evaluate the deviation between the cumulative load of a current employee and the average load of all employees after the current employee is assigned to the task. It calculates the average of the cumulative effective working hours (average_load) of all available employees up to the current production schedule, and then calculates the current cumulative effective working hours (worker_current_load) of the candidate employee. The new cumulative load after assigning the candidate employee to the current task is: new_load = worker_current_load + effective minutes of this task. The personnel load balancing score is calculated as: LoadBalanceScore = |new_load - average_load| / average_load. A lower score is better. The technical implication is that it prioritizes selecting employees whose cumulative load, after being assigned to the current task, has the smallest deviation from the average load of all employees, thus avoiding a situation where a few employees are fully loaded while others are idle for extended periods, and ensuring a more balanced load across all available employees.
[0100] The order delivery date risk score is used to evaluate how close the estimated completion time of the current task is to the order delivery date. It obtains the delivery date (due_date) of the order to which the current task belongs. If the current task has a clearly defined estimated completion time (candidate_end) among the candidate solutions, the difference between the estimated completion time and the order delivery date is calculated: due_gap = candidate_end - due_date. The order delivery date risk score is calculated as: DueDateScore = max(0, due_gap) / planning period. The planning period is a configurable parameter used to normalize delivery date deviations. A smaller score is better. When the estimated completion time is earlier than or equal to the order delivery date, due_gap ≤ 0, and DueDateScore is 0, indicating no delivery date risk. When the estimated completion time is later than the order delivery date, DueDateScore is positive, with a higher score for longer delays.
[0101] It should be noted that, since the weight coefficient δ of DueDateScore is significantly smaller than the weight coefficient α of IdleGapScore, the design philosophy of this scoring function is that, in the case of severely unfavorable personnel utilization (leading to long periods of idle personnel or severely uneven workload), the system will not sacrifice the overall personnel utilization for the sake of advancing the delivery date of a few orders; however, among candidate solutions with similar performance in the personnel utilization dimension, the system will still tend to choose the solution with lower delivery date risk in order to balance delivery performance.
[0102] The equipment continuous processing degree score is used to evaluate whether the current task and the previous task belong to the same process / mold / mold change attribute. It queries the information of the last task scheduled on the candidate equipment, including the task's process number, mold number, or mold change attribute identifier, and compares it with the corresponding information of the current task. The ContinuityScore value selection rules are as follows: If the current task and the previous task belong to the same aggregation group, and the device ID assigned to the current task is the same as that assigned to the previous task (i.e., the process number is the same, the available equipment sets overlap, and the processing attributes are the same or similar), then the ContinuityScore is low (e.g., 0 or 0.1), indicating continuous processing with little or no mold change preparation. If the current task and the previous task do not belong to the same aggregation group, but their mold change attributes are similar (e.g., the same product family), then the ContinuityScore is medium (e.g., 0.5), indicating that some mold change time is required. If the current task and the previous task do not belong to the same aggregation group and their mold change attributes differ significantly, then the ContinuityScore is high (e.g., 1.0), indicating that full mold change preparation is required, with the strongest penalty. The lower the score, the better. The technical implication is that, under the same conditions (i.e., when personnel utilization, delivery risk, and other scoring dimensions are similar), the system tends to continuously assign tasks with the same process, the same mold, or the same mold change attribute to the same equipment, thereby reducing time losses caused by frequent mold changes and equipment switching. Since the weight coefficient ε of ContinuityScore is the lowest among all sub-items, equipment continuity is a factor that is considered only after personnel utilization and delivery time targets are met, reflecting the design concept of minimizing mold changes without sacrificing personnel utilization.
[0103] In this embodiment, the values of each weight coefficient are as follows: α: 0.35–0.45, preferably 0.40; β: 0.20–0.30, preferably 0.25; γ: 0.15–0.25, preferably 0.20; δ: 0.08–0.15, preferably 0.10; ε: 0.03–0.08, preferably 0.05. The weight coefficient values satisfy: α>β>γ>δ>ε. In other embodiments, each scoring weight can be manually configured, configured according to workshop rules, or dynamically learned through historical production scheduling effects, delays, mold changeover times, and personnel and equipment utilization rates. The scoring items can also include sub-items such as bottleneck equipment load, order importance level, work-in-process waiting time, maximum continuous idle time, and personnel skill training priority, based on actual workshop management needs.
[0104] Calculate the composite score for each of the candidate scheduling schemes for the current ready task, and select the scheme with the lowest score (optimal) as the scheduling scheme for the ready task.
[0105] S500 updates personnel and equipment timelines based on the production scheduling plan. Once all process-level tasks are scheduled, the production scheduling results are output.
[0106] The scheduling plan for ready tasks is synchronously written into three types of global status data: personnel timeline, equipment timeline, and personnel daily work hour records. Single-day tasks are directly inserted into the corresponding time period, while multi-day tasks are split into multiple work segments according to the workday and inserted separately. The task status of the corresponding nodes in the DAG is updated synchronously to ensure that the resource occupancy information of personnel, equipment, and work hours remains consistent at all times. On this basis, scheduled tasks are removed from the ready task pool, and all pending nodes are rescanned. New tasks are selected only when all preceding nodes have been completed or scheduled and the end time is met. The tasks of subsequent processes with inter-process constraints are added to the pool, and then the iteration termination condition is checked: if the ready pool is empty and all nodes have been completed, the scheduling ends; if the ready pool is not empty, the next round of scheduling begins; if the ready pool is empty but there are still pending nodes, an abnormal alarm is triggered. This constructs a complete decision-execution-feedback-re-decision closed-loop mechanism, ensuring that each scheduling decision is based on the latest global resource occupancy status. This guarantees that all process-level tasks are fully included in the scheduling without omission, and also ensures that the scheduling results in any intermediate state do not violate any hard resource constraints.
[0107] After completing the coarse scheduling of all process-level tasks, the system obtains a complete and feasible production schedule that satisfies all hard constraints, i.e., the initial production schedule. Before outputting the final production schedule, local search optimization is performed. Local search optimization includes: refining the initial production schedule using two types of heuristic operators without violating constraints, guiding the search direction with the objective function, and performing idle compression operations and / or personnel switching operations on the generated production schedule. The objective function is defined as: LocalScore=100×LongIdlePenalty+80×UnusedCapacityPenalty+60×LoadSpreadPenalty+20×TardinessPenalty+5×MakespanPenalty This function prioritizes smaller values. Specifically, LongIdlePenalty (long idle time penalty, weight 100); UnusedCapacityPenalty (unused time penalty, weight 80); LoadSpreadPenalty (load dispersion penalty, weight 60); TardinessPenalty (delay penalty, weight 20); and MakespanPenalty (overall completion time penalty, weight 5). Long idle time and unused time penalties have the highest priority, followed by load dispersion penalties, while delay and overall completion time penalties have relatively lower priorities. This weighting aligns with the design philosophy of prioritizing the utilization of core scheduling personnel, ensuring that local optimizations also prioritize improving personnel idle time and load balancing.
[0108] Idle time compression involves moving subsequent tasks of the same person forward to the idle time period after the previous task has ended. The system scans adjacent task pairs on each person's timeline, moving subsequent tasks forward to the idle time period after the previous task has ended, thus filling time gaps. Before moving tasks forward, the system re-verifies all hard constraints, including no conflicts in the device timeline, DAG dependencies, daily work hour limits, and work calendars. Only if all constraints are met can the compression attempt be performed; otherwise, it is abandoned. This iterative scanning pattern proceeds repeatedly from front to back until no compression occurs in a round, maximizing the compression of idle time gaps.
[0109] The personnel switching operation involves transferring tasks from high-load personnel to low-load personnel with the same skills. High-load personnel are identified, and tasks are selected from them to attempt to transfer to personnel with the same skills but lower cumulative load. Before the transfer, a new feasible time window (aligned with the original device time window) must be searched for for the target personnel, and all hard constraints must be re-verified. Execution can only proceed if all constraints are met; otherwise, the process reverts to the state before the transfer. This iterative scanning mode executes round by round according to load from high to low until no switching occurs in a round.
[0110] Both types of operations follow a strict rollback mechanism. If any adjustment attempt results in a violation of hard constraints, the system immediately reverts to the backup state before the adjustment. All optimizations are performed under the unified guidance of the objective function, achieving a significant improvement in scheduling quality with minimal computational cost: idle time compression shortens the overall completion time, personnel switching improves load balancing, and the optimization process remains within the safety boundaries of hard constraints, compensating for the shortcomings of greedy strategies in terms of global perspective.
[0111] By introducing local search optimization after coarse scheduling, two types of remedial operations—idle time compression and personnel switching—are performed on the generated feasible scheduling results. These operations further reduce redundant idle time and load imbalances in the scheduling scheme without violating any hard constraints. Specifically, idle time compression moves subsequent tasks for the same personnel to the idle period after the previous task ends, filling in any time fragments that may have been left over from the coarse scheduling stage. Personnel switching transfers tasks from high-load personnel to low-load personnel with similar skills, improving load balance among personnel. These two operations complement each other, jointly achieving redundancy removal and rebalancing of the coarse scheduling results. Furthermore, any adjustments are made without violating hard constraints, ensuring the safety of the optimization process.
[0112] After local search optimization, the overall quality of the production scheduling plan has been significantly improved. However, in the later stages of the production scheduling plan, i.e., the several working days later in the timeline, there may still be situations where personnel utilization remains low or the workload is unbalanced. Heuristic idle compression and personnel switching operations are limited by local perspectives and it is difficult to find a globally optimal adjustment plan in the later stages of the scheduling. Therefore, after local search optimization, tail-stage optimization is performed.
[0113] The tail segment refers to a suboptimal time period at the end of the timeline after coarse scheduling and local search optimization, where there are persistently low personnel utilization rates or uneven workloads. This segment typically covers the last few working days of the production schedule. Its starting boundary is dynamically identified through preset rules, and its ending boundary is the final completion time of all tasks. The set of process-level tasks falling within this time segment is defined as the tail segment task set, and only this set is stripped and precisely re-decomposed.
[0114] The identification rules for the tail-end interval include three triggering conditions: First, based on the personnel utilization rate statistics for working days, if the average utilization rate of all personnel is lower than a preset threshold, such as 60%, for several consecutive working days (e.g., 3 working days), the starting time of this continuous low utilization rate interval is identified as the tail-end starting boundary. Second, if there are personnel idle for a long period of time at the end of the production schedule, such as continuous idle time exceeding 50% of the daily working hour limit, and there are still unfinished tasks, the starting time of this working day is identified as the tail-end starting boundary. Third, if the load difference between the last few working days, i.e., the difference between the highest and lowest load personnel, exceeds a certain proportion of the average load of all personnel, such as 50%, the date on which this situation first occurs is identified as the tail-end starting boundary. The earliest starting boundary identified by the above triggering conditions is taken as the tail-end starting boundary, and the final end time of all tasks is taken as the tail-end ending boundary. In an alternative implementation, the tail-end interval can also be dynamically identified according to the set of delayed orders, the set of bottleneck equipment, the set of key personnel, or the last few working days.
[0115] After the tail-end task set is determined, the system establishes a CP-SAT sub-model. This sub-model uses the start time, end time, personnel allocation, and equipment allocation of the tail-end tasks as decision variables. Constraints include resource uniqueness constraints, DAG prerequisite relationship constraints, no overlap for the same personnel, no overlap for the same equipment, prohibition of non-working days, lunch break constraints, and daily work hour limits. All boundary conditions (all task allocations and scheduling before the tail-end start time) are fixed as immutable premises. The objective function of the sub-model is: LocalScore=100×LongIdlePenalty+80×UnusedCapacityPenalty+60×LoadSpreadPenalty+20×TardinessPenalty+5×MakespanPenalty The objective function is consistent with the objective function in local search optimization, prioritizing reducing idle personnel and uneven workload, then reducing the risk of delays, and finally compressing the tail completion time.
[0116] The solution timeout is set to 15 seconds, and the tail-end scheduling scheme optimized by local search is used as the initial solution. Improvements are made from existing feasible solutions rather than starting the search from scratch. After the solution is completed, a full hard constraint check is performed on the solution results: if the check passes, the original tail-end scheduling scheme is replaced with the CP-SAT solution; if the check fails or no feasible solution is found within the timeout period, the system automatically reverts to the scheduling scheme optimized by local search.
[0117] By introducing tail-end optimization after local search optimization, a constrained programming sub-model is established for the tail-end intervals in the scheduling results where personnel utilization is consistently low or load is unbalanced, and then the solution is accurately resolved. This achieves a hierarchical optimization architecture where heuristic coarse scheduling lays the foundation, local search refines the details, and accurate solution tackles the tail-end problems. Compared to existing solutions that directly use an accurate solver for the full scheduling task, resulting in excessively long solution times and inability to meet real-time requirements, this solution only performs small-scale accurate modeling and solving for the tail-end intervals in the scheduling results. This achieves a better local scheduling solution than pure heuristic methods within the tail-end intervals while keeping the computation time within an acceptable range, thus balancing scheduling quality and computational efficiency.
[0118] Before outputting the final production schedule, hard constraint checks are performed on the production schedule plan. Hard constraints include at least the following: checks on dependencies between preceding and subsequent processes, personnel skills, equipment capabilities, non-overlapping personnel timelines, non-overlapping equipment timelines, daily working hour limits, and work calendar.
[0119] For each non-starting node (i.e., a task with a preceding process), check whether the start time in its production schedule is not earlier than the end time of all its preceding process nodes in the production schedule.
[0120] Personnel skill verification involves going through all production schedules for each process-level task and checking whether the personnel assigned to each task possess the skills required for that process.
[0121] Equipment capability verification involves iterating through all production schedules for each process-level task and checking whether the equipment assigned to each task has the processing capability for the corresponding process.
[0122] For personnel timeline overlap checks, it iterates through all assigned tasks for each person and checks whether the time periods of any two tasks for that person overlap.
[0123] The device timeline overlap check iterates through all assigned tasks for each device and checks whether the time periods of any two tasks on that device overlap.
[0124] Daily work hour limit check: Iterate through all task segments for each employee on each workday and check whether the employee's cumulative effective work hours for that workday exceed the daily work hour limit. Work calendar verification involves iterating through all process-level task scheduling plans and checking whether the start time of each task falls within the valid work time window.
[0125] Once all hard constraint checks pass, the final production scheduling result is generated and output. The output production scheduling result should include at least: production scheduling details, delayed order statistics, personnel utilization statistics, and warning messages.
[0126] It should be noted that hard constraint checks are performed during the generation of the production scheduling plan for ready tasks, as well as during the local and tail-end optimizations of the initial production scheduling plan. If the final check fails, the process either reverts to the optimal feasible solution of the previous stage or generates an anomaly report.
[0127] By performing full hard constraint checks on the dependencies between preceding and following processes, personnel skills, equipment capabilities, non-overlapping personnel timelines, non-overlapping equipment timelines, daily work hour limits, and work calendars for the production scheduling plan, a hard access control mechanism ensures that any production scheduling plan that does not meet any of the above hard constraints is intercepted and prohibited from output. This mechanism guarantees at the system architecture level that the final production scheduling results issued to the workshop meet 100% of all on-site executable conditions, preventing unexecutable schedules caused by algorithm defects or data anomalies from flowing into the production process, significantly improving the reliability and on-site implementation of the scheduling results. At the same time, this verification step is performed after coarse scheduling, local optimization, and tail-end optimization, forming a multi-layered safety net. Any optimization operation that results in a violation of hard constraints can be immediately rolled back, ensuring that the production scheduling results are always within the safety boundaries.
[0128] In summary, this embodiment breaks down orders into process-level tasks according to the product's technological route, refining the scheduling granularity from the order level to the process level. This solves the problem in traditional solutions where overall order scheduling cannot accurately reflect the actual processing in the workshop, providing a data structure foundation for subsequent refined scheduling. By constructing a directed acyclic graph to maintain the pre-dependencies between processes and dynamically releasing ready tasks that meet the dependency conditions, the mechanism ensures that multiple processes within the same order are scheduled sequentially according to the technological order, and that subsequent processes never start before preceding processes, completely avoiding sequence errors and technological conflicts caused by manually maintaining dependencies. By jointly searching feasible time windows in the timelines of each group of candidate personnel and equipment, and mandating that personnel time, equipment time, daily working hour limits, and work calendars simultaneously meet constraints, this changes the traditional phased decision-making model of determining equipment first and then finding personnel or vice versa. It avoids repeated adjustments caused by inconsistent personnel and equipment matching, and a feasible scheduling scheme that simultaneously meets both personnel and machine constraints can be obtained in a single search. The composite scoring and selection mechanism with personnel utilization rate as the core prioritizes solutions that allow personnel to have continuous tasks, reduce long periods of idle time, and achieve a more balanced workload, while ensuring compliance with all production constraints. This effectively improves the overall utilization rate of workshop personnel.
[0129] Example 2:
[0130] like Figure 3 As shown, this embodiment provides a production scheduling system for generating production scheduling plans based on production scheduling requests. The system can be a computer device or a mobile device, etc. Specifically, it includes at least a processor 110 and a memory 120.
[0131] The processor 110 executes the computer program or instructions stored in the memory 120, performing the following steps: based on the process route of the product corresponding to each order, the order is broken down into multiple process-level tasks; using the process-level tasks as nodes and the pre-dependencies between processes within the same order as directed edges, a directed acyclic graph is constructed; based on the directed acyclic graph, nodes that satisfy the pre-dependencies are determined, and the process-level tasks corresponding to these nodes are designated as ready tasks; for each ready task, candidate personnel and equipment are screened; for each group of candidate personnel and equipment, feasible time windows in the personnel timeline and equipment timeline are jointly searched to obtain several candidate scheduling schemes, wherein the feasible time windows must simultaneously satisfy personnel time without conflict, equipment time without conflict, daily work hour limit for personnel, and work calendar constraints; for the candidate scheduling schemes, a composite scoring function with personnel utilization rate as the first priority is used to score them, and the candidate scheduling scheme with the best score is selected as the scheduling scheme for the ready task; based on the scheduling scheme, the personnel timeline and equipment timeline are updated, all process-level tasks are scheduled, and the scheduling result is output.
[0132] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.
[0133] The memory 120 can be used to store computer executable program code, including instructions. The memory 120 includes a program storage area and a data storage area. The program storage area can store the operating system, application programs required for at least one function (such as image display functions), etc. The data storage area can store data created during device use. Furthermore, the memory 120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, Universal Flash Storage (UFS), etc.
[0134] The production scheduling system may also include a display screen 130 for displaying production scheduling results. The display screen 130 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini-LED, a Micro-LED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc.
[0135] Example 3:
[0136] This embodiment provides a memory that stores computer programs or instructions. When the computer programs or instructions are called and run by a processor, the computer programs or instructions cause the processor to execute the above-described scheduling method.
[0137] Specifically, the memory can be non-volatile memory (such as ROM, flash memory, hard disk drive, solid-state drive, etc.) or volatile memory (such as RAM). When a computer program or instruction is executed, it performs at least the following steps: Based on the process route of the product corresponding to each order, the order is broken down into multiple process-level tasks; using the process-level tasks as nodes and the pre-dependencies between processes within the same order as directed edges, a directed acyclic graph is constructed; based on the directed acyclic graph, nodes that satisfy the pre-dependencies are determined, and the process-level tasks corresponding to those nodes are designated as ready tasks; for each ready task, candidate personnel and equipment are screened; for each group of candidate personnel and equipment, feasible time windows in the personnel timelines and equipment timelines are jointly searched to obtain several candidate scheduling schemes, wherein the feasible time windows must simultaneously satisfy personnel time without conflict, equipment time without conflict, daily work hour limit for personnel, and work calendar constraints; for the candidate scheduling schemes, a composite scoring function with personnel utilization rate as the first priority is used to score them, and the candidate scheduling scheme with the best score is selected as the scheduling scheme for the ready task; based on the scheduling scheme, the personnel timelines and equipment timelines are updated, all process-level tasks are scheduled, and the scheduling results are output.
[0138] Although exemplary embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above exemplary embodiments are merely illustrative and are not intended to limit the scope of this application. Various changes and modifications can be made therein by those skilled in the art without departing from the scope and spirit of this application. All such changes and modifications are intended to be included within the scope of this application as claimed in the appended claims.
[0139] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0140] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed.
[0141] The various component embodiments of this application can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some modules according to the embodiments of this application. This application can also be implemented as an apparatus program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such an implementation of this application can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
[0142] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0143] Although the description of this application has been made in conjunction with the specific embodiments described above, it will be apparent to those skilled in the art that many substitutions, modifications, and variations can be made based on the foregoing. Therefore, all such substitutions, modifications, and variations are included within the spirit and scope of the appended claims.
Claims
1. A production scheduling method for multi-order process routes in discrete manufacturing, characterized in that, The method includes: Based on the process route of the product corresponding to each order, the order is broken down into multiple process-level tasks; Using the process-level tasks as nodes and the pre-dependencies between processes within the same order as directed edges, a directed acyclic graph is constructed. Based on the directed acyclic graph, nodes that satisfy the pre-dependencies are determined, and the process-level tasks corresponding to these nodes are designated as ready tasks. For each ready task, candidate personnel and equipment are screened. For each group of candidate personnel and equipment, feasible time windows in the personnel timeline and equipment timeline are jointly searched to obtain several candidate production scheduling schemes. The feasible time windows must simultaneously satisfy the following conditions: no conflict between personnel time, no conflict between equipment time, upper limit of daily working hours for personnel, and work calendar constraints. For the candidate scheduling schemes, a composite scoring function with personnel utilization rate as the first priority is used to score them, and the candidate scheduling scheme with the best score is selected as the scheduling scheme for the ready task. Based on the production scheduling plan, update the personnel timeline and equipment timeline, complete the production scheduling of all process-level tasks, and output the production scheduling results.
2. The production scheduling method for multi-order process routes in discrete manufacturing according to claim 1, characterized in that, Before breaking down an order into multiple process-level tasks, the following is also included: In response to a production scheduling request, the production scheduling input data is validated; the validation of the production scheduling input data includes at least: Verify that the order status is pending production, verify that the product in the order has a corresponding process route, and verify that each process has at least one usable piece of equipment and at least one skilled person.
3. The production scheduling method for multi-order process routes in discrete manufacturing according to claim 2, characterized in that, The step of determining nodes that satisfy prerequisite dependencies based on the directed acyclic graph, and treating the corresponding process-level tasks as ready tasks, includes: Maintain the task status of each node, which includes pending, ready, scheduled, and completed. When all the predecessor nodes of a node in the pending state are in the completed or scheduled state, and the end time of the predecessor nodes meets the time constraint, the node is set to the ready state, and the corresponding process-level task of the node is set as a ready task.
4. The production scheduling method for multi-order process routes in discrete manufacturing according to claim 3, characterized in that, The feasible time windows in the joint search personnel timeline and equipment timeline include: Starting from the earliest feasible start time, the search for candidate start times is incremented by a preset time step, skipping start times on non-working days, start times during non-working hours, and start times during lunch breaks. Calculate the candidate end time based on the effective working hours required for the task, deducting lunch break time during the calculation process and allowing extensions across days; The candidate start time and candidate end time that simultaneously meet the following conditions are considered as feasible time windows: no overlap between personnel timelines, no overlap between equipment timelines, personnel's cumulative effective working hours on the same day do not exceed the daily working hour limit, and the start time is not earlier than the end time of all preceding processes.
5. The scheduling method for multi-order process routes in discrete manufacturing according to claim 4, characterized in that, The composite scoring function is: Score=α×IdleGapScore+β×DayFillScore+γ×LoadBalanceScore+δ×DueDateScore+ε×ContinuityScore, Among them, IdleGapScore is the score for personnel idle time, DayFillScore is the score for personnel daily work hour fill rate, LoadBalanceScore is the score for personnel load balancing, DueDateScore is the score for order delivery risk, and ContinuityScore is the score for equipment continuous processing. α, β, γ, δ, and ε are the weight coefficients of each sub-item, and the weights of α, β, and γ are all greater than the weights of δ and ε.
6. The production scheduling method for multi-order process routes in discrete manufacturing according to claim 1, characterized in that, Before outputting the production scheduling results, perform local search optimization on the generated feasible production schedule. The local search optimization includes: Without breaking the constraints, perform idle compression and / or personnel switching operations on the generated production scheduling results; The idle compression operation involves moving subsequent tasks of the same person forward to the idle period after the previous task has ended. The personnel switching operation involves transferring tasks from high-load personnel to low-load personnel with the same skills.
7. The production scheduling method for multi-order process routes in discrete manufacturing according to claim 6, characterized in that, After the local search optimization, tail segment optimization is performed, which includes: Identify the tail section of feasible production scheduling where personnel utilization is below a preset threshold or the load is unbalanced; A constrained programming sub-model is established for the task within the tail segment interval and the solution is re-solved. Replace the original tail-end production scheduling plan with the solution results.
8. The production scheduling method for multi-order process routes in discrete manufacturing according to claim 7, characterized in that, The method further includes: The production scheduling plan is subjected to hard constraint verification, which includes at least the following: verification of dependencies between preceding and subsequent processes, verification of personnel skills, verification of equipment capabilities, verification of no overlap between personnel timelines, verification of no overlap between equipment timelines, verification of daily working hours limit, and verification of work calendar.
9. A production scheduling system, comprising a processor and a memory storing computer programs or instructions capable of running on the processor, characterized in that, When the computer program or instructions are executed by the processor, they implement the scheduling method as described in any one of claims 1 to 8.
10. A memory, characterized in that, The memory stores a computer program or instructions that, when invoked and executed by the processor, cause the processor to perform the scheduling method according to any one of claims 1 to 8.
