Optimization method for solving flexible job-shop scheduling with resource constraints

By combining the hybrid algorithm ILCPEA with imitation learning and constrained programming models, the scheduling of flexible job shops is optimized, which solves the problem of unreasonable resource allocation and achieves the effects of minimizing the maximum completion time and improving machine utilization.

CN121599415BActive Publication Date: 2026-05-08LIAOCHENG UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
LIAOCHENG UNIV
Filing Date
2026-01-27
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing flexible job shop scheduling methods suffer from unreasonable resource allocation, insufficient solution space exploration, low search efficiency, and low machine utilization, making it difficult to effectively solve the scheduling problem of large-scale flexible job shops.

Method used

The hybrid algorithm ILCPEA, which combines imitation learning and constraint programming models, is adopted. Through crossover operators, mutation operators, hybrid decoding strategies and local search optimization scheduling, a disjunctive graph model and critical path are designed to optimize process sequencing, machine selection and resource allocation.

Benefits of technology

It minimizes the maximum completion time, improves resource utilization efficiency and scheduling performance, reduces resource waiting time, and enhances machine utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121599415B_ABST
    Figure CN121599415B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of flexible job shop scheduling in intelligent manufacturing and production scheduling, and particularly relates to an optimization method for solving flexible job shop scheduling with adjusted resource constraints. The method comprises the following steps: initializing parameters and randomly generating an initial population; using a crossover operator and a mutation operator in sequence to evolve the current population; executing a hybrid decoding strategy on the current population; sorting the individuals in the current population in ascending order of maximum completion time to form an elite population, and updating the elite population through problem-specific local search; judging whether the evolution condition is met, and if yes, executing mathematical evolution based on CP, and outputting a final solution when the running time reaches the total running time. The present application has the positive effects of reducing resource waiting time, improving machine utilization, and improving the resource utilization efficiency and scheduling performance of the entire workshop production.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of flexible job shop scheduling technology in intelligent manufacturing and production scheduling, specifically an optimization method for solving flexible job shop scheduling that adjusts resource constraints. Background Technology

[0002] The Flexible Job Shop Scheduling Problem (FJSP) is a core scheduling problem in intelligent manufacturing systems. It breaks the fixed constraint of "one machine per process" inherent in the traditional Job Shop Scheduling Problem (JSP), allowing processes to be processed on multiple compatible machines, significantly improving production flexibility and equipment utilization. The Flexible Job Shop Scheduling Problem with Sequence-Dependent Setup Times (FJSP-SDST), an extension of FJSP, is widely used in light industries such as printing and chemicals. FJSP-SDST considers the setup tasks required between processes where machines are continuously processing different workpieces. Setup tasks refer to equipment state adjustments performed by machines to meet processing requirements during continuous processing of different workpieces. These adjustments require corresponding setup resources and consume a certain amount of setup time, the length of which is determined by both the current and previous processes. Existing research on FJSP-SDST typically assumes that the adjustment task is autonomously managed by the machine, neglecting the coordination and constraints of external resources. This limits its applicability in resource-constrained real-world production environments. This paper addresses this issue by solving FJSP-SDST with adjustment resource constraints (RFJSP-SDST). RFJSP-SDST considers adjustment tasks performed by external resources. The RFJSP-SDST problem is NP-hard, and the main solution methods include exact and approximate methods. Mixed Integer Linear Programming (MILP) and Constraint Programming (CP) models belong to the exact method category and can obtain optimal solutions for small-scale instances. However, for large-scale instances, approximate methods, especially metaheuristic algorithms, are effective solution tools, utilizing evolutionary operators and search mechanisms to effectively explore the solution space. Imitation Learning (IL) is an important area in reinforcement research. It is a decision learning method based on expert demonstration data. By learning the action decisions made by experts under specific scheduling states, it constructs a mapping relationship between states and action decisions, which can quickly converge to an effective policy. The RFJSP-SDST problem involves four sub-problems: process sequencing, machine selection, task allocation adjustment, and resource allocation, making it difficult to solve efficiently. Therefore, a hybrid optimization method is urgently needed that can efficiently balance resource allocation, explore the solution space, and optimize scheduling performance. Summary of the Invention

[0003] The purpose of this invention is to propose an optimization method for solving flexible job shop scheduling with adjusted resource constraints, which solves problems such as unreasonable resource allocation, insufficient solution space exploration, low search efficiency, and low machine utilization in existing scheduling methods, so as to achieve the scheduling objective of minimizing the maximum completion time.

[0004] This invention provides an optimization method for solving flexible job shop scheduling with adjusted resource constraints, characterized by comprising the following steps:

[0005] Step 1: Initialize parameters and set the initial population size N. p Elite population size N e Crossover probability P c Probability of mutation P m and total running time;

[0006] Step 2, randomly generate a number of sizes N p The initial population;

[0007] Step 3: Use the crossover operator and mutation operator sequentially to evolve the current population;

[0008] Step 4: Implement a hybrid decoding strategy for the current population;

[0009] Step 5: Sort the individuals in the current population according to their maximum completion time from smallest to largest, forming a population of size N. e The elite population is updated through a problem-specific local search;

[0010] Step 6: Determine whether the evolutionary conditions are met. If so, construct a CP model, use the individuals in the updated elite population as the initial solutions in the CP model, and use the global search capability of the CP model to perform mathematical evolution based on CP. When the running time reaches the total running time, take the individual with the smallest maximum completion time in the evolved elite population as the final solution and output it. Otherwise, return to step 3.

[0011] Furthermore, in step 2, a random number of size N is generated. p The initial population is initialized by iteratively starting individuals, with the initial population iteratively starting from 0 to N. pThe process iterates, creating one individual in each iteration. Each individual consists of three vectors: a process sorting vector, a machine selection vector, and a resource selection vector. The process sorting vector is initialized with a length equal to the total number of processes. For each workpiece, its number is repeatedly added to the process sorting vector according to the number of processes within that workpiece. The process sorting vector is then randomly arranged, with workpiece numbers ranging from [0, n-1], where n is the total number of workpieces. The number of times each workpiece number appears in the process sorting vector corresponds to the number of processes within that workpiece. The machine selection vector is also initialized with a length equal to the total number of processes. For each process, a machine is randomly selected from the set of machines that can process that process and added to the machine selection vector. The machine numbers in the set range from [0, M-1], where M is the total number of machines. The set of machines that can process a given process represents the set of machines capable of processing that process. The resource selection vector is initialized with a length equal to the total number of processes. Adjustment resources in the resource selection vector are randomly generated within the range [0, R-1], where R is the total number of adjustment resources. After individual initialization, the generated N... p A number of individuals are added to the initial population.

[0012] Furthermore, in step 3, the evolution process of the crossover operator involves generating a random value p1 in the range of 0 to 1. If p1 is less than the crossover probability P... c If two individuals are randomly selected from the current population, a crossover operator is executed. The crossover operator includes a priority-order crossover operator and a uniform crossover operator. The priority-order crossover operator is applied to the order vector, while the uniform crossover operator is applied to the machine selection vector and the resource selection vector.

[0013] The operation process of the priority process crossover operator is as follows: obtain the process sorting vectors of individuals pop1 and pop2, where the process sorting vectors represent process sequences; initialize lists C1 and C2, where list C1 stores the process sequence of pop1 after crossover and list C2 stores the process sequence of pop2 after crossover; randomly divide all workpieces into two different sets, denoted as workpiece set I1 and workpiece set I2, respectively; copy the processes belonging to workpiece set I1 in the process sorting vector of pop1 to the corresponding positions in list C1; copy the processes belonging to workpiece set I2 in the process sorting vector of pop2 to the unoccupied positions in list C1 according to their order in pop2; copy the processes belonging to workpiece set I2 in the process sorting vector of pop2 to the corresponding positions in list C2; copy the processes belonging to workpiece set I1 in the process sorting vector of pop1 to the unoccupied positions in list C2 according to their order in pop1; assign the process sequence obtained after crossover in list C1 to pop1; and assign the process sequence obtained after crossover in list C2 to pop2.

[0014] The uniform crossover operator operates as follows: First, obtain the machine selection vectors for individuals pop1 and pop2, where each machine selection vector represents a machine sequence. Second, initialize lists C1 and C2. List C1 stores the machine sequence of pop1 after crossover, and list C2 stores the machine sequence of pop2 after crossover. Third, randomly generate a binary mask vector B of the same length as the machine sequences. For each bit in mask vector B, if the value is 0, copy the corresponding machine from the pop1 machine sequence to the corresponding position in list C1, and copy the corresponding machine from the pop2 machine sequence to the corresponding position in list C2. If the value is 1, copy the corresponding machine from the pop2 machine sequence to the corresponding position in list C1, and copy the corresponding machine from the pop1 machine sequence to the corresponding position in list C2. Finally, assign the crossover sequence obtained in list C1 to pop1, and the crossover sequence obtained in list C2 to pop2.

