Flexible flow shop scheduling method considering die change based on genetic algorithm
By constructing a flexible flow shop scheduling model and solving it with a genetic algorithm, the complex scheduling problem of mold change operations in the flexible flow shop was solved, production efficiency and equipment utilization were improved, and production costs and delivery deadlines were optimized.
Patent Information
- Application Number
- CN202510744816.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-09-23
AI Technical Summary
Existing technologies are unable to effectively solve the complex scheduling problem of mold change operations in flexible assembly lines, especially in large-scale scenarios, where the computational efficiency is low and practical constraints such as production costs and delivery deadlines are not comprehensively considered.
A flexible flow shop scheduling model considering die change is constructed and solved by genetic algorithm. The population is iteratively optimized through selection, crossover and mutation operations, gradually approaching the optimal solution.
It has achieved efficient solution of flexible flow shop scheduling problems in large-scale scenarios, optimized production costs and delivery deadlines, and improved equipment utilization and production efficiency.
Smart Images

Figure CN120688781A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a flexible flow shop scheduling model considering die change and a solution method thereof. Background Art
[0002] With the rapid development of information technology, the concept of Industry 4.0, typified by smart factories and intelligent manufacturing, has emerged. Against this backdrop, research on intelligent scheduling solutions integrating cutting-edge technologies such as artificial intelligence, the Internet of Things, and big data has flourished. These solutions aim to significantly improve production efficiency, significantly reduce operating costs, continuously optimize product quality, and precisely meet personalized customization needs through the comprehensive digitization, deep intelligence, and high automation of production processes. These innovative research initiatives are driving the manufacturing industry toward flexibility, intelligence, and greener development.
[0003] The flexible flow shop die change problem is a special type of flow shop scheduling problem characterized by the following characteristics: 1) all products follow the same process route; 2) each process can be processed by multiple machines in parallel; and 3) a die change is required when a machine switches between different products. This problem has broad application in the manufacturing industry, particularly in typical discrete manufacturing industries such as automotive manufacturing, electronic equipment assembly, food and beverage production, pharmaceuticals and chemicals, metalworking, and textiles and apparel. Research on this type of problem is crucial for improving equipment utilization, shortening production cycles, and reducing switching costs. Summary of the Invention
[0004] The purpose of this invention is to provide a flexible flow shop scheduling model and its solution algorithm considering mold change. The establishment of the model includes the following steps:
[0005] 3.1 Sets and Definitions
[0006] Product category collection;
[0007] The order set of product category i;
[0008] Machine collection;
[0009] A set of integers, where the upper and lower scripts represent the lower and upper bounds of the integers in the set;
[0010] i1, i2, i3: product category index,
[0011] k i : The kth product of category i i orders,
[0012] p: machine index,
[0013] q: process index,
[0014] n: total number of processes;
[0015] I: total number of product categories;
[0016] K i : The total number of orders for product i;
[0017] P: Total number of machines.
[0018] 3.2 Parameters
[0019] w c : Weight coefficient of completion time;
[0020] w l : Weight coefficient of delayed delivery;
[0021] w o : Weight coefficient of operating cost (processing + mold change);
[0022] PC piq : The unit cost of processing each i-th product in the q-th process on the p-th machine;
[0023] The cost of changing the mold from product i1 to product i2 on the pth machine;
[0024] t piq : The processing time of a single workpiece of the i-th product on the p-th machine for the q-th process;
[0025] The mold change time when the pth machine finishes processing the i1th type product and is about to process the i2th type product;
[0026] The mold change time when the pth machine finishes processing the i2th type product and is about to process the i1th type product;
[0027] Product k of category i i The number of products in an order;
[0028] Product k of category i i The release time of an order (i.e. the time when processing can begin);
[0029] Product k of category i i Delivery deadline for each order;
[0030] Product k of category i i The penalty cost of delaying the delivery of each order per unit time;
[0031] M: A very large number, for example, 10 6 .
[0032] 3.3 Decision variables
[0033] If the kth product of category i i If the qth process of the order is assigned to the pth machine for processing, the value is 1, otherwise it is 0;
[0034] If on the pth machine, the i1th product Order No. The first process is in the i2 category products Order No. If it is processed before the process, it takes 1, otherwise it takes 0;
[0035] If on the pth machine, the i1th product Order No. The first process is the first i2 product Order No. If it is the immediate predecessor of the process, then the value is 1, otherwise it is 0;
[0036] Product k of category i i The start time of the qth process of an order on the pth machine;
[0037] Product k of category i i The completion time of the qth process of an order on the pth machine;
[0038] Product k of category i i The start time of the qth process of an order;
[0039] Product k of category i i The completion time of the qth process of an order;
[0040] Product k of category i i The processing time for each order;
[0041] MC: maximum completion time;
[0042] Product k of category ii The length of time the order will be delayed.
[0043] 3.4 Model objective function
[0044] The objective function of the problem is defined as the weighted sum of the maximum completion time, delay penalty, processing cost, and mold change cost. Therefore, we can adjust the weight coefficients to select the direction the model tends to minimize. For example, we can increase the weight coefficient of the delay penalty to ensure that orders are completed within the deadline as much as possible. The following is the objective function of the model:
[0045]
[0046] 3.5 Constraint Formula
[0047]
[0048]
[0049] Expression (2) indicates that the completion time of a process on a machine is equal to its start time plus the actual processing time;
[0050] Expression (3) indicates that the completion time of a process is the sum of the completion times of the process on all machines;
[0051] Expression (4) indicates that the completion time of an order is equal to the completion time of its last process;
[0052] Expression (5) defines that the maximum completion time of the entire job must be greater than or equal to the completion time of all product orders;
[0053] Expression (6) defines the delay time as the difference between the completion time and the delivery time;
[0054] Expression (7) ensures that the delay time is non-negative;
[0055] Expression (8) means that on machine p, if exist Before processing, The start processing time must be greater than or equal to The completion time plus the mold change time from product i1 to product i2 (if i1 = i2, the mold change time is 0);
[0056] Expression (9) means that on machine p, if exist Before processing, The start processing time must be greater than or equal to The completion time plus the mold change time from product i2 to product i1 (if i1 = i2, the mold change time is 0);
[0057] Expression (10) ensures that if two processes are not processed on the same machine, they must not satisfy the before-after relationship;
[0058] Expression (11) ensures that if two processes do not satisfy the before-after relationship, then they must not satisfy the immediately preceding relationship;
[0059] Expression (12) ensures that if two processes are processed one after the other on the same machine and there are other processes in between, then the two processes are not in a close-precedence relationship;
[0060] Expression (13) is the process sequence constraint, which means that the process with a larger number for the same product and the same order must be processed after the process with a smaller number.
[0061] Expression (14) indicates that the process start time is equal to the sum of the start times of the process on all machines (due to the uniqueness constraint of process allocation, the process can only be processed by one machine, so the start time of the process on the remaining machines is 0);
[0062] Expression (15) is the uniqueness constraint for process allocation, which means that a process can only be performed on one machine from the start to the completion of the process;
[0063] Expression (16) is the release time constraint, which means that the start time of the first process of a product order must be greater than or equal to the release time of the product order;
[0064] Expression (17) ensures that if the kth product of category i i If the qth process of an order is not assigned to the pth machine, then the time it starts processing on the pth machine is 0; in formula (17), if (i.e. no process is assigned to the machine) then if (i.e. assigning processes to machines) then The purpose of this formula is to ensure hour must be equal to 0, and hour It is always true and does not conflict with other constraints.
[0065] Expressions (18)-(21) represent the types of variables.
[0066] 3.6 Genetic Algorithm
[0067] The above modeling yields a mixed integer programming model for the flexible flow shop problem with mold changes. However, when the number of products, orders, processes, and machines increases, the model's variables and constraints become numerous, making direct solution using a commercial solver very inefficient. Therefore, the present invention employs a genetic algorithm to solve the problem. This algorithm iteratively optimizes the population through selection, crossover, and mutation operations, gradually approaching the optimal solution.
[0068] The following is the main framework of the genetic algorithm:
[0069] 3.6.1 Chromosome coding design
[0070] 1) Using process-based three-dimensional mapping encoding, each gene represents the machine assigned to a process of a specific order.
[0071] 2) Different from traditional binary encoding, the machine number is directly used as the gene value.
[0072] 3.6.2 Initializing the population
[0073] 1) Randomly generate an initial population containing a fixed number of individuals, each of which represents a possible scheduling solution.
[0074] 2) Each scheduling scheme is constructed by randomly assigning machines to each process without considering process constraints.
[0075] 3) Each initial solution is evaluated, its fitness value (i.e., the objective function value, which includes completion time, delay cost, processing cost, and mold change cost) is calculated, and a maximum penalty value is set to correct infeasible solutions. That is, when the process and the machine do not match, the processing time of a single workpiece is set to the maximum value M to correct the infeasible solution.
[0076] 3.6.3 Fitness Evaluation
[0077] The evaluation process is as follows:
[0078] 2) Process sequence constraint processing
[0079] a. Ensure that the processes of the same order are executed in sequence;
[0080] b. The completion time of the previous process is used as the lower limit of the start time of the subsequent process.
[0081] 2) Machine scheduling optimization
[0082] a. Arrange the processes on the machine in ascending order by order deadline;
[0083] b. Calculate mold change time (switching cost between different product types).
[0084] 3) Multi-objective cost calculation
[0085] Multi-objective cost calculation is to calculate the fitness value, which is the model objective function value, consisting of four parts: maximum completion time cost, order delay cost, processing cost, and mold change cost.
[0086] 3.6.4 Selection Operation (Championship Selection)
[0087] The traditional method using roulette wheel selection may lead to premature convergence, so it is improved.
[0088] a. Randomly select 3 individuals from the current population using sampling without replacement to form a tournament team.
[0089] b. Select the individual with the best fitness from the group as one of the parents.
[0090] c. Repeat this process until a sufficient number of parent individuals are selected to maintain population diversity.
[0091] 3.6.5 Crossover Operation (Two-Point Crossover)
[0092] The traditional method of using single-point intersection may violate the process sequence constraint (that is, the process with a smaller number for the same product and order must be processed before the process with a larger number). This algorithm has improved it.
[0093] a. Pair the selected parent individuals.
[0094] b. For each pair of parents, randomly select two crossover points, exchange the machine allocation scheme between the two points, and generate two new children.
[0095] c. When crossing, keep the original allocation outside the intersection point and only swap the middle fragments.
[0096] 3.6.6 Mutation Operation
[0097] a. For each newly generated offspring, mutation is performed with a certain probability.
[0098] b. Randomly select a process during mutation and reallocate it to a different machine.
[0099] c. Ensure that the mutated machines are different from the original allocation to ensure validity.
[0100] 3.6.7 Elite Retention Strategy
[0101] a. Sort the current generation population by fitness and retain a certain proportion of the best individuals (elites).
[0102] b. Add elite individuals directly to the next generation population to prevent the loss of excellent genes.
[0103] 3.6.8 Update the global optimal solution
[0104] a. After each generation, check the best individual of the current generation.
[0105] b. If it is better than the historical optimal solution, update the global optimal solution.
[0106] 3.6.9 Termination and Output
[0107] 1) When the preset evolutionary generations are reached, the algorithm terminates.
[0108] 2) Output the best scheduling solution found in the entire evolution process and its corresponding objective function value.
[0109] Compared with the prior art, the present invention has the following beneficial effects:
[0110] This study innovatively introduces mold change operation constraints based on the traditional multi-product, multi-order flexible assembly line scheduling problem, and comprehensively considers actual production constraints such as order release time and delivery deadline. To address this complex scheduling problem, we constructed a multi-objective optimization model with the goals of minimizing maximum completion time, reducing delay costs, reducing processing costs, and optimizing mold change costs. To effectively solve this problem, this study first established a mixed integer programming model. Given the limitations of commercial solvers in large-scale scenarios, and considering the multi-objective nature of the problem, we specifically designed an efficient genetic algorithm solution framework, providing a practical solution for actual production scheduling. BRIEF DESCRIPTION OF THE DRAWINGS
[0111] Figure 1 This is the result of the multi-product order process scheduling Gantt chart obtained in Example 1;
[0112] Figure 2 This is the convergence diagram of the genetic algorithm in Example 1. DETAILED DESCRIPTION
[0113] Example 1
[0114] This Example 1 is used as an example to verify the scientificity and effectiveness of the flexible flow shop scheduling model and its solution algorithm considering product mold change:
[0115] A set of examples is randomly generated. The example has 4 products, 5 orders for each product, 80 workpieces for each order, 6 machines, and 3 processes. Process 1 can only be processed on machines 0 and 1, process 2 can only be processed on machines 2 and 3, and process 3 can only be processed on machines 4 and 5. Therefore, when the processes and machines are matched, the processing time t for a single workpiece is piq4 minutes, and a maximum value (10 6 minutes). In addition, the genetic algorithm parameters are as follows: population size is 300, number of iterations is 200, mutation rate is 0.5, elite retention rate is 0.1, and tournament size is 3. The remaining parameter designs are shown in the following table:
[0116] Parameter Information Table
[0117]
[0118] When calculating in Example 1 of the present invention, the objective function formula (1) and constraint formulas (2)-(21) in the specification are used, and a genetic algorithm is used to solve.
[0119] The final solution is as follows:
[0120] Multi-product and multi-order process scheduling time and machine allocation details
[0121]
[0122] Convert the data in the above table into a more intuitive Gantt chart as follows Figure 1 As shown in the figure, the horizontal axis represents time, the vertical axis represents machine number, and the different colored rectangles represent different product categories. For example, the number "P0-O0-Q1" in the rectangle represents the first process of product number 0, order number 0, which is assigned to machine 0. The Gantt chart also shows that when different product categories are switched on the same machine, there is a blank period. This blank period is the mold change time considered in this model.
[0123] The algorithm iterative convergence diagram is as follows Figure 2 As shown, it can be seen that the solution efficiency is relatively high, and it gradually approaches the optimal solution after a relatively small number of iterations.
Claims
1. A flexible flow shop scheduling method based on genetic algorithm considering die change, characterized by The following steps are involved: Step 1: Define the parameters and variables. The parameter symbols are defined as follows: : product category collection; : The order set of the i-th product; : machine collection; : A set of integers, where the upper and lower scripts represent the upper and lower bounds of the integers in the set; i1, i2, i3: product category index, k i : The kth product of category i i orders, p: machine index, q: process index, n: total number of processes; I: total number of product categories; K i : The total number of orders for product i; P: total number of machines; w c : Weight coefficient of completion time; w l : Weight coefficient of delayed delivery; w o : Weight coefficient of operating costs of processing and mold changing; PC piq : The unit cost of processing each i-th product in the q-th process on the p-th machine; : The cost of changing the mold from product i1 to product i2 on the p-th machine; t piq : The processing time of a single workpiece of the i-th product on the p-th machine for the q-th process; : The mold change time when the pth machine finishes processing the i1th type product and is about to process the i2th type product; : The mold change time when the pth machine finishes processing the i2th type product and is about to process the i1th type product; :Product k of category i i The number of products in an order; :Product k of category i i The release time of an order, that is, the time when processing can begin; :Product k of category i i Delivery deadline for each order; :Product k of category i i The penalty cost of delaying the delivery of each order per unit time; M: a very large number; :If the kth product of category i i If the qth process of the order is assigned to the pth machine for processing, the value is 1, otherwise it is 0; :If on the pth machine, the i1th product Order No. The first process is in the i2 category products Order No. If it is processed before the process, it takes 1, otherwise it takes 0; :If on the pth machine, the i1th product Order No. The first process is the first i2 product Order No. If it is the immediate predecessor of the process, then the value is 1, otherwise it is 0; :Product k of category i i The start time of the qth process of an order on the pth machine; :Product k of category i i The completion time of the qth process of an order on the pth machine; :Product k of category i i The start time of the qth process of an order; :Product k of category i i The completion time of the qth process of an order; :Product k of category i i The processing time for each order; MC: maximum completion time; :Product k of category i i The length of time the order will be delayed; Step 2: Determine the objective function of the model The objective function of the model is the minimum value of the maximum completion time cost, the penalty cost of order delay, the processing cost, and the mold change cost. The objective function is expressed as shown in formula (1): Step 3: Construct a series of constraints, including the following time constraints: Expression (2) indicates that the completion time of a process on a machine is equal to its start time plus the actual processing time; Expression (3) indicates that the completion time of a process is the sum of the completion times of the process on all machines; Expression (4) indicates that the completion time of an order is equal to the completion time of its last process; Expression (5) defines that the maximum completion time of the entire job must be greater than or equal to the completion time of all product orders; Expression (6) defines the delay time as the difference between the completion time and the delivery time; Step 4: Solve the objective function of the model through the solution algorithm to obtain the flexible flow shop scheduling plan.
2. A flexible flow shop scheduling method based on genetic algorithm and considering die change as claimed in claim 1, characterized in that Step 3 also includes the following constraint process: Expression (8) means that on machine p, if exist Before processing, The start processing time must be greater than or equal to The sum of the completion time and the mold change time from product i1 to product i2. If i1 = i2, the mold change time is 0; Expression (9) means that on machine p, if exist Before processing, The start processing time must be greater than or equal to The sum of the completion time and the mold change time from product i2 to product i1. If i1 = i2, the mold change time is 0. Indicates the product of category i1 Order No. process; Indicates the i2 category product Order No. A process.
3. A flexible flow shop scheduling method based on genetic algorithm and considering die change as claimed in claim 1, characterized in that Step 3 also includes the following process constraints: Expression (10) ensures that if two processes are not processed on the same machine, then they must not satisfy the before-after relationship; Expression (11) ensures that if two processes do not satisfy the before-after relationship, then they must not satisfy the immediately preceding relationship; Expression (12) ensures that if two processes are processed one after the other on the same machine and there are other processes in between, then the two processes are not in a close-precedence relationship; Expression (13) is the process sequence constraint, which means that the process with a larger number for the same product and the same order must be processed after the process with a smaller number. Expression (14) indicates that the process start time is equal to the sum of the start times of the process on all machines. Due to the uniqueness constraint of process allocation, the process can only be processed by one machine, so the start time of the process on the remaining machines is 0. Expression (15) is the uniqueness constraint for process allocation, which means that a process can only be performed on one machine from the start to the completion of processing.
4. A flexible flow shop scheduling method based on genetic algorithm and considering die change as claimed in claim 1, characterized in that Step 3 also includes the following constraint process: Expression (16) is the release time constraint, which means that the start time of the first process of a product order must be greater than or equal to the release time of the product order; Expression (17) ensures that if the kth product of category i i If the qth process of an order is not assigned to the pth machine, then the time it starts processing on the pth machine is 0; Expressions (18)-(21) represent the types of variables.
5. A flexible flow shop scheduling method based on genetic algorithm and considering die change as claimed in claim 1, characterized in that The genetic algorithm is used as the solution algorithm, which includes the following steps: S1. Chromosome coding design Using a three-dimensional mapping encoding based on process, each gene represents the machine assigned to a process of a specific order, that is, the machine number is directly used as the gene value; S2. Initialize the population 1) Randomly generate an initial population containing a fixed number of individuals, each of which represents a possible scheduling solution. 2) Each scheduling scheme is constructed by randomly assigning machines to each process without considering process constraints; 3) Evaluate each initial solution, calculate its fitness value, and set a maximum penalty value to correct infeasible solutions; the fitness value is the minimum value of the maximum completion time cost, order delay penalty cost, processing cost, and mold change cost. Its calculation formula is shown in formula (1); S3. Fitness evaluation 1) Process sequence constraint processing a. Ensure that the processes of the same order are executed in sequence; b. The completion time of the previous process is used as the lower limit of the start time of the subsequent process. 2) Machine scheduling optimization a. Arrange the processes on the machine in ascending order by order deadline; b. Calculate mold change time; 3) Multi-objective cost calculation The fitness value is calculated as the minimum value of the four components: maximum completion time cost, penalty cost of order delay, processing cost, and mold change cost. The calculation formula is shown in formula (1); S4. Select operation a. Randomly select 3 individuals from the current population using sampling without replacement to form a tournament team; b. Select the individual with the best fitness from the group as one of the parents; c. Repeat this process until a sufficient number of parent individuals are selected to maintain population diversity; S5, crossover, mutation; S6. Based on the elite retention strategy, the best individuals are retained to generate a new generation of parent population. That is, the top K particles with the best fitness in the current population are directly transferred to the next generation, and the remaining particles are used to generate a new population through crossover and mutation operations. S7, update the global optimal solution. After each generation, check the optimal individual of the current generation. If it is better than the historical optimal solution, update the global optimal solution. S8, termination and output 1) When the preset evolutionary generations are reached, the algorithm terminates. 2) Output the best scheduling solution found in the entire evolution process and its corresponding objective function value.
6. A flexible flow shop scheduling method based on genetic algorithm and considering die change as claimed in claim 5, characterized in that The crossover operation steps in step S5 are as follows: a. Pair the selected parent individuals in pairs; b. For each pair of parents, randomly select two crossover points, swap the machine allocation between the two points, and generate two new offspring; c. When crossing, keep the original allocation outside the intersection point and only swap the middle fragments.
7. A flexible flow shop scheduling method based on genetic algorithm and considering die change as claimed in claim 5, characterized in that The mutation operation in step S5 is as follows: a. For each newly generated offspring, mutation is performed with a certain probability; b. Randomly select a process during mutation and reallocate it to a different machine; c. Ensure that the mutated machines are different from the original allocation to ensure validity.
8. The flexible flow shop scheduling method based on genetic algorithm and considering die change as claimed in claim 5, characterized in that In step S6, the proportion of the first K particles to all particles in the entire current population is 10%, that is, the elite retention rate is 10%.
9. A flexible flow shop scheduling method based on genetic algorithm and considering die change as claimed in claim 7, characterized in that The probability of the mutation is 50%.