An assembly line scheduling optimization method considering generalized precedence constraints

This paper proposes an adaptive neighborhood selection and batch move iterative local search framework that combines Q-learning reinforcement learning and integer linear programming models. This framework addresses the generalized priority constraints on assembly lines in existing technologies. By employing Q-learning reinforcement learning, it adaptively solves the assembly line scheduling optimization problem, thereby resolving the assembly technology issue. The generalized priority constraints on the assembly line optimize the assembly line scheduling, solving a generalized technical problem in existing technologies and achieving efficient optimization of assembly line scheduling.

CN121836196BActive Publication Date: 2026-07-07GUANGDONG UNIV OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGDONG UNIV OF TECH
Filing Date
2025-12-23
Publication Date
2026-07-07

Smart Images

  • Figure CN121836196B_ABST
    Figure CN121836196B_ABST
Patent Text Reader

Abstract

The present application relates to production scheduling and intelligent manufacturing technology field, and proposes a kind of assembly line scheduling optimization method considering generalized priority constraint, including constructing integer linear programming model, generalized priority relationship reinforcement and propagation and work station capacity improvement are carried out to the input instance of integer linear programming model;Calculate simple lower bound based on task processing time, lower bound based on priority graph longest path and lower bound based on maximum flow algorithm, take the maximum value of three as final lower bound;Define including action space, define state space to represent the change of current solution relative to global optimal solution and local optimal solution on target function value and allocation balance degree, design reward function to adaptively select neighborhood operation;Based on final lower bound and Q-learning dynamic selection module, build initial scheme, carry out batch movement iteration by neighborhood operation adaptively selected by Q-learning dynamic selection module;Based on the result of batch movement iteration local search, output assembly line scheduling scheme satisfying generalized priority constraint.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of production scheduling and intelligent manufacturing technology, and in particular to an assembly line scheduling optimization method that considers generalized priority constraints. Background Technology

[0002] With the rapid development of the manufacturing industry, the number of assembly processes in industrial products has increased significantly, and there are complex sequence relationships and process requirements between these processes. As a core problem in production scheduling, the assembly line balancing problem is traditionally solved using exact integer programming methods or heuristic / meta-heuristic algorithms such as genetic algorithms, particle swarm optimization, tabu search, and local search. However, these methods are only applicable to simple look-ahead-follow-up constraints and cannot effectively handle generalized priority constraints, such as minimum sequence lag (i.e., process requirements such as solidification, cooling, chemical reaction, or detection response where processes must wait for several production cycles).

[0003] Existing technologies face the following problems when dealing with generalized priority constraints: First, most algorithms can only simplify generalized priority constraints to traditional constraints, resulting in solutions that are infeasible in practical processes or require extensive manual correction. Second, the computational complexity of conventional exact methods increases exponentially with the problem size, making it difficult to obtain the optimal solution within a reasonable timeframe. Third, traditional heuristic methods employ a single-move strategy, lacking effective utilization of the structured information of the constraints. This leads to low search efficiency in the tightly coupled feasible region caused by generalized priority constraints, and the absence of targeted perturbation and repair mechanisms makes it easy to get trapped in low-quality local optima and difficult to escape. Fourth, traditional methods typically traverse all neighborhoods indiscriminately, lacking an adaptive selection mechanism, resulting in wasted computational resources. Summary of the Invention

[0004] To address the aforementioned shortcomings, the present invention aims to propose an assembly line scheduling optimization method that considers generalized priority constraints. By integrating the adaptive neighborhood selection and batch move iterative local search framework of Q-learning reinforcement learning with a specialized modeling and preprocessing mechanism for generalized priority constraints, this method significantly improves solution efficiency and solution quality while ensuring that the solution meets process constraints such as minimum sequence lag, and quickly obtains a globally high-quality assembly line scheduling scheme.

[0005] To achieve this objective, the present invention adopts the following technical solution:

[0006] An assembly line scheduling optimization method considering generalized priority constraints includes:

[0007] Based on the input task set, workstation set, cycle time, and generalized priority constraints, an integer linear programming model with workstation index approximating the time axis is constructed. The generalized priority constraints represent the necessary waiting requirements between tasks, and decision variables are defined to describe task allocation and workstation usage status.

[0008] Generalized priority relation reinforcement and propagation, as well as workstation capacity enhancement, are performed on the input instances of the integer linear programming model to reduce the feasible region and improve search efficiency;

[0009] Based on the preprocessed instances, we calculate the simple lower bound based on task processing time, the lower bound based on the longest path in the priority graph, and the lower bound based on the maximum flow algorithm, and take the maximum value of the three as the final lower bound.

[0010] The definition includes an action space with several preset neighborhood operations, and a state space is defined to represent the changes in the objective function value and distribution balance of the current solution relative to the global optimal solution and the local optimal solution. A reward function is designed to adaptively select neighborhood operations, wherein the reward function comprehensively considers global breakthrough, local improvement, continuous failure penalty and load balancing improvement.

[0011] Based on the final lower bound and the Q-learning dynamic selection module, an initial scheme is constructed, and batch move iteration is performed through the neighborhood operation adaptively selected by the Q-learning dynamic selection module. The batch move iteration includes collecting feasible moves, evaluating and applying feasible moves according to the suitability function, and executing a destruction-repair strategy to escape the local optimum when the search gets stuck in a local optimum.

[0012] Based on the results of batch move iterative local search, an assembly line scheduling scheme that satisfies the generalized priority constraint is output.

[0013] Preferably, constructing an integer linear programming model that approximates the time axis using workstation indices includes:

[0014] Establish an optimization problem with the goal of minimizing the number of workstations used;

[0015] Set task assignment constraints to ensure that each task is assigned to a unique workstation;

[0016] Set a workstation time constraint to ensure that the total processing time of tasks allocated within each workstation does not exceed the cycle time.

[0017] Define a generalized priority constraint to represent the necessary waiting requirements between tasks in the form of workstation index difference, and ensure that for task pairs with priority relationship, the index of the workstation where the subsequent task is located is not less than the sum of the index of the workstation where the preceding task is located and the minimum waiting unit.

[0018] Set a workstation usage order constraint to ensure that workstations are used in the order they are indexed.

[0019] Preferably, performing generalized precedence relation reinforcement and propagation, as well as workstation capacity improvement, on the input instances of the integer linear programming model includes:

[0020] For each pair of task nodes in the priority graph that have a direct or indirect priority relationship... and Update its associated minimum waiting unit. The following relation is satisfied:

[0021] ;

[0022] in, Indicates from the task To the mission Minimum waiting unit required, Indicates the node in the priority graph To the node The set of task nodes included on all directed paths. Indicates task Processing time, This indicates the time of the beat. This represents the floor function;

[0023] For each task Solve a subset sum problem with conflict constraints, and adjust the task based on the optimal solution to the subset sum problem with conflict constraints. The processing time, the optimal solution value of the subset with conflict constraints and the problem. Satisfying the relation:

[0024] ;

[0025] in, Representation and Task The set of tasks that do not have direct generalized priority constraints and conflicts. This indicates that the workstation has completed its task. The remaining available time and satisfy , Indicates task Processing time, Indicates task The decision variable regarding whether or not to be selected to enter the same workstation. Represents a set All of the above satisfy The task to A set;

[0026] If the optimal solution value Less than the cycle time Then adjust the task. The processing time and adjustment process satisfy the following relationship:

[0027] ;

[0028] Among them, the updated Indicates task Adjusted processing time.

[0029] Preferably, based on the preprocessed instances, the lower bounds are calculated as follows: a simple lower bound based on task processing time, a lower bound based on the longest path in the priority graph, and a lower bound based on the maximum flow algorithm. The maximum value of these three is then taken as the final lower bound.

[0030] Calculate the first lower bound The following relation is satisfied: ;

[0031] in, This represents a simple lower bound based on task processing time. Represents the set of all tasks. Indicates task Processing time, This indicates the time of the beat. This represents the floor function;

[0032] Calculate the second lower bound The following relation is satisfied: ;

[0033] in, This represents the lower bound of the longest path in the priority graph. This represents the priority graph including virtual source and sink nodes. In the middle, from the virtual source point To Virtual Exchange The length of the longest path;

[0034] Calculate the third lower bound The lower bound satisfies the following relation:

[0035] ;

[0036] in, This represents the lower bound calculated using the maximum flow algorithm. In the priority diagram From virtual source To Virtual Exchange The subset of real-world tasks included in the longest path. This indicates that the first-fit strategy is used to subset... The minimum set of workstations obtained after tasks are allocated under the conditions of satisfying cycle time and generalized priority constraints. Indicates the size of the workstation set. Represents the set of remaining tasks and satisfies , This represents the result obtained by solving a maximum flow problem, which allows the flow from a set to... Successfully assigned to workstation set The sum of the maximum task processing times within the remaining capacity of all workstations;

[0037] Take the first lower bound The second lower bound With the third lower bound The maximum value in the range is used as the final lower bound. .

[0038] Preferably, the action space is defined to include several preset neighborhood operations, and the state space is defined to characterize the changes in the objective function value and allocation balance of the current solution relative to the global optimum and the local optimum, including:

[0039] The definition includes three preset action spaces for neighborhood operations, namely, operations... ,operate and operation ,in This indicates that a task is moved from its currently assigned workstation to another workstation. This indicates the exchange of two tasks on the same workstation with one task on a different workstation. Indicates the task From workstation Move to workstation At the same time, the original workstation Task Move to a different workstation Another workstation;