[0015] Furthermore, the evolution process of the mutation operator is as follows: after the crossover operator evolves, a random value p2 in the range of 0 to 1 is generated. If p2 is less than the mutation probability P... m Then, an individual is randomly selected from the current population, and the mutation operator is executed. The mutation operators include the exchange mutation operator and the redistribution mutation operator. The exchange mutation operator is applied to the process ordering vector, and the redistribution mutation operator is applied to the machine selection vector and the resource selection vector, where...

[0016] The operation of the exchange mutation operator is as follows: randomly select two different positions rand1 and rand2 from the individual's process sorting vector, and exchange the processes at the selected positions rand1 and rand2.

[0017] The operation of the redistribution mutation operator is as follows: randomly select a position from the machine selection vector of an individual, and then select a new machine from the set of machines that can process the corresponding process to replace the current machine. The set of machines that can process the corresponding process represents the set of machines that can process the corresponding process.

[0018] Furthermore, in step 4, the implementation process of the hybrid decoding strategy for the current population is as follows: the current population is divided into three subpopulations of equal size, each subpopulation having a size of N. p / 3, the three subpopulations respectively applied basic decoding, mathematical heuristic decoding, and imitation learning-assisted decoding, among which,

[0019] The basic decoding process involves taking an individual's process order vector, machine selection vector, and resource selection vector as input, and outputting the maximum completion time; then iterating through each process O in the process order vector. i,j O i,jThis represents the j-th operation of workpiece i, where operation O is obtained from the machine selection vector. i,j Machine k obtains process O from the resource selection vector. i,j Adjusting resource w, if k has already undergone a process, and the current process O i,j If the workpiece i is different from the workpiece of the previous process completed on machine k, check if w is currently usable. If it is usable, execute the adjustment task directly, and then perform the processing operation on k. If it is not usable, wait for w to become usable before executing the adjustment task, and then perform the processing operation on k. If k has not yet processed any processes, or the current process O... i,j If the workpiece i belongs to the same workpiece as the workpiece in the previous operation completed on machine k, then the processing operation is performed directly on machine k, and the operation O is recorded. i,j The start and end times of each workpiece; based on the end time of the last process in all workpieces, the longest end time is selected as the maximum completion time for that individual workpiece.

[0020] The mathematical heuristic decoding process involves performing basic decoding on the input individual to generate an initial scheduling scheme. This initial scheme includes a process time vector and an adjustment time vector. The start time of each process and the start time of its corresponding adjustment task are obtained. Then, each process O in the process sorting vector is traversed. i,j From the initial scheduling plan, process O i,j The start time of process O is recorded in the process time vector. i,j The start time of the corresponding adjustment task is recorded in the adjustment time vector; an initial solution object of the constraint programming solver is created, the scheduling scheme obtained from the basic decoding is used as the initial solution of the constraint programming model, and the optimized maximum completion time is obtained after calling the mathematical solver;

[0021] The process of imitation learning-assisted decoding involves taking an individual's process order vector, machine selection vector, resource selection vector, state vector, and the imitation learning agent as input, and outputting the maximum completion time. The state vector is used to record process O. i,j The workpiece i and process O i,j For machine k, the length of the state vector is 2N, where N is the total number of processes. The imitation learning agent can select the resource w that minimizes the maximum completion time of the individual based on the input state vector; it iterates through the process sorting vector to find each process O. i,j Obtain process O from the machine selection vector i,j Machine k, process O i,j The workpiece i and process O i,j The machine k is recorded in the state vector. The imitation learning agent selects and adjusts resources w according to the state vector. If k has already processed a process and the current process O i,jIf the workpiece i is different from the workpiece of the previous process completed on machine k, check if w is currently usable. If it is usable, execute the adjustment task directly, and then perform the processing operation on k. If it is not usable, wait for w to become usable before executing the adjustment task, and then perform the processing operation on k. If k has not yet processed any processes, or the current process O... i,j If the workpiece i belongs to the same workpiece as the workpiece in the previous operation completed on machine k, then the processing operation is performed directly on machine k, and the operation O is recorded. i,j Given the start and end times, select the longest end time as the maximum completion time for each individual task.

[0022] Furthermore, in step 5, the process of performing a problem-specific local search on the elite population involves constructing a critical path based on a disjunctive graph model for each individual in the elite population, and performing a local search on each individual using four neighborhood structures: swap neighborhood, insertion neighborhood, inverted neighborhood, and reallocated neighborhood.

[0023] The process of constructing the disjunctive graph model is as follows: construct a disjunctive graph model G = (V, C∪D), where G represents the current disjunctive graph model, V represents the set of process task nodes and two virtual nodes, and each process O to be processed... i,j Each corresponds to a process task node. The two virtual nodes include a virtual start node and a virtual end node. The start node represents the beginning of the entire scheduling plan, and the end node represents the end of the entire scheduling plan. C represents the set of connecting arcs, where each connecting arc represents a process constraint within the workpiece. Within the same workpiece, the previous process O... i,j The next process O must be completed after completion. i,j+1 Only then can it begin, meaning there is a process starting from step O. i,j The corresponding process task node points to process O i,j+1 The arc corresponding to the process task node; D represents the set of disjunctive arcs, where a disjunctive arc represents two process task nodes connected on the same machine, representing the processing order on the machine. If process O i,j and process O i’,j’ Processed on the same machine, and process O i,j In process O i’,j’ Previously, there was a process O i,j The corresponding process task node points to process O i’,j’ The arc corresponding to the task node of the process; C∪D represents the set of all connecting arcs and disjunctive arcs in the disjunctive graph model;

[0024] The critical path construction process is as follows: Based on the constructed disjunctive graph model, an empty critical process file is created to store all identified critical process task nodes; the earliest start time and latest end time of each process task node are calculated; for any process task node u in the model, the earliest start time of u is calculated. , , This represents the preceding task node of u on its respective workpiece; that is, the task node that must be processed before u in the same workpiece. This represents the predecessor task node of u on its machine path, that is, the task node that u was processed before on the same machine. Represents process task nodes The earliest end time, Represents process task nodes The earliest end time, This represents the adjustment time for sequence dependencies, i.e., when u immediately follows a process task node. When processing on the same machine, the earliest start time of u is constrained by the end time of the preceding process task node on the workpiece and the end time of the preceding process task node on the machine path, plus the required adjustment time. The later time is taken. Calculate the latest end time of u. , , This represents the successor process task node of u on its associated workpiece; that is, the process task node that must be processed after u within the same workpiece. This indicates the successor task node of u on its machine path, that is, the task node processed after u on the same machine. Represents process task nodes The latest start time, Represents process task nodes The latest start time, This represents the adjustment time for sequence dependencies, i.e., when u immediately follows a process task node. When processing on the same machine, to allow for the necessary setup time, u must finish before the next process node of its associated workpiece begins processing, and also before the next process node of its associated machine path begins processing. After calculating the earliest start time and latest finish time for all process task nodes, iterate through each process task node. If u's earliest start time... The latest end time equal to u ,Right now If u has no time fluctuation, u is identified as a critical process task node. All identified critical process task nodes are added to the critical process file. Based on all process task nodes in the critical process file and the connection relationship of process task nodes in the disjunction graph, the critical process task nodes are connected in sequence to form one or more continuous paths from the virtual start node to the virtual end node. The continuous path is defined as the critical path.

[0025] The process of exchanging neighborhoods is as follows: randomly select two key processes from the critical path of an individual, and exchange the processing order of the two selected key processes.

[0026] The process of inserting a neighbor is to randomly select two critical steps from the critical path of an individual and insert the later selected critical step into the step before the earlier selected critical step.

[0027] The process of reversing the neighborhood is to randomly select two critical processes from the critical path of an individual and reverse the processing order of all processes between the two selected critical processes.

[0028] The process of reassigning the neighborhood is as follows: randomly select a key process from the critical path of an individual, and then select a new machine from the set of machines that can process the selected key process to replace the current machine. The set of machines that can process the corresponding process represents the set of machines that can process the corresponding process.

[0029] The local search process involves iterating through each individual in the elite population, randomly selecting one of the four neighborhood structures and applying it to the current individual to generate an initial perturbation solution. This perturbation solution represents a temporary solution generated during the local search. All neighborhood structures are iterated through, and a swapped neighborhood structure is selected and applied to obtain a new solution. If the maximum completion time of the new solution is less than the maximum completion time of the current perturbation solution, the new solution is updated to the latest perturbation solution, and the search restarts from the swapped neighborhood structure. If the maximum completion time of the new solution is not less than the maximum completion time of the current perturbation solution, an insertion neighborhood structure is selected and applied until all neighborhood structures have been selected. If the maximum completion time of the final perturbation solution is less than the maximum completion time of the current individual, the final perturbation solution is added to the new elite population. If the maximum completion time of the final perturbation solution is not less than the maximum completion time of the current individual, the current individual is added to the new elite population. Finally, the new elite population replaces the current elite population.

[0030] Furthermore, in step 6, the evolutionary condition is that the running time of the updated elite population reaches half of the total running time.

[0031] Furthermore, the CP model includes the following set of constraints:

[0032] (1)

[0033] (2)

[0034] (3)

[0035] (4)

[0036] (5)

