A flexible workshop scheduling method based on SSA

By improving the squirrel foraging algorithm, combining orthogonal design variation and power-law distribution sliding coefficient adaptive method, the problems of local optimal solutions and premature convergence in workshop flexible scheduling are solved, and a more efficient production scheduling solution is achieved.

CN113919745BActive Publication Date: 2024-11-01NANJING TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111296682.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-04
Publication Date
2024-11-01
Estimated Expiration
2041-11-04

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively solve the local optimal solution and early maturity convergence problems in large-scale production scheduling problems, especially in the field of workshop flexible scheduling. Traditional methods such as mathematical planning and heuristic methods increase in computational complexity when scale is expanded or cannot be achieved. Ensure the global optimal solution.

Method used

The squirrel foraging algorithm (SSA) is used to continuously process the workshop flexible scheduling problem, and the diversity and search efficiency of populations are enhanced by introducing orthogonal design variation (ODV) and power law distribution sliding coefficient (Gc) adaptive methods. Overcome premature agglomeration and local optimal problems.

Benefits of technology

It realizes more efficient solution to workshop scheduling problems under larger-scale problems, improves solution speed and accuracy, avoids the trap of local optimal solutions, and improves the efficiency of production scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113919745B_ABST
    Figure CN113919745B_ABST
Patent Text Reader

Abstract

A workshop flexible scheduling method based on SSA, comprising the following steps: 1) making the discrete workshop scheduling problem continuous; 2) using SSA to solve the workshop scheduling problem; 3) improving the SSA in step 2), using ODV to increase the diversity of the population, and introducing power-law distribution to adjust the search space. The present invention makes the discrete workshop scheduling problem continuous, so that the workshop scheduling problem can be solved using SSA. The present invention also improves the traditional SSA, overcoming the problem that SSA is prone to fall into local optimal solutions and has a slow convergence speed in the later stage when solving larger-scale problems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The technical solution belongs to the field of computer application technology, and specifically is a workshop flexible scheduling method based on SSA. Background Art

[0002] With the development of industrial technology and information industry, people are increasingly aware of the importance of improving production efficiency. How to improve the utilization rate of each equipment in the production process and fully release the potential of production equipment, thereby improving overall production efficiency and improving economic benefits, has become the focus of major companies.

[0003] The quality of production scheduling directly determines the level of production efficiency. The research on production scheduling mainly focuses on the allocation and use of enterprise production resources. Generally speaking, different types of production orders require different production equipment and other resources. Therefore, different production scheduling plans need to be formulated according to different production orders.

[0004] One of the main functions of the MES system (Manufacturing Execution System) is to formulate different production scheduling plans for different production orders. In the field of manufacturing, the upper layer of MES is the ERP (Enterprise Resource Planning) system, and the lower layer is the PCS (Process Control System). MES formulates production scheduling plans based on the production order information issued by ERP, and then transmits the production scheduling plans to PCS for execution of the scheduling plans. There are many evaluation indicators for production scheduling plans, such as completion time, equipment utilization, simultaneous assembly degree, weighted delay time, etc. Different companies have different choices for production scheduling evaluation indicators, but most companies pay more attention to order completion time. Therefore, minimizing the maximum completion time of the scheduling plan is an issue worthy of in-depth study.

[0005] With the development of industrial technology, the research on scheduling problems has evolved from simple single-machine scheduling to assembly line scheduling, and then to complex workshop flexible scheduling. Studies have shown that assembly line scheduling with more than three machines is an NP (NP-hard) problem. Directly solving its optimal solution has an unacceptable time cost for production scheduling. Therefore, in the field of production scheduling, the following three types of solution methods have been generated:

[0006] The first category is the traditional mathematical programming method, which can find the optimal solution. However, as the scale of the problem increases, the complexity of the calculation increases exponentially, and the mathematical programming method has strict mathematical constraints, such as differentiable and continuous constraints. Therefore, this method is only suitable for small-scale problems and some areas where mathematical constraints meet the conditions.

[0007] The second type is the heuristic method, which is based on experience or judgment and arranges all workpieces to be processed according to pre-established rules. Common rules include SPT, LPT, EDD, FIFO, etc. However, this method requires professional experience and judgment in the production field, cannot be applied to all production fields, and cannot guarantee the global optimal solution to the problem.

[0008] The third category is meta-heuristic methods, which combine random algorithms with local search and include a variety of swarm intelligence optimization algorithms. As one of the latest swarm intelligence optimization algorithms, the Squirrel search algorithm (SSA) has the characteristics of high solution accuracy, strong stability, and applicability to large-scale problems. However, like many intelligent optimization algorithms, the SSA algorithm still has problems such as premature convergence, local optimality, and slow convergence in the late stage. Summary of the invention

