Multi-load AGV task scheduling method based on improved genetic algorithm and hierarchical clustering algorithm
By combining the improved genetic algorithm with the hierarchical clustering algorithm, and using differential operations and double-layer coding to optimize AGV task scheduling, the problems of low efficiency and slow convergence in the existing technology are solved, and more efficient multi-load AGV scheduling is achieved.
Patent Information
- Application Number
- CN202510813407.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-09-26
AI Technical Summary
Existing genetic algorithms have low efficiency, slow convergence, high computational complexity in multi-task scheduling of multi-load AGVs, and are difficult to effectively optimize scheduling solutions.
An improved genetic algorithm is combined with a hierarchical clustering algorithm to generate an initial solution through hierarchical clustering. Differential operations are used instead of mutation operations, and double-layer encoding and iterative updates are performed. Finally, single-layer encoding is used to continue iteration to optimize the scheduling plan.
Improved the efficiency of multi-load AGV task scheduling, obtained better scheduling solutions, and improved overall execution performance.
Smart Images

Figure CN120706783A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to automated logistics and warehousing technology, in particular to route planning and trajectory optimization technology for automated guided vehicles (AGVs) in warehousing and logistics, and specifically to a multi-load AGV task scheduling method based on a combination of a hierarchical clustering algorithm and a genetic algorithm. Background Art
[0002] AGVs are often used in warehousing to improve logistics efficiency. Multi-load AGVs can deliver multiple goods to multiple locations at a time, achieving higher delivery efficiency. A reasonable delivery sequence ensures the delivery efficiency of the AGV and the timeliness of the delivery of each good. The delivery sequence problem is a combinatorial optimization problem. Currently, heuristic algorithms are mainly used to solve the problem. Among them, genetic algorithms have a simple structure and relatively superior performance. However, when the problem scale is large, the genetic algorithm takes a long time to calculate and converges slowly. Many scholars have improved genetic algorithms and applied them to AGV scheduling, but the computational complexity is still very high. In order to improve the heuristic algorithm's ability to explore and develop the search space and improve the algorithm's convergence and computational complexity, some scholars have combined heuristic algorithms with clustering algorithms. Hierarchical clustering algorithms do not require the pre-specified number of clusters and can generate a complete clustering hierarchy. By cutting different levels of the tree diagram, plane partitions of different granularities can be obtained. How to improve the genetic algorithm and, at the same time, apply the clustering algorithm to the AGV scheduling problem to effectively improve planning efficiency and optimize the scheduling scheme are the key points of this invention. Summary of the Invention
[0003] The invention aims to overcome the problems of low efficiency and slow convergence in the prior art when solving multi-task scheduling of multi-load AGVs, and provides a multi-load AGV task scheduling method based on an improved genetic algorithm and a hierarchical clustering algorithm.
[0004] In order to achieve the above object, the present invention adopts the following technical solutions:
[0005] The multi-load AGV task scheduling method based on the improved genetic algorithm and hierarchical clustering algorithm includes the following steps:
[0006] Step 1: Generate an initial solution based on the hierarchical clustering algorithm, cluster the task points, perform double-layer coding between clusters and within clusters, and randomly generate the initial delivery order;
[0007] Step 2: Improve the genetic algorithm based on the differential operation, and use the differential operation to replace the mutation operation in the genetic algorithm;
[0008] Step 3: Iterative update based on improved genetic algorithm and two-layer coding strategy;
[0009] Step 4: Change the chromosome encoding method to a single-layer encoding method, continue to iterate the improved genetic algorithm, and obtain a multi-load AGV scheduling solution.
[0010] As a further description of the above technical solution: the hierarchical clustering algorithm described in step 1 clusters the tasks into several clusters based on the Manhattan distance. The clusters are first randomly sorted to form inter-cluster gene fragments to represent the order of each cluster. Then, the tasks within each cluster are randomly sorted to form intra-cluster gene fragments to represent the delivery order of the tasks within each cluster. The sorting result is used as the initial delivery order.
[0011] Assume that the task set is N = {1, 2, ..., n}, the number of tasks is n, the result of hierarchical clustering is C = {c1, c2, ..., cm}, and the number of clusters is m, where m should satisfy:
[0012]
[0013] Where m! is the factorial of m, |c i | is the number of tasks in cluster i;
[0014] The distance between two tasks is the Manhattan distance:
[0015] d ij mhd =|x i -x j |+|y i -y j | (3)
[0016] where d ij mhd is the Manhattan distance between task i and task j, x i ,y i , x j ,y j are the horizontal and vertical coordinates of tasks i and j.
[0017] As a further description of the above technical solution: In the improved genetic algorithm based on differential operation described in step 2, the mutation operation in the genetic algorithm is replaced by differential operation, and the concept of exchanger is used to perform the addition and subtraction operations of chromosomes in the differential operation. The result after differential operation is:
[0018] R i =R i +F(R1-R2) (4)
[0019] where R i To perform differential gene fragments between clusters of individuals, F is the probability of retaining the exchanger, F∈(0,1), and F(R1-R2) means that the exchanger obtained by R1-R2 has a probability of being retained.
[0020] As a further description of the above technical solution: the dual-layer encoding strategy described in step 3 refers to using inter-cluster encoding and intra-cluster encoding to decode, performing differential operations and crossover operations on inter-cluster gene segments, and performing mutation operations on intra-cluster gene segments;
[0021] Assuming that the encoding of each cluster is [3,1,2], and the encoding within each cluster is [[2,1,3],[1],[1,2]], then the double-layer encoding is [[3,1,2],[[2,1,3],[1],[1,2]]], and the decoding result is [4,6,3,2,5,1], which means the multi-load AGV delivery order is: 4-6-3-2-5-1;
[0022] The specific steps include:
[0023] 41) Calculate the objective function value of the population, perform fast non-dominated sorting on the individuals in the population, and calculate the crowding value P[i] of each individual distance ;
[0024]
[0025] P[i+1]f k represents the objective function value of the i+1th individual, P[i-1]f k represents the objective function value of the i-1th individual, and r is the number of objective functions;
[0026] 42)R i0 is the inter-cluster gene fragment of the current individual, and two individuals are randomly selected. The inter-cluster gene fragment of the two individuals is R 10 ,R 20 Perform differential operation, where R i0 ≠R 10 ≠R 20 , using the difference operation as:
[0027] R i0 =R i0 +F(R 10 -R 20 ) (6)
[0028] Where F is the probability of retaining the swapper, F∈(0,1), F(R 10 -R 20 ) represents R 10 -R 20 The resulting swapper has a probability of F being retained;
[0029] 43) Generate a random number from 0 to 1. If the random number > crossover probability CR, then R i0No crossover operation is performed. Otherwise, two individuals are randomly selected and the one with smaller non-dominated sorting is selected as the parent. If the non-dominated sorting is equal, the one with larger crowding distance is selected as the parent. If the crowding distances are equal, one is randomly selected and R is set. i0 Crossover with the inter-cluster gene fragments of the parent generation, using partial mapping crossover;
[0030] 44) Generate a random number between 0 and 1. If the random number > mutation probability MR, then the gene fragment R in the cluster of the current individual i1 No mutation operation is performed, otherwise, R is randomly selected i1 A gene fragment is randomly rearranged to obtain a new generation;
[0031] 45) Repeat 42, 43, and 44 until all individuals in the current population have undergone differential operations;
[0032] 47) Merge the current population and the new generation population, and use the elite selection principle to select the next generation;
[0033] 47) Repeat 41, 45, and 46 until the current number of iterations G> the number of double-layer coding iterations G0.
[0034] As a further description of the above technical solution: the double-layer code described in step 4 is decoded to obtain the task sequence, the task sequence is directly encoded into chromosomes, and the differential operation and crossover operation of the genetic algorithm are performed;
[0035] The specific steps include:
[0036] 51) Change double-layer coding to single-layer coding
[0037] 52) Calculate the objective function value of the population, perform fast non-dominated sorting on the individuals in the population, and calculate the crowding value P[i] of each individual distance ;
[0038]
[0039] P[i+1]f k represents the objective function value of the i+1th individual, P[i-1]f k represents the objective function value of the i+1th individual, and r is the number of objective functions;
[0040] 53) Randomly select two individuals, R1 and R2, and perform differential operation, where R i ≠R1≠R2, perform differential operation:
[0041] R i =R i +F(R1-R2) (8)
[0042] where R i is the current individual, F is the probability of retaining the swapper, F∈(0,1), F(R1-R2) means that the swapper obtained by R1-R2 has a probability of being retained;
[0043] 54) Generate a random number from 0 to 1. If the random number > crossover probability CR, then R i No crossover operation is performed. Otherwise, two individuals are randomly selected and the one with smaller non-dominated sorting is selected as the parent. If the non-dominated sorting is equal, the one with larger crowding distance is selected as the parent. If the crowding distances are equal, one is randomly selected and R is set. i Crossover with the parent generation individuals to obtain the new generation, and the crossover method is partial mapping crossover;
[0044] 55) Repeat 53 and 54 until all individuals in the current population have undergone differential operations;
[0045] 56) Merge the current population and the new generation population, and select the offspring using the elite selection principle;
[0046] 57) Repeat 52, 55, and 56 until the current iteration number G >= total iteration number Gen
[0047] 58) Calculate the objective function value of the population and perform fast non-dominated sorting on the individuals in the population;
[0048] 59) Output the Pareto front solution and obtain the multi-capacity AGV scheduling solution.
[0049] The working principle of the present invention is as follows: a hierarchical clustering algorithm divides a task set into several clusters according to the distance between each task, and through double-layer coding, encodes the inter-cluster order and the intra-cluster task order respectively to ensure that tasks that are far apart are not adjacent, and removes some inferior solutions in the solution generation stage, thereby improving the overall quality of the solution, while narrowing the solution space and reducing the computational complexity of the problem; the differential operation in the differential evolution algorithm is used to replace the mutation operation in the genetic algorithm to ensure that there is a difference between the generated offspring solution and the parent solution, so that the algorithm can explore the solution space more fully in order to escape the local optimum; after performing an iterative search with double-layer coding, the double-layer coding is changed to single-layer coding, so that the solutions excluded under the double-layer coding are added to the solution space, and the iterative search is continued to find a better solution.
[0050] The innovation of the present invention is: in the multi-load AGV task scheduling problem, a hierarchical clustering algorithm is used to divide the tasks into several clusters, and the solution is encoded with a double-layer coding according to the clustering results; the differential operation in the differential evolution algorithm is used to replace the mutation operation in the genetic algorithm, and the concept of the exchanger is introduced into the differential operation of integer coding.
[0051] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0052] When performing multi-task scheduling, the scheduling efficiency is improved and a better scheduling plan is obtained, thereby improving the overall performance of multi-load AGVs in executing tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 The initial solution generation flow chart of the present invention;
[0054] Figure 2 Iterative flow chart of the improved genetic algorithm under double-layer encoding of the present invention;
[0055] Figure 3 An example diagram of differential operation under integer coding of the present invention;
[0056] Figure 4 Example diagram of some mapping cross operations;
[0057] Figure 5 Iterative flow chart of the improved genetic algorithm under single-layer coding of the present invention;
[0058] Figure 6a and Figure 6b This is the operating result diagram of the improved genetic algorithm of the present invention under different G0, where: Figure 6a is the average path length obtained by running the algorithm under different G0, Figure 6b is the average time window penalty value obtained by running the algorithm under different G0;
[0059] Figure 7a and Figure 7b This is a comparison chart of the running results of the improved genetic algorithm of the present invention and the traditional algorithm when the task scale is 25, where: Figure 7a This is a comparison chart of the path lengths obtained by running different algorithms when the task scale is 25. Figure 7b This is a comparison chart of the time window penalty values obtained by running different algorithms when the task scale is 25;
[0060] Figure 8a and Figure 8b This is a comparison chart of the running results of the improved genetic algorithm of the present invention and the traditional algorithm when the task scale is 50, where: Figure 8a This is a comparison chart of the path lengths obtained by running different algorithms when the task scale is 50. Figure 8b This is a comparison chart of the time window penalty values obtained by running different algorithms when the task scale is 50;
[0061] Figure 9a and Figure 9b This is a comparison chart of the running results of the improved genetic algorithm of the present invention and the traditional algorithm when the task scale is 100, where: Figure 9a This is a comparison chart of the path lengths obtained when different algorithms are run at a task scale of 100. Figure 9b This is a comparison chart of the time window penalty values obtained by running different algorithms when the task scale is 100. DETAILED DESCRIPTION
[0062] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 making any creative efforts shall fall within the scope of protection of the present invention.
[0063] Please see the attached Figure 1 -Attached Figure 9b The present invention provides a technical solution: a multi-load AGV task scheduling method based on an improved genetic algorithm and a hierarchical clustering algorithm, comprising the following steps:
[0064] Step 1: Generate an initial solution based on the hierarchical clustering algorithm, cluster the task points, perform double-layer coding between clusters and within clusters, and randomly generate the initial delivery order;
[0065] Step 2: Improve the genetic algorithm based on the differential operation, and use the differential operation to replace the mutation operation in the genetic algorithm;
[0066] Step 3: Iterative update based on improved genetic algorithm and two-layer coding strategy;
[0067] Step 4: Change the chromosome encoding method to a single-layer encoding method, continue to iterate the improved genetic algorithm, and obtain a multi-load AGV scheduling solution.
[0068] Step 1: Generate an initial solution based on the hierarchical clustering algorithm, cluster the task points, perform double-layer coding between clusters and within clusters, and randomly generate the initial delivery order;
[0069] The hierarchical clustering algorithm clusters tasks into several clusters based on Manhattan distance. First, the clusters are randomly sorted to form inter-cluster gene fragments to represent the order of each cluster. Then, the tasks within each cluster are randomly sorted to form intra-cluster gene fragments to represent the distribution order of tasks within each cluster. The sorting result is used as the initial distribution order. The process is as follows: Figure 1 As shown;
[0070] Assume that the task set is N = {1, 2, ..., n}, the number of tasks is n, the result of hierarchical clustering is C = {c1, c2, ..., cm}, and the number of clusters is m, where m should satisfy:
[0071]
[0072] where |c i | is the number of tasks in cluster i;
[0073] The distance between two tasks is the Manhattan distance:
[0074] d ij mhd =|x i -x j |+|y i -y j | (3)
[0075] where d ij mhd is the Manhattan distance between task i and task j, x i ,y i , x j ,y j are the horizontal and vertical coordinates of tasks i and j;
[0076] Compared with other clustering algorithms, the hierarchical clustering algorithm can obtain clustering results with multiple cluster numbers in one calculation, thereby selecting appropriate clustering results for encoding; the double-layer encoding strategy ensures that tasks that are far apart are not adjacent in sequence, removes some inferior solutions in the solution generation stage, reduces the solution space, thereby improving the overall quality of the population and improving the computational efficiency of subsequent algorithms.
[0077] Step 2: Improve the genetic algorithm based on the differential operation, and use the differential operation to replace the mutation operation in the genetic algorithm;
[0078] In the improved genetic algorithm, the mutation operation in the genetic algorithm is replaced by the differential operation, and the concept of the exchanger is used to perform the addition and subtraction operations of chromosomes in the differential operation. The result after the differential operation is;
[0079] R i =R i +F(R1-R2) (4)
[0080] where R i To differentiate gene segments between clusters of individuals, F is the probability of retaining the swapper, F∈(0,1). F(R1-R2) indicates that the swapper obtained by R1-R2 has a probability of being retained. The genetic algorithm's mutation operation involves random transformation of individual segment genes. After mutation, there is a possibility that the new genes overlap with the original genes, which may lead to convergence to a local optimum. Differencing is used to scale the differences between individuals, ensuring that the differentiated genes remain within a certain distance from the original genes. This allows for the continuous generation of new individuals, a thorough search of the solution space, and the escape from the local optimum.
[0081] Step 3, iterative update based on improved genetic algorithm and two-layer coding strategy;
[0082] The double-layer coding strategy uses inter-cluster coding and intra-cluster coding to decode, performs differential and crossover operations on inter-cluster gene fragments, and performs mutation operations on intra-cluster gene fragments. The process is as follows: Figure 2 As shown;
[0083] Assuming the encoding for each cluster is [3,1,2], and the encoding within each cluster is [[2,1,3],[1],[1,2]], then the double-layer encoding is [[3,1,2],[[2,1,3],[1],[1,2]]], and the decoding result is [4,6,3,2,5,1], indicating that the order of multi-load AGV delivery is: 4-6-3-2-5-1. The double-layer encoding strategy ensures that tasks that are far apart are not sequentially adjacent, reducing the solution space, thereby improving the overall quality of the population and the computational efficiency of subsequent algorithms.
[0084] The specific steps include:
[0085] 31) Calculate the objective function value of the population, perform fast non-dominated sorting on the individuals in the population, and calculate the crowding value P[i] of each individual distance ;
[0086]
[0087] P[i+1]f k Represents the function value of i+1 on the objective function, P[i-1]f k represents the function value of i-1 on the objective function, and r is the number of objective functions;
[0088] 32)R i0 is the inter-cluster gene fragment of the current individual, and two individuals are randomly selected. The inter-cluster gene fragment of the two individuals is R 10 ,R 20 Perform differential operation, where R i0 ≠R 10 ≠R 20 , using the difference operation as:
[0089] R i0 =R i0 +F(R 10 -R 20 ) (6)
[0090] Where F is the probability of retaining the swapper, F∈(0,1), F(R 10 -R 20 ) represents R 10 -R 20 The resulting swapper is retained with probability F, such as Figure 3 As shown;
[0091] 33) Generate a random number between 0 and 1. If the random number > crossover probability CR, then Ri0 No crossover operation is performed. Otherwise, two individuals are randomly selected and the one with smaller non-dominated sorting is selected as the parent. If the non-dominated sorting is equal, the one with larger crowding distance is selected as the parent. If the crowding distances are equal, one is randomly selected and R is set. i0 Crossover is performed with the inter-cluster gene fragments of the parent generation, and the crossover method is partial mapping crossover, such as Figure 4 As shown;
[0092] 34) Generate a random number between 0 and 1. If the random number > mutation probability MR, then the gene fragment R in the cluster of the current individual i1 No mutation operation is performed, otherwise, R is randomly selected i1 A gene fragment is randomly rearranged to obtain a new generation;
[0093] 35) Repeat 32, 33, and 34 until all individuals in the current population have undergone differential operations;
[0094] 36) Merge the current population and the new generation population, and select the offspring using the elite selection principle;
[0095] 37) Repeat 31, 35, and 36 until the current number of iterations G> the number of double-layer coding iterations G0.
[0096] Step 4: Change the chromosome encoding method to a single-layer encoding method, continue to iterate the improved genetic algorithm, and obtain a multi-load AGV scheduling solution;
[0097] Decode the double-layer code to obtain the task sequence, encode the task sequence directly into chromosomes, and perform differential and crossover operations of the genetic algorithm. The process is as follows: Figure 5 As shown in Figure 6, the double-layer coding strategy cannot represent all feasible solutions, so it is necessary to perform algorithm search under single-layer coding in order to jump out of the local optimal solution. In addition, as shown in Figure 6, the setting of the double-layer coding iteration number G0 will affect the algorithm results. When the total number of iterations Gen is 1000, G0 is set to about 100, which has a better effect.
[0098] The specific steps include:
[0099] 41) Change double-layer coding to single-layer coding
[0100] 42) Calculate the objective function value of the population, perform fast non-dominated sorting on the individuals in the population, and calculate the crowding value P[i] of each individual distance ;
[0101]
[0102] P[i+1]f k Represents the function value of i+1 on the objective function, P[i-1]fk represents the function value of i-1 on the objective function, and r is the number of objective functions;
[0103] 43) Randomly select two individuals, R1 and R2, and perform differential operation, where R i ≠R1≠R2, perform differential operation:
[0104] R i =R i +F(R1-R2) (8)
[0105] where R i is the current individual, F is the probability of retaining the swapper, F∈(0,1), F(R1-R2) means that the swapper obtained by R1-R2 has the probability of being retained. Figure 3 As shown;
[0106] 44) Generate a random number from 0 to 1. If the random number > crossover probability CR, then R i No crossover operation is performed. Otherwise, two individuals are randomly selected and the one with smaller non-dominated sorting is selected as the parent. If the non-dominated sorting is equal, the one with larger crowding distance is selected as the parent. If the crowding distances are equal, one is randomly selected and R is set. i The new generation is obtained by crossover with the parent generation individuals, and the crossover method is partial mapping crossover, such as Figure 4 As shown;
[0107] 45) Repeat 43 and 44 until all individuals in the current population have undergone differential operations;
[0108] 46) Merge the current population and the new generation population, and select the next generation based on the elite selection principle;
[0109] 47) Repeat 42, 45, and 46 until the current iteration number G >= total iteration number Gen
[0110] 48) Calculate the objective function value of the population and perform fast non-dominated sorting on the individuals in the population;
[0111] 49) Output the Pareto front solution and obtain the multi-capacity AGV scheduling solution.
[0112] Specific experimental examples and experimental results of the present invention are as follows:
[0113] Problem Description: A material warehouse has n material delivery tasks that need to be assigned to workstations. An AGV departs from the warehouse at the start of a task and returns to the warehouse according to the order of the tasks after completing the task. Each workstation has a soft time window, which represents the ideal time for material delivery. Delivery earlier or later than the specified time in the time window will result in a penalty function value. The scheduling goal is to shorten the total path length of the AGV delivery and ensure that the material arrives at each workstation at the optimal time. To facilitate model establishment, the following basic assumptions are made:
[0114] This experiment involves a single material warehouse with multiple workstation demand points. The number of multi-capacity AGVs is 1. The material required by the workstation does not exceed the rated load capacity of the AGV. The AGV's travel speed is constant, assuming 1m / s. Problems such as failures or insufficient power during transportation are ignored. The mission starts from the material warehouse and the multi-capacity AGV must return to the warehouse after all delivery tasks are completed. The time required for each workstation to retrieve the required materials from the AGV is not considered. The specific location of the warehouse and each workstation, the point-to-point distance, and the time window requirement are known.
[0115] The mathematical model of the problem is:
[0116]
[0117] d ij =|x j -x i |+|y j -y i |,i∈N,j∈N (13)
[0118] x ij ∈{0,1},i∈N,j∈N(14)
[0119] α<β (15)
[0120] α>0,β>0 (16)
[0121] where x ij When it is 1, it means that task j is immediately followed by task i. (9) and (10) represent two optimization objectives: the shortest delivery path and the minimum penalty of the soft time window. i represents the time when AGV arrives at task point i, (t is , t ie) represents the ideal time window for task point i to receive materials, (11) represents the AGV starting from the silo and finally returning to the silo, (12) represents that each station can only be served by the AGV once, (13) represents the Manhattan distance between two tasks, (14) represents the decision variable constraint, (15) represents that the penalty coefficient α for being earlier than the start time of the time window is less than the penalty coefficient β for being later than the end time of the time window; (16) represents that both penalty coefficients are greater than 0;
[0122] The experiments were conducted on a 64-bit Windows 10 system equipped with an AMD Core(TM) Ryzen7-4800H 2.90GHz processor and 16GB RAM. The programming language was Python-3.11. The example used was c101 in Solomon. The task sizes were 25, 50, and 100, respectively. The algorithm was compared with the traditional genetic algorithm (NSGA-II) and the multi-objective particle swarm optimization (MOPSO).
[0123] Parameter settings: crossover probability CR = 0.8, mutation probability MR = 0.2, swapper retention probability F = 0.8, total number of iterations Gen = 1000, number of double-layer coding iterations G0 = 150 in the genetic algorithm; inertia weight ω = 1.2, learning factors c1 = 2, c2 = 2 in the multi-objective particle swarm algorithm; population size pop = 50, penalty coefficient α = 0.5, penalty coefficient β = 1.0;
[0124] The three algorithms were run independently 10 times. Figures 7-9 show the comparison of the algorithm running results when the task scale is 25, 50, and 100, respectively. The single running time is 10s, 15s, and 25s, respectively.
[0125] The contents described in the embodiments of this specification are merely an enumeration of the implementation forms of the inventive concept. The scope of protection of the present invention should not be regarded as limited to the specific forms described in the embodiments. The scope of protection of the present invention also extends to equivalent technical means that can be conceived by those skilled in the art based on the inventive concept.
Claims
1. A multi-load AGV task scheduling method based on an improved genetic algorithm and a hierarchical clustering algorithm is characterized by: The following steps are involved: Step 1: Generate an initial solution based on the hierarchical clustering algorithm, cluster the task points, perform double-layer coding between clusters and within clusters, and randomly generate the initial delivery order; Step 2: Improve the genetic algorithm based on the differential operation, and use the differential operation to replace the mutation operation in the genetic algorithm; Step 3: Iterative update based on improved genetic algorithm and two-layer coding strategy; Step 4: Change the chromosome encoding method to a single-layer encoding method, continue to improve the iteration of the genetic algorithm, and obtain a multi-load AGV scheduling solution.
2. The multi-load AGV task scheduling method based on improved genetic algorithm and hierarchical clustering algorithm according to claim 1 is characterized in that: In step 1, the hierarchical clustering algorithm clusters the tasks into several clusters based on the Manhattan distance. The clusters are first randomly sorted to form inter-cluster gene fragments to represent the order of each cluster. Then, the tasks within each cluster are randomly sorted to form intra-cluster gene fragments to represent the delivery order of the tasks within each cluster. The sorting result is used as the initial delivery order. Assume that the task set is N = {1, 2, ..., n}, the number of tasks is n, the result of hierarchical clustering is C = {c1, c2, ..., cm}, and the number of clusters is m, where m should satisfy: Where m! is the factorial of m, |c i | is the number of tasks in cluster i; The distance between two tasks is the Manhattan distance: d ij mhd =|x i -x j |+|y i -y j | (3) where d ij mhd is the Manhattan distance between task i and task j, x i ,y i , x j ,y j are the horizontal and vertical coordinates of tasks i and j.
3. The multi-load AGV task scheduling method based on improved genetic algorithm and hierarchical clustering algorithm according to claim 1 is characterized in that: In the improved genetic algorithm based on differential operation described in step 2, the differential operation is used to replace the mutation operation in the genetic algorithm, and the concept of exchanger is used to perform the addition and subtraction operations of chromosomes in the differential operation. The result after differential operation is: R i =R i +F(R1-R2) (4) where R i To perform differential gene fragments between clusters of individuals, F is the probability of retaining the exchanger, F∈(0,1), and F(R1-R2) means that the exchanger obtained by R1-R2 has a probability of being retained.
4. The multi-load AGV task scheduling method based on improved genetic algorithm and hierarchical clustering algorithm according to claim 1 is characterized in that: The double-layer coding strategy described in step 3 includes: using inter-cluster coding and intra-cluster coding to decode, performing differential operations and crossover operations on inter-cluster gene segments, and performing mutation operations on intra-cluster gene segments; Assuming that the encoding of each cluster is [3,1,2], and the encoding within each cluster is [[2,1,3],[1],[1,2]], then the double-layer encoding is [[3,1,2],[[2,1,3],[1],[1,2]]], and the decoding result is [4,6,3,2,5,1], which means the multi-load AGV delivery order is 4-6-3-2-5-1; The specific steps include: 41) Calculate the objective function value of the population, perform fast non-dominated sorting on the individuals in the population, and calculate the crowding value P[i] of each individual distance ; P[i+1]f k represents the objective function value of the i+1th individual, P[i-1]f k represents the objective function value of the i+1th individual, and r is the number of objective functions; 42)R i0 is the inter-cluster gene fragment of the current individual, and two individuals are randomly selected. The inter-cluster gene fragment of the two individuals is R 10 ,R 20 Perform differential operation, where R i0 ≠R 10 ≠R 20 , using the difference operation as: R i0 =R i0 +F(R 10 -R 20 ) (6) Where F is the probability of retaining the swapper, F∈(0,1), F(R 10 -R 20 ) represents R 10 -R 20 The resulting swapper has a probability of F being retained; 43) Generate a random number from 0 to 1. If the random number > crossover probability CR, then R i0 No crossover operation is performed. Otherwise, two individuals are randomly selected and the one with smaller non-dominated sorting is selected as the parent. If the non-dominated sorting is equal, the one with larger crowding distance is selected as the parent. If the crowding distances are equal, one is randomly selected and R is set. i0 Crossover with the inter-cluster gene fragments of the parent generation, using partial mapping crossover; 44) Generate a random number between 0 and 1. If the random number > mutation probability MR, then the gene fragment R in the cluster of the current individual i1 No mutation operation is performed, otherwise, R is randomly selected i1 A gene fragment is randomly rearranged to obtain a new generation; 45) Repeat 42, 43, and 44 until all individuals in the current population have undergone differential operations; 46) Merge the current population and the new generation population, and use the elite selection principle to select the next generation; 47) Repeat 41, 45, and 46 until the current number of iterations G> the number of double-layer coding iterations G0.
5. The multi-load AGV task scheduling method based on improved genetic algorithm and hierarchical clustering algorithm according to claim 1 is characterized in that: Decode the double-layer code as described in step 4 to obtain the task sequence, encode the task sequence directly into chromosomes, and perform differential and crossover operations of the genetic algorithm; The specific steps include: 51) Change the double-layer coding to single-layer coding; 52) Calculate the objective function value of the population, perform fast non-dominated sorting on the individuals in the population, and calculate the crowding value R[i] of each individual distance ; P[i+1]f k represents the objective function value of the i+1th individual, P[i-1]f k represents the objective function value of the i-1th individual, and r is the number of objective functions; 53) Randomly select two individuals, R1 and R2, and perform differential operation, where R i ≠R1≠R2, perform differential operation: R i =R i +F(R1-R2) (8) where R i is the current individual, F is the probability of retaining the swapper, F∈(0,1), F(R1-R2) means that the swapper obtained by R1-R2 has a probability of f being retained; 54) Generate a random number from 0 to 1. If the random number > crossover probability CR, then R i No crossover operation is performed. Otherwise, two individuals are randomly selected and the one with smaller non-dominated sorting is selected as the parent. If the non-dominated sorting is equal, the one with larger crowding distance is selected as the parent. If the crowding distances are equal, one is randomly selected and R is set. i Crossover with the parent generation individuals to obtain the new generation, and the crossover method is partial mapping crossover; 55) Repeat 53 and 54 until all individuals in the current population have undergone differential operations; 56) Merge the current population and the new generation population, and select the offspring using the elite selection principle; 57) Repeat 52, 55, and 56 until the current iteration number G >= total iteration number Gen 58) Calculate the objective function value of the population and perform fast non-dominated sorting on the individuals in the population; 59) Output the Pareto front solution and obtain the multi-capacity AGV scheduling solution.