[0037] (6)

[0038] (7)

[0039] (8)

[0040] (9)

[0041] Where i represents the workpiece index; I represents the set of all workpieces; The number of operations for workpiece i is represented by j; the operation index is represented by j. Let represent the process set of workpiece i; k represent the machine index; K represent the set of all machines; n represent the total number of workpieces; and N represent the total number of processes. Represents a sufficiently large positive number; This indicates an adjustment to the total number of resources; Indicates the ability to process step O i,j A collection of machines; For continuous decision variables representing the maximum completion time; For process O i,j The interval variable; Indicate process The interval variable; For process O i,j Adjust the task range variable; For process O i,j The optional interval variable processed on machine k; For machine sequence decision variables, including assigned optional interval variables. ; An empty identifier; For process O i,j The logo; Let be the transition matrix of machine k, which stores the sequence dependency adjustment time;

[0042] The constraint set (1) represents the objective as minimizing the maximum completion time. ,function Return range variable End time;

[0043] The constraint set (2) represents the interval variable. The length is greater than or equal to zero, ensuring that the duration of each adjustment task is non-negative, and the function... The function returns a range variable. Length;

[0044] The constraint set (3) represents the interval variable. The length of the function is equal to the adjustment time of the sequence dependency. Return sequence decision variables Closely following the interval variable The identifier of the next interval variable, if the interval variable It is a sequential decision variable If it is the last one in the sequence, then the function returns. ,and If the interval variable Not in sequence When the condition is met, the function returns 0, and ;

[0045] The constraint set (4) represents the interval variable. The start time is greater than or equal to the interval variable The end time, that is, the time of process O i,j After processing is completed, the next adjustment task will be carried out. The function returns a range variable. The start time, The function returns a range variable. End time;

[0046] The constraint set (5) represents the interval variables on machine k. The end time must be less than or equal to the time of the sequential decision variable. The start time of the next interval variable of the optional interval variable, the function. Return sequence decision variables Selectable range variables The start time of the next interval variable, when the optional interval variable... Not in the sequence decision variable When the variable is selected, the function returns 0; when the variable is selected, the range variable is selected. It is a sequential decision variable The last one in the list, then the function returns the value. , The function returns a range variable. End time;

[0047] The constraint set (6) represents the interval variable. Only in interval variables The process begins after processing is completed, i.e., after process O is finished. i,j Only after that can the processing steps be carried out. i,j+1 , Functions representing interval variables The start time is no earlier than that of the interval variable. End time;

[0048] The constraint set (7) represents the constraint set for interval variables. There can only be one optional range variable. Existence, that is, each process O i,j Only one machine can be selected for processing. Represents the variable in each interval Only one optional range variable can be selected. ;

[0049] The constraint set (8) represents the range of optional variables for machine k, taking into account resource adjustments. No overlap occurs, transition matrix Constrain the minimum distance between two adjacent interval variables, the minimum distance being determined by the adjustment time. Decide, The function indicates that two processes cannot be performed simultaneously on machine k, and there must be sufficient settling time between adjacent processes;

[0050] Constraint set (9) indicates that, at any time interval during scheduling, the number of resources used for adjustment is less than or equal to the total number of resources used for adjustment. , Functions representing interval variables It will occupy 1 adjustment resource during its duration.

[0051] The present invention provides an optimization method for solving flexible job shop scheduling with adjusted resource constraints, aiming to minimize the maximum completion time. Compared with the prior art, it has the following positive effects:

[0052] (1) This invention proposes a novel hybrid algorithm, namely the Imitation Learning and Constraint Programming Assisted Evolutionary Algorithm (ILCPEA), which combines the imitation learning and constraint programming models. The imitation learning assists decoding to efficiently obtain high-quality solutions, and the constraint programming model further expands the solution space and improves the quality of solutions, thereby obtaining solutions with smaller maximum completion time.

[0053] (2) In this invention, a hybrid decoding strategy is designed, which combines three methods: basic decoding, mathematical heuristic decoding and imitation learning-assisted decoding. Basic decoding ensures population diversity, mathematical heuristic decoding achieves optimal resource allocation, and imitation learning-assisted decoding balances computational resources and performance. At the same time, a critical path is constructed based on the disjunctive graph model, and four neighborhood structures are designed to perform problem-specific local search, so as to minimize the maximum completion time of the obtained solution.

[0054] (3) The present invention adopts the CP model, which is suitable for the flexible job shop scheduling problem of adjusting resource constraints. Compared with the MILP model, the CP model can explore the solution space more comprehensively and handle the complex relationship between sequence dependency adjustment time and adjustment resource constraints more effectively. It achieves global optimization through constraint propagation and domain reduction techniques.

[0055] In summary, this invention effectively solves the problem of flexible workshop scheduling with adjusted resource constraints. It can rationally arrange the process sequence of workpieces, select machines, and adjust the resource allocation sequence of tasks, thus reducing resource waiting time, improving machine utilization, and enhancing the resource utilization efficiency and scheduling performance of the entire workshop. Attached Figure Description

[0056] Figure 1 This is a flowchart illustrating the implementation of the present invention;

[0057] Figure 2 Example diagrams of process sequencing vector, machine selection vector, and resource selection vector for an individual component of this invention;

[0058] Figure 3 This is an example diagram of the disjunction graph model of the present invention;

[0059] Figure 4 This is a trend graph of the parameter levels of the present invention;

[0060] Figure 5 Box plot comparing the RPI of the ILCPEA algorithm proposed in this invention with four other variant algorithms;

[0061] Figure 6 Box plot comparing the RPI of the ILCPEA algorithm and the ILCPEA-1 algorithm proposed in this invention;

[0062] Figure 7 Box plot comparing the RPI of the ILCPEA algorithm and the ILCPEA-2 algorithm proposed in this invention;

[0063] Figure 8 Box plot showing the RPI comparison of the ILCPEA algorithm proposed in this invention with the QABC, IGA and CVNS-Q algorithms. Detailed Implementation

[0064] like Figure 1 As shown, the present invention provides an optimization method for solving flexible job shop scheduling with adjusted resource constraints, which is mainly achieved through the following process.

[0065] Step 1: Initialize parameters and set the initial population size N. p Elite population size N e Crossover probability P c Probability of mutation P m And total running time.

[0066] Step 2, randomly generate a number of sizes N p The initial population. Specifically, a randomized population of size N is generated. p The initial population is initialized by iteratively starting individuals, with the initial population iteratively starting from 0 to N. p The process iterates, creating one individual in each iteration. Each individual consists of three vectors: a process ordering vector, a machine selection vector, and a resource selection vector. An example diagram of the process ordering vector, machine selection vector, and resource selection vector for an individual is shown below. Figure 2 As shown. Where, O i,j Let represent the j-th operation of workpiece i. The sequence of numbers on the operation sorting vector represents the processing order of the operations. For example, the first number 3 represents the first operation O of workpiece 3. 3,1 The second number 2 indicates the first process O of workpiece 2. 2,1 The third number 2 indicates the second process O for workpiece 2. 2,2 The fourth digit 1 indicates the first process O of workpiece 1. 1,1 The fifth digit 3 indicates the second process O for workpiece 3. 3,2 The sixth digit 1 indicates the second process O of workpiece 1. 1,2 The numbers on the machine selection vector represent the machines selected for processing each operation. For example, the first number 2 indicates the first operation O for workpiece 1. 1,1 The processing is carried out on machine 2, and the second number 4 indicates the second operation O of workpiece 1. 1,2 The workpiece is processed on machine 4. The third number 3 indicates the first operation O of workpiece 2. 2,1 The processing is carried out on machine 3. The fourth number 3 indicates the second process O of workpiece 2. 2,2 The workpiece is processed on machine 3. The fifth digit, 1, represents the first operation (O) of workpiece 3. 3,1 The processing is carried out on machine 1. The sixth digit, 2, represents the second process O of workpiece 3. 3,2 Processing is performed on machine 2; the numbers on the resource selection vector represent the adjustment resource number assigned to each process to perform the adjustment task. For example, the first number 1 indicates the first process O of workpiece 3. 3,1Allocate adjustment resource 1 to execute the adjustment task; the second number 2 represents the first operation O of workpiece 2. 2,1 Allocate adjustment resource 2 to execute the adjustment task; the third number 1 indicates the second operation O of workpiece 2. 2,2 Allocate adjustment resource 1 to execute the adjustment task. The fourth number 1 represents the first operation O of workpiece 1. 1,1 Allocate resource 1 to perform the adjustment task. The fifth number 1 represents the second operation O of workpiece 3. 3,2 Allocate resource 1 to perform the adjustment task. The sixth number, 2, represents the second operation O of workpiece 1. 1,2 Allocate adjustment resource 2 to execute the adjustment task. Initialize the process sorting vector, with a length equal to the total number of processes. Iterate through each workpiece, repeatedly adding each workpiece number to the process sorting vector according to the number of processes within the workpiece. Then, randomly arrange the process sorting vector. Workpiece numbers are in the range [0, n-1], where n is the total number of workpieces. The number of times each workpiece number appears in the process sorting vector is consistent with the number of processes contained in the workpiece. Initialize the machine selection vector, with a length equal to the total number of processes. For each process, randomly select one machine from the process's available machine set and add it to the machine selection vector. The machine numbers in the machine set are in the range [0, M-1], where M is the total number of machines. The processable machine set represents the set of machines capable of processing the corresponding process. Initialize the resource selection vector, with a length equal to the total number of processes. The adjustment resources in the resource selection vector are randomly generated in the range [0, R-1], where R is the total number of adjustment resources. After completing individual initialization, generate N... p A number of individuals are added to the initial population.