[0009] In order to solve the above technical problems, the present invention applies a swarm intelligence optimization algorithm to solve large-scale production scheduling problems.

[0010] The present invention firstly makes the discrete workshop scheduling problem continuous; then uses the squirrel foraging algorithm SSA to solve the flexible workshop scheduling problem. Furthermore, the present invention also improves the traditional SSA, uses ODV to increase the diversity of the population, and introduces the power law distribution to adjust the search space. The method of the present invention can be applied to the MES system.

[0011] The present invention is specifically a flexible workshop scheduling method based on SSA, wherein the flexible workshop scheduling means: there are i workpieces and m machines, each workpiece has multiple processes, each process will be arranged to be produced on 1 to m machines, and the production time is different, and the scheduling method is based on the workshop scheduling sequence under the optimization target, and the steps include: 1) serializing the discrete workshop scheduling problem; 2) using SSA to solve the workshop scheduling problem;

[0012] In step 1), the workshop scheduling problem is dimensionalized

[0013] The solution to the workshop scheduling problem is essentially to find the scheduling sequence under the optimization objective;

[0014] According to the scheduling rules, in the workpiece production information table, there are M m Column, O ij Line; M m represents the mth machine, O ij represents the jth process of workpiece i; the table data at the intersection of the rows and columns of the table indicates that the jth process of workpiece i is performed by machine M m Processing time, or machine M mThe processing of this process cannot be completed; when processing each workpiece, the next process can only be processed after the previous process is completed, and each machine can only process one process at a time;

[0015] Then, a dual-segment coding method is used to represent a scheduling sequence; in the dual-segment coding scheduling sequence, the first half represents the machine sequence, i.e., the machine sequence code segment, and the second half represents the process sequence, i.e., the process sequence code segment;

[0016] The lengths of the machine sequence and the process sequence are equal, which are the total number of processes for all workpieces. In the machine sequence, from left to right, the corresponding processes of the workpieces are represented. ij Production on the mth available machine; in the process sequence, the jth occurrence of i represents the jth process O of workpiece i ij ;

[0017] In the step 2), the double-segment coding scheduling sequence is converted into the position of the individuals in the population of the squirrel foraging algorithm SSA:

[0018] In the squirrel foraging algorithm SSA, the position of each individual in the d-dimensional space is represented by a d-dimensional vector. Then, each position of the double-segment coding scheduling sequence corresponds to each dimension of the d-dimensional space, and the conversion of the position and the coding sequence is realized under the constraints of the scheduling rules. The conversion method is:

[0019] The lower bound of the m-th dimension of the individuals in the population in the d-dimensional space is expressed as lb m , the upper bound is denoted as ub m In the scheduling sequence, each code of the machine sequence code segment corresponds to a process, and the maximum number of available machines num for this process max That is, the code is converted into the corresponding ub of the d-dimensional space individual m , the minimum number of available machines num min lb m , after conversion to d-dimensional space, the relative order of machine codes does not change.

[0020] In the conversion of process sequence code segments, the following rules are followed: if the positions of individuals in the d-dimensional space are different, the sequence of the corresponding process sequence code segments will also be different. The relative processing order of the same process before and after the conversion remains unchanged. Therefore, the positions corresponding to the process sequence code segments in the d-dimensional space are sorted according to the numerical values, and the index values ​​of their original positions are recorded. Workpieces and processes are allocated according to the size of the index values.

[0021] Calculation of fitness:

[0022] In d-dimensional space, the fitness of an individual is related to the position in each dimension; therefore, when an individual represents a process sequence, its fitness is the optimization objective of the scheduling problem; when minimizing the maximum completion time is selected as the optimization objective, the fitness of an individual represents the maximum completion time of the process sequence, then the fitness of an individual in the population is the completion time of the last process of the last workpiece in a process sequence.

[0023] Improvement 1: The method for improving the squirrel foraging algorithm SSA is as follows: designing an orthogonal design variation ODV and embedding it into the population iteration process of the squirrel foraging algorithm SSA to enhance the robustness of the entire population and the robustness of SSA;

[0024] In the orthogonal design variation ODV, subgroups M1 and M2 are set, each containing s individuals, and randomly selected from non-high-quality individuals; M1 is used to generate better individuals and replace M2 to enter the next population iteration, that is, in ODV, inferior individuals will be eliminated;

