Multi-target flexible workshop adaptive scheduling method
By adopting the multi-objective flexible workshop adaptive scheduling method in flexible operation workshop scheduling, and using technical means such as layered hypercube sampling and dynamic weighting, the problems of low computing efficiency and insufficient diversity in multi-objective optimization are solved, and more efficient and flexible scheduling effects are achieved.
Patent Information
- Application Number
- CN202411736091.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-07
AI Technical Summary
The prior art has problems such as low computing efficiency, insufficient solution diversity and lack of universality in multi-objective optimization in flexible operation workshop scheduling, which is difficult to meet the needs of modern manufacturing for high efficiency, low energy consumption and economics.
The multi-objective flexible workshop adaptive scheduling method is adopted to improve the initial position of the slimy mold algorithm through layered hypercube sampling, and the update amplitude of the solution is controlled using the dynamic weight of the nonlinear decreasing mechanism, and the position update is performed by combining multi-scale differential variation and cross-operation, and Pareto cutting-edge solutions are collected through non-dominant sorting and k-nearest congestion calculation.
It improves the diversity of the algorithm's computational efficiency and solutions, can explore the search space more effectively, improve early convergence speed, balance global search and local search, and enhances the robustness and applicability of the algorithm.
Smart Images

Figure CN119575910A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of flexible workshop management, and in particular relates to a multi-objective flexible workshop adaptive scheduling method. Background Art
[0002] The flexible job shop scheduling problem is a classic optimization problem in the field of production management, which aims to reasonably schedule job tasks and allocate resources to optimize a certain performance indicator (such as production cycle, equipment utilization or cost). Compared with the traditional job shop scheduling problem, the flexible job shop scheduling problem has higher flexibility and complexity. There are several workpieces in the flexible job shop scheduling system, and each workpiece contains a series of operations that need to be completed in a specific order. There are several machines in the system, and each machine can complete one or more operations. Each operation can be completed by any of multiple machines (but the processing efficiency and cost may be different). Flexible job shop scheduling focuses on solving the problems of operation allocation and operation sequencing, and its constraints include time constraints, resource constraints and flexibility constraints.
[0003] The objectives of flexible job shop scheduling problems are mainly divided into single-objective optimization and multi-objective optimization. Single-objective optimization only sets a single objective, such as minimizing total processing time, minimizing equipment idle time, minimizing production costs, etc. The Chinese invention patent applied by our unit with the publication number CN 118642439A: A method and system for solving flexible shop scheduling using an improved slime mold algorithm, which belongs to single-objective optimization. In the population initialization part, the Bernoulli chaotic mapping of mixed Brownian motion is used for population initialization to increase the diversity of the population and improve the quality of the initial solution; the weight formula in the original slime mold algorithm is improved, and the Sigmoid function weight is introduced, which has the characteristics of dynamic adjustment and reduction of randomness, and balances the optimization of global search and local search; the Gaussian mutation operator and custom parameters are introduced to improve the position update formula of the original slime mold algorithm; at the same time, the particle swarm algorithm is introduced for local search; the global search ability of the algorithm is improved, the relationship between global search and local search is better balanced, the convergence accuracy and optimization accuracy of the algorithm are improved, and it has better robustness.
[0004] Multi-objective optimization considers multiple indicators at the same time, such as balancing resource utilization and reducing waiting time. With the increasing demand for high efficiency, low energy consumption and economy in modern manufacturing, the multi-objective optimization problem in flexible job shop scheduling has become an important problem that needs to be solved urgently. Typical methods of multi-objective optimization include heuristic algorithms, meta-heuristic algorithms (including genetic algorithms, particle swarm optimization algorithms, simulated annealing algorithms, ant colony algorithms), hybrid algorithms, linear programming or mixed integer programming, etc. These research methods have made certain progress in the fields of multi-objective optimization, dynamic scheduling and low-carbon manufacturing, but most methods still have shortcomings in computational efficiency, diversity of solutions and versatility. Summary of the invention
[0005] In view of the above-mentioned deficiencies in the prior art, the problem to be solved by the present invention is the multi-objective optimization algorithm for flexible job shop scheduling, which still has many deficiencies and needs to be optimized to meet the requirements of modern manufacturing industry for high efficiency, low energy consumption and economy. The present invention provides a multi-objective flexible workshop adaptive scheduling method, introduces hierarchical hypercube sampling to improve the initialization position of slime mold, controls the update amplitude of the current solution through the dynamic weight of the nonlinear decreasing mechanism, uses multi-scale differential mutation and crossover operation to update the position, uses non-dominated sorting to collect the Pareto frontier, runs the algorithm multiple times and collects the Pareto solution set, adds it to the Pareto frontier, collects the optimal results of all rounds, removes duplicate solutions, saves the final Pareto solution set, and fills the shortcomings of SMA in FJSP multi-objective optimization.
[0006] The present invention adopts the following technical solution: a multi-objective flexible workshop adaptive scheduling method, comprising the following steps:
[0007] The first step is to determine multiple objectives of flexible workshop scheduling and set the objective function.
[0008] The first main goal is the shortest completion time. The objective function is as follows:
[0009] f1=minC max =min{max(C i )},i=1,2,...,n
[0010] in:
[0011] C i Workpiece J i The completion time,
[0012] i is the workpiece number,
[0013] n is the total number of workpieces,
[0014] The second main goal: minimum machine energy consumption, the objective function is as follows:
[0015]
[0016] in:
[0017] EC is the energy consumption of the machine,
[0018] z is the machine serial number,
[0019] X ijz It is process Oi j Processing status on machine z, O ij Workpiece J iThe jth process of
[0020] E z is the energy consumption per unit time when machine z is working,
[0021] T ijz It is process Oi j Working time on machine z,
[0022] U z is the energy consumption per unit time when machine z is idle,
[0023] P i Workpiece J i The number of processes,
[0024] m is the total number of machines,
[0025] The third main goal: minimum resource consumption, the objective function is as follows:
[0026]
[0027] CT is resource consumption.
[0028] C z is the resource consumption per unit working time of the zth machine,
[0029] The second step is to determine the constraints.
[0030] The constraints are as follows:
[0031]
[0032] S ij M ijh +F(1-H ijvwh )≥E vw M vwh
[0033] E ij -T ijh M ijh ≥S ij
[0034] C i ≤C max
[0035] (S ij +T ijh )H ijvwh ≤S vw
[0036] S ij ≥0,E ij ≥0,T ijh ≥0
[0037] in:
[0038] S ij It is process O ij The start time of processing,
[0039] F is a sufficiently large positive number,
[0040] M ijh Process O ij If it is processed on machine h, the value is 1, otherwise it is 0.
[0041] H ijvwh Process O ij Before O vw If machine h is processing, it is 1, otherwise it is 0. vw Workpiece J v The wth process
[0042] The third step is to use the slime mold meta-heuristic algorithm to optimize the target and initialize the parameters.
[0043] In the initial stage, the initial population position of random positions is generated by the initialization function, distributed in the definition domain [lb, ub], and then the fitness value of each individual is calculated. The position of the initial population is randomly diffused, which simulates the slime mold spreading in space during the search process to ensure global search;
[0044] In each round of iteration, the algorithm calculates the weight W of the individual and simulates the slime mold gradually approaching the food by dynamically adjusting the parameters a and b. For the individuals in the first half, higher weights are given according to the individuals with higher fitness; for the individuals in the second half, lower weights are given to ensure a certain amount of exploration space. The update rule uses different random factors to randomly initialize the individual positions with uniform distribution, and also introduces normal distribution to adjust the existing individual positions.
[0045]
[0046] in:
[0047] r is a random number in [0,1];
[0048] F b and F w Indicates the best and worst fitness values in the current iteration;
[0049] SmellIndex represents the position index after the individual fitness values are arranged in ascending order;
[0050] N / 2 represents the first half of the population;
[0051] After each update, the algorithm recalculates the fitness values of all individuals and sorts them, sets the individual with the best fitness as the current global optimal individual, and records the optimal fitness value. The algorithm updates the inertia factor a through a nonlinear function:
[0052] a=arctanh(1-(t / t max ))
[0053] As the number of iterations increases, the inertia factor gradually decreases, and individuals gradually gather toward the current optimal position, simulating the slime mold to surround the optimal food after finding it;
[0054] Initialize the independent variable dimension, the number of objective functions, the upper and lower bounds of the independent variables, the population size and number of iterations of the slime mold algorithm, and set the dynamic scaling factor and crossover probability of differential mutation;
[0055] The fourth step is to use stratified Latin hypercube sampling to initialize the slime mold population to ensure that the sample individuals are evenly distributed in the multidimensional search space.
[0056] Initialize an all-zero matrix to store the generated population individuals. The size of the matrix is the population size × the variable dimension. Randomly generate a random value within the selected stratum to ensure that the sampling points are not concentrated in a specific area, so that the population distribution is more uniform.
[0057] The fifth step is to perform non-dominated sorting and k-nearest neighbor crowding calculation to achieve the screening of the Pareto front.
[0058] Through non-dominated sorting and k-nearest neighbor crowding calculation, a set of solutions that perform well under multiple objective functions is found.
[0059] Through non-dominated sorting, we can select which solutions to use as the Pareto frontier in multi-objective optimization and find a set of solutions that do not dominate each other.
[0060] By calculating the crowding degree, we can measure the distribution of individuals in the population in the solution space, maintain the diversity of the population within the same non-dominated level, and avoid over-concentration.
[0061] The sixth step is to use dynamic weights to control the update amplitude of the current solution, and use a combination of sigmoid function and tanh function for dynamic update.
[0062] The weight w is dynamically adjusted by nonlinear attenuation. As the number of iterations increases, the weight gradually decreases. The following is the dynamic weight update formula. The formula uses the square term to gradually decay the weight in the later stages of iterations, so that the algorithm focuses more on development capabilities and reduces exploration capabilities in the later stages:
[0063]
[0064] Where: wmax and w min is the maximum and minimum value of the weight,
[0065] Itera is the current iteration number,
[0066] Max_Itera is the maximum number of iterations;
[0067] The specific steps for dynamic update are as follows:
[0068] (1) Use the sigmoid function to adjust the weight change trend. Combined with the difference between the current number of iterations and the maximum number of iterations, the weight changes in the early and late stages are different. The formula is as follows:
[0069]
[0070] in: is the midpoint of the iteration number,
[0071] exp is the natural exponential function;
[0072] (2) The tanh function is used to perform nonlinear scaling on the weights. As the number of iterations increases, the weights gradually approach 1. The formula is:
[0073]
[0074] The tanh function ranges from [-1,1], and tanh(x) approaches 1 when x>0. As the number of iterations increases, the weight changes less.
[0075] A3. Update the comprehensive weight:
[0076]
[0077] where f i is the fitness of the ith individual,
[0078] S=F b -F w +ε (ε is introduced to prevent the denominator from being 0),
[0079] F b and F w are the current optimal and worst fitness respectively;
[0080] Step 6: Update the position and store the updated solution through differential mutation and crossover.
[0081] The best individual and two other random individuals are mutated, and the current individual is mutated according to two other randomly selected individuals. After mutation, a crossover operation is performed, in which the mutated individuals are mixed with the original individuals according to probability. The crossover rate decreases as the iteration proceeds. The individuals after crossover mutation are checked for boundaries to ensure that they are within the defined range.
[0082] The specific formula is as follows:
[0083] (1) Differential variation formula:
[0084] Current_Best mutation strategy: mut=x1+F·(P b -x1)+F·(x2-x3)
[0085] Current_Rand mutation strategy: mut=pop(i,:)+F·(x2-x3)
[0086] (2) Crossover operation formula:
[0087]
[0088] (3) SMA dynamic weight update formula:
[0089] When the conditions are met, the position update formula is:
[0090]
[0091] When the conditions are not met, the position update formula is:
[0092]
[0093] (4) Dynamic weight in SMA: p = tanh(|f i -f b |)
[0094] Step 8: Repeat steps 5 to 7 to update the solution until the maximum number of iterations is reached.
[0095] After each iteration, the population is combined with the newly generated individuals and the non-dominated sorting is performed again to maintain a diverse set of Pareto optimal solutions. The average, minimum, and maximum values are recorded during each iteration.
[0096] Step 9, final output,
[0097] Return the overall Pareto solution and extract the unique Pareto optimal solution;
[0098] After all iterations, the algorithm selects the best non-dominated solution from the final population and records the fitness value and the corresponding machine ranking.
[0099] According to another embodiment of the invention or the adaptive scheduling method of any of the aforementioned embodiments, the specific steps of initializing the slime mold population using stratified Latin hypercube sampling include:
[0100] (1) Perform hierarchical division. In each dimension, the range [0, 1] is evenly divided into strata subintervals. The i-th dimension is divided into strata subintervals, and its boundaries are defined by the following formula:
[0101]
[0102] Here S k is the range of the kth subinterval
[0103] (2) Randomly select a layer and generate random points. For each dimension i and sample j, randomly select a layer k. strata_idx , that is, select a subinterval S k , and then generate random points in this subinterval:
[0104]
[0105] where r∈[0,1] is a random number uniformly distributed in each subinterval, and k∈[0,strata-1] is a random integer corresponding to the selected stratum number;
[0106] (3) Perform stratified sampling on all dimensions and samples. For sample j = 1, 2, ..., samples (population size) and dimension i = 1, 2, ..., dim (variable dimension), generate a random sampling matrix through the previous process:
[0107] X=[X j,i ],j=1,2,...,samples\i=1,2,...,dim
[0108] Where X j,i is a random sampling point distributed in the i-th dimension and belonging to the j-th sample.
[0109] (4) The formula for determining stratified Latin hypercube sampling is:
[0110]
[0111] where r j,i is a random number uniformly distributed in [0,1], k j,i ∈{0,1,2,...,strata-1} is the randomly selected stratum number that ultimately generates the random sampling matrix.
[0112] According to another embodiment of the invention or the adaptive scheduling method of any of the above embodiments, the specific steps of performing non-dominated sorting are:
[0113] For each individual P i , define S i is the dominating set, that is, i The set of individuals that dominate
[0114] The formula is:
[0115]
[0116] S i = {P j |P i <P j}
[0117] Where 1(P j |P j <P i ) is an indicator function, which takes the value of 1 when Pj<Pi, and 0 otherwise.
[0118] Perform recursive operations and convert all non-dominated individuals (i.e. n i = 0) are placed in the first frontier (Front1), and then they are subtracted from the non-dominated degrees of other individuals to form the next frontier (Front2). This process is repeated until all individuals are assigned to the frontier. After each individual is assigned to a frontier, its non-dominated degree will be subtracted from the subsequent calculation. Let F1, F2, ..., F k Represents different frontier sets, and the formula is:
[0119] Initial condition: F1 = {P i |n i =0}
[0120] The recursive formula is:
[0121] According to another embodiment of the invention or the adaptive scheduling method of any of the above embodiments, the specific steps of calculating the congestion degree are:
[0122] (1) Crowding calculation: k nearest neighbor distance calculation. For the sorted middle individual, calculate its distance to the kth nearest neighbor individual. Let P (i) is an individual in the frontier, and its crowding degree is calculated as:
[0123] The kth preceding neighbor: P (i-k) The kth next neighbor: P (i+k)
[0124] The congestion calculation formula is:
[0125] in and The objective function f k The maximum and minimum values of are used to normalize the distance.
[0126] (2) Total crowding: For each individual, calculate the sum of the crowding distances of all objective functions:
[0127]
[0128] where d k (P i ) is the crowding contribution of the kth objective function.
[0129] Beneficial effects of the present invention:
[0130] 1. A multi-objective flexible workshop adaptive scheduling method disclosed in the present invention solves the multi-objective flexible workshop scheduling problem based on an improved slime mold algorithm. In the population initialization part, stratified Latin hypercube sampling (LHS) is used to ensure that the population is evenly distributed in the search space, avoiding the initial solution from being concentrated in a specific area, thereby improving the population diversity, and can efficiently explore the search space, thereby improving the convergence speed of the early algorithm;
[0131] 2. The present invention ensures the diversity of Pareto frontier solutions by calculating the congestion degree of non-dominated sorting and K nearest neighbor distances; dynamically adjusts weights, balances exploration and development, and uses sigmoid and tanh functions for nonlinear weight updates, making weight adjustment more adaptive;
[0132] 3. The present invention enhances the diversity, variety and flexibility of mutations through differential mutation and crossover operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0133] Figure 1 It is a flow chart of the multi-objective flexible workshop adaptive scheduling method of the present invention;
[0134] Figure 2 A schematic diagram showing the comparison of population distribution using stratified Latin hypercube sampling and random initialization;
[0135] Figure 3 A schematic diagram comparing the solution distribution with and without non-dominated sorting and crowding calculation;
[0136] Figure 4 Schematic diagram for comparing the distribution of non-dominated solutions of the present invention and the binary multiplication algorithm. DETAILED DESCRIPTION
[0137] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0138] The Slime Mold Algorithm (SMA) is a heuristic optimization algorithm based on the growth of slime mold. It completes resource allocation and path optimization by simulating the behavior of slime mold in building dynamic networks during the foraging process. The Slime Mold Algorithm has the advantages of strong global search capability, fewer parameters and high robustness, and has demonstrated excellent performance in path planning, network design and scheduling problems.
[0139] The multi-objective flexible job shop scheduling problem (MOFJSP) involves optimizing the scheduling of a production shop consisting of multiple machines with "flexible" processing. Each machine can perform different processes of multiple workpieces, but different machines have different efficiency and processing time for different operations. The core task of FJSP is to reasonably allocate workpiece processes to machines and optimize the operation sequence of each machine to improve the overall production efficiency.
[0140] The specific process is as follows Figure 1 shown.
[0141] The multi-objective flexible job shop scheduling problem can be described as follows: a workshop has a processing task, which contains n (n ≥ 1) workpieces that need to be processed. n , and m (m ≥ 1) processing machines M m , where each workpiece J i (i∈{1,2,...,n}) contains O ij The scheduling goal of multi-objective optimization is to reasonably arrange the processes and allocate machines under certain constraints, so that the scheduling scheme can minimize the maximum completion time and reduce the machine energy consumption and resource consumption in the production process.
[0142] The optimization objectives of the multi-objective FJSP of the present invention are the completion time of the machine, the energy consumption of the machine and the resource consumption, and the objective function is:
[0143] f1=minC max =min{max(C i )},i=1,2,...,n
[0144] The above objective formula is to solve the objective function of minimizing the maximum completion time.
[0145]
[0146] The above formula is to solve the objective function of minimizing the energy consumption of the machine.
[0147]
[0148] The above formula is to solve the objective function of minimizing resource consumption.
[0149] The specific constraints of the FJSP problem are as follows:
[0150]
[0151]
[0152] S ij M ijh +F(1-H ijvwh )≥E vw M vwh
[0153] E ij -T ijh M ijh ≥S ij
[0154] C i ≤C max
[0155] (S ij +T ijh )H ijvwh ≤S vw
[0156] S ij ≥0,E ij ≥0,T ijh ≥0
[0157] Table 1. Parameter definitions
[0158]
[0159]
[0160] The slime mold algorithm is a meta-heuristic algorithm that simulates the behavior of bacteria in the foraging process, which can be divided into three main steps: finding food, approaching food, and surrounding food.
[0161] Food discovery phase: In the initial phase, the initial population position of random positions is generated by the initialization function and distributed in the definition domain [lb, ub]. Then the fitness value of each individual is calculated. The position of the initial population is randomly diffused, simulating the slime mold spreading in space during the search process to ensure global search.
[0162] Approaching food stage: In each round of iteration, the algorithm calculates the weight W of the individual, and simulates the slime mold gradually approaching the food by dynamically adjusting the parameters a and b. For the individuals in the first half, higher weights are given according to the individuals with higher fitness; for the individuals in the second half, lower weights are given to ensure a certain amount of exploration space. The update rule uses different random factors to randomly initialize the individual positions with uniform distribution, and also introduces normal distribution to adjust the existing individual positions.
[0163]
[0164] Where: r is a random number in [0,1]; F b and F w It represents the best and worst fitness values in the current iteration; SmellIndex represents the position index of individual fitness values after they are arranged in ascending order; N / 2 represents the first half of the population.
[0165] Surrounding food stage: After each update, the algorithm recalculates the fitness values of all individuals and sorts them, sets the individual with the best fitness as the current global optimal individual, and records the optimal fitness value. The algorithm updates the inertia factor a through a nonlinear function:
[0166] a=arctan h(1-(t / t max ))
[0167] As the number of iterations increases, the inertia factor gradually decreases, and individuals gradually gather toward the current optimal position, simulating the slime mold surrounding the optimal food after finding it.
[0168] Although the original slime mold algorithm has certain optimization capabilities, it also has some shortcomings:
[0169] It is easy to fall into local optimality. The slime mold algorithm lacks a mechanism to jump out of the local optimality, especially in complex search spaces, such as the multi-objective optimization process for flexible workshop scheduling problems. It is easy to stay in the local optimality, thus affecting the global optimization performance;
[0170] The convergence speed is slow. In the later stage of the algorithm, the convergence speed of the slime mold algorithm is slow, and it may take multiple iterations to reach the convergence standard. Especially for problems with higher dimensions, the convergence speed will drop significantly.
[0171] Insufficient population diversity: As iterations proceed, population diversity decreases, which may lead to premature convergence and prevent the algorithm from fully exploring the entire search space.
[0172] The parameters are highly sensitive. The algorithm parameters, such as weight factors, have a significant impact on the results. Therefore, parameter selection needs to be optimized and there is no unified usage rule.
[0173] The slime mold algorithm has poor adaptability and may not perform well in dealing with complex multi-objective optimization problems or dynamic problems, and it is difficult to meet different types of optimization requirements. Therefore, it is necessary to adopt the improved SMA algorithm (AMS-SMA) of the present invention.
[0174] The random initialization of the original slime mold algorithm makes the generated population insufficiently diverse and prone to local optimality. Here, Stratified Latin Hypercube Sampling (LHS) is used to initialize the population to ensure that the sample individuals are evenly distributed in the multidimensional search space. LHS generates samples through stratified sampling, dividing each dimension into even layers:
[0175] In each dimension, the interval [0,1] is divided into Strata subintervals, and the boundary of the kth subinterval is defined as:
[0176]
[0177] Random sampling positions in the strata. For each dimension i and sample j, a sampling position is randomly generated in each stratum. First, a stratum number k is randomly selected. j,i ∈{0,1,...,strata-1}, corresponding to the kth j,i Sub-interval Generate a random point at random within this subinterval:
[0178]
[0179] where r j,i is a random number uniformly distributed in [0,1], ensuring random distribution within the sampling point subinterval.
[0180] Perform stratified sampling for all dimensions and samples. For each sample j = 1, 2, ..., samples and each dimension i = 1, 2, ..., dim, repeat the previous stratified numbering and sampling point generation process to form a complete random sampling matrix X, where:
[0181] X=[X i,j ],i=1,2,...,dim,j=1,2,...,samples
[0182] Where X i,j represents a random sampling point on the jth sample in the i-th dimension.
[0183] Linearly map the generated sampling point matrix to the search space [LB i ,UB i ], the mapping formula is:
[0184] MSi,j =LB i +(UB i -LB i )·X i,j
[0185] This mapping ensures that the sampling points in each dimension are evenly distributed within the domain, and the resulting MS i,j The matrix is a matrix of sampling points evenly distributed within the actual variable range, which is used to initialize the population of the algorithm. Figure 2 The figure shows the comparison between the population distribution using stratified Latin hypercube sampling and the population distribution using random initialization. It can be seen that the population distribution using stratified Latin hypercube sampling is more uniform.
[0186] Dynamic weight update: The weight update of the original slime mold algorithm lacks continuity and is highly random. When the fitness change difference is small, the weight change is no longer significant and it is easy to fall into the local optimum. The present invention uses dynamic weights to control the update amplitude of the current solution and adopts a nonlinear decreasing mechanism. The formula is as follows:
[0187]
[0188] Where: w max represents the maximum value of the weight; k controls the decreasing rate of the weight; Itera is the current number of iterations; Max_Itera is the maximum number of iterations. In the initial stage, w dm Close to w max , the algorithm is more exploratory, and a larger step size is generated, which makes it easy to jump out of the local optimum. In the middle and late stages, as the number of iterations increases, w dm Gradually decrease, increase the algorithm's ability to search locally, and gradually converge to the global optimum.
[0189] At the same time, when LHS initializes the population, stratified sampling is used to make the initial solution better cover the entire space. In each algorithm iteration, the dynamic weight flexibly adjusts the update amplitude according to the current iteration progress. In multi-dimensional space, the adaptive dynamic weight is combined with the boundary of each stratified area to ensure the uniformity of the search area and better balance global development and local exploration.
[0190] Multi-scale differential mutation position update: In the original slime mold algorithm, there are several shortcomings in position update: random initialization is too radical, and the position directly reinitializes the entire solution space, which easily causes individuals to deviate from the current search direction, affecting the current convergence process and being inefficient; local updates are not fine enough, and small-scale perturbations are made using normal distribution random numbers. Such local updates lack pertinence, and the update direction is completely random, resulting in insufficient local development capabilities; lack of adaptability, no dynamic weight adjustment, and the inability to adjust the balance between exploration and development according to the current iteration progress. The entire position update process lacks pertinence, and may be updated in the same way at different stages, and adaptive crossover. The present invention combines multi-scale differential mutation and crossover with the position update method of the slime mold algorithm. First, three different individuals x1, x2, and x3 are randomly selected in each iteration, and a variant individual is generated based on these three individuals, and then a test individual is generated through a crossover operation.
[0191] Differential mutation: If the random number is less than the set value, differential mutation is selected, and the differential evolution strategy is selected according to the current iteration progress. If the current iteration ratio If it is less than the mutation threshold mt, the Crand mutation strategy is selected:
[0192] mut=x i +F·(x2-x3)
[0193] Otherwise, choose the Cbest mutation strategy:
[0194] mut=x1+F·(P b -x1)+F·(x2-x3)
[0195] Where: x i is the position vector of the current individual; F is the scaling factor, which usually takes a value between [0,1] and is used to control the amplitude of variation; x2 and x3 are the other two randomly selected individual vectors; P b is the position vector of the best individual in the current population.
[0196] Crossover operation: Generate a random vector cp, and use the crossover probability CR to determine which dimension values are inherited from the mutant individual to generate a new test individual tr:
[0197]
[0198] Where: tr j is the value of the test individual in the jth dimension; mut j is the value of the variant individual in the jth dimension; x i,j dimension is the value of the current individual in the jth dimension; CR is the crossover probability, which is set to 0.9 here.
[0199] Position update: If the random number is greater than the set value, the SMA dynamic weight update method is selected to adjust the position. The tanh function is used to calculate the dynamic weight p of the current iteration. The formula is as follows:
[0200] p = tanh(|f(x i ) - f(xb)|), where f(x i ) and f(xb) are the fitness values of the current individual and the optimal individual respectively. At the same time, two random vectors vb and vc are generated for dynamically adjusting the individual position.
[0201] For each dimension j, a random probability r is generated and compared with the dynamic weight p to determine the update method.
[0202] If r < p, the vb vector is used for dynamic update:
[0203] x i,j = xb j + vb j · w dm · (x A,j - x B,j )
[0204] where xb j is the value of the current optimal individual in the j-th dimension; x A,j and x B,j are the values of two randomly selected different individuals in the j-th dimension; w dm is the non-linear decreasing weight mentioned above.
[0205] Otherwise, x i,j = vc j · x i,j .
[0206] In summary, the improved slime mold position update formula can be summarized as:
[0207]
[0208] where: z is the preset switching probability threshold; r is the random number of the current dimension, used to compare the weight p; w dm is the non-linear decreasing weight above.
[0209] Non-dominated sorting and k-nearest neighbor crowding distance calculation: To help the slime mold algorithm find solutions closer to the Pareto optimal front in multi-objective optimization, while maintaining the diversity of the solution set, and enabling the solution set to evenly cover the Pareto front region.
[0210] Non-dominated sorting: The purpose of introducing non-dominated sorting is to help the slime mold algorithm select which solutions to use as the Pareto frontier in multi-objective optimization. In each round of iteration, low-level frontier individuals are retained first because these individuals perform better in multiple objectives and can gradually approach the Pareto frontier. At the same time, non-dominated sorting can also improve the quality of solutions. Most of the solutions that are retained first are non-dominated solutions and high-quality solutions. Through non-dominated sorting, the algorithm will give priority to retaining individuals with lower frontiers, gradually optimize the quality of the solution set, and finally converge to the Pareto optimal frontier.
[0211] Non-dominated degree calculation: For each individual P i , define S i is the dominating set, that is, i The set of dominated individuals is given by:
[0212] S i = {P j |P i <P j}
[0213] Where 1(P j |P j <P i ) is the indicator function, when P j <P i The value is 1 when n is equal to 1, otherwise it is 0. The non-dominated sort is completed recursively, and all non-dominated individuals (i.e. n i = 0) are placed in the first frontier (Front1), and then they are subtracted from the non-dominated degrees of other individuals to form the next frontier (Front2). This process is repeated until all individuals are assigned to the frontier. After each individual is assigned to the frontier, its dominance is subtracted from the subsequent calculation. Let F1, F2, ..., F k Represents different frontier sets, and the formula is:
[0214] Initial condition: F1 = {P i |n i =0}
[0215] The recursive formula is:
[0216] k-nearest neighbor crowding calculation: In the same non-dominated frontier, some individuals have small differences. To avoid the concentrated distribution of the solution set on the frontier, crowding calculation is used to select, giving priority to individuals with larger crowding to maintain the diversity of solutions. Increase the coverage of the search space. Most solutions with large crowding are in sparse positions in the space. Retaining these solutions helps to explore a wider Pareto frontier. At the same time, while approaching the Pareto frontier, it ensures the uniform distribution of the population on the frontier. k-nearest neighbor crowding calculation, for the sorted middle individual, calculate its distance to the kth nearest neighbor individual, set P i is an individual in the frontier, and its crowding degree is calculated as:
[0217] The kth preceding neighbor: P (i-k)
[0218] The kth next neighbor: P (i+k)
[0219]
[0220] in and The objective function f k The maximum and minimum values of are used to normalize the distance, the crowding is totaled, and for each individual, the sum of the crowding distances of all objective functions is calculated:
[0221]
[0222] where d k (P i ) is the crowding contribution of the kth objective function. Through non-dominated sorting and k nearest neighbor crowding calculation, the solutions are distributed more evenly and comprehensively on the Pareto frontier. However, if non-dominated sorting and crowding calculation are not used, the distribution of solutions is uneven and the convergence is poor. For example, Figure 3 As shown in the figure, it can be found that non-dominated sorting and k-nearest neighbor crowding calculation make the solution cover the lower area of the target space better and closer to the Pareto frontier.
[0223] Pareto solution set collection: To obtain a more comprehensive and high-quality Pareto solution set, the Pareto solution sets of different experimental rounds can be collected by running the algorithm multiple times. In each run, the algorithm generates a set of Pareto solutions, which represent the best trade-offs between different objectives. The Pareto solution set obtained from each run is gradually added to the overall Pareto preface to aggregate the optimal solutions of all experimental rounds. To ensure the accuracy and diversity of the final result, the solution sets are deduplicated when merging the solution sets to remove duplicate solutions. The final Pareto solution set covers the best compromise solutions for multiple objective optimizations while retaining the diversity and coverage of the solutions, so that the final generated solution set can better meet the needs of multi-objective optimization. Multiple iterative optimizations help improve the quality and comprehensiveness of the solution set.
[0224] like Figure 4 As shown in Figure 1, the non-dominated solution distribution of the AMS-SMA algorithm on the MK01 example shows that the solutions are mainly concentrated in the areas of lower machine energy consumption and smaller completion time, showing stronger optimization performance. The SSA algorithm in Figure (b) has a wide coverage of non-dominated solutions on the same example, but is slightly scattered in completion time and has relatively poor stability.
[0225] Algorithm flow: Through the above improvement measures, LHS initialization of the population is realized, making the distribution of population samples more uniform, and retaining the best solution for each iteration through non-dominated sorting of the population and calculation of the k-nearest neighbor crowding distance. At the same time, dynamic weights and multi-scale differential mutation strategies are introduced to improve the position update formula of the original slime mold algorithm. The following is the pseudo code and flowchart of the algorithm.
[0226] Table 2 AMS-SMA algorithm pseudo code
[0227]
[0228]
[0229] 5. Experimental simulation results
[0230] The proposed AMS-SMA algorithm is implemented using Matlab-R2021b programming. In order to verify the effectiveness of the improved algorithm in solving the multi-objective flexible shop scheduling problem, the KACEM benchmark examples (Kacem1-Kacem5) are selected for simulation experiments, where Cmax represents the maximum completion time, CT represents resource consumption, and EC represents machine energy consumption. The two evaluation indicators (Inverted Generational Distance, IGD) and (Hypervolume, HV) are used to compare the approximation, coverage and diversity of the algorithm solution set.
[0231]
[0232] The results are compared in the following table:
[0233] Table 3 Comparison of algorithm performance test function results
[0234]
[0235] Table 4 Comparison of multi-objective optimization performance of algorithms for solving Kacem example
[0236]
[0237]
[0238] Through comparative tests, as shown in the table, it can be found that the AMS-SMA algorithm performs better in solving multi-objective flexible workshop scheduling problems, among which the IGD and HV evaluation indicators are relatively good, indicating that the solution set of AMS-SMA is closest to the Pareto frontier in these examples, and the diversity and coverage of the solution are good, while the SSA algorithm has a good HV value on some examples (Kacem2\Kacem4), but the IGD value is too large, the solution set distribution is not ideal, and the stability is poor. Here, the Gantt charts of the process sorting and machine allocation of the examples Kacem2 and Kacem5 are listed. Combined with the charts, it can be found that AMS-SMA not only performs better in the maximum completion time, but also reduces machine energy consumption and resource consumption on the basis of reducing the maximum completion time.
[0239] When solving the multi-objective flexible workshop scheduling problem, the present invention combines dynamic weight adjustment, differential mutation and crossover operation with the slime mold algorithm, so that the optimization process can quickly approach the Pareto frontier, and the global search and local search are balanced, while the diversity is also maintained. The algorithm has strong adaptability, dynamic parameter adjustment and weight nonlinear update, which improves the robustness and applicability of the algorithm.
[0240] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the above implementation is only to illustrate the technical concept and features of the present invention, and its purpose is to enable people familiar with this technology to understand the content of the present invention and implement it, and it cannot be used to limit the protection scope of the present invention. All equivalent changes or modifications made according to the spirit of the present invention should be included in the protection scope of the present invention.
Claims
1. A multi-objective flexible workshop adaptive scheduling method, characterized by: The following steps are involved: S1. Determine multiple objectives of flexible workshop scheduling and set the objective function. The first main goal is the shortest completion time. The objective function is as follows: f1=minC max =min{max(C i )},i=1,2,...,n in: C i Is workpiece J i The completion time, i is the workpiece number, n is the total number of workpieces, The second main goal: minimum machine energy consumption, the objective function is as follows: in: EC is the energy consumption of the machine, z is the machine serial number, X ijz It is process O ij Processing status on machine z, O ij Is workpiece J i The jth process of E z is the energy consumption per unit time when machine z is working, T ijz It is process O ij Working time on machine z, U z is the energy consumption per unit time when machine z is idle, P i Is workpiece J i The number of processes, m is the total number of machines, The third main goal: minimum resource consumption, the objective function is as follows: CT is resource consumption. C z is the resource consumption per unit working time of the zth machine, The second step is to determine the constraints. The constraints are as follows: S ij M ijh +F(1-H ijvwh )≥E vw M vwh E ij -T ijh M ijh ≥S ij C i ≤C max (S ij +T ijh )H ijvwh ≤S vw S ij ≥0,E ij ≥0,T ijh ≥0 in: S ij It is process O ij The start time of processing, F is a sufficiently large positive number, M ijh Process O ij If it is processed on machine h, the value is 1, otherwise it is 0. H ijvwh Process O ij Before O vw If machine h is processing, it is 1, otherwise it is 0. vw Is workpiece J v The wth process The third step is to use the slime mold meta-heuristic algorithm to optimize the target and initialize the parameters. In the initial stage, the initial population position of random positions is generated by the initialization function, distributed in the definition domain [lb, ub], and then the fitness value of each individual is calculated. The position of the initial population is randomly diffused, which simulates the slime mold spreading in space during the search process to ensure global search; In each round of iteration, the algorithm calculates the weight W of the individual and simulates the slime mold gradually approaching the food by dynamically adjusting the parameters a and b. For the individuals in the first half, higher weights are given according to the individuals with higher fitness; for the individuals in the second half, lower weights are given to ensure a certain amount of exploration space. The update rule uses different random factors to randomly initialize the individual positions with uniform distribution, and also introduces normal distribution to adjust the existing individual positions. in: r is a random number in [0,1]; F b and F w Indicates the best and worst fitness values in the current iteration; SmellIndex represents the position index after the individual fitness values are arranged in ascending order; N / 2 represents the first half of the population; After each update, the algorithm recalculates the fitness values of all individuals and sorts them, sets the individual with the best fitness as the current global optimal individual, and records the optimal fitness value. The algorithm updates the inertia factor a through a nonlinear function: a=arctanh(1-(t / t max )) As the number of iterations increases, the inertia factor gradually decreases, and individuals gradually gather toward the current optimal position, simulating the slime mold to surround the optimal food after finding it; Initialize the independent variable dimension, the number of objective functions, the upper and lower bounds of the independent variables, the population size and number of iterations of the slime mold algorithm, and set the dynamic scaling factor and crossover probability of differential mutation; The fourth step is to use stratified Latin hypercube sampling to initialize the slime mold population to ensure that the sample individuals are evenly distributed in the multidimensional search space. Initialize an all-zero matrix to store the generated population individuals. The size of the matrix is the population size × the variable dimension. Randomly generate a random value within the selected stratum to ensure that the sampling points are not concentrated in a specific area, so that the population distribution is more uniform. The fifth step is to perform non-dominated sorting and k-nearest neighbor crowding calculation to achieve the screening of the Pareto front. Through non-dominated sorting and k-nearest neighbor crowding calculation, a set of solutions that perform well under multiple objective functions is found. Through non-dominated sorting, we can select which solutions to use as the Pareto frontier in multi-objective optimization and find a set of solutions that do not dominate each other. By calculating the crowding degree, we can measure the distribution of individuals in the population in the solution space, maintain the diversity of the population within the same non-dominated level, and avoid over-concentration. The sixth step is to use dynamic weights to control the update amplitude of the current solution, and use a combination of sigmoid function and tanh function for dynamic update. The weight w is dynamically adjusted by nonlinear attenuation. As the number of iterations increases, the weight gradually decreases. The following is the dynamic weight update formula. The formula uses the square term to gradually decay the weight in the later stages of iterations, so that the algorithm focuses more on development capabilities and reduces exploration capabilities in the later stages: Where: w max and w min is the maximum and minimum value of the weight, Itera is the current iteration number, Max_Itera is the maximum number of iterations; The specific steps for dynamic update are as follows: A1. Use the sigmoid function to adjust the weight change trend. Combined with the difference between the current number of iterations and the maximum number of iterations, the weight changes in the early and late stages are different. The formula is as follows: in: is the midpoint of the iteration number, exp is the natural exponential function; A2. Use the tanh function to perform nonlinear scaling on the weights. As the number of iterations increases, the weights gradually approach 1. The formula is: The tanh function ranges from [-1,1], and tanh(x) approaches 1 when x>0. As the number of iterations increases, the weight changes less. A3. Update the comprehensive weight: where f i is the fitness of the ith individual, S=F b -F w +ε (ε is introduced to prevent the denominator from being 0), F b and F w are the current optimal and worst fitness respectively; Step 7: Update the position and store the updated solution through differential mutation and crossover. The best individual and two other random individuals are mutated, and the current individual is mutated according to two other randomly selected individuals. After mutation, a crossover operation is performed, in which the mutated individuals are mixed with the original individuals according to probability. The crossover rate decreases as the iteration proceeds. The individuals after crossover mutation are checked for boundaries to ensure that they are within the defined range. The specific formula is as follows: (1) Differential variation formula: Current_Best mutation strategy: mut=x1+F·(P b -x1)+F·(x2-x3) Current_Rand mutation strategy: mut=pop(i,:)+F·(x2-x3) (2) Crossover operation formula: (3) SMA dynamic weight update formula: When the conditions are met, the position update formula is: When the conditions are not met, the position update formula is: (4) Dynamic weight in SMA: p = tanh(f i -f b ) Step 8: Repeat steps 5 to 7 to update the solution until the maximum number of iterations is reached. After each iteration, the population is combined with the newly generated individuals and the non-dominated sorting is performed again to maintain a diverse set of Pareto optimal solutions. The average, minimum, and maximum values are recorded during each iteration. Step 9, final output, Return the overall Pareto solution and extract the unique Pareto optimal solution; After all iterations, the algorithm selects the best non-dominated solution from the final population and records the fitness value and the corresponding machine ranking.
2. The multi-objective flexible workshop adaptive scheduling method according to claim 1, characterized in that: The specific steps for initializing the slime mold population using stratified Latin hypercube sampling include: B1. Perform hierarchical division. In each dimension, the range [0,1] is evenly divided into strata sub-intervals. The i-th dimension is divided into strata sub-intervals, and its boundaries are defined by the following formula: Here S k is the range of the kth subinterval B2. Randomly select a layer and generate a random point. For each dimension i and sample j, randomly select a layer k. strata_idx , that is, select a subinterval S k , and then generate random points in this subinterval: where r∈[0,1] is a random number uniformly distributed in each subinterval, and k∈[0,strata-1] is a random integer corresponding to the selected stratum number; B3. Perform stratified sampling on all dimensions and samples. For samples j = 1, 2, ..., samples (population size), dimensions i = 1, 2, ..., dim (variable dimension), generate a random sampling matrix through the previous process: X=[X j,i ],j=1,2,...,samples\i=1,2,...,dim Where X j,i is a random sampling point distributed in the i-th dimension and belonging to the j-th sample. B4. The formula for determining stratified Latin hypercube sampling is: where r j,i is a random number uniformly distributed in [0,1], k j,i ∈{0,1,2,...,strata-1} is the randomly selected stratum number that ultimately generates the random sampling matrix.
3. The multi-objective flexible workshop adaptive scheduling method according to claim 1, characterized in that: The specific steps for non-dominated sorting are: For each individual P i , define S i is the dominating set, that is, i The set of individuals that dominate The formula is: S i ={P j P i <P j } Where 1(P j |P j <P i ) is an indicator function, which takes the value of 1 when Pj<Pi, and 0 otherwise. Perform recursive operations and convert all non-dominated individuals (i.e. n i = 0) are placed in the first frontier (Front1), and then they are subtracted from the non-dominated degrees of other individuals to form the next frontier (Front2). This process is repeated until all individuals are assigned to the frontier. After each individual is assigned to a frontier, its non-dominated degree will be subtracted from the subsequent calculation. Let F1, F2, ..., F k Represents different frontier sets, and the formula is: Initial condition: F1 = {P i |n i =0} The recursive formula is:
4. The multi-objective flexible workshop adaptive scheduling method according to claim 1, characterized in that: The specific steps for calculating congestion are: C1. Crowding calculation: k nearest neighbor distance calculation. For the sorted middle individual, calculate its distance with the kth nearest neighbor individual. Let P (i) is an individual in the frontier, and its crowding degree is calculated as: The kth preceding neighbor: P (i-k) The kth next neighbor: P (i+k) The congestion calculation formula is: in and The objective function f k The maximum and minimum values of are used to normalize the distance. C2. Total crowding: For each individual, calculate the sum of the crowding distances of all objective functions: where d k (P i ) is the crowding contribution of the kth objective function.
Citation Information
Patent Citations
Scheduling method and system for solving flexible workshop by using improved myxobacteria algorithm
CN118642439A
Cited By
Thermal power plant multi-target economic dispatch optimization method, equipment, medium and product
CN120258488A
Method for automatically optimizing continuous intelligent microreactor platform
CN120493571A
Workshop production scheduling control method
CN120630916A
Intelligent cooperative control method for boxing production line based on multi-station linkage
CN122284553A
Intelligent collaborative control method for box packing and case packing production line based on multi-station linkage
CN122284553B