[0067] Step 3: Use the crossover operator and mutation operator sequentially to evolve the current population.

[0068] Specifically, the evolution process of the crossover operator is as follows: a random value p1 in the range of 0 to 1 is generated; if p1 is less than the crossover probability P... c Then, two individuals are randomly selected from the current population, and the crossover operator is executed. The crossover operator includes the priority process crossover operator and the uniform crossover operator. The priority process crossover operator is applied to the process sorting vector, and the uniform crossover operator is applied to the machine selection vector and the resource selection vector.

[0069] The operation process of the priority process crossover operator is as follows: obtain the process sorting vectors of individuals pop1 and pop2, where the process sorting vectors represent process sequences; initialize lists C1 and C2, where list C1 stores the process sequence of pop1 after crossover and list C2 stores the process sequence of pop2 after crossover; randomly divide all workpieces into two different sets, denoted as workpiece set I1 and workpiece set I2, respectively; copy the processes belonging to workpiece set I1 in the process sorting vector of pop1 to the corresponding positions in list C1; copy the processes belonging to workpiece set I2 in the process sorting vector of pop2 to the unoccupied positions in list C1 according to their order in pop2; copy the processes belonging to workpiece set I2 in the process sorting vector of pop2 to the corresponding positions in list C2; copy the processes belonging to workpiece set I1 in the process sorting vector of pop1 to the unoccupied positions in list C2 according to their order in pop1; assign the process sequence obtained after crossover in list C1 to pop1; and assign the process sequence obtained after crossover in list C2 to pop2.

[0070] The uniform crossover operator operates as follows: First, obtain the machine selection vectors for individuals pop1 and pop2, where each machine selection vector represents a machine sequence. Second, initialize lists C1 and C2. List C1 stores the machine sequence of pop1 after crossover, and list C2 stores the machine sequence of pop2 after crossover. Third, randomly generate a binary mask vector B of the same length as the machine sequences. For each bit in mask vector B, if the value is 0, copy the corresponding machine from the pop1 machine sequence to the corresponding position in list C1, and copy the corresponding machine from the pop2 machine sequence to the corresponding position in list C2. If the value is 1, copy the corresponding machine from the pop2 machine sequence to the corresponding position in list C1, and copy the corresponding machine from the pop1 machine sequence to the corresponding position in list C2. Finally, assign the crossover sequence obtained in list C1 to pop1, and the crossover sequence obtained in list C2 to pop2.

[0071] The evolution process of the mutation operator is as follows: After the crossover operator evolves, a random value p2 in the range of 0 to 1 is generated. If p2 is less than the mutation probability P... m Then, an individual is randomly selected from the current population, and the mutation operator is executed. The mutation operators include the exchange mutation operator and the redistribution mutation operator. The exchange mutation operator is applied to the process ordering vector, and the redistribution mutation operator is applied to the machine selection vector and the resource selection vector.

[0072] The operation of the exchange mutation operator is as follows: randomly select two different positions rand1 and rand2 from the individual's process sorting vector, and exchange the processes at the selected positions rand1 and rand2.

[0073] The operation of the redistribution mutation operator is as follows: randomly select a position from the machine selection vector of an individual, and then select a new machine from the set of machines that can process the corresponding process to replace the current machine. The set of machines that can process the corresponding process represents the set of machines that can process the corresponding process.

[0074] Step 4: Implement a hybrid decoding strategy for the current population. Specifically, the implementation process of implementing a hybrid decoding strategy for the current population is as follows: divide the current population into three subpopulations of equal size, each subpopulation having a size of N. p / 3, the three subpopulations respectively apply basic decoding, mathematical heuristic decoding and imitation learning-assisted decoding.

[0075] The basic decoding process involves taking an individual's process order vector, machine selection vector, and resource selection vector as input, and outputting the maximum completion time; then iterating through each process O in the process order vector. i,j O i,j This represents the j-th operation of workpiece i, where operation O is obtained from the machine selection vector. i,j Machine k obtains process O from the resource selection vector. i,j Adjusting resource w, if k has already undergone a process, and the current process O i,j If the workpiece i belongs to a different workpiece from the previous process completed on machine k, an adjustment task needs to be performed. At this point, it checks if w is currently usable. If it is, the adjustment task is executed directly, and then processing is performed on k. If w is not usable, it waits until w becomes usable before executing the adjustment task, and then processing is performed on k. If k has not yet completed a process, or the current process O... i,j If the workpiece i belongs to the same workpiece as the workpiece of the previous process that has been completed on machine k, then no adjustment task is required, and the processing operation can be performed directly on k. Based on the end time of the last process among all workpieces, the largest end time is selected as the maximum completion time of the individual.

[0076] The mathematical heuristic decoding process involves performing basic decoding on the input individual to generate an initial scheduling scheme. This initial scheme includes a process time vector and an adjustment time vector. The start time of each process and the start time of its corresponding adjustment task are obtained. Then, each process O in the process sorting vector is traversed. i,j From the initial scheduling plan, process O i,j The start time of process O is recorded in the process time vector. i,jThe start time of the corresponding adjustment task is recorded in the adjustment time vector; an initial solution object of the constraint programming solver is created, the scheduling scheme obtained from the basic decoding is used as the initial solution of the constraint programming model, and the optimized maximum completion time is obtained after calling the mathematical solver;

[0077] The process of imitation learning-assisted decoding involves taking an individual's process order vector, machine selection vector, resource selection vector, state vector, and the imitation learning agent as input, and outputting the maximum completion time. The state vector is used to record process O. i,j The workpiece i and process O i,j For machine k, the length of the state vector is 2N, where N is the total number of processes. The imitation learning agent can select the resource w that minimizes the maximum completion time of the individual based on the input state vector; it iterates through the process sorting vector to find each process O. i,j Obtain process O from the machine selection vector i,j Machine k, process O i,j The workpiece i and process O i,j The machine k is recorded in the state vector. The imitation learning agent selects and adjusts resources w according to the state vector. If k has already processed a process and the current process O i,j If the workpiece i belongs to a different workpiece from the previous process completed on machine k, an adjustment task needs to be performed. At this point, it checks if w is currently usable. If it is, the adjustment task is executed directly, and then processing is performed on k. If w is not usable, it waits until w becomes usable before executing the adjustment task, and then processing is performed on k. If k has not yet completed a process, or the current process O... i,j If the workpiece i belongs to the same workpiece as the workpiece in the previous process already completed on machine k, then no adjustment task is needed. In this case, the processing operation can be performed directly on machine k, and the process O is recorded. i,j Given the start and end times, select the longest end time as the maximum completion time for each individual task.

[0078] Step 5: Sort the individuals in the current population according to their maximum completion time in ascending order, forming a population of size N. e The elite population is updated through problem-specific local search. Specifically, the process of performing problem-specific local search on the elite population involves constructing a critical path based on a disjunctive graph model for each individual in the elite population, and performing a local search on each individual in the elite population using four neighborhood structures.

[0079] The disjunctive graph model is constructed as follows: A disjunctive graph model G = (V, C∪D) is built, where G represents the current disjunctive graph model, V represents the set of process task nodes and two virtual nodes, and each process O to be processed... i,jEach corresponds to a process task node. The two virtual nodes include a virtual start node and a virtual end node. The start node represents the beginning of the entire scheduling plan, and the end node represents the end of the entire scheduling plan. C represents the set of connecting arcs, where each connecting arc represents a process constraint within the workpiece. Within the same workpiece, the previous process O... i,j The next process O must be completed after completion. i,j+1 Only then can it begin, meaning there is a process starting from step O. i,j The corresponding process task node points to process O i,j+1 The arc corresponding to the process task node; D represents the set of disjunctive arcs, where a disjunctive arc represents two process task nodes connected on the same machine, representing the processing order on the machine. If process O i,j and process O i’,j’ Processed on the same machine, and process O i,j In process O i’,j’ Previously, there was a process O i,j The corresponding process task node points to process O i’,j’ The arcs corresponding to the task nodes of the disjunctive graph; C∪D represents the set of all connecting arcs and disjunctive arcs in the disjunctive graph model. An example diagram of the disjunctive graph model is shown below. Figure 3 As shown, each process O that needs to be processed i,j Each corresponds to a process task node, where Start represents a virtual start node, End represents a virtual end node, and O i,j The process nodes represent the corresponding processes, k1, k2, and k3 represent the processing machines that can be selected for each process, solid arrows represent connecting arcs, and represent the internal process constraints of the workpiece, i.e., the process sequence of the same workpiece, such as O. 1,1 With O 1,2 The arrows between the two indicate that the process O must be completed. 1,1 Only after that can the processing step O be completed. 1,2 O 2,1 With O 2,2 The arrows between the two indicate that the process O must be completed. 2,1 Only after that can the processing step O be completed. 2,2 O 3,1 With O 3,2 The arrows between the two indicate that the process O must be completed. 3,1 Only after that can the processing step O be completed. 3,2 The dashed arrow represents a disjunction arc, connecting two process task nodes processed on the same machine. For example, the processing sequence of processes on machine k1 is process O. 3,1 and process O 1,1 The processing sequence on machine k2 is process O. 2,2 and process O 3,2 The processing sequence on machine k3 is process O.2,1 and process O 1,2 .