[0025] Since M1 and M2 are obtained randomly, all non-high-quality individuals except high-quality individuals can be used to generate new individuals through ODV;

[0026] In the d-dimensional space, for all individuals in M1, a high-quality individual is randomly selected and an orthogonal table L is established with the individuals in M1. M (2 d ), that is, each individual in M1 is matched with the high-quality individuals according to the orthogonal table L M (2 d ) to perform orthogonal mutation, find the best value of each dimension of the individual, and form a new individual; replace the individuals in M2 with the new individuals. For the orthogonal mutation process of scale s, a total of s*M orthogonal experiments are performed;

[0027] The individuals of the original population are replaced by the M2 subgroup that has undergone orthogonal design variation ODV to participate in the next iteration.

[0028] Improvement 2: The method for improving the squirrel foraging algorithm SSA is to design a sliding coefficient G based on the power law distribution. c Adaptive method, sliding coefficient G in the squirrel foraging algorithm SSA c Automatically adjust global and local search during iteration;

[0029] When the population iteration just starts, the optimal solution is explored in the global scope, that is, the search range of the population iteration at the beginning fluctuates greatly with the increase of the number of iterations, so as to ensure that there is a solution search behavior in each space segment, so as to quickly search the entire solution space with a small number of iterations; then focus on a certain space to search for the optimal solution; so that the sliding coefficient G cThe value of follows the Pareto distribution as the number of iterations increases, ensuring that 20% of the iterations shrink to the local space containing the optimal solution during the global search, and 80% of the iterations search for the optimal solution in a relatively certain space, thereby overcoming the problem that SSA is prone to fall into the local optimal solution.

[0030] Specifically, in step 2), the method for obtaining the completion time according to the process sequence is: assuming that the starting processing time of a process on a certain machine is start, the processing time is span, and the processing end time is end, then when the process sequence is inserted into the production queue one by one:

[0031] If the process has not been processed on the corresponding machine and this process is the first process of the workpiece, then insert this process into the machine, start = 0, end = span;

[0032] If the corresponding machine has not processed the process and the process is not the first process, then obtain the end time last_end of the previous process of the workpiece, and set start = last_end, end = last_end + span;

[0033] If the process has been processed on the corresponding machine, then find an idle segment that meets the conditions on the machine. The conditions are: the length of the idle segment is not less than the production time of the process on the machine; when the process is not the first process, the start time of the idle segment is not less than the end time of the previous process of the workpiece corresponding to the process.

[0034] The present invention makes the discrete workshop scheduling problem continuous, so that the workshop scheduling problem can be solved by using SSA. The present invention also improves the traditional SSA, overcoming the problem that SSA is prone to fall into the local optimal solution and has a slow convergence speed in the later stage when solving large-scale problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 Schematic diagram of the aerodynamic model of position shifting;

[0036] Figure 2 Schematic diagram of dual-segment coding scheduling sequence;

[0037] Figure 3 A schematic diagram of a process that has not been processed by a machine and a process is the first process of the corresponding workpiece;

[0038] Figure 4 A schematic diagram of a process that has not been processed by a machine and a process is not the first process of the corresponding workpiece;

[0039] Figure 5 A certain machine has processed the process diagram;

[0040] Figure 6 Schematic diagram of Pareto distribution and Gaussian distribution;

[0041] Figure 7 Improved SSA flow chart for solving flexible shop scheduling problem;

[0042] Figure 8a It is the Gantt chart of the particle swarm algorithm solution result;

[0043] Figure 8b It is the improved Gantt chart of SSA solution results. DETAILED DESCRIPTION

[0044] The present invention is further described below in conjunction with specific embodiments:

[0045] 1. Introduction to traditional SSA:

[0046] SSA is a type of swarm intelligence optimization algorithm that imitates the foraging behavior of a group of flying squirrels to find the optimal solution in the solution space.

[0047] Flying squirrels have the following characteristics: In non-winter seasons, due to the high temperature, they use abundant acorns as food and store fruits with higher nutritional value, such as pecans; in winter, due to the sudden drop in temperature and the high nutritional demand, squirrels will directly use the fruits on pecan trees or the pecans stored in caves as food. This dynamic foraging strategy of squirrels is the principle basis of SSA. In warm seasons, squirrels move between ordinary trees, oak trees and pecan trees by "gliding" to find different fruits. In winter, due to the large amount of fallen leaves in the forest, the probability of squirrels being captured by natural enemies increases, and squirrels reduce their activities and focus on stored food. Based on the above process, the following assumptions are made and the mathematical model of SSA is established.