[0040] Define a state space that includes a two-dimensional discrete space. Among them, the first dimension state value The second dimension, state value, represents the quality change of the current solution relative to the optimal solution. It represents the change in the distribution balance of the current solution relative to the optimal solution;

[0041] in The value of is 0, 1, or 2, which respectively represent that the current solution has improved the global optimum, improved the local optimum, or has not improved any optimum. The value of is 0 or 1, representing whether the distribution balance of the current solution is improved or not compared to the optimal solution, respectively. The distribution balance is determined by the suitability function. Measurement, among which This represents the set of workstations used by the current solution. Indicates workstation The total processing time of the assigned tasks.

[0042] Preferably, the design reward function for adaptive neighborhood selection includes:

[0043] Design reward function The following relation is satisfied:

[0044] ;

[0045] in, This represents the objective function value of the current solution obtained after performing the neighborhood operation. This represents the objective function value of the historical global optimal solution. This represents the objective function value of the current local optimum. Representing neighborhood operations The number of consecutive failures, This represents the distribution balance value of the current solution. This represents the distribution balance value of the local optimal solution. Represents the step function. This represents the function that takes the maximum value. This represents the preset weight coefficient for the global breakthrough reward item. This represents the preset weighting coefficient for the reward items for local improvements. This represents the preset weighting coefficient of the consecutive failure penalty term. This indicates the preset weighting coefficient for the load balancing improvement reward items.

[0046] Preferably, the batch move iteration using the adaptively selected neighborhood operation through the Q-learning dynamic selection module includes:

[0047] Initialize the Q-value table and the consecutive failure count table. Learning rate Discount Factor and exploration rate ;

[0048] In each iteration, the state is updated based on the current solution, the global optimum, and the local optimum. For the new state ;

[0049] Based on the new state Update the table of consecutive failures ;

[0050] Based on reward function The discount factor And the maximum Q value of each neighborhood operation in the new state, compared with the current state in the Q value table. and the currently executed neighborhood operations The corresponding Q value is updated, and the update process satisfies the following relationship:

[0051] ;

[0052] in, Indicates the state Perform neighborhood operations The corresponding Q value, Indicates a new state The maximum Q value among all possible neighborhood operations;

[0053] According to the preset attenuation coefficient Decrease the learning rate The attenuation process satisfies the following relationship: ;

[0054] based on The greedy strategy dynamically selects the next neighbor operation. Generate a random number ,like Then, randomly select from all neighborhood operations in the action space. Otherwise, choose the current state. The neighborhood operation with the largest Q value is used as The selection process satisfies the following relation:

[0055] ;

[0056] The exploration rate is reduced according to a preset rule. .

[0057] Preferably, the initial construction scheme includes:

[0058] The first candidate initial scheme is constructed using the first-adapt strategy, which includes: processing each unassigned task in the order of priority among tasks, assigning each task to the first available workstation that satisfies the workstation time constraint and the generalized priority constraint, and creating a new workstation for assignment if there is no available workstation.

[0059] Constructing a second candidate initial solution: for workstations Solve an optimization problem to maximize the workstation The task's time consumption, optimizing the optimal solution value of the problem. Satisfying the relation:

[0060] ;

[0061] in, Indicates workstation The optimal solution value of the improved SSP-PC problem, Indicates the workstations currently available. The set of candidate tasks for allocation includes all unassigned tasks that have no prerequisite tasks or whose prerequisite tasks have already been assigned, as well as unassigned tasks that have no mandatory priority constraints with existing tasks in the set. Indicates task Processing time, Indicates task Whether to be selected and assigned to a workstation Decision variables, This indicates the time of the beat. Represents a set All data that satisfy direct priority relationships and have the minimum waiting time The task to A set;

[0062] By iteratively solving the problem and assigning tasks to each workstation until all tasks have been assigned, a second candidate initial solution is obtained.

[0063] The integer linear programming model is solved directly using an integer programming solver to obtain a third candidate initial scheme.

[0064] The total number of workstations used by the first candidate initial scheme, the second candidate initial scheme, and the third candidate initial scheme is compared, and the scheme with the fewest workstations is selected as the final initial scheme.

[0065] Preferably, when the search gets stuck in a local optimum, the destruction-repair strategy to escape the local optimum includes:

[0066] The current neighborhood operation is adaptively selected based on the Q-learning dynamic selection module. Iterate through all feasible single moves that meet the constraints;

[0067] For each feasible move, compute the adequacy function value of the solution after the feasible move is executed. The appropriateness function value Satisfying the relation: ;

[0068] in, This represents the set of workstations used to execute the move and resolve the issue. Indicates workstation The total processing time of the tasks assigned in the process;

[0069] Based on the aforementioned suitability function value Improvement value relative to the solution before moving The feasible moves are evaluated and screened, and all are included. The moves are collected into the candidate move set;

[0070] The moves in the candidate move set are sorted by Sort the values ​​in descending order;

[0071] Apply the sorted moves sequentially. Before each application, determine whether the current move still satisfies all constraints and still has improvement potential. If the result is yes, apply the current move to update the current solution.

[0072] After a complete batch move application, the obtained new solution is compared with the current local optimum. If the new solution is better in terms of objective function value, or if the objective function value is the same but the fitness function value is lower, the result is considered. If a better solution is found, then update the current local optimum to the new solution;

[0073] If continuous If the current local optimum is not updated in subsequent iterations, the search is determined to be trapped in a local optimum, and a destruction-repair strategy is executed, including:

[0074] According to the preset damage strength parameters Randomly remove from the current local optimum There are several tasks, including the initial one. ;

[0075] If removing a task results in a workstation becoming idle, then delete the currently idle workstation and shift the index of all workstations after the deleted workstation one position forward.

[0076] Based on the first-fit strategy, the removed tasks are reassigned to existing or new workstations in the order they were removed, in an attempt to fix the problem and obtain a complete new solution.

[0077] If the repair is successful, the new solution obtained after the repair will be used as the current solution, and the iterative process will continue; if the repair fails, then... Decrease by one and retry the destruction and repair process until... If it still cannot be repaired after being reduced to 1, then... Reset to And restart the entire destruction-repair strategy.

[0078] One of the above technical solutions has the following advantages or beneficial effects:

[0079] This invention establishes an integer linear programming model based on workstation index approximation, accurately transforming generalized priority constraints such as minimum sequence lag into computable mathematical expressions. It also incorporates a preprocessing mechanism to enhance constraint propagation and workstation capacity, fundamentally solving the problem of infeasible solutions caused by simplified constraints in traditional methods. Furthermore, it utilizes structural constraints to eliminate invalid solution spaces, focusing the search on the feasible region. Secondly, it constructs a Q-learning dynamic selection module, using a learning-driven adaptive neighborhood selection mechanism to intelligently identify the most effective optimization direction at different search stages based on state feedback, effectively avoiding the computational resource waste caused by indiscriminate traversal of neighborhoods in traditional methods. Thirdly, it employs a batch-movement iterative local search strategy, performing batch moves rather than single adjustments based on neighborhood operations selected by Q-learning, effectively addressing the tight coupling and chain-reaction adjustment requirements between tasks caused by generalized priority constraints, significantly improving local optimization efficiency. Finally, it introduces a diversified perturbation-repair mechanism, strategically disrupting and reconstructing the current solution to enhance the algorithm's ability to escape low-quality local optima. In summary, this invention effectively improves both solution efficiency and solution quality while ensuring strict satisfaction of process constraints, enabling the rapid acquisition of globally high-quality assembly line scheduling schemes. Attached Figure Description

[0080] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0081] Figure 1 This is a flowchart of the assembly line scheduling optimization method considering generalized priority constraints provided in the embodiments of the present invention;

[0082] Figure 2 This is a simplified example priority diagram provided by an embodiment of the present invention;

[0083] Figure 3 This is a schematic diagram of the optimal solution for a simple example provided in the embodiments of the present invention;

[0084] Figure 4 This is a schematic diagram of the iterative dual preprocessing process provided in an embodiment of the present invention;

[0085] Figure 5 This is an example priority graph for calculating the lower bound of maximum flow provided in an embodiment of the present invention;

[0086] Figure 6 This is a schematic diagram of the maximum flow computing network provided in an embodiment of the present invention. Detailed Implementation

[0087] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0088] In this invention, the terms "comprising," "including," or any other variations thereof are intended to cover a 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 limitation, 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 said element.

[0089] An assembly line scheduling optimization method considering generalized priority constraints includes the following steps:

[0090] S1: Based on the input task set, workstation set, cycle time, and generalized priority constraints, construct an integer linear programming model with workstation index approximating the time axis. The generalized priority constraints represent the necessary waiting requirements between tasks, and define decision variables to describe task allocation and workstation usage status.

[0091] It should be noted that the task set refers to the set of n processes to be assembled, denoted as Each task It has a fixed processing time. This represents the time required to complete the process. Workstation set This represents the potential workstation sequence arranged in index order, with cycle time. This represents the maximum allowed operation time for a single workstation. Generalized priority constraints manifest as mandatory waiting requirements between processes beyond simple sequential orders. For example, a welding process may require three cooling cycles before proceeding to the next process. This constraint is expressed through directed arc sets. tuples in It means that, among them A non-negative integer, representing the task. Complete the task The minimum number of ticks that must be waited before starting. The workstation index approximation timeline is a modeling strategy that discretizes continuous time into workstation position differences, using workstation number differences to replace actual time intervals, thus transforming time lag constraints into position constraints. This significantly reduces computational complexity. Decision variables It is a binary assigned variable, when the task Assigned to workstation The value is 1 if it is true, and 0 otherwise. It is a workstation-enabled variable, when the workstation The value is 1 when at least one task is assigned, and 0 otherwise. These variables together constitute the encoding form of the solution.