[0080] The critical path construction process is as follows: Based on the constructed disjunctive graph model, an empty critical process file is created to store all identified critical process task nodes; the earliest start time and latest end time of each process task node are calculated; for any process task node u in the model, the earliest start time of u is calculated. , , This represents the preceding task node of u on its respective workpiece; that is, the task node that must be processed before u in the same workpiece. This represents the predecessor task node of u on its machine path, that is, the task node that u was processed before on the same machine. Represents process task nodes The earliest end time, Represents process task nodes The earliest end time, This represents the adjustment time for sequence dependencies, i.e., when u immediately follows a process task node. When processing on the same machine, the earliest start time of u is constrained by the end time of the preceding process task node on the workpiece and the end time of the preceding process task node on the machine path, plus the required adjustment time. The later time is taken. Calculate the latest end time of u. , , This represents the successor process task node of u on its associated workpiece; that is, the process task node that must be processed after u within the same workpiece. This indicates the successor task node of u on its machine path, that is, the task node processed after u on the same machine. Represents process task nodes The latest start time, Represents process task nodes The latest start time, This represents the adjustment time for sequence dependencies, i.e., when u immediately follows a process task node. When processing on the same machine, to allow for the necessary setup time, u must finish before the next process node of its associated workpiece begins processing, and also before the next process node of its associated machine path begins processing. After calculating the earliest start time and latest finish time for all process task nodes, iterate through each process task node. If u's earliest start time... The latest end time equal to u ,Right now If u has no time fluctuation, u is identified as a critical process task node. All identified critical process task nodes are added to the critical process file. Based on all process task nodes in the critical process file and the connection relationship of process task nodes in the disjunctive graph, the critical process task nodes are connected in sequence to form one or more continuous paths from the virtual start node to the virtual end node. The continuous path is defined as the critical path.

[0081] The four neighborhood structures include exchange neighborhood, insertion neighborhood, reverse neighborhood, and redistribution neighborhood, specifically:

[0082] The process of exchanging neighborhoods is as follows: randomly select two key processes from the critical path of an individual, and exchange the processing order of the two selected key processes.

[0083] The process of inserting a neighbor is to randomly select two critical steps from the critical path of an individual and insert the later selected critical step into the step before the earlier selected critical step.

[0084] The process of reversing the neighborhood is to randomly select two critical processes from the critical path of an individual and reverse the processing order of all processes between the two selected critical processes.

[0085] The process of reassigning the neighborhood is as follows: randomly select a critical process from the critical path of an individual, and then select a new machine from the set of machines that can process the critical process to replace the current machine. The set of machines that can process the corresponding process represents the set of machines that can process the corresponding process.

[0086] The local search process involves iterating through each individual in the elite population, randomly selecting one of the four neighborhood structures and applying it to the current individual to generate an initial perturbation solution. This perturbation solution represents a temporary solution generated during the local search. All neighborhood structures are iterated through, and a swapped neighborhood structure is selected and applied to obtain a new solution. If the maximum completion time of the new solution is less than the maximum completion time of the current perturbation solution, the new solution is updated to the latest perturbation solution, and the search restarts from the swapped neighborhood structure. If the maximum completion time of the new solution is not less than the maximum completion time of the current perturbation solution, an insertion neighborhood structure is selected and applied until all neighborhood structures have been selected. If the maximum completion time of the final perturbation solution is less than the maximum completion time of the current individual, the final perturbation solution is added to the new elite population. If the maximum completion time of the final perturbation solution is not less than the maximum completion time of the current individual, the current individual is added to the new elite population. Finally, the new elite population replaces the current elite population.

[0087] Step 6: Determine if the evolutionary condition is met. If yes, construct a CP model, using individuals from the updated elite population as initial solutions. Utilize the global search capability of the CP model to perform CP-based mathematical evolution. When the running time reaches half of the total running time, output the individual with the smallest maximum completion time in the evolved elite population as the final solution. Otherwise, return to Step 3. The evolutionary condition is that the running time of the updated elite population reaches half of the total running time. The CP model specifically includes the following constraint set:

[0088] (1)

[0089] (2)

[0090] (3)

[0091] (4)

[0092] (5)

[0093] (6)

[0094] (7)

[0095] (8)

[0096] (9)

[0097] In the CP model, the variables are as follows: i represents the workpiece index; I represents the set of all workpieces; The number of operations for workpiece i is represented by j; the operation index is represented by j. Let represent the process set of workpiece i; k represent the machine index; K represent the set of all machines; n represent the total number of workpieces; and N represent the total number of processes. Represents a sufficiently large positive number; This indicates an adjustment to the total number of resources; Indicates that it can process step O i,j A collection of machines; For continuous decision variables representing the maximum completion time; For process O i,j The interval variable; Indicate process The interval variable; For process O i,j Adjust the task range variable; For process O i,j The optional interval variable processed on machine k; For machine sequence decision variables, including assigned optional interval variables. ; An empty identifier; For process O i,j The logo; Let be the transition matrix of machine k, which stores the sequence dependency adjustment time;

[0098] The constraint set (1) represents the objective as minimizing the maximum completion time. ,function Return range variable End time;

[0099] The constraint set (2) represents the interval variable. The length is greater than or equal to zero, ensuring that the duration of each adjustment task is non-negative, and the function... The function returns a range variable. Length;

[0100] The constraint set (3) represents the interval variable. The length of the function is equal to the adjustment time of the sequence dependency. Return sequence decision variables Closely following the interval variable The identifier of the next interval variable, if the interval variable It is a sequential decision variable If it is the last one in the sequence, then the function returns. ,and If the interval variable Not in sequence When the condition is met, the function returns 0, and ;

[0101] The constraint set (4) represents the interval variable. The start time is greater than or equal to the interval variable The end time, that is, the time of process O i,j After processing is completed, the next adjustment task will be carried out. The function returns a range variable. The start time, The function returns a range variable. End time;

[0102] The constraint set (5) represents the interval variables on machine k. The end time must be less than or equal to the time of the sequential decision variable. The start time of the next interval variable of the optional interval variable, the function. Return sequence decision variables Selectable range variables The start time of the next interval variable, when the optional interval variable... Not in the sequence decision variable When the variable is selected, the function returns 0; when the variable is selected, the range variable is selected. It is a sequential decision variable The last one in the list, then the function returns the value. , The function returns a range variable. End time;

[0103] The constraint set (6) represents the interval variable. Only in interval variables The process begins after processing is completed, i.e., after process O is finished. i,j Only after that can the processing steps be carried out. i,j+1 , Functions representing interval variables The start time is no earlier than that of the interval variable. End time;

[0104] The constraint set (7) represents the constraint set for interval variables. There can only be one optional range variable. Existence, that is, each process O i,j Only one machine can be selected for processing. Represents the variable in each interval Only one optional range variable can be selected. ;

[0105] The constraint set (8) represents the range of optional variables for machine k, taking into account resource adjustments. No overlap occurs, transition matrix Constrain the minimum distance between two adjacent interval variables, the minimum distance being determined by the adjustment time. Decide, The function indicates that two processes cannot be performed simultaneously on machine k, and there must be sufficient settling time between adjacent processes;

[0106] Constraint set (9) indicates that, at any time interval during scheduling, the number of resources used for adjustment is less than or equal to the total number of resources used for adjustment. , Functions representing interval variables It will occupy 1 adjustment resource during its duration.

[0107] The present invention will now be further described and illustrated through a specific example.

[0108] This invention runs on a computer equipped with an Intel® Core™ i7-12700 processor and an NVIDIA T600 GPU. The ILCPEA algorithm and CP model are implemented in C++, and the CP model is solved using CPLEX 12.7.1. The total runtime is set to 2N seconds (N being the total number of operations in the corresponding instance), and all comparison algorithms are executed 10 times on each instance.