[0048] 1. There is only one squirrel in a tree;

[0049] 2. There are hickory trees with high nutritional value, oak trees with average nutritional value, and ordinary trees with no nutritional value within the squirrel's range;

[0050] 3. Among the three types of trees, the proportions of hickory trees, oak trees, and common trees increase in order.

[0051] 1.1 Random Initialization

[0052] Use a d-dimensional vector to represent the location of each squirrel. Let Pop_num be the population size. Then the population can be represented by (1):

[0053]

[0054] Where n = Pop_num, FS i,jRepresents the position of the i-th individual in the population in the j-th dimension. Initializing the population means initializing each dimension of each individual. The assignment method is as follows (2):

[0055] FS i =FS l +random(0,1)*(FS u -FS l ) (2)

[0056] Among them FS i Represents the d-dimensional vector consisting of the position of the i-th individual in each dimension, FS l Represents the vector of the lower bound of the individual at each latitude. Similarly, FS u Represents the vector consisting of the upper bounds of each dimension. Random(0,1) represents a random number between 0 and 1.

[0057] 1.2 Fitness calculation

[0058] According to the position of each individual in each dimension, the fitness of the individual is comprehensively evaluated in combination with specific problems, such as variance, sum of squares, etc. The fitness of the population is expressed as (3):

[0059]

[0060] 1.3 Population distribution

[0061] The fitness of the individuals was ranked and the population was allocated to hickory, oak, and common trees in order of fitness from best to worst.

[0062] 1.4 Aerodynamic model of position movement

[0063] Squirrels move by "gliding". Figure 1 As shown in the figure, the resultant force R of lift L and drag D is equal to the gravity of the squirrel itself, but opposite in direction. Under the condition that the two forces R and G are balanced, the squirrel glides at a certain angle to the horizontal direction. The aerodynamic model of its gliding process is as follows Figure 1 .

[0064] Depend on Figure 1 It can be seen that:

[0065]

[0066] The squirrel changes the angle of gliding by changing the magnitude of lift and drag, thereby changing the gliding distance. The calculation formulas for L and D are shown in (5) and (6).

[0067]

[0068]

[0069] When air hits the squirrel membrane, it deflects downward, and the resulting reverse thrust is lift. In the calculation formula of lift and drag, ρ (1.204kg / m 3 ) is the air density, C L and C D are lift coefficient and drag coefficient respectively, V is the gliding speed (5.25m / s), S (0.0154m 2 ) is the surface area of ​​the membrane.

[0070] Depend on Figure 1 It can be seen that the calculation formula for the squirrel's sliding distance is (7).

[0071]

[0072] From actual measurements, we can get h g =8m, C L Between 0.675 and 1.5, C D =0.6. The sliding distances calculated by the above model are all between 9 and 20 m, but the excessively large d g The value will cause a large disturbance to the result, so consider introducing the parameter sf to d g For example, when sf = 18, d g The value of falls in the smaller interval [0.5,1.11].

[0073] 1.5 Location Update

[0074] Squirrels often face natural enemies in the woods. When natural enemies appear, squirrels no longer forage for food, but wander randomly. On the contrary, when there are no natural enemies, squirrels adopt different foraging strategies according to the season. In addition, in mild seasons, squirrels carry out activities in a larger range, while in winter, squirrels mainly focus on stored food and have a smaller range of activities. In mild seasons, when squirrels on different types of trees slide to other types of trees, their position update formula is as follows (8):

[0075]

[0076] This formula represents how a squirrel in an oak tree updates its position as it glides to a hickory tree.

[0077] In the formula, represents the location of the squirrel in the pecan tree, Represents the squirrel in the oak tree. 1 is a random number between 0 and 1, P dp is the probability of natural enemies appearing, d g is the sliding distance, t represents the current iteration, G cis the sliding coefficient, which is used to balance the global search and local search.

[0078] If R 1 >P dp , which means that there are no natural enemies, and the squirrels on the oak tree move to the hickory tree; otherwise, it means that there are natural enemies, and the squirrels on the oak tree only move randomly in a small range to avoid natural enemies.

[0079] Similarly, formula (9) gives the position update formula when a squirrel on an ordinary tree moves to an oak tree.

[0080]

[0081] Where R 2 is a random number between 0 and 1, Represents a common tree squirrel.

[0082] In addition, some squirrels in ordinary trees may have eaten acorns and slide directly to the hickory tree. Their position update formula is as follows (10):

[0083]

[0084] R 3 A random number between 0 and 1.