[0092] Understandably, step S1 involves transforming the generalized priority constraints with time lag characteristics into computable mathematical expressions. Traditional methods using continuous-time modeling lead to an explosion of variable dimensions. Step S1, however, uses workstation index discretization to preserve the physical meaning of process waiting requirements while linearizing the constraints, transforming the waiting rules, originally at the temporal logic level, into spatial ordering rules. This transformation allows integer linear programming models to accurately characterize waiting processes such as cooling, solidification, and chemical reactions, which are measured in ticks, while avoiding the solution difficulties caused by nonlinear time expressions. This significantly improves the model's tractability in general solvers and lays the mathematical foundation for subsequent efficient searches. This modeling approach, while maintaining strict constraints, shifts the problem complexity from the time dimension to the spatial dimension, achieving a balance between computational feasibility and expressive accuracy.

[0093] S2: Perform generalized priority relation reinforcement and propagation and workstation capacity enhancement on the input instances of the integer linear programming model to reduce the feasible region and improve search efficiency;

[0094] It should be noted that generalized priority relation strengthening and propagation refers to the technique of making explicit, stronger constraint relations implicit in the original constraints through logical reasoning and constraint derivation, thereby reducing the search space. For any two tasks in the priority graph... and If multiple paths exist, the actual waiting time should be the maximum value among all paths. Workstation capacity enhancement is a preprocessing technique that dynamically adjusts task processing times by analyzing non-co-station conflict relationships between tasks, making the calculation of each workstation's actual available capacity more compact. Non-co-station conflicts are determined by the positive lag time in the generalized priority constraint. Cause, indicating a task and These cannot be processed on the same workstation. The Subset Sum Problem (SSPC) is a combinatorial optimization problem that selects items to maximize total value given a capacity constraint. Here, it's used to calculate the maximum possible filling amount for other tasks that do not conflict with the current task. The positive decay process involves checking for parameter changes after each preprocessing step. If no change is observed, the process terminates; otherwise, both types of preprocessing are repeated until convergence, forming an iterative optimization loop.

[0095] Understandably, a dual preprocessing mechanism is used to achieve compactness of the constraint space. Generalized priority relations are strengthened by utilizing the transitivity principle to transform indirect priority relations into direct strong constraints. For example, if the task... Waiting Reaching 2 beats, Waiting If it reaches 3 beats, then it can be deduced that Waiting At least 5 cycle times; explicitizing such implicit constraints reduces redundant exploration in the search. Increasing workstation capacity addresses this from a resource perspective, identifying task pairs unable to share workstations due to forced waiting. By solving the SSPC problem, the theoretical upper limit of remaining capacity after a given task occupies a workstation is precisely calculated. If this upper limit is lower than the cycle time... This indicates that the actual time consumed by the task has been underestimated, and its processing time needs to be revised upwards. This bidirectional preprocessing is mutually reinforcing. On the one hand, the constraints are strengthened to reduce feasible position combinations; on the other hand, the increased capacity adds weight to the processing time. The synergistic effect of these two aspects makes the lower bound estimate of the problem tighter, the search range smaller, and the pruning efficiency higher, providing high-quality initial information for subsequent optimization algorithms. The preprocessing diagram is shown below. Figure 4 As shown.

[0096] S3: Based on the preprocessed instance, calculate the simple lower bound based on task processing time, the lower bound based on the longest path in the priority graph, and the lower bound based on the maximum flow algorithm, and take the maximum value of the three as the final lower bound;

[0097] It should be noted that the lower bound refers to a theoretical lower limit on the objective function value of the optimal solution. The objective value of any feasible solution cannot fall below this limit. It is used to evaluate the quality of the solution and to terminate the search early. Simple lower bound. Ignoring all priority constraints and calculating solely based on the ratio of total processing time to cycle time, this is the most lenient yet fastest lower bound. Longest path lower bound. Based on the priority graph topology, in the extended graph Calculate the length of the longest path from virtual source node 0 to virtual sink node n+1. , Reflects the incompressibility of the task sequence. Maximum flow lower bound. It is a hybrid lower bound that combines the longest path subset and the allocation probability of the remaining tasks, and uses the maximum flow algorithm to calculate the upper limit of workstation capacity occupied by the subset of embeddable paths for the remaining tasks. The maximum flow problem is the maximum flow that can be sent from the source to the sink in a capacity network. Here, it is used to model the matching relationship between tasks and the remaining capacity of workstations.

[0098] Understandably, the multi-lower-bound fusion strategy aims to obtain the tightest possible lower-bound estimate, providing the algorithm with strong pruning capabilities and termination criteria. A basic lower bound is given from the perspective of resource capacity. Both the priority chain approach and the priority chain approach capture different aspects of the problem, but both have limitations. The innovation lies in the organic combination of the two: first, identifying the critical path subset in the priority graph. This subset of tasks, due to their strong priority, must be allocated sequentially, forming the skeleton of the solution; then, for the non-critical task set... Construct a binary network, with the left node being... Medium task (capacity is processing time), right-hand node is Occupying the remaining capacity of the workstation (capacity is - Elapsed time), edges indicate that a task can be legally inserted into a workstation (meeting lag and position constraints). Solving for the maximum flow of this network yields... ,Right now Medium-duty tasks can be added to the existing total number of workstations, thus avoiding overestimating the demand for new workstations, such as... Figure 5 and 6 The figures show the instance priority graph and the maximum flow calculation network diagram used in this embodiment for calculating the lower bound of maximum flow, respectively. Taking the maximum value of the three factors ensures that the lower bound simultaneously satisfies resource, sequence, and hybrid constraints, enabling the algorithm to reliably determine the global optimum when it reaches this lower bound, avoiding premature termination or over-search.

[0099] S4: Define an action space including several preset neighborhood operations, and define a state space to characterize the changes of the current solution relative to the global optimal solution and the local optimal solution in terms of objective function value and distribution balance. Design a reward function to adaptively select neighborhood operations, wherein the reward function comprehensively considers global breakthrough, local improvement, continuous failure penalty and load balancing improvement.

[0100] It's important to note that the action space refers to the set of all executable neighborhood operations within the reinforcement learning framework. In the assembly line scheduling problem, it represents the basic operation types that transform the current task allocation scheme, defining the decision range that the search algorithm can take. The state space is a set of feature vectors describing the environment in which the search process occurs. By encoding the relative relationship between the current solution and the global and local optima in terms of objective function and allocation balance, it provides contextual information for policy selection. The objective function value is the core indicator for evaluating the quality of the solution, specifically referring to the total number of workstations used in the current scheme. Minimizing this value is the primary optimization objective of the assembly line balancing problem. Allocation balance is an auxiliary indicator measuring the uniformity of workstation load distribution. It is calculated through a suitability function and aims to capture potential improvements that, while not directly reducing the number of workstations, can improve task distribution and create conditions for subsequent optimization. The reward function is a feedback signal used in reinforcement learning to quantify the quality of actions. It transforms changes in solution quality into scalar values, driving the learning and updating of the Q-value table. A global breakthrough refers to the improvement event where the objective function value of the current solution surpasses the historical best for the first time, representing a qualitative leap in the search. Local improvement refers to incremental optimization where the current solution is better than the recent local optimum but not the global optimum. Consecutive failure penalty is a negative incentive applied to actions that repeatedly fail to improve the solution, used to suppress inefficient exploration. Load balancing improvement refers to an increase in the distribution balance relative to the reference solution, reflecting a more even distribution of tasks among workstations.

[0101] Understandably, by defining abstract action and state space structures, a decision-making framework for reinforcement learning-guided search is constructed. The action space design transforms the static neighborhood traversal of traditional iterative local search into a learnable dynamic selection problem, enabling the algorithm to adaptively determine the type and intensity of the next operation based on the search state, rather than indiscriminately trying all possibilities, thus avoiding wasted computational resources. The state space design compresses high-dimensional solution quality information into low-dimensional discrete representations, allowing the algorithm to perceive different stages of the search process, such as global breakthrough, local optimization, or stagnation, providing contextual basis for strategy adjustments. The reward function, acting as a bridge connecting search behavior and optimization objectives, encodes manual tuning experience into automatically learnable incentive signals through a weighted design of four mechanisms: global breakthrough, local improvement, continuous failure penalty, and load balancing improvement. This guides the algorithm to achieve a balance between the core objective of reducing the total number of workstations and the auxiliary objective of improving task distribution. Overall, step S4 realizes the transformation of the search strategy from experience-driven to data-driven, enabling the algorithm to identify effective patterns from historical interactions, laying a theoretical foundation for subsequent adaptive selection.

[0102] S5: Based on the final lower bound and the Q-learning dynamic selection module, construct the initial scheme, and perform batch move iteration through the adaptive neighborhood operation selected by the Q-learning dynamic selection module. The batch move iteration includes collecting feasible moves, evaluating and applying feasible moves according to the suitability function, and executing a destruction-repair strategy to escape the local optimum when the search gets stuck in a local optimum.