[0109] This invention uses widely used benchmark instances MFJS01-MFJS10 and MK01-MK10 in FJSP to evaluate the algorithm's performance. The workshop adjustment resource is set to 3, and the adjustment time between operations for different workpieces is determined by multiplying the total processing time of the corresponding two operations by 0.3. For the ILCPEA algorithm of this invention, there are 6 key parameters: initial population size N... p Elite Group N e Crossover probability P c Probability of mutation P m The learning rate (lr) and training epochs (e) are given. The learning rate (lr) represents the intensity of parameter updates made by the imitation learning agent when learning expert decisions. The training epochs (e) represent the number of epochs in which the parameters of the imitation learning agent are updated using the training data in a single complete run. The initial population size (N) is also given. p The unit is an elite population N. e The unit of N is 1, and the unit of training rounds e is 1 round. For each parameter, we choose the following 3 levels: N p ={150, 300, 450}, N e ={10, 20, 30}, P c ={0.7, 0.8, 0.9}, P m Given {0.1, 0.15, 0.2}, lr = {0.01, 0.05, 0.10}, e = {5, 10, 15}, the optimal parameters are determined using a parameter horizontal trend plot, as shown in the figure. Figure 4 As shown, each parameter is evaluated based on its relative percentage growth (RPI), and the optimal parameter configuration is determined as follows: N p =300, N e =20, P c =0.7, P m =0.1, lr=0.05, e=10.

[0110] First, the effectiveness of the constraint programming model (CP model) of this invention is verified. The running time of the CP model is set to twice the total number of operations in the example. The results of the CP model of this invention are shown in Table 1:

[0111] Table 1 Results of the CP model of the present invention

[0112] Example Makespan / minute Time / second MFJS01 593 0.04 MFJS02 516 0.07 MFJS03 593 0.07 MFJS04 681 42 MFJS05 653 42 MFJS06 796 48 MFJS07 1157 64 MFJS08 1150 72 MFJS09 1499 88 MFJS10 1658 96 MK01 60 110 MK02 43 116 MK03 - 300 MK04 - 180 MK05 - 212 MK06 111 300 MK07 - 200 MK08 - 450 MK09 - 480 MK10 - 480

[0113] In Table 1, "Makespan" represents the maximum completion time, "Time" represents CPU time, and "-" indicates that no feasible solution was found within the time limit. Specifically, if the CP model terminates before reaching the time limit, it means that a solution was found within the time limit and proven to be optimal, resulting in the solution with the minimum maximum completion time. If a solution was found within the time limit but not proven to be optimal, only the currently found feasible solution is returned. If no solution was found within the time limit, only "-" is returned. According to Table 1, the CP model verifies the optimal solutions for MFJS01-MFJS03. For MFJS04-MFJS10, MK01, MK02, and MK06, the CP model can obtain feasible solutions. However, due to the high problem complexity of MK03-MK05 and MK07-MK10, the CP model cannot obtain feasible solutions. In summary, the CP model can serve as an effective and accurate method for solving small- to medium-scale RFJSP-SDST problems. The effectiveness of the CP model has been verified, and a benchmark solution has been provided for evaluating heuristic and metaheuristic algorithms. At the same time, the computational limitations of the CP model on large-scale problems further highlight the necessity of introducing novel hybrid algorithms.

[0114] To demonstrate the effectiveness of the hybrid decoding strategy of this invention, the effectiveness of the hybrid decoding strategy is compared with that of four variant algorithms. The comparison results of the ILCPEA algorithm of this invention with the other four variant algorithms are shown in Table 2:

[0115] Table 2. Comparison results of the ILCPEA algorithm of this invention with four other variant algorithms.

[0116]

[0117] In Table 2, "Basic-Algorithm" indicates using basic decoding alone, "Matheuristic" indicates using mathematical heuristic decoding alone, "Basic-Matheuristic" indicates a combination of basic decoding and mathematical heuristic decoding, "Matheuristic-IL" indicates a combination of mathematical heuristic decoding and imitation learning (IL) assisted decoding, "Best" indicates the minimum maximum completion time for each instance repeated 10 times, "AVG" indicates the average maximum completion time for each instance repeated 10 times, and "Average" indicates the average of the results in each column. According to Table 2, in 20 instances, the ILCPEA algorithm of this invention achieved 19 minimum results in both the Best and AVG metrics. Both the Basic-Matheuristic algorithm and the Matheuristic-IL algorithm outperformed using mathematical heuristic decoding alone. This is because using mathematical heuristic decoding alone consumes significant computational resources, which slows down the population evolution speed. Imitation learning assisted decoding can both mimic the logic of mathematical heuristic decoding and significantly reduce computational resource requirements, maintaining a better allocation scheme while ensuring population diversity.

[0118] Box plots comparing the RPI of the ILCPEA algorithm of this invention with four other variant algorithms are shown below. Figure 5 As shown, RPI represents the Relative Percentage Increase (RPI). The box plot reveals that the ILCPEA algorithm has the most compact box. The upper boundary of the data distribution range represents the maximum value (upper whisker), and the lower boundary represents the minimum value (lower whisker). The upper and lower whiskers are positioned relatively low. The horizontal line inside the box represents the median, and "+" indicates outliers. The concentrated RPI data distribution and small extreme value differences indicate that the ILCPEA algorithm of this invention significantly outperforms the other four variant algorithms in terms of solution quality and robustness, exhibiting superior median performance and lower outlier performance, demonstrating outstanding overall stability. Furthermore, comparing the Basic-Matheuristic algorithm and the Matheuristic-IL algorithm, the Matheuristic-IL algorithm outperforms the other four variant algorithms in terms of median and outliers. This is because imitation learning-assisted decoding can mimic mathematical heuristic decoding, significantly reducing computational resource consumption while maintaining good allocation performance and appropriate diversity. This demonstrates that the hybrid decoding strategy designed in this invention, by integrating basic decoding, mathematical heuristic decoding, and imitation learning-assisted decoding, can effectively achieve optimal resource allocation, thereby minimizing waiting time and ensuring solution diversity and optimal resource allocation during the evolutionary process, achieving a good balance between computational resource consumption and solution performance. Therefore, the ILCPEA algorithm of this invention is significantly superior to the other four variant algorithms compared.

[0119] To demonstrate the effectiveness of the problem-specific local search method of this invention, the ILCPEA algorithm with problem-specific local search and the ILCPEA-1 algorithm without problem-specific local search are compared. The comparison results of the ILCPEA algorithm and the ILCPEA-1 algorithm are shown in Table 3:

[0120] Table 3 Comparison results of the ILCPEA algorithm of the present invention and the ILCPEA-1 algorithm.

[0121]

[0122] As shown in Table 3, in 20 instances, the ILCPEA algorithm achieved 20 minimum results for the Best and 19 minimum results for the AVG metrics. Compared to the ILCPEA-1 algorithm, the ILCPEA algorithm achieved the lowest average Best and AVG scores. The box plot comparing the RPI of the ILCPEA and ILCPEA-1 algorithms is shown below. Figure 6 As shown in the box plot, the ILCPEA algorithm has a lower median performance and a lower outlier performance than the ILCPEA-1 algorithm. This is because the ILCPEA algorithm has four neighborhood structures for specific problems based on the critical path, which further optimizes the solution with the minimum maximum completion time in the elite population. This shows that the problem-specific local search based on the critical path designed in this invention refines the solution in the elite population by utilizing the neighborhood structure, thereby enhancing the search efficiency and algorithm convergence.

[0123] To demonstrate the effectiveness of the CP-based mathematical evolution of this invention, the ILCPEA algorithm based on CP mathematical evolution and the ILCPEA-2 algorithm without CP mathematical evolution are compared. The comparison results of the ILCPEA algorithm and the ILCPEA-2 algorithm are shown in Table 4:

[0124] Table 4 Comparison results of the ILCPEA algorithm of this invention and the ILCPEA-2 algorithm

[0125]

[0126] As shown in Table 4, in 20 examples, the ILCPEA algorithm of this invention achieved 20 minimum results in both the Best and AVG metrics. Compared with the ILCPEA-2 algorithm, the ILCPEA algorithm achieved the lowest average Best and AVG. The ILCPEA algorithm based on mathematical evolution of CP significantly outperforms the ILCPEA-2 algorithm without CP-based mathematical evolution. The box plot comparing the RPI of the ILCPEA algorithm and the ILCPEA-2 algorithm is shown below. Figure 7As shown in the box plot, the ILCPEA algorithm has a lower median performance and a lower outlier performance than the ILCPEA-1 algorithm. In summary, the ILCPEA algorithm based on mathematical evolution of CP overcomes the limitations of traditional encoding and decoding strategies and obtains a solution with a smaller maximum completion time by utilizing a mathematical solver.

[0127] The ILCPEA algorithm proposed in this invention is compared with three existing comparative algorithms: Q-learning-based Artificial Bee Colony Algorithm (QABC), Improved Genetic Algorithm (IGA), and Q-learning-based Cooperative Variable Neighborhood Search Algorithm (CVNS-Q). The comparison results are shown in Table 5.

[0128] Table 5. Comparison results of the ILCPEA algorithm of this invention with the QABC algorithm, IGA algorithm, and CVNS-Q algorithm.

[0129]