[0085] In winter, due to the low temperature, squirrels mainly eat walnuts with high energy stored in mild seasons. In addition, the leaves fall, increasing the probability of being captured by natural enemies, so they can only move in a small range. Therefore, the position update formula in winter is as follows (11):

[0086]

[0087] Among them, FS l Represents the d-dimensional vector consisting of the lower bound of the squirrel's position in each dimension. Similarly, FS u Represents the d-dimensional vector of the upper bound. Levy represents Levy flight, which is a random walk whose step length conforms to the Levy distribution (heavy-tailed distribution). The Levy distribution is a probability distribution that conforms to the laws of motion in nature better than Brownian motion. The motion trajectories of many organisms obey the Levy distribution. (12) gives a method for calculating the random step length that conforms to the Levy distribution.

[0088]

[0089] Among them, τ(x)=(x-1)!, r a and r b are all random numbers between 0 and 1, β=1.5.

[0090] During population iteration, (13) and (14) are used to determine whether winter has arrived:

[0091]

[0092]

[0093] S min represents the seasonal judgment threshold, represents the seasonality judgment index of the current iteration, d represents the dimension, and t m Represents the maximum number of iterations. When , it means winter has arrived, and the squirrel's position is updated according to the Levy flight method.

[0094] 2. Improve SSA and solve the problem of flexible shop scheduling

[0095] In the field of industrial production, the workshop scheduling problem has been proven to be an NP-hard problem. When the scale is large, swarm intelligence optimization algorithm can be used to solve the above problem.

[0096] The flexible workshop scheduling problem refers to: there are n workpieces and m machines. Each workpiece has multiple processes. Each process can be arranged on 1-m machines for production, and the production time is different. Find the workshop scheduling sequence under the optimization goal. Among them, common optimization goals are: minimizing the maximum completion time, minimizing the total completion time, minimizing the early / delay penalty, minimizing the equipment idle time, etc. From the above, we can know that SSA can be used to solve continuous problems, while the workshop scheduling problem is a discrete problem. Therefore, it is necessary to serialize the discrete workshop scheduling problem or discretize the continuous problem, and then use SSA to solve the workshop scheduling problem.

[0097] 2.1 Dimensionalization of the Workshop Scheduling Problem

[0098] The solution to the workshop scheduling problem is essentially to find the scheduling sequence under the optimization goal. The following uses 3 workpieces and 8 machines as an example to illustrate the representation of the scheduling sequence, where the workpiece production information is as follows:

[0099] Table 1 Workpiece production information

[0100]

[0101] Among them, O ij represents the jth process of workpiece i, M mrepresents the mth machine, and the table data represents the production time of the process on the machine. 9999 means that the machine cannot complete the processing of the process. When processing each workpiece, the next process can only be processed after the previous process is completed. Each machine can only process one process at a time. Therefore, a dual-segment coding method is used to represent a scheduling sequence, such as Figure 2 As shown:

[0102] In the two-segment coding method, the first half represents the machine sequence, and the second half represents the process sequence. The length of the machine sequence and the process sequence are equal, both of which are the total number of processes for all workpieces. The machine sequence represents the number of machines on which each process of each workpiece is produced from left to right, such as 2 represents process O12 is produced on the second available machine; in the process sequence, the jth occurrence of i represents the jth process O of workpiece i. ij .

[0103] To solve the scheduling problem using SSA, the above coding sequence needs to be converted into the position of individuals in SSA. In SSA, the position of each individual in the d-dimensional space is represented by a d-dimensional vector. Therefore, each position of the scheduling coding sequence corresponds to each dimension of the d-dimensional space, and the conversion of positions and coding sequences is realized under the constraints of the scheduling rules. The specific conversion method is as follows. The lower bound of the m-th dimension of the population in the d-dimensional space is expressed as lb m , the upper bound is ub m In the scheduling sequence, the machine sequence code segment, each code corresponds to a process, the maximum number of available machines num max That is, the code is converted into the corresponding ub of the d-dimensional space individual m , the minimum number of available machines num min lb m , after conversion to d-dimensional space, the relative order of machine codes does not change. In the conversion of workpiece sequence code segments, the following rules are followed: if the position of individuals in d-dimensional space is different, the sequence of corresponding process code segments will also be different, and the relative processing order of the same process before and after conversion should not change. Therefore, the positions corresponding to the process code segments in the d-dimensional space are sorted according to the numerical values, the index values ​​of the original positions are recorded, and the workpieces and processes are allocated according to the index values. For example, for the positions of the process codes in the d-dimensional space [-1.127, -2.940, 6.567, 9.745, -5.436, -1.542, 8.538, -0.211], they are sorted according to the numerical values ​​to form an index array [4, 1, 5, 0, 7, 2, 6, 3], so that the first process of the first workpiece always corresponds to the minimum index value, and the last process of the last workpiece always corresponds to the maximum index value. The process sequence represented after conversion is [O22, O12, O31, O11, O33, O21, O32, O22].