[0103] It should be noted that the Q-learning dynamic selection module is a neighborhood operation adaptive selection mechanism built on the Q-learning reinforcement learning algorithm. By learning the state-action value function, it realizes the transformation from blind traversal to experience-driven intelligent decision-making, concentrating search resources on high-potential improvement directions. Batch move iteration differs from traditional single move search. It refers to the systematic generation of multiple feasible moves in one iteration, which are then selected and sorted based on evaluation metrics and executed in batches to capture the chain adjustment effect under generalized priority constraints and improve search efficiency. A feasible move refers to a task reassignment scheme that satisfies all workstation time constraints and generalized priority constraints after performing a neighborhood operation based on the current solution. It is the basic unit of batch move iteration. The suitability function is an auxiliary evaluation metric used to assess the potential of moves. It adopts the form of the sum of squares of workstation loads and applies a nonlinear penalty to load imbalances, enabling the identification of moves with potential improvement value when the objective function remains unchanged. The disrupt-repair strategy is a structured perturbation mechanism that breaks the existing solution structure by purposefully removing some tasks when the search gets stuck in a local optimum, and then rebuilding it according to the rules. This allows for a leapfrog exploration of the solution space and avoids excessive lingering in inferior regions.

[0104] Understandably, the synergy between the Q-learning dynamic selection module and the batch move iteration and destruction-repair strategy enables the search process to leap from blind exploration to intelligent optimization. The Q-learning module, based on the framework defined in step S4, continuously updates the action value assessment during the search process, allowing the algorithm to identify which neighborhood operations are more promising in a specific search state. This concentrates computational resources on high-value directions, significantly improving search efficiency. The batch move iteration mechanism breaks through the limitations of traditional single moves, systematically generating and evaluating multiple related moves. It identifies potential improvements that, while not immediately reducing the number of workstations, can improve task distribution through a suitability function. Multiple moves are applied at once to accommodate the chain of adjustments caused by generalized priority constraints, avoiding constraint conflicts and redundant verification between multiple single moves. When multiple iterations fail to improve the local optimum, the destruction-repair strategy breaks the existing solution structure by purposefully removing some tasks and then reconstructing it in an orderly manner based on constraint logic, achieving a leapfrog exploration of the solution space and helping the algorithm escape the trap of low-quality local optima. The adaptive parameter adjustment of this mechanism ensures that the perturbation intensity is gradually optimized from mild to deep, which avoids excessive damage to high-quality structures and ensures that deep reorganization can be carried out when mild perturbations are ineffective. This allows for the continuous discovery of new improvement areas while maintaining feasibility, thereby improving the breadth and depth of the search.

[0105] S6: Based on the results of batch moving iterative local search, output an assembly line scheduling scheme that satisfies the generalized priority constraint.

[0106] Preferably, constructing an integer linear programming model that approximates the time axis using workstation indices includes:

[0107] Establish an optimization problem with the goal of minimizing the number of workstations used;

[0108] Set task assignment constraints to ensure that each task is assigned to a unique workstation;

[0109] Set a workstation time constraint to ensure that the total processing time of tasks allocated within each workstation does not exceed the cycle time.

[0110] Define a generalized priority constraint to represent the necessary waiting requirements between tasks in the form of workstation index difference, and ensure that for task pairs with priority relationship, the index of the workstation where the subsequent task is located is not less than the sum of the index of the workstation where the preceding task is located and the minimum waiting unit.

[0111] Set a workstation usage order constraint to ensure that workstations are used in the order they are indexed.

[0112] It should be noted that the integer linear programming model is a mathematical optimization model in which both the objective function and constraints are linear expressions, and the decision variables take integer values. In this embodiment, it specifically refers to binary decision variables. and The model system is structured as follows. The objective function of minimizing the number of workstations used is achieved through... Implementation, in which Using binary variables, this design enables state linearization of discrete workstations, facilitating processing by standard solvers. Task assignment constraints. Ensuring the feasibility of a solution and preventing tasks from being repeatedly assigned or omitted are fundamental structural constraints of the model. Workstation time constraints. Using the Big M method, when Forced ,when The total task time is limited, achieving a unified expression of logic and capacity. Generalized priority constraint. The core innovation lies in transforming time lag requirements into positional sorting constraints through a linear combination of workstation indexes, thus avoiding the introduction of non-linear time variables. Workstations utilize sequence constraints. To avoid the symmetry of solutions and prevent meaningless solutions with discontinuous workstation numbers, the search space is reduced.

[0113] Understandably, a rigorous yet efficient mathematical model is constructed through the collaborative design of five types of constraints. The objective function directly targets the core indicators of the assembly line balancing problem, making the optimization direction clear. Task allocation constraints and workstation time constraints constitute the basic framework of the traditional assembly line balancing problem, ensuring the basic feasibility of the solution. The innovative modeling of generalized priority constraints is the key difference between this scheme and existing technologies. It transforms the originally difficult-to-handle temporal waiting into spatial location constraints, enabling complex process requirements to be expressed using standard linear constraints. This satisfies actual production needs while avoiding the high computational cost of nonlinear programming. The use of workstation sequence constraints reduces the search space by nearly 50% by eliminating symmetric solutions, significantly improving solution efficiency. The five types of constraints support each other, forming a complete constraint system from task allocation to time scheduling, from priority relationships to spatial layout. This provides a solid mathematical foundation for subsequent intelligent optimization algorithms, ensuring that all search processes are conducted within the feasible region and avoiding ineffective exploration.

[0114] Preferably, performing generalized precedence relation reinforcement and propagation, as well as workstation capacity improvement, on the input instances of the integer linear programming model includes:

[0115] For each pair of task nodes in the priority graph that have a direct or indirect priority relationship... and Update its associated minimum waiting unit. The following relation is satisfied:

[0116] ;

[0117] in, Indicates from the task To the mission Minimum waiting unit required, Indicates the node in the priority graph To the node The set of task nodes included on all directed paths. Indicates task Processing time, This indicates the time of the beat. This represents the floor function;

[0118] For each task Solve a subset sum problem with conflict constraints, and adjust the task based on the optimal solution to the subset sum problem with conflict constraints. The processing time, the optimal solution value of the subset with conflict constraints and the problem. Satisfying the relation:

[0119] ;

[0120] in, Representation and Task The set of tasks that do not have direct generalized priority constraints and conflicts. This indicates that the workstation has completed its task. The remaining available time and satisfy , Indicates task Processing time, Indicates task The decision variable regarding whether or not to be selected to enter the same workstation. Represents a set All of the above satisfy The task to A set;

[0121] If the optimal solution value Less than the cycle time Then adjust the task. The processing time and adjustment process satisfy the following relationship:

[0122] ;

[0123] Among them, the updated Indicates task Adjusted processing time.

[0124] Performing generalized precedence reinforcement and propagation on input instances of integer linear programming models, as well as workstation capacity enhancement, includes:

[0125] For each pair of task nodes in the priority graph that have a direct or indirect priority relationship... and Update its associated minimum waiting unit. The following relation is satisfied:

[0126] ;

[0127] in, Indicates from the task To the mission Minimum waiting unit required, Indicates the node in the priority graph To the node The set of task nodes included on all directed paths. Indicates task Processing time, This indicates the time of the beat. This represents the floor function;

[0128] For each task Solve a subset sum problem with conflict constraints, and adjust the task based on the optimal solution to the subset sum problem with conflict constraints. The processing time, the optimal solution value of the subset with conflict constraints and the problem. Satisfying the relation:

[0129] ;

[0130] in, Representation and Task The set of tasks that do not have direct generalized priority constraints and conflicts. This indicates that the workstation has completed its task. The remaining available time and satisfy , Indicates task Processing time, Indicates task The decision variable regarding whether or not to be selected to enter the same workstation. Represents a set All of the above satisfy The task to A set;

[0131] If the optimal solution value Less than the cycle time Then adjust the task. The processing time and adjustment process satisfy the following relationship:

[0132] ;

[0133] Among them, the updated Indicates task Adjusted processing time.

[0134] It should be noted that a priority graph is a directed acyclic graph with tasks as nodes and generalized priority constraints as directed arcs, used to visually represent the order and waiting relationships between tasks. Direct or indirect priority relationships refer to the existence of a priority relationship in the priority graph. arrive A directed path, the path length can be greater than 1. Minimum waiting unit. It is the core parameter of the generalized priority constraint, representing the task Complete the task The minimum number of beats that must be waited before starting. The set includes arrive The intermediate task nodes on each path serve to quantify the total workload along that path. (Round-up function) Used to transform continuous workloads into discrete workstation units. The Subset Sum Problem with Conflict Constraints (SSPC) is a variant of the classic subset sum problem that adds mutual exclusion constraints; the goal is to select tasks that are mutually exclusive. Coexisting tasks maximize workstation capacity. Conflict set. Record The task pairs that cannot be completed at the same station due to the time lag are... Constraints ensure that conflicting tasks are not selected simultaneously. Indicates deduction of task The remaining clock cycle time after it has been occupied is the capacity limit of the SSPC problem. The value reflects the maximum amount of work that can be filled under conflict-free conditions. If this value is less than... , describe the task If the actual effective time used exceeds its nominal processing time, it needs to be adjusted upwards.

[0135] Understandably, this preprocessing step achieves a systematic reduction of the feasible region through a dual mechanism. The generalized priority relation strengthening leverages the transitivity of constraints to make implicit long-path waiting requirements explicit. The original constraints only directly connect adjacent tasks, but stronger constraints can be derived through path propagation. For example, if task A→B requires a 2-step wait and B→C requires a 3-step wait, then A→C requires at least a 5-step wait. The original... It may be only 0 or a small value. The update formula estimates the necessary wait from a workload perspective by dividing the total workload on the path by the cycle time minus 1, avoiding directly solving NP-hard subproblems and achieving a balance between computational efficiency and constraint strength. Increasing workstation capacity addresses the issue from a resource contention perspective, identifying tasks that cannot be completed due to waiting constraints. For conflict-prone tasks at shared sites, accurately calculate the maximum fill limit for remaining capacity. If this limit is insufficient, it indicates a problem with the task. The processing time was underestimated, and the correction was made. This reflects the actual resource consumption. The iterative execution of the two processes can reinforce each other: the priority relationship is strengthened, increasing... Value, expanding the conflict set This makes the SSPC problem more compact; the increased capacity makes it more robust. This, in turn, affects the calculation of path workload. This two-way feedback continuously tightens the model, enabling the search algorithm to obtain high-quality structured information before it starts, and significantly reducing invalid exploration areas.