[0130] For the QABC algorithm, the population size, number of iterations, learning rate, and discount factor were set to 80, 10, 0.2, and 0.1, respectively. For the IGA algorithm, the population size, crossover probability, mutation probability, and diversity check generations were set to 400, 0.9, 0.1, and 300, respectively. For the CVNS-Q algorithm, the learning rate, discount factor, variable neighborhood search time, restart time, and total search time were set to 0.2, 0.7, 8 seconds, 200 seconds, and 20 seconds, respectively. According to Table 5, in 20 examples, the ILCPEA algorithm of this invention achieved 20 minimum results in both the Best and AVG metrics. The ILCPEA algorithm outperformed the QABC, IGA, and CVNS-Q algorithms in Best, AVG, and Average metrics. The box plots comparing the RPI of the ILCPEA algorithm with those of the QABC, IGA, and CVNS-Q algorithms are shown below. Figure 8 As shown in the box plot, the ILCPEA algorithm has a lower median performance and a lower outlier performance, indicating that the ILCPEA algorithm of this invention is more stable than the QABC algorithm, IGA algorithm and CVNS-Q algorithm, and has higher solution quality and efficiency.

[0131] In summary, the ILCPEA algorithm of this invention, by integrating hybrid decoding strategies, problem-specific local search, and CP-based mathematical evolution, ensures a balance between population diversity, optimal resource allocation, and computational efficiency and performance, enhances local search, and provides a more comprehensive exploration of the solution space.

Claims

1. An optimization method for solving flexible job shop scheduling with adjusted resource constraints, characterized in that, Includes the following steps, Step 1: Initialize parameters and set the initial population size N. p Elite population size N e Crossover probability P c Probability of mutation P m and total running time; Step 2, randomly generate a number of sizes N p The initial population; individuals are initialized cyclically, with the initial population ranging from 0 to N. p The process iterates, creating an individual in each iteration. Each individual consists of three vectors: a process sorting vector, a machine selection vector, and a resource selection vector. The process sorting vector is initialized with a length equal to the total number of processes. Each workpiece is traversed, and each workpiece number is repeatedly added to the process sorting vector according to the number of processes in the workpiece. Then, the process sorting vector is randomly arranged, with workpiece numbers ranging from [0, n-1], where n is the total number of workpieces. The number of times each workpiece number appears in the process sorting vector is the same as the number of processes contained in the workpiece. The machine selection vector is initialized with a length equal to the total number of processes. For each process, a machine is randomly selected from the set of machines capable of processing the process and added to the machine selection vector in sequence. The machine numbers in the set are in the range [0, M-1], where M is the total number of machines, and the set of machines capable of processing the corresponding process represents the set of machines that can process the process. The resource selection vector is initialized with a length equal to the total number of processes. The adjustment resources in the resource selection vector are randomly generated in the range [0, R-1], where R is the total number of adjustment resources. After completing the individual initialization, the generated N... p A certain number of individuals are added to the initial population; Step 3: Use the crossover operator and mutation operator sequentially to evolve the current population; Step 4: Implement a hybrid decoding strategy for the current population; divide the current population into three equal-sized subpopulations, each with a size of N. p / 3, the three subpopulations respectively applied basic decoding, mathematical heuristic decoding, and imitation learning-assisted decoding, among which, The basic decoding process involves taking an individual's process order vector, machine selection vector, and resource selection vector as input, and outputting the maximum completion time; then iterating through each process O in the process order vector. i,j O i,j This represents the j-th operation of workpiece i, where operation O is obtained from the machine selection vector. i,j Machine k obtains process O from the resource selection vector. i,j Adjusting resource w, if k has already undergone a process, and the current process O i,j If the workpiece i is different from the workpiece of the previous process completed on machine k, check if w is currently usable. If it is usable, execute the adjustment task directly, and then perform the processing operation on k. If it is not usable, wait for w to become usable before executing the adjustment task, and then perform the processing operation on k. If k has not yet processed any processes, or the current process O... i,j If the workpiece i belongs to the same workpiece as the workpiece in the previous operation completed on machine k, then the processing operation is performed directly on machine k, and the operation O is recorded. i,j The start and end times of each workpiece; based on the end time of the last process in all workpieces, the longest end time is selected as the maximum completion time for that individual workpiece. The mathematical heuristic decoding process involves performing basic decoding on the input individual to generate an initial scheduling scheme. This initial scheme includes a process time vector and an adjustment time vector. The start time of each process and the start time of its corresponding adjustment task are obtained. Then, each process O in the process sorting vector is traversed. i,j From the initial scheduling plan, process O i,j The start time of process O is recorded in the process time vector. i,j The start time of the corresponding adjustment task is recorded in the adjustment time vector; an initial solution object of the constraint programming solver is created, the scheduling scheme obtained from the basic decoding is used as the initial solution of the constraint programming model, and the optimized maximum completion time is obtained after calling the mathematical solver; The process of imitation learning-assisted decoding involves taking an individual's process order vector, machine selection vector, resource selection vector, state vector, and the imitation learning agent as input, and outputting the maximum completion time. The state vector is used to record process O. i,j The workpiece i and process O i,j For machine k, the length of the state vector is 2N, where N is the total number of processes. The imitation learning agent can select the resource w that minimizes the maximum completion time of the individual based on the input state vector; it iterates through the process sorting vector to find each process O. i,j Obtain process O from the machine selection vector i,j Machine k, process O i,j The workpiece i and process O i,j The machine k is recorded in the state vector. The imitation learning agent selects and adjusts resources w according to the state vector. If k has already processed a process and the current process O i,j If the workpiece i is different from the workpiece of the previous process completed on machine k, check if w is currently usable. If it is usable, execute the adjustment task directly, and then perform the processing operation on k. If it is not usable, wait for w to become usable before executing the adjustment task, and then perform the processing operation on k. If k has not yet processed any processes, or the current process O... i,j If the workpiece i belongs to the same workpiece as the workpiece in the previous operation completed on machine k, then the processing operation is performed directly on machine k, and the operation O is recorded. i,j Given the start and end times, select the longest end time as the maximum completion time for the individual. Step 5: Sort the individuals in the current population according to their maximum completion time from smallest to largest, forming a population of size N. e The elite population is updated through a problem-specific local search; Step 6: Determine whether the evolutionary conditions are met. If so, construct a CP model, use the individuals in the updated elite population as the initial solutions in the CP model, and use the global search capability of the CP model to perform mathematical evolution based on CP. When the running time reaches the total running time, take the individual with the smallest maximum completion time in the evolved elite population as the final solution and output it. Otherwise, return to step 3.

2. The optimization method for solving flexible job shop scheduling with adjusted resource constraints according to claim 1, characterized in that, In step 3, the evolution process of the crossover operator is as follows: a random value p1 in the range of 0 to 1 is generated; if p1 is less than the crossover probability P... c If two individuals are randomly selected from the current population, a crossover operator is executed. The crossover operator includes a priority-order crossover operator and a uniform crossover operator. The priority-order crossover operator is applied to the order vector, while the uniform crossover operator is applied to the machine selection vector and the resource selection vector. The operation process of the priority process crossover operator is as follows: obtain the process sorting vectors of individuals pop1 and pop2, where the process sorting vectors represent process sequences; initialize lists C1 and C2, where list C1 stores the process sequence of pop1 after crossover and list C2 stores the process sequence of pop2 after crossover; randomly divide all workpieces into two different sets, denoted as workpiece set I1 and workpiece set I2, respectively; copy the processes belonging to workpiece set I1 in the process sorting vector of pop1 to the corresponding positions in list C1; copy the processes belonging to workpiece set I2 in the process sorting vector of pop2 to the unoccupied positions in list C1 according to their order in pop2; copy the processes belonging to workpiece set I2 in the process sorting vector of pop2 to the corresponding positions in list C2; copy the processes belonging to workpiece set I1 in the process sorting vector of pop1 to the unoccupied positions in list C2 according to their order in pop1; assign the process sequence obtained after crossover in list C1 to pop1; and assign the process sequence obtained after crossover in list C2 to pop2. The uniform crossover operator operates as follows: First, obtain the machine selection vectors for individuals pop1 and pop2, where each machine selection vector represents a machine sequence. Second, initialize lists C1 and C2. List C1 stores the machine sequence of pop1 after crossover, and list C2 stores the machine sequence of pop2 after crossover. Third, randomly generate a binary mask vector B of the same length as the machine sequences. For each bit in mask vector B, if the value is 0, copy the corresponding machine from the pop1 machine sequence to the corresponding position in list C1, and copy the corresponding machine from the pop2 machine sequence to the corresponding position in list C2. If the value is 1, copy the corresponding machine from the pop2 machine sequence to the corresponding position in list C1, and copy the corresponding machine from the pop1 machine sequence to the corresponding position in list C2. Finally, assign the crossover sequence obtained in list C1 to pop1, and the crossover sequence obtained in list C2 to pop2.

3. The optimization method for solving flexible job shop scheduling with adjusted resource constraints according to claim 2, characterized in that, The evolution process of the mutation operator is as follows: after the crossover operator evolves, a random value p2 in the range of 0 to 1 is generated. If p2 is less than the mutation probability P... m Then, an individual is randomly selected from the current population, and the mutation operator is executed. The mutation operators include the exchange mutation operator and the redistribution mutation operator. The exchange mutation operator is applied to the process ordering vector, and the redistribution mutation operator is applied to the machine selection vector and the resource selection vector, where... The operation of the exchange mutation operator is as follows: randomly select two different positions rand1 and rand2 from the individual's process sorting vector, and exchange the processes at the selected positions rand1 and rand2. The operation of the redistribution mutation operator is as follows: randomly select a position from the machine selection vector of an individual, and then select a new machine from the set of machines that can process the corresponding process to replace the current machine. The set of machines that can process the corresponding process represents the set of machines that can process the corresponding process.