[0104] 2.2 Calculation of fitness

[0105] In d-dimensional space, the fitness of an individual is related to the position of each dimension. In this problem, when an individual represents a process sequence, its fitness should be the optimization goal of the scheduling problem. When minimizing the maximum completion time is selected as the optimization goal in this paper, the fitness of the individual should represent the maximum completion time of the process sequence. Therefore, the fitness of an individual in the population should be the completion time of the last process of the last workpiece in a process sequence. The following is a method for obtaining the completion time based on the process sequence: suppose the starting processing time of a process on a machine is start, the processing time is span, and the processing end time is end. When the process sequence is inserted into the production queue one by one, such as Figure 3 As shown, the corresponding machine has not processed any process yet and this process is the first process of the workpiece. This process is directly inserted into the machine, start = 0, end = span.

[0106] If the corresponding machine has not processed any process and the process is not the first process, obtain the end time last_end of the previous process of the workpiece, set start = last_end, end = last_end + span, such as Figure 4 shown.

[0107] like Figure 5 As shown, if the corresponding machine has processed the process, then find an idle segment on the machine that meets the following conditions: the length of the idle segment is not less than the production time of the process on the machine; when the process is not the first process, the start time of the idle segment must not be less than the end time of the previous process on the workpiece corresponding to the process.

[0108] 2.3 Improved SSA

[0109] Although SSA is suitable for solving larger-scale problems, it still has the problems of being easily trapped in local optimal solutions and having a slow convergence speed in the later stage. The present invention improves SSA from the following two aspects.

[0110] 2.3.1 OD variation enhances population diversity and robustness

[0111] Orthogonal experimental design (OD) is an experimental method used to study multi-level and multi-factors. In orthogonal design, representative samples are selected from the experimental space to participate in the experiment according to the orthogonal table. Since the orthogonal table is orthogonal, these sample points are evenly dispersed, neat and comparable in the entire experimental space. The experimental method of orthogonal design can greatly reduce the cost of the experiment. For example, the result of an experiment is affected by three factors A, B, and C. Each factor has three different levels of values. According to the traditional experimental method, at least 3 factors and their level combinations that have the greatest impact on the experimental results are required. 3 Experiments are performed twice, while orthogonal tables only need 9 times, which greatly reduces the experimental cost. The orthogonal table is generated based on the number of factors, the number of factor levels and their interactions. Taking the experiment of three factors A, B and C as an example, the orthogonal table is as follows in Table 2:

[0112] Table 2 Orthogonal design table

[0113]

[0114] A set of orthogonal designs can be L n (m k ), where k represents the number of factors affecting the experiment, m represents the number of value levels of each factor, and n represents the lower limit of the total number of experiments, which is a necessary condition for the experiment. According to the properties of the orthogonal table, n = k (m-1) + 1, and the above table can be expressed as L 9 (3 3 ).

[0115] After conducting the experiment according to the orthogonal table, a multi-factor variance analysis was performed on the experimental results to obtain the significant influence of each factor and each level on the experimental results, and then obtain the optimal level of each factor.

[0116] The present invention utilizes the low-cost characteristic of OD to design an orthogonal design variation (ODV), which is embedded into the population iteration process to enhance the robustness of the entire population and the robustness of SSA.

[0117] In ODV, subgroups M1 and M2 are set, each containing s individuals, and are randomly selected from oak and common tree individuals. M1 is used to generate better individuals and replace M2 to enter the next population iteration. That is, in ODV, inferior individuals will be eliminated. Since M1 and M2 are randomly obtained, all individuals except hickory trees can be used to generate new individuals through ODV. In the d-dimensional space, for all individuals in M1, a hickory tree individual (high-quality individual) is randomly selected and an orthogonal table L is established with the individuals in M1. M (2 d), that is, each individual in M1 is matched with the high-quality individuals according to the orthogonal table L M (2 d ) to perform orthogonal mutation, find the best value of each dimension of the individual, form a new individual, and replace the individuals in M2 with the new individual. For an orthogonal mutation process of scale s, a total of s*M orthogonal experiments are required. Replace the individuals of the original population with the M2 subgroup that has undergone ODV and participate in the next iteration.