[0136] Preferably, based on the preprocessed instances, the lower bounds are calculated as follows: a simple lower bound based on task processing time, a lower bound based on the longest path in the priority graph, and a lower bound based on the maximum flow algorithm. The maximum value of these three is then taken as the final lower bound.

[0137] Calculate the first lower bound The following relation is satisfied: ;

[0138] in, This represents a simple lower bound based on task processing time. Represents the set of all tasks. Indicates task Processing time, This indicates the time of the beat. This represents the floor function;

[0139] Calculate the second lower bound The following relation is satisfied: ;

[0140] in, This represents the lower bound of the longest path in the priority graph. This represents the priority graph including virtual source and sink nodes. In the middle, from the virtual source point To Virtual Exchange The length of the longest path;

[0141] Calculate the third lower bound The lower bound satisfies the following relation:

[0142] ;

[0143] in, This represents the lower bound calculated using the maximum flow algorithm. In the priority diagram From virtual source To Virtual Exchange The subset of real-world tasks included in the longest path. This indicates that the first-fit strategy is used to subset... The minimum set of workstations obtained after tasks are allocated under the conditions of satisfying cycle time and generalized priority constraints. Indicates the size of the workstation set. Represents the set of remaining tasks and satisfies , This represents the result obtained by solving a maximum flow problem, which allows the flow from a set to... Successfully assigned to workstation set The sum of the maximum task processing times within the remaining capacity of all workstations;

[0144] Take the first lower bound The second lower bound With the third lower bound The maximum value in the range is used as the final lower bound. .

[0145] It should be noted that the simple lower bound It is a relaxed lower bound that ignores all priority constraints between tasks, and is calculated only based on the ratio of the sum of the processing times of all tasks to the cycle time. Its core function is to provide a basic theoretical lower bound from the perspective of pure resource capacity. Lower bound of the longest path in the priority graph. Based on priority graph The topology is determined by calculating the longest path length from the virtual source node 0 to the virtual sink node n+1. This reflects the incompressibility of the task sequence. The lower bound captures the priority constraint's mandatory requirement on the number of workstations, such as... Figure 2 The diagram shown is a simple example priority diagram, as follows: Figure 3 A schematic diagram of the optimal solution for a simple example. Maximum flow lower bound. It is an innovative hybrid lower bound that incorporates the longest path subset. and the remaining task set The allocation probability is calculated using the maximum flow algorithm. Medium tasks can be filled in The maximum remaining capacity of the workstation has been used. Virtual source node 0 and virtual sink node n+1 are auxiliary nodes introduced to unify the handling of task priority relationships. They have zero processing time and are connected to all real tasks. (Length of the longest path) This indicates that the task sequence on the critical path will require at least one less workstation. The first-fit strategy is a greedy allocation method that iterates through the tasks in order, assigning each task to the first available workstation that meets the time and priority constraints; if none is found, a new workstation is created. The remaining task set... It is the total task set Subtract the longest path subset The complement represents non-critical tasks that can be flexibly arranged. The maximum flow algorithm is a standard method for solving network flow problems; here it is used to model the matching process between tasks and workstation capacity. By constructing a directed network of source-task-workstation-sink, the maximum flow value from the source to the sink is calculated. .

[0146] Understandably, by fusing three lower bounds, a multi-dimensional, tightly constrained estimate of the theoretical lower bound is provided. Simple Lower Bound The longest path lower bound is calculated quickly from the perspective of resource capacity, although it has a large relaxation degree, its computational complexity is low, providing a basic support for the calculation. Taking a priority constraint chain approach, this method identifies the sequence of critical tasks that must be executed in order, reflecting the lower bound enforcement effect of the constraint structure on the solution. This approach is particularly suitable for scenarios with dense priority constraints. (Maximum Flow Lower Bound) Its core innovation lies in its ability to first identify a subset of critical paths in the priority graph. This subset, due to its strong priority relation, forms the skeleton structure of the solution and must be allocated to workstations in sequence to form a workstation set. Then, for the set of non-critical tasks... Construct a bipartite network matching model, with the left node being... Medium task (capacity is processing time), right-hand node is The remaining capacity of each workstation is calculated, and edges represent the number of workstations where a task can be legally inserted (subject to position and lag constraints). The maximum flow algorithm is used to accurately calculate these values. The total time that can be embedded in the medium task on the existing workstation Thus, accurately estimate the difference In addition, the number of new workstations needs to be added. Taking the maximum value of the three factors ensures that the lower bound simultaneously satisfies the resource, sequence, and hybrid constraints, providing a strong pruning criterion and optimality proof for subsequent algorithms. When the objective value of the algorithm solution equals this lower bound, the global optimum can be determined, avoiding over-search.

[0147] The definition includes an action space with several predefined neighborhood operations, and a state space to characterize the changes in the objective function value and distribution balance of the current solution relative to the global and local optima, including:

[0148] The definition includes three preset action spaces for neighborhood operations, namely, operations... ,operate and operation ,in This indicates that a task is moved from its currently assigned workstation to another workstation. This indicates the exchange of two tasks on the same workstation with one task on a different workstation. Indicates the task From workstation Move to workstation At the same time, the original workstation Task Move to a different workstation Another workstation;

[0149] Define a state space that includes a two-dimensional discrete space. Among them, the first dimension state value The second dimension, state value, represents the quality change of the current solution relative to the optimal solution. It represents the change in the distribution balance of the current solution relative to the optimal solution;

[0150] in The value of is 0, 1, or 2, which respectively represent that the current solution has improved the global optimum, improved the local optimum, or has not improved any optimum. The value of is 0 or 1, representing whether the distribution balance of the current solution is improved or not compared to the optimal solution, respectively. The distribution balance is determined by the suitability function. Measurement, among which This represents the set of workstations used by the current solution. Indicates workstation The total processing time of the assigned tasks.

[0151] It should be noted that the action space is the set of all executable operations in the reinforcement learning framework, specifically referring to three neighborhood transformation operations for the assembly line balancing problem. Single-task movement operations. It is the most basic neighborhood structure, achieving local adjustments by changing the workstation to which a single task belongs. Its function is to explore basic location optimization possibilities. Dual-task swapping operation. This three-task reordering, involving multiple workstations, can balance the load without increasing the number of workstations, improving the uniformity of task distribution across workstations. (Three-task interlocking movement operation) This is a deep operation specifically designed for generalized priority constraints. By moving two tasks at once and changing their relative positions, it adapts to the cascading adjustment requirements caused by lag constraints, and its role is to handle complex constraint coupling scenarios. The state space is a set of variables describing the characteristics of the search environment, and a two-dimensional discrete structure is used to implement state compression encoding. First dimension By comparing the current solution objective value with global optimal Local Optimum The magnitude relationship is used to discretize the quality changes of the solution into three levels, enabling the algorithm to perceive whether the search process is in a global breakthrough, local optimization, or stagnation phase. Second dimension Through the appropriateness function To measure the load balancing status, Workstation load is calculated using the sum of squares. Perform nonlinear aggregation, as the load distribution becomes more uneven... A larger value guides the search towards clearing out lightly loaded workstations, indirectly reducing the total number of workstations. The criterion for improving allocation balance is the current solution's... Whether the value decreases relative to the reference solution indicates that the load is more even, which is beneficial for subsequent optimization.

[0152] Understandably, through ingenious design of the action space and state space, the indiscriminate traversal of traditional iterative local search is transformed into intelligent decision-making based on environmental perception. The design of the action space reflects hierarchy: It is simple yet flexible to operate, making it suitable for fine-tuning. The operation involves multi-task collaboration and is suitable for moderate-intensity optimization. While complex to operate, it can trigger chain reactions, making it suitable for overcoming constraint bottlenecks. This hierarchical design allows the algorithm to select operations of varying intensities based on the search stage, avoiding a mismatch between operational capabilities and problem requirements. Two-dimensional encoding of the state space compresses high-dimensional solution quality information into low-dimensional discrete states, significantly reducing the learning complexity of Q-learning. Dimensions enable the algorithm to clearly distinguish the current level of improvement, when When a new global optimum is discovered, the selection probability of this operation should be strengthened; when If the operation is invalid, it should be penalized and other operations should be explored. The dimension introduces load balancing as a secondary objective because simply optimizing the number of workstations may lead to extreme load unevenness, while the suitability function... By employing a quadratic penalty mechanism, the algorithm can still create conditions for subsequent workstation clearing by improving load distribution even when it cannot immediately reduce the number of workstations, thus achieving a multi-objective collaborative optimization effect.

[0153] Preferably, the design reward function for adaptive neighborhood selection includes:

[0154] Design reward function The following relation is satisfied:

[0155] ;

[0156] in, This represents the objective function value of the current solution obtained after performing the neighborhood operation. This represents the objective function value of the historical global optimal solution. This represents the objective function value of the current local optimum. Representing neighborhood operations The number of consecutive failures, This represents the distribution balance value of the current solution. This represents the distribution balance value of the local optimal solution. Represents the step function. This represents the function that takes the maximum value. This represents the preset weight coefficient for the global breakthrough reward item. This represents the preset weighting coefficient for the reward items for local improvements. This represents the preset weighting coefficient of the consecutive failure penalty term. This indicates the preset weighting coefficient for the load balancing improvement reward items.