4. The optimization method for solving flexible job shop scheduling with adjusted resource constraints according to claim 3, characterized in that, In step 5, the implementation process of performing a problem-specific local search on the elite population is as follows: for each individual in the elite population, a critical path is constructed based on the disjunctive graph model, and a local search is performed on each individual in the elite population using four neighborhood structures. The disjunctive graph model is constructed as follows: a disjunctive graph model G = (V, C∪D) is constructed, where G represents the current disjunctive graph model, V represents the set of process task nodes and two virtual nodes, and each process O to be processed... i,j Each corresponds to a process task node. The two virtual nodes include a virtual start node and a virtual end node. The start node represents the beginning of the entire scheduling plan, and the end node represents the end of the entire scheduling plan. C represents the set of connecting arcs, where each connecting arc represents a process constraint within the workpiece. Within the same workpiece, the previous process O... i,j The next process O must be completed after completion. i,j+1 Only then can it begin, meaning there is a process starting from step O. i,j The corresponding process task node points to process O i,j+1 The arc corresponding to the process task node; D represents the set of disjunctive arcs, where a disjunctive arc represents two process task nodes connected on the same machine, representing the processing order on the machine. If process O i,j and process O i’,j’ Processed on the same machine, and process O i,j In process O i’,j’ Previously, there was a process O i,j The corresponding process task node points to process O i’,j’ The arc corresponding to the task node of the process; C∪D represents the set of all connecting arcs and disjunctive arcs in the disjunctive graph model.

5. The optimization method for solving flexible job shop scheduling with adjusted resource constraints according to claim 4, characterized in that, The critical path construction process is as follows: Based on the constructed disjunctive graph model, an empty critical process file is created to store all identified critical process task nodes; the earliest start time and latest end time of each process task node are calculated; for any process task node u in the model, the earliest start time of u is calculated. , , This represents the preceding task node of u on its respective workpiece; that is, the task node that must be processed before u in the same workpiece. This represents the predecessor task node of u on its machine path, that is, the task node that u was processed before on the same machine. Represents process task nodes The earliest end time, Represents process task nodes The earliest end time, This represents the adjustment time for sequence dependencies, i.e., when u immediately follows a process task node. When processing on the same machine, the earliest start time of u is constrained by the end time of the preceding process task node on the workpiece and the end time of the preceding process task node on the machine path, plus the required adjustment time. The later time is taken. Calculate the latest end time of u. , , This represents the successor process task node of u on its associated workpiece; that is, the process task node that must be processed after u within the same workpiece. This indicates the successor task node of u on its machine path, that is, the task node processed after u on the same machine. Represents process task nodes The latest start time, Represents process task nodes The latest start time, This represents the adjustment time for sequence dependencies, i.e., when u immediately follows a process task node. When processing on the same machine, to allow for the necessary setup time, u must finish before the next process node of its associated workpiece begins processing, and also before the next process node of its associated machine path begins processing. After calculating the earliest start time and latest finish time for all process task nodes, iterate through each process task node. If u's earliest start time... The latest end time equal to u ,Right now If u has no time fluctuation, u is identified as a critical process task node. All identified critical process task nodes are added to the critical process file. Based on all process task nodes in the critical process file and the connection relationship of process task nodes in the disjunctive graph, the critical process task nodes are connected in sequence to form one or more continuous paths from the virtual start node to the virtual end node. The continuous path is defined as the critical path.

6. The optimization method for solving flexible job shop scheduling with adjusted resource constraints according to claim 5, characterized in that, The four neighborhood structures include exchange neighborhood, insertion neighborhood, reverse neighborhood, and redistribution neighborhood. The process of exchanging neighborhoods is as follows: randomly select two key processes from the critical path of an individual, and exchange the processing order of the two selected key processes. The process of inserting a neighbor is to randomly select two critical steps from the critical path of an individual and insert the later selected critical step into the step before the earlier selected critical step. The process of reversing the neighborhood is to randomly select two critical processes from the critical path of an individual and reverse the processing order of all processes between the two selected critical processes. The process of reassigning the neighborhood is as follows: randomly select a critical process from the critical path of an individual, and then select a new machine from the set of machines that can process the critical process to replace the current machine. The set of machines that can process the corresponding process represents the set of machines that can process the corresponding process.

7. The optimization method for solving flexible job shop scheduling with adjusted resource constraints according to claim 6, characterized in that, The local search process involves iterating through each individual in the elite population, randomly selecting one of the four neighborhood structures and applying it to the current individual to generate an initial perturbation solution. This perturbation solution represents a temporary solution generated during the local search. All neighborhood structures are iterated through, and a swapped neighborhood structure is selected and applied to obtain a new solution. If the maximum completion time of the new solution is less than the maximum completion time of the current perturbation solution, the new solution is updated to the latest perturbation solution, and the search restarts from the swapped neighborhood structure. If the maximum completion time of the new solution is not less than the maximum completion time of the current perturbation solution, an insertion neighborhood structure is selected and applied until all neighborhood structures have been selected. If the maximum completion time of the final perturbation solution is less than the maximum completion time of the current individual, the final perturbation solution is added to the new elite population. If the maximum completion time of the final perturbation solution is not less than the maximum completion time of the current individual, the current individual is added to the new elite population. Finally, the new elite population replaces the current elite population.

8. An optimization method for solving flexible job shop scheduling with adjusted resource constraints according to any one of claims 1-7, characterized in that, The CP model contains the following set of constraints. (1) (2) (3) (4) (5) (6) (7) (8) (9) Where i represents the workpiece index; I represents the set of all workpieces; The number of operations for workpiece i is represented by j; the operation index is represented by j. Let represent the process set of workpiece i; k represent the machine index; K represent the set of all machines; n represent the total number of workpieces; and N represent the total number of processes. Represents a sufficiently large positive number; This indicates an adjustment to the total number of resources; Indicates the ability to process step O i,j A collection of machines; For continuous decision variables representing the maximum completion time; For process O i,j The interval variable; Indicate process The interval variable; For process O i,j Adjust the task range variable; For process O i,j The optional interval variable processed on machine k; For machine sequence decision variables, including assigned optional interval variables. ; An empty identifier; For process O i,j The logo; Let be the transition matrix of machine k, which stores the sequence dependency adjustment time; The constraint set (1) represents the objective as minimizing the maximum completion time. ,function Return range variable End time; The constraint set (2) represents the interval variable. The length is greater than or equal to zero, ensuring that the duration of each adjustment task is non-negative, and the function... The function returns a range variable Length; The constraint set (3) represents the interval variable. The length of the function is equal to the adjustment time of the sequence dependency. Return sequence decision variables Closely following the interval variable The identifier of the next interval variable, if the interval variable It is a sequential decision variable If it is the last one in the list, then the function returns. ,and If the interval variable Not in sequence When the condition is met, the function returns 0, and ; The constraint set (4) represents the interval variable. The start time is greater than or equal to the interval variable The end time, that is, the time of process O i,j After processing is completed, the next adjustment task will be carried out. The function returns a range variable The start time, The function returns a range variable End time; The constraint set (5) represents the interval variables on machine k. The end time must be less than or equal to the time of the sequential decision variable. The start time of the next interval variable of the optional interval variable, the function. Return sequence decision variables Selectable range variables The start time of the next interval variable, when the optional interval variable... Not in the sequence decision variable When the variable is selected, the function returns 0; when the variable is selected, the range variable is selected. It is a sequential decision variable The last one in the list, then the function returns the value. , The function returns a range variable End time; The constraint set (6) represents the interval variable. Only in interval variables The process begins after processing is completed, i.e., after process O is finished. i,j Only after that can the processing steps be carried out. i,j+1 , Functions representing interval variables The start time is no earlier than that of the interval variable. End time; The constraint set (7) represents the constraint set for interval variables. There can only be one optional range variable. Existence, that is, each process O i,j Only one machine can be selected for processing. Represents the variable in each interval Only one optional range variable can be selected. ; The constraint set (8) represents the range of optional variables for machine k, taking into account resource adjustments. No overlap occurs, transition matrix Constrain the minimum distance between two adjacent interval variables, the minimum distance being determined by the adjustment time. Decide, The function indicates that two processes cannot be performed simultaneously on machine k, and there must be sufficient settling time between adjacent processes; Constraint set (9) indicates that, at any time interval during scheduling, the number of resources used for adjustment is less than or equal to the total number of resources used for adjustment. , Functions representing interval variables It will occupy 1 adjustment resource during its duration.

Citation Information

Patent Citations

  • Efficient and energy-saving flexible job shop scheduling method considering adjustment time

    CN121073114A