[0118] 2.3.2 Adaptive Gc based on power-law distribution

[0119] In formulas (8), (9), and (10), G c It can be used to balance global and local search. However, for a fixed G C The value can easily cause the solution to fall into a local optimal solution or always linger in the global optimal solution and fail to find the optimal solution. Therefore, the present invention also proposes a G based on power law distribution c Adaptive methods that automatically adjust global and local searches during an iterative process.

[0120] Many phenomena in nature and in human beings obey Gaussian distribution, that is, a considerable number of phenomena are concentrated near the mean level. However, with the development of information technology, many phenomena that do not obey Gaussian distribution have emerged, such as the distribution of academic journal impact factors, the distribution of human height, and the distribution of words in dictionaries, which all obey power-law distribution, that is, in the same time span, smaller events have a greater probability of occurring, while larger events have a lower probability of occurring. Pareto distribution is a typical power-law distribution, which was discovered by Vilfredo Pareto. (15) The representation of Pareto distribution is given as:

[0121]

[0122] Its probability density function is expressed as:

[0123] f(x)=-αk α x -α-1 (16)

[0124] Where α>0 is the Pareto index, k>0 indicates the scale, and x indicates the random variable. The Pareto distribution has a thicker left tail and a longer right tail than the Gaussian distribution. Figure 6 shown.

[0125] The power law distribution shows that the random variable x can produce huge fluctuations in a small range, but less fluctuations in a larger range. When the population iteration just starts, it is necessary to explore the optimal solution in the global range. Therefore, the initial population iteration search range should have a large fluctuation as the number of iterations increases to ensure that there is a solution search behavior in each space segment, that is, quickly search the entire solution space with a small number of iterations, and then focus on a certain space to search for the optimal solution. Therefore, G c The value of follows a power-law distribution as the number of iterations increases, ensuring that 20% of the iterations shrink toward the local space containing the optimal solution during the global search, and 80% of the iterations search for the optimal solution in a relatively certain space, thereby overcoming the problem that SSA easily falls into the local optimal solution.

[0126] 2.3.3 Flowchart and Pseudocode

[0127] Figure 7 The flowchart of the improved SSA for solving the flexible shop scheduling problem is given.

[0128] The following gives Figure 7 The corresponding pseudo code.

[0129]

[0130] 2.4 Comparison between improved SSA and traditional particle swarm algorithm solutions

[0131] Taking Table 1 as an example, the traditional particle swarm algorithm and the improved SSA are used to solve the problem respectively. The results of 20 solutions are shown in Table 3.

[0132] Table 3 Solution results of genetic algorithm and improved SSA

[0133]

[0134] The Gantt charts corresponding to the solution results of the two methods are shown in Figure 8.

[0135] From Table 3 and Figure 8a and Figure 8b It can be seen that the improved SSA algorithm is superior to the traditional particle swarm algorithm in solving the flexible shop scheduling problem in terms of both solution speed and solution results.

Claims