[0157] It should be noted that the reward function is a scalar signal used in reinforcement learning to evaluate the quality of an action, driving... The update direction of the value table. Global breakthrough reward items. A strong positive stimulus is provided when a solution superior to the historical global optimum is found, where the step function... Output 1 when the independent variable is positive, otherwise output 0, ensuring activation only when the global optimum is truly breached. Rewards are typically set to a large value (e.g., 100) to highlight the importance of overall improvement. Local improvement rewards. Appropriate rewards will be given based on the proportion of improvement. The function ensures that a reward is given only if the current solution is better than a local optimum, divided by... Achieve normalization processing. A moderate value (e.g., 10) is used to balance exploration and exploitation. A penalty is applied for consecutive failures. Apply negative suppression to operations that fail frequently. Record operation The penalty for consecutive unimproved solutions increases linearly with the number of failures. Typically set to a small value (e.g., 1) to avoid prematurely abandoning potentially successful operations. Load balancing improvement incentives. Provide positive feedback when the distribution balance improves. The value is calculated using a suitability function, reflecting the uniformity of workstation load. This value guides the search towards load balancing. Values ​​(e.g., 5) fall between global and local rewards. Weighting coefficient. to These are manually set hyperparameters that control the relative importance of each reward item in the total reward and need to be optimized according to the characteristics of the problem.

[0158] Understandably, the reward function design achieves fine-grained control of search behavior through a multi-objective weighted mechanism, addressing the lack of adaptive guidance in traditional methods. The global breakthrough reward provides the main optimization impetus for the algorithm, ensuring the search always moves towards the core objective of reducing the total number of workstations. Its step-like characteristic avoids oversensitivity to minor improvements, concentrating resources on qualitative breakthroughs. The local improvement reward maintains the algorithm's continuous optimization capability. When the number of workstations cannot be immediately reduced, it still encourages the gradual improvement of solution quality, preventing search stagnation. Normalization ensures the reward magnitude adapts to the optimization difficulty. The continuous failure penalty introduces a negative feedback mechanism, enabling the algorithm to automatically identify inefficient operations and reduce their selection probability, achieving a leap from blind trial and error to intelligent avoidance. Simultaneously, the linear penalty design preserves the possibility of reactivation of operations after environmental changes. The load balancing reward is implemented through a suitability function. The squared penalty property cleverly integrates the indirect goal (clearing low-load workstations) into the direct optimization process. When a workstation's load... When significantly lower than C, The high sensitivity of the value will prompt the algorithm to continuously move tasks to this station, creating structural conditions for reducing the number of workstations in the future. The four rewards work together to form an incentive system with clear goal orientation, sound punishment mechanism, and multi-objective balance, enabling Q-learning to accurately evaluate the long-term value of each operation under different states and achieve dynamic adaptive adjustment of the search strategy.

[0159] Preferably, the batch move iteration using the adaptively selected neighborhood operation through the Q-learning dynamic selection module includes:

[0160] Initialize the Q-value table and the consecutive failure count table. Learning rate Discount Factor and exploration rate ;

[0161] In each iteration, the state is updated based on the current solution, the global optimum, and the local optimum. For the new state ;

[0162] Based on the new state Update the table of consecutive failures ;

[0163] Based on reward function The discount factor And the maximum Q value of each neighborhood operation in the new state, compared with the current state in the Q value table. and the currently executed neighborhood operations The corresponding Q value is updated, and the update process satisfies the following relationship:

[0164] ;

[0165] in, Indicates the state Perform neighborhood operations The corresponding Q value, Indicates a new state The maximum Q value among all possible neighborhood operations;

[0166] According to the preset attenuation coefficient Decrease the learning rate The attenuation process satisfies the following relationship: ;

[0167] based on The greedy strategy dynamically selects the next neighbor operation. Generate a random number ,like Then, randomly select from all neighborhood operations in the action space. Otherwise, choose the current state. The neighborhood operation with the largest Q value is used as The selection process satisfies the following relation:

[0168] ;

[0169] The exploration rate is reduced according to a preset rule. .

[0170] It should be noted that, The value table is a matrix structure used in reinforcement learning to store state-action value functions. In this embodiment, the dimension is 1. ,in It is the size of the state space. It is the size of the action space, for each element. Recorded in historical experience in state Next action The accumulated expected total reward provides a basis for neighborhood selection decisions. (Table of consecutive failure counts) It is a one-dimensional array, the length of which is equal to the size of the action space. ,element Record actions in the most recent consecutive iterations The number of times a solution is selected but fails to improve it, enabling dynamic monitoring of the effectiveness of each operation. Learning rate. Decide The step size for value updates, larger This allows the algorithm to respond quickly to new rewards, but may cause oscillations, which are relatively small. This makes learning stable but converges slowly, using a decay mechanism. Achieve a dynamic transition from rapid learning to stable convergence. Discount factor. Weighing the importance of immediate rewards versus future rewards, When the algorithm approaches zero, it becomes short-sighted, focusing only on immediate results. When the value is close to 1, the algorithm considers the long-term cumulative effect, which is usually set to 1 in this invention. To balance exploration depth. Exploration rate. control In a greedy strategy, the probability of random exploration versus utilizing a known optimal action is relatively high. Encourage exploration of unknown states-action pairs, lower The algorithm tends to utilize learned high-quality actions, and the decay mechanism gradually shifts the focus from extensive exploration to refined utilization. (State transition process) This is achieved by comparing the quality and balance of the current solution, the global optimum, and the local optimum, reflecting the changes in the search environment caused by the actions performed. (Attenuation coefficient) These are preset hyperparameters, usually set to... This controls the rate at which the learning rate and exploration rate decay exponentially with the number of iterations.

[0171] Understandably, by constructing a complete Q-learning update and selection closed loop, adaptive learning and dynamic adjustment of the search strategy can be achieved. The initialization phase will... Value table and Clear the table and set it. , , Initial values ​​provide a starting point for the learning process. The state update mechanism quantifies the search progress into discrete states, enabling the algorithm to perceive the current search context. Table updates establish a short-term memory of the effectiveness of operations by recording the number of consecutive failures, providing data support for failure penalties. The value update formula adopts the idea of ​​temporal difference learning, where Some are referred to as TD targets, representing actions. The immediate reward obtained after execution, plus the maximum expected value of subsequent states, is equal to the current... The difference is called the TD error, multiplied by the learning rate. Later used for correction Value, making Gradually approximating the true long-term value. Learning rate decay ensures rapid learning in the early stages and avoids over-correction in the later stages, achieving stable convergence. The greedy strategy dynamically balances exploration and exploitation, initially showing a high... Ensure that the effects of each action under different states are fully explored to avoid premature convergence to a local optimum; low latency in the later stages This allows the algorithm to utilize learned experience to select high Q-value actions for a more refined search. The exploration rate decay rule can be set as follows: ,in For the number of iterations, To explore the lower bound (e.g., 0.01) and ensure that the algorithm always retains its ability to explore small limits, this mechanism gradually transitions the search process from random trial and error to experience-driven intelligent decision-making, thereby improving search efficiency and solution quality.

[0172] Preferably, the initial construction scheme includes:

[0173] The first candidate initial scheme is constructed using the first-adapt strategy, which includes: processing each unassigned task in the order of priority among tasks, assigning each task to the first available workstation that satisfies the workstation time constraint and the generalized priority constraint, and creating a new workstation for assignment if there is no available workstation.

[0174] Constructing a second candidate initial solution: for workstations Solve an optimization problem to maximize the workstation The task's time consumption, optimizing the optimal solution value of the problem. Satisfying the relation:

[0175] ;

[0176] in, Indicates workstation The optimal solution value of the improved SSP-PC problem, Indicates the workstations currently available. The set of candidate tasks for allocation includes all unassigned tasks that have no prerequisite tasks or whose prerequisite tasks have already been assigned, as well as unassigned tasks that have no mandatory priority constraints with existing tasks in the set. Indicates task Processing time, Indicates task Whether to be selected and assigned to a workstation Decision variables, This indicates the time of the beat. Represents a set All data that satisfy direct priority relationships and have the minimum waiting time The task to A set;

[0177] By iteratively solving the problem and assigning tasks to each workstation until all tasks have been assigned, a second candidate initial solution is obtained.

[0178] The integer linear programming model is solved directly using an integer programming solver to obtain a third candidate initial scheme.

[0179] The total number of workstations used by the first candidate initial scheme, the second candidate initial scheme, and the third candidate initial scheme is compared, and the scheme with the fewest workstations is selected as the final initial scheme.

[0180] It should be noted that the initial solution is the starting point for the iterative local search algorithm, and its quality directly affects the convergence speed of subsequent searches and the quality of the final solution. The first-fit strategy is a greedy construction method that processes tasks sequentially according to their topological order. For each task, it searches for the first workstation within its feasible workstation range that satisfies the time capacity and generalized priority constraints and assigns it to the task; if no such workstation exists, a new workstation is created. This strategy is computationally fast and guarantees feasibility, but may lead to low workstation utilization due to short-sightedness. The SSP-PC problem is a variant of the standard subset sum problem with added priority pairing constraints. Its goal is to select a set of coexisting candidate tasks within a single workstation to maximize its total processing time, thereby improving workstation fill rate. (Candidate task set) Dynamically constructed, initially including all unassigned tasks with an in-degree of zero (i.e., tasks with no predecessor tasks or whose predecessor tasks have already been assigned), and then iteratively expanded to include tasks with... There are currently no mandatory priority constraints on tasks (i.e.) Other tasks within the set ensure that tasks can be flexibly combined. Pairing constraints. Defined as A pair of tasks that satisfy a direct priority relationship and have a minimum waiting time of zero. The set, constraints Ensure that if you select a task Then its predecessor must be selected at the same time. This reflects a strong coupling relationship. Integer programming solvers refer to commercial optimization engines such as Gurobi and CPLEX, which can directly solve the established integer linear programming model and obtain a high-quality initial solution through branch and bound algorithms, but the computational cost is relatively large.

[0181] Understandably, the collaborative competition of three heterogeneous strategies addresses the technical problem of unstable initial solution quality caused by the reliance on a single construction rule in traditional methods. The first-fit strategy, as a lightweight method, quickly generates feasible solutions as a safety net, ensuring the algorithm always has a starting point. The SSP-PC strategy achieves local optimum filling for each workstation by precisely solving subsets and the problem, significantly improving workstation utilization. Its dynamic candidate set construction and pairing constraint mechanism effectively handles task coupling under generalized priority constraints, making the initial solution structure more compact. The integer programming solver strategy utilizes mature optimization algorithms to obtain near-optimal initial solutions within an acceptable timeframe, making it particularly suitable for small to medium-sized instances. The candidate solutions generated by the three strategies compete for objective values, selecting the solution with the fewest workstations as the final initial solution. This mechanism integrates the advantages of rapid construction, precise filling, and global optimization, ensuring solution feasibility and improving initial quality, allowing subsequent iterative local searches to start from a higher starting point and reducing the number of optimization steps required. Compared to a single strategy, multi-strategy competition can adapt to different problem characteristics: for simple instances, the first-fit strategy may be good enough; for complex instances, the SSP-PC or ILP strategy can provide a higher quality starting point and avoid the search from getting stuck in low-quality areas.

[0182] Preferably, when the search gets stuck in a local optimum, the destruction-repair strategy to escape the local optimum includes:

[0183] The current neighborhood operation is adaptively selected based on the Q-learning dynamic selection module. Iterate through all feasible single moves that meet the constraints;

[0184] For each feasible move, compute the adequacy function value of the solution after the feasible move is executed. The appropriateness function value Satisfying the relation: ;

[0185] in, This represents the set of workstations used to execute the move and resolve the issue. Indicates workstation The total processing time of the tasks assigned in the process;

[0186] Based on the aforementioned suitability function value Improvement value relative to the solution before moving The feasible moves are evaluated and screened, and all are included. The moves are collected into the candidate move set;

[0187] The moves in the candidate move set are sorted by Sort the values ​​in descending order;

[0188] Apply the sorted moves sequentially. Before each application, determine whether the current move still satisfies all constraints and still has improvement potential. If the result is yes, apply the current move to update the current solution.

[0189] After a complete batch move application, the obtained new solution is compared with the current local optimum. If the new solution is better in terms of objective function value, or if the objective function value is the same but the fitness function value is lower, the result is considered. If a better solution is found, then update the current local optimum to the new solution;

[0190] If continuous If the current local optimum is not updated in subsequent iterations, the search is determined to be trapped in a local optimum, and a destruction-repair strategy is executed, including:

[0191] According to the preset damage strength parameters Randomly remove from the current local optimum There are several tasks, including the initial one. ;

[0192] If removing a task results in a workstation becoming idle, then delete the currently idle workstation and shift the index of all workstations after the deleted workstation one position forward.

[0193] Based on the first-fit strategy, the removed tasks are reassigned to existing or new workstations in the order they were removed, in an attempt to fix the problem and obtain a complete new solution.

[0194] If the repair is successful, the new solution obtained after the repair will be used as the current solution, and the iterative process will continue; if the repair fails, then... Decrease by one and retry the destruction and repair process until... If it still cannot be repaired after being reduced to 1, then... Reset to And restart the entire destruction-repair strategy.

[0195] It's important to note that batch move iteration differs from the traditional single-move search mechanism. It systematically generates multiple candidate moves in a single iteration, evaluates their overall effectiveness, and then executes them in batches. This mechanism can capture the cascading adjustment needs under generalized priority constraints, avoiding conflicts and redundant calculations between multiple single moves. A feasible single move refers to performing a neighborhood operation based on the current solution. The resulting task reassignment scheme satisfies all time capacity and priority constraints; each move requires independent feasibility verification. (Appropriateness function) It is a core evaluation indicator, using a sum-of-squares approach to non-linearly aggregate workstation load. The more uneven the load distribution, the more... A larger value indicates that the potential for improvement can still be identified when the objective function cannot be improved immediately. Improvement value , The ability to improve load balancing is a criterion for selecting candidate moves. The candidate move set is a temporary storage structure for batch searching, collecting all moves that pass the test. Filtered moves are sorted by improvement value to ensure high-potential moves are applied first. Continuous lack of updates is determined by a counter. Implementation, each batch move does not improve the local optimum. Increase by 1, when Reaching the preset threshold This triggers diverse strategies to prevent the search from lingering excessively in low-quality areas. The disrupt-repair strategy is a structured perturbation mechanism that purposefully removes parts of the task to break the current solution structure, then reconstructs it to explore new areas. Disruption intensity parameters. It is a preset integer, which can be set to... Control the initial disturbance amplitude. Remove the number of tasks. It is an adaptive adjustment variable, initially equal to The number of workstations decreases progressively upon repair failure, allowing for a gradual approach from mild to severe damage. Workstation index shifting is a contraction operation during the damage process; when removing a task leaves a workstation empty, that workstation is deleted and the numbers of all subsequent workstations are decremented by 1, maintaining solution compactness and reducing search space redundancy. The repair process is based on a first-fit strategy, re-inserting tasks in reverse order of removal, prioritizing the use of existing workstation capacity, and creating new workstations when necessary to ensure the feasibility of new solutions.

[0196] Understandably, the synergistic design of batch move mechanism and destruction-repair strategy addresses the technical problems of traditional local search easily getting trapped in local optima and lacking sufficient search depth under generalized priority constraints. Batch move iteration first systematically traverses the current neighborhood operations. All feasible moves, through the adequacy function Evaluate the potential value of each move, rather than relying solely on the objective function, because the objective function is insensitive to changes in the number of workstations, and small adjustments are unlikely to alter its value. The quadratic penalty mechanism can capture subtle improvements in load distribution and identify moves that could lead to emptying workstations. The collection and sorting mechanism ensures high-value moves are prioritized, forming gradient optimization paths; the pre-application re-check mechanism considers the impact of previous moves on subsequent constraints, avoiding conflicts caused by batch applications and ensuring solution feasibility. The continuous no-update judgment mechanism provides automatic identification of local optima when the algorithm... If no improvement is achieved after the first attempt, it indicates that the current solution region has been fully explored, necessitating a structural leap. The disrupt-repair strategy achieves leapfrog exploration of the solution space while maintaining solution feasibility through purposeful random removal and ordered reconstruction: removal operations disrupt the original task distribution pattern, especially removing critical tasks which may free up adjustment space for multiple workstations; contraction operations maintain the compactness of the solution and avoid search redundancy caused by discontinuous numbering; the repair process, based on first-fit and removal reversal, tends to redistribute tasks to different locations, thereby exploring new structures. Parameters The adaptive reduction mechanism ensures that the disturbance intensity is gradually adjusted from mild to deep, avoiding excessive damage to high-quality structures, while ensuring that deep reconstruction can be carried out when mild disturbances are ineffective.

[0197] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0198] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims

1. An assembly line scheduling optimization method considering generalized priority constraints, characterized in that, include: Based on the input task set, workstation set, cycle time, and generalized priority constraints, an integer linear programming model with workstation index approximating the time axis is constructed. The generalized priority constraints represent the necessary waiting requirements between tasks, and decision variables are defined to describe task allocation and workstation usage status. Generalized priority relation reinforcement and propagation, as well as workstation capacity enhancement, are performed on the input instances of the integer linear programming model to reduce the feasible region and improve search efficiency; Based on the preprocessed instances, we calculate the simple lower bound based on task processing time, the lower bound based on the longest path in the priority graph, and the lower bound based on the maximum flow algorithm, and take the maximum value of the three as the final lower bound. The definition includes an action space with several preset neighborhood operations, and a state space is defined to represent the changes in the objective function value and distribution balance of the current solution relative to the global optimal solution and the local optimal solution. A reward function is designed to adaptively select neighborhood operations, wherein the reward function comprehensively considers global breakthrough, local improvement, continuous failure penalty and load balancing improvement. Based on the final lower bound and the Q-learning dynamic selection module, an initial scheme is constructed, and batch move iteration is performed through the neighborhood operation adaptively selected by the Q-learning dynamic selection module. The batch move iteration includes collecting feasible moves, evaluating and applying feasible moves according to the suitability function, and executing a destruction-repair strategy to escape the local optimum when the search gets stuck in a local optimum. Based on the results of batch moving iterative local search, an assembly line scheduling scheme that satisfies the generalized priority constraint is output. Constructing an integer linear programming model that approximates the time axis using workstation indices includes: Establish an optimization problem with the goal of minimizing the number of workstations used; Set task assignment constraints to ensure that each task is assigned to a unique workstation; Set a workstation time constraint to ensure that the total processing time of tasks allocated within each workstation does not exceed the cycle time. Define a generalized priority constraint to represent the necessary waiting requirements between tasks in the form of workstation index difference, and ensure that for task pairs with priority relationship, the index of the workstation where the subsequent task is located is not less than the sum of the index of the workstation where the preceding task is located and the minimum waiting unit. Set a workstation usage order constraint to ensure that workstations are used in the order they are indexed.