1. A flexible workshop scheduling method based on SSA, wherein the flexible workshop scheduling means: there are i workpieces and m machines, each workpiece has multiple processes, each process will be arranged to be produced on 1 to m machines, and the production time is different. The scheduling method is based on the workshop scheduling sequence under the optimization goal, and its characteristics are as follows: include: 1) To make the discrete workshop scheduling problem continuous; 2) Use SSA to solve the shop scheduling problem; In step 1), the workshop scheduling problem is dimensionalized The solution to the workshop scheduling problem is essentially to find the scheduling sequence under the optimization goal. According to the scheduling rules, there are m columns in the workpiece production information table; M m represents the mth machine, O ij represents the jth process of workpiece i; the table data at the intersection of the rows and columns of the table indicates that the jth process of workpiece i is performed by machine M m Processing time, or machine M m The processing of this process cannot be completed; when processing each workpiece, the next process can only be processed after the previous process is completed, and each machine can only process one process at a time; Then, a dual-segment coding method is used to represent a scheduling sequence; in the dual-segment coding scheduling sequence, the first half represents the machine sequence, i.e., the machine sequence code segment, and the second half represents the process sequence, i.e., the process sequence code segment; The lengths of the machine sequence and the process sequence are equal, which are the total number of processes for all workpieces. In the machine sequence, from left to right, the corresponding processes of the workpieces are represented. ij Production on the mth available machine; in the process sequence, the jth occurrence of i represents the jth process O of workpiece i ij ; In the step 2), the double-segment coding scheduling sequence is converted into the position of the individuals in the population of the squirrel foraging algorithm SSA: In the squirrel foraging algorithm SSA, the position of each individual in the d-dimensional space is represented by a d-dimensional vector. Then, each position of the double-segment coding scheduling sequence corresponds to each dimension of the d-dimensional space, and the conversion of the position and the coding sequence is realized under the constraints of the scheduling rules. The conversion method is: The lower bound of the m-th dimension of the individuals in the population in the d-dimensional space is expressed as lb m , the upper bound is denoted as ub m In the scheduling sequence, each code of the machine sequence code segment corresponds to a process, and the maximum number of available machines num for this process max That is, the code is converted into the corresponding ub of the d-dimensional space individual m , the minimum number of available machines num min lb m ,After ,converted to d-dimensional space, the relative order of the machine codes does not change; In the conversion of process sequence code segments, the following rules are followed: if the positions of individuals in the d-dimensional space are different, the sequence of the corresponding process sequence code segments will also be different. The relative processing order of the same process before and after the conversion remains unchanged. Therefore, the positions corresponding to the process sequence code segments in the d-dimensional space are sorted according to the numerical values, and the index values ​​of their original positions are recorded. Workpieces and processes are allocated according to the size of the index values. Calculation of fitness: In d-dimensional space, the fitness of an individual is related to the position of each dimension; then, when an individual represents a process sequence, its fitness is the optimization target of the scheduling problem; when minimizing the maximum completion time is selected as the optimization target, the fitness of an individual represents the maximum completion time of the process sequence, then, the fitness of an individual in the population is the completion time of the last process of the last workpiece in a process sequence; Improve the squirrel foraging algorithm SSA in step 2), design orthogonal design variation ODV, and embed it into the population iteration process of the squirrel foraging algorithm SSA to enhance the robustness of the entire population and the robustness of SSA; In the orthogonal design variation ODV, subgroups M1 and M2 are set, each containing s individuals, and randomly selected from non-high-quality individuals; M1 is used to generate better individuals and replace M2 to enter the next population iteration, that is, in ODV, inferior individuals will be eliminated; Since M1 and M2 are obtained randomly, all non-high-quality individuals except high-quality individuals can be used to generate new individuals through ODV; In the d-dimensional space, for all individuals in M1, a high-quality individual is randomly selected and an orthogonal table L is established with the individuals in M1. M (2 d ), that is, each individual in M1 is matched with the high-quality individuals according to the orthogonal table L M (2 d ) to perform orthogonal mutation, find the best value of each dimension of the individual, and form a new individual; replace the individuals in M2 with the new individuals. For the orthogonal mutation process of scale s, a total of s*M orthogonal experiments are performed; The individuals of the original population are replaced by the M2 subgroup that has undergone orthogonal design variation ODV to participate in the next iteration.

2. The SSA-based workshop flexible scheduling method according to claim 1 is characterized by: The squirrel foraging algorithm SSA in step 2) is improved and G based on power law distribution is designed. c Adaptive methods, which automatically adjust global and local searches during the iteration process; In the Squirrel Foraging Algorithm (SSA), when the population iteration just begins, the optimal solution needs to be explored globally. Therefore, the initial population iteration search range should fluctuate greatly with the increase in the number of iterations to ensure that there is a solution search behavior in each space segment, and the entire solution space can be quickly searched with a small number of iterations. Then focus on a certain space to search for the optimal solution; Make the sliding coefficient G in the squirrel foraging algorithm SSA c The value of follows the Pareto distribution as the number of iterations increases, which ensures that 20% of the iterations shrink toward the local space containing the optimal solution during the global search, and 80% of the iterations search for the optimal solution in a relatively certain space.

3. The SSA-based workshop flexible scheduling method according to claim 1 is characterized by: In step 2), the method for obtaining the completion time according to the process sequence is: assuming that the starting processing time of a process on a machine is start, the processing time is span, and the processing end time is end, then when the process sequence is inserted into the production queue one by one: If the process has not been processed on the corresponding machine and this process is the first process of the workpiece, then insert this process into the machine, start = 0, end = span; If the corresponding machine has not processed the process and the process is not the first process, then obtain the end time last_end of the previous process of the workpiece, and set start = last_end, end = last_end + span; If the process has been processed on the corresponding machine, then find an idle segment that meets the conditions on the machine. The conditions are: the length of the idle segment is not less than the production time of the process on the machine; when the process is not the first process, the start time of the idle segment is not less than the end time of the previous process of the workpiece corresponding to the process.