2. The assembly line scheduling optimization method considering generalized priority constraints according to claim 1, characterized in that, Performing generalized precedence reinforcement and propagation on input instances of integer linear programming models, as well as workstation capacity enhancement, includes: For each pair of task nodes in the priority graph that have a direct or indirect priority relationship... and Update its associated minimum waiting unit. The following relation is satisfied: ; in, Indicates from the task To the mission Minimum waiting unit required, Indicates the node in the priority graph To the node The set of task nodes included on all directed paths. Indicates task Processing time, This indicates the time of the beat. This represents the floor function; For each task Solve a subset sum problem with conflict constraints, and adjust the task based on the optimal solution to the subset sum problem with conflict constraints. The processing time, the optimal solution value of the subset with conflict constraints and the problem. Satisfying the relation: ; in, Representation and Task The set of tasks that do not have direct generalized priority constraints and conflicts. This indicates that the workstation has completed its task. The remaining available time and satisfy , Indicates task Processing time, Indicates task The decision variable regarding whether or not to be selected to enter the same workstation. Represents a set All of the above satisfy The task to A set; If the optimal solution value Less than the cycle time Then adjust the task. The processing time and adjustment process satisfy the following relationship: ; Among them, the updated Indicates task Adjusted processing time.

3. The assembly line scheduling optimization method considering generalized priority constraints according to claim 1, characterized in that, Based on the preprocessed instances, we calculate the simple lower bound based on task processing time, the lower bound based on the longest path in the priority graph, and the lower bound based on the maximum flow algorithm, and take the maximum value of the three as the final lower bound, including: Calculate the first lower bound The following relation is satisfied: ; in, This represents a simple lower bound based on task processing time. Represents the set of all tasks. Indicates task Processing time, This indicates the time of the beat. This represents the floor function; Calculate the second lower bound The following relation is satisfied: ; in, This represents the lower bound of the longest path in the priority graph. This represents the priority graph including virtual source and sink nodes. In the middle, from the virtual source point To Virtual Exchange The length of the longest path; Calculate the third lower bound The lower bound satisfies the following relation: ; in, This represents the lower bound calculated using the maximum flow algorithm. In the priority diagram From virtual source To Virtual Exchange The subset of real-world tasks included in the longest path. This indicates that the first-fit strategy is used to subset... The minimum set of workstations obtained after tasks are allocated under the conditions of satisfying cycle time and generalized priority constraints. Indicates the size of the workstation set. Represents the set of remaining tasks and satisfies , This represents the result obtained by solving a maximum flow problem, which allows the flow from a set to... Successfully assigned to workstation set The sum of the maximum task processing times within the remaining capacity of all workstations; Take the first lower bound The second lower bound With the third lower bound The maximum value in the range is used as the final lower bound. .

4. The assembly line scheduling optimization method considering generalized priority constraints according to claim 1, characterized in that, The definition includes an action space with several predefined neighborhood operations, and a state space to characterize the changes in the objective function value and distribution balance of the current solution relative to the global and local optima, including: The definition includes three preset action spaces for neighborhood operations, namely, operations... ,operate and operation ,in This indicates that a task is moved from its currently assigned workstation to another workstation. This indicates the exchange of two tasks on the same workstation with one task on a different workstation. Indicates the task From workstation Move to workstation At the same time, the original workstation Task Move to a different workstation Another workstation; Define a state space that includes a two-dimensional discrete space. Among them, the first dimension state value The second dimension, state value, represents the quality change of the current solution relative to the optimal solution. It represents the change in the distribution balance of the current solution relative to the optimal solution; in The value of is 0, 1, or 2, which respectively represent that the current solution has improved the global optimum, improved the local optimum, or has not improved any optimum. The value of is 0 or 1, representing whether the distribution balance of the current solution is improved or not compared to the optimal solution, respectively. The distribution balance is determined by the suitability function. Measurement, among which This represents the set of workstations used by the current solution. Indicates workstation The total processing time of the assigned tasks.

5. The assembly line scheduling optimization method considering generalized priority constraints according to claim 4, characterized in that, The design reward function for adaptive neighborhood selection includes: Design reward function The following relation is satisfied: ; in, This represents the objective function value of the current solution obtained after performing the neighborhood operation. This represents the objective function value of the historical global optimal solution. This represents the objective function value of the current local optimum. Representing neighborhood operations The number of consecutive failures, This represents the distribution balance value of the current solution. This represents the distribution balance value of the local optimal solution. Represents the step function. This represents the function that takes the maximum value. This represents the preset weight coefficient for the global breakthrough reward item. This represents the preset weighting coefficient for the reward items for local improvements. This represents the preset weighting coefficient of the consecutive failure penalty term. This indicates the preset weighting coefficient for the load balancing improvement reward items.

6. The assembly line scheduling optimization method considering generalized priority constraints according to claim 5, characterized in that, Batch move iterations using the adaptive neighborhood selection operation via the Q-learning dynamic selection module include: Initialize the Q-value table and the consecutive failure count table. Learning rate Discount Factor and exploration rate ; In each iteration, the state is updated based on the current solution, the global optimum, and the local optimum. For the new state ; Based on the new state Update the table of consecutive failures ; Based on reward function The discount factor And the maximum Q value of each neighborhood operation in the new state, compared with the current state in the Q value table. and the currently executed neighborhood operations The corresponding Q value is updated, and the update process satisfies the following relationship: ; in, Indicates the state Perform neighborhood operations The corresponding Q value, Indicates a new state The maximum Q value among all possible neighborhood operations; According to the preset attenuation coefficient Decrease the learning rate The attenuation process satisfies the following relationship: ; based on The greedy strategy dynamically selects the next neighbor operation. Generate a random number ,like Then, randomly select from all neighborhood operations in the action space. Otherwise, choose the current state. The neighborhood operation with the largest Q value is used as The selection process satisfies the following relation: ; The exploration rate is reduced according to a preset rule. .

7. The assembly line scheduling optimization method considering generalized priority constraints according to claim 1, characterized in that, The initial construction scheme includes: The first candidate initial scheme is constructed using the first-adapt strategy, which includes: processing each unassigned task in the order of priority among tasks, assigning each task to the first available workstation that satisfies the workstation time constraint and the generalized priority constraint, and creating a new workstation for assignment if there is no available workstation. Constructing a second candidate initial solution: for workstations Solve an optimization problem to maximize the workstation The task's time consumption, optimizing the optimal solution value of the problem. Satisfying the relation: ; in, Indicates workstation The optimal solution value of the improved SSP-PC problem, Indicates the workstations currently available. The set of candidate tasks for allocation includes all unassigned tasks that have no prerequisite tasks or whose prerequisite tasks have already been assigned, as well as unassigned tasks that have no mandatory priority constraints with existing tasks in the set. Indicates task Processing time, Indicates task Whether to be selected and assigned to a workstation Decision variables, This indicates the time of the beat. Represents a set All data that satisfy direct priority relationships and have the minimum waiting time The task to A set; By iteratively solving the problem and assigning tasks to each workstation until all tasks have been assigned, a second candidate initial solution is obtained. The integer linear programming model is solved directly using an integer programming solver to obtain a third candidate initial scheme. The total number of workstations used by the first candidate initial scheme, the second candidate initial scheme, and the third candidate initial scheme is compared, and the scheme with the fewest workstations is selected as the final initial scheme.

8. The assembly line scheduling optimization method considering generalized priority constraints according to claim 7, characterized in that, When the search gets stuck in a local optimum, a break-and-fix strategy is implemented to escape the local optimum, including: The current neighborhood operation is adaptively selected based on the Q-learning dynamic selection module. Iterate through all feasible single moves that meet the constraints; For each feasible move, compute the adequacy function value of the solution after the feasible move is executed. The appropriateness function value Satisfying the relation: ; in, This represents the set of workstations used to execute the move and resolve the issue. Indicates workstation The total processing time of the tasks assigned in the process; Based on the aforementioned suitability function value Improvement value relative to the solution before moving The feasible moves are evaluated and screened, and all are included. The moves are collected into the candidate move set; The moves in the candidate move set are sorted by Sort the values ​​in descending order; Apply the sorted moves sequentially. Before each application, determine whether the current move still satisfies all constraints and still has improvement potential. If the result is yes, apply the current move to update the current solution. After a complete batch move application, the obtained new solution is compared with the current local optimum. If the new solution is better in terms of objective function value, or if the objective function value is the same but the fitness function value is lower, the result is considered. If a better solution is found, then update the current local optimum to the new solution; If continuous If the current local optimum is not updated in subsequent iterations, the search is determined to be trapped in a local optimum, and a destruction-repair strategy is executed, including: According to the preset damage strength parameters Randomly remove from the current local optimum There are several tasks, including the initial one. ; If removing a task results in a workstation becoming idle, then delete the currently idle workstation and shift the index of all workstations after the deleted workstation one position forward. Based on the first-fit strategy, the removed tasks are reassigned to existing or new workstations in the order they were removed, in an attempt to fix the problem and obtain a complete new solution. If the repair is successful, the new solution obtained after the repair will be used as the current solution, and the iterative process will continue; if the repair fails, then... Decrease by one and retry the destruction and repair process until... If it still cannot be repaired after being reduced to 1, then... Reset to And restart the entire destruction-repair strategy.