A Route Planning Method for Home Appliance Recycling Vehicles Based on an Improved Genetic Algorithm
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-17
- Publication Date
- 2026-08-14
AI Technical Summary
[0005]本发明所要解决的技术问题是针对背景技术中提到的缺陷,提供一种基于改进遗传算法的家电回收车辆路径规划方法,在保持较高的求解质量的同时,克服传统遗传算法收敛速度慢、算法耗时长,难以兼顾种群多样性和收敛速度的问题
[0012]1、本发明采用基于高斯矩阵变异算子的改进遗传算法,为家电回收车辆的路径进行规划。该方法在保证较高求解质量的同时,有效解决了传统遗传算法的收敛速度慢,容易陷入局部最优,难以兼顾全局寻优能力和收敛速度的问题。
Smart Images

Figure CN116432877B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of route planning for home appliance recycling vehicles, and more particularly to a route planning method for home appliance recycling vehicles based on an improved genetic algorithm. Background Technology
[0002] With the improvement of residents' living standards, the replacement rate of household appliances is accelerating, and the number of discarded appliances continues to grow. Based on the extended producer responsibility principle, household appliance manufacturers are responsible for the recycling, dismantling, and reuse of discarded appliances. The recycling process requires planning reasonable transportation routes for recycling vehicles to improve transportation efficiency and reduce transportation costs. The appliance recycling vehicle route planning problem is essentially a variation of the Traveling Salesman Problem (TSP). It considers a single vehicle starting from a starting point, loading discarded appliances at various stations along the way, and transporting them to the final recycling point, seeking the route with the lowest transportation cost.
[0003] Genetic Algorithm (GA) is an adaptive global optimization search algorithm that simulates the genetic and evolutionary processes of organisms in nature. It draws inspiration from the genetic processes of individuals in a population, employing a population search technique. It uses the encoding of decision variables as the operational objects, with each individual's chromosome corresponding to a feasible solution to the problem. The population constitutes the entire set of feasible solutions. The fitness function is the evaluation metric used in the genetic algorithm to judge the quality of individuals. The selection of the fitness function determines the direction of population evolution. Individuals in the population are selected and sorted according to their fitness. Through gene crossover, mutation, and other operations, the next generation of the population is generated. After multiple iterations of optimization, the population continuously evolves towards higher fitness, ultimately obtaining an approximate optimal solution to the problem.
[0004] The optimization objective of the appliance recycling vehicle routing problem consists of two parts: the transportation cost of the vehicle's own weight and the transportation cost of carrying the appliances. Minimizing the transportation cost based on the vehicle's own weight only requires considering the distance between stations when determining the station visit order. Minimizing the transportation cost based on the appliances' own weight requires considering not only the distance between stations but also the quantity of appliances to be recycled at each station. Solving this problem necessitates a trade-off between the transportation costs incurred due to the vehicle's own weight and the amount of goods loaded. Compared to other algorithms, genetic algorithms possess strong random search capabilities and are characterized by simple implementation, high flexibility, and easy scalability. However, traditional genetic algorithms suffer from slow convergence and premature convergence when solving the appliance recycling vehicle routing problem. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to address the shortcomings mentioned in the background art by providing a method for planning the route of home appliance recycling vehicles based on an improved genetic algorithm. While maintaining high solution quality, the method overcomes the problems of slow convergence speed, long algorithm time, and difficulty in balancing population diversity and convergence speed of traditional genetic algorithms.
[0006] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:
[0007] A method for route planning of home appliance recycling vehicles based on an improved genetic algorithm, characterized by the following steps:
[0008] (1) Establish a mathematical model for the route planning of home appliance recycling vehicles;
[0009] (2) Solve the problem using an improved genetic algorithm;
[0010] (3) Calculate the route that minimizes the transportation cost of the appliance recycling vehicle.
[0011] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0012] 1. This invention employs an improved genetic algorithm based on the Gaussian matrix mutation operator to plan the routes for appliance recycling vehicles. This method effectively addresses the problems of slow convergence speed, susceptibility to local optima, and difficulty in balancing global optimization capability and convergence speed in traditional genetic algorithms while ensuring high solution quality.
[0013] 2. This invention fully explores the prior information in the original data of recycling stations, and uses the implicit station position distribution characteristics to construct a Gaussian probability mutation matrix to guide the population to evolve towards higher fitness. The improved genetic algorithm is more suitable for solving the route planning problem of home appliance recycling vehicles.
[0014] 3. The method of the present invention is applied to the recycling process to plan a reasonable transportation route for recycling vehicles, thereby improving transportation efficiency and reducing transportation costs. Attached Figure Description
[0015] Figure 1 This is a schematic diagram of the main process of step (2) of the present invention.
[0016] Figure 2 for Figure 1 A schematic diagram of the Gaussian probability mutation matrix calculation process in step (2.1).
[0017] Figure 3 for Figure 1 Schematic diagram of Gaussian matrix mutation operator in step (2.7)
[0018] Figure 4 This is a schematic diagram of the site distribution in an embodiment of the present invention.
[0019] Figure 5 The graphs shown are the average convergence curves of the improved genetic algorithm and the traditional genetic algorithm for the appliance recycling vehicle routing problem in this embodiment of the invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described below with reference to the accompanying drawings and embodiments. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the invention, and should not be construed as limiting the invention.
[0021] Example
[0022] A method for route planning of home appliance recycling vehicles based on an improved genetic algorithm includes the following steps:
[0023] 1. Establish a mathematical model for route planning of home appliance recycling vehicles.
[0024] The route planning problem for home appliance recycling vehicles is described as follows: Given a vehicle's starting point, ending point, and N stations (N = 20), each station provides door-to-door recycling services within a certain area, collecting and organizing discarded home appliances within that area for unified collection by the recycling vehicle. The starting point, ending point, and station addresses are shown in Table 1. The distribution is as follows... Figure 1 As shown. The recycling vehicle starts from the starting point and visits each station sequentially along the route to complete the recycling of used home appliances. After traversing N stations, the vehicle reaches the destination, completing the recycling task. The starting point is a vehicle transportation company, and the destination is a used home appliance dismantling center. Transportation costs due to load capacity need to be considered during transport. It is assumed that the maximum load capacity of the recycling vehicle can always meet the recycling needs of N stations. Therefore, this invention minimizes transportation costs under the following constraints:
[0025] (1) Vehicle route constraints. Vehicles must start from the origin, visit all stations, and arrive at the destination.
[0026] (2) Vehicle access constraints. Each site must be accessed by a reclaimed vehicle only once.
[0027] Let set K = {0, 1, 2, 3, ..., N, N+1}, where "0" and "N+1" represent the starting and ending points, respectively, and "1" to "N" represent the N station numbers. The recycling amount corresponding to each station is... (Recycling volume refers to the weight of household appliances), as shown in Table 2. Let the distance between any two stations be d. ij(i, j∈K), the distances between each pair of the N+2 stations form an (N+2)×(N+2) dimensional matrix D, which is calculated by calling the open platform API. The vehicle's weight is O = 2. The feasible solution obtained from route planning is denoted as v = [v0, v1, ..., v N v N+1 ](v n ∈K). The set of feasible solutions consisting of all feasible solutions is denoted as Ω=[v 1 ;v 2 ;…;v M ], where M = N!. Using This indicates that the recycling vehicle is at station v i and v i+1 The transportation cost per unit distance when traveling between locations is expressed as follows:
[0028]
[0029] Where, α 0 α represents the transportation cost coefficient per unit distance when the vehicle is empty. * The transportation cost coefficient per unit distance for goods is taken as 1. This indicates that the vehicle is at station v. i and v i+1 The load capacity during travel is expressed as follows: The total cost of recycling a vehicle during its operation is as follows:
[0030]
[0031] in, This represents the transportation costs incurred during the transportation process due to the vehicle's own weight. This represents the transportation costs incurred during the transport of recycled appliances. θ = α 0 O and μ=α * These represent the weighting coefficients corresponding to the two parts of the transportation cost. By adjusting θ and μ, the model considered in this invention can be applied to more scenarios.
[0032] Example Table 1 (i.e., site distribution map) Figure 4 )
[0033]
[0034] Table 2
[0035]
[0036]
[0037] Based on the above description, the route planning problem for home appliance recycling vehicles can be expressed as follows:
[0038]
[0039] stv0 = 0, v N+1 =N+1 (5)
[0040]
[0041] Formula (4) is the objective function, representing the total transportation cost incurred by the vehicle during its visit to N stations; Formula (5) is the vehicle route constraint; and Formula (6) is the vehicle access constraint.
[0042] 2. Solve the problem using an improved genetic algorithm, such as... Figure 1 As shown:
[0043] This invention employs an improved genetic algorithm to solve the route planning problem for home appliance recycling vehicles. The specific steps are as follows:
[0044] 2.1) Calculate the Gaussian probability variation matrix, such as... Figure 2 As shown.
[0045] 2.1.1) Sort the station numbers in ascending order of distance from the starting point, in descending order of distance from the ending point, and by recovery amount e. i The vectors a, b, and u are obtained by arranging them in ascending order, and the sorted basic sequence matrix H of the sites is constructed as follows:
[0046] H = [a, b, u]
[0047] 2.1.2) Let w represent the station number, starting from 1.
[0048] 2.1.3) Find the row number n corresponding to the element in each column of H that is equal to w. w m w k w , forming vector β w =[n w m w k w ].
[0049] 2.1.4) Calculate μ w and
[0050]
[0051] 2.1.5) On the interval (0.5, N+0.5) Truncate to obtain The probability density function γ(μ, σ, 0.5, N+0.5; x) and distribution function Ψ(μ) of the truncated distribution. w , σw , 0.5, N+0.5; x):
[0052]
[0053]
[0054] Where χ(·) and Φ(·) represent the probability density function and distribution function of the standard normal distribution, respectively;
[0055] 2.1.6) Calculate the probability P that station w is in position i in feasible solution v. w (i):
[0056] P w (i)=Ψ(μ w , σ w ,0.5,N+0.5;i+0.5)-Ψ(μ w , σ w (i = 0.5, N+0.5; i-0.5)
[0057] 2.1.7) Increment w by 1, then determine whether w is less than or equal to N. If w ≤ N, execute step (13); if w > N, end the loop and obtain the Gaussian probability matrix P. G :
[0058] P a =[P wi ] N×N P wi =P w (i)
[0059] 2.2) Set the generation counter t, and the maximum generation T = 200.
[0060] 2.3) Use natural number encoding to randomly generate the initial population, and set the population size to 80.
[0061] 2.4) Calculate the fitness function value f(v) for all individuals. The fitness function f(v) is:
[0062]
[0063] 2.5) Selection operation. All individuals are sorted in descending order of fitness value. Individuals with high fitness values are retained for the next generation. After each selection and mutation, the new population is larger than the original population size. The selection operation maintains the population at the original size.
[0064] 2.6) Crossover operation. Based on the crossover probability P c=0.9 Select individuals in pairs from the existing population. Each individual randomly selects one gene, and the two genes are exchanged to generate a new individual. The newly generated individual is then added to the population.
[0065] 2.7) Mutation operation. Based on the mutation probability P m =0.5 Select individuals from the existing population, mutate their genes using the Gaussian matrix mutation operator, and add the resulting new individuals to the population, such as... Figure 3 As shown.
[0066] 2.7.1) Let i represent the i-th individual in the population, starting from 3.
[0067] 2.7.2) The roulette wheel selection method is used to select and determine the gene locus to be mutated in the i-th individual of the population, forming a vector π. i According to π i Select the mutant individuals and determine π. i length If the value is 0, skip step 2.7.3; otherwise, proceed with step 2.7.3.
[0068] 2.7.3) Use the Gaussian matrix mutation operator to mutate the i-th individual, and let the variable j = 1.
[0069] 2.7.3.1) Select π i The j-th element π i (j), select the genotype v of the i-th individual. i The πth i (j) elements v i (π i (j) represents the gene to be mutated; calculate P. G v i (π i The cumulative probability q(k) of row (j) (k = 1, 2, ..., N):
[0070]
[0071] 2.7.3.2) After obtaining the cumulative probability q(k), the roulette wheel selection method is used to select gene v. i (π i (j)) In v, the new position g.
[0072] 2.7.3.3) Gene v i (π i (j)) and v i (g) Swap positions to complete one mutation.
[0073] 2.7.3.4) Increment j by 1, and determine if j is greater than L. πIf the result is greater than 1, terminate the mutation operation on the i-th individual; otherwise, proceed to step 2.7.3.2.
[0074] 2.7.4) Increment i by 1, then determine if i is greater than the population size. If it is, end step 2.7); otherwise, proceed to step 2.7.3.
[0075] 2.8) Update the generation counter t and determine whether the maximum generation T has been reached. If t≤T, jump to step 2.4); if t>T, terminate the evolution. At this time, the individual with the highest fitness in the population is the optimal solution.
[0076] (3) Calculate the route that minimizes the transportation cost for the appliance recycling vehicle.
[0077] Performance Comparison of Examples
[0078] Running both algorithms 200 times each, the improved genetic algorithm yielded the solution: 0→8→11→19→13→20→14→16→12→4→15→3→6→2→9→5→7→10→18→17→21→22. The average convergence curve of the algorithm is shown below. Figure 5 As shown in the figure. Simulation results show that the improved genetic algorithm provided by this invention significantly improves the average convergence speed while maintaining high solution accuracy. The Gaussian matrix mutation operator based on station location relationships and recovery volume information, while maintaining population diversity, can use prior information on population mutation as a guiding factor for the mutation direction, accelerating the population's evolution towards higher fitness and improving the algorithm's convergence speed. In application, the method of this invention can find the travel path with the minimum transportation cost, achieving the goal of improving transportation efficiency and reducing transportation costs.
Claims
1. A method for route planning of home appliance recycling vehicles based on an improved genetic algorithm, characterized in that: Includes the following steps: (1) Establish a mathematical model for the route planning of home appliance recycling vehicles; (2) Solve the problem using an improved genetic algorithm; (3) Develop the route that minimizes the transportation cost for the appliance recycling vehicle; The mathematical model in step (1) is as follows: Let set Where "0" and " "" represents the starting point and the ending point, respectively, from "1" to "". "respectively represent" Each site number; Let the recycling amount corresponding to each site be... The amount of recycled appliances refers to their weight. Let the distance between any two stations be . , The distance between any two stations constitutes a dimensional matrix ; Assume the vehicle's weight is ; Let the feasible solution obtained from route planning be denoted as ( ); Let the set of feasible solutions, which comprises all feasible solutions, be denoted as . ,in ;use Indicates that the recycling vehicle is at the station and The transportation cost per unit distance when traveling between locations is expressed as follows: (1) in, This represents the transportation cost coefficient per unit distance when the vehicle is unloaded. This represents the transportation cost coefficient per unit distance of goods. Indicates that the vehicle is at the station. and The load capacity during travel is expressed as follows: (2) The total cost of recycling a vehicle during its operation is as follows: (3) in, This represents the transportation costs incurred during the transportation process due to the vehicle's own weight. This indicates the transportation costs incurred during the transportation of recycled home appliances; and These represent the weighting coefficients; Based on the above description, the route planning problem for home appliance recycling vehicles can be expressed as follows: (4) (5) (6) in, Formula (4) is the objective function, representing the vehicle access... The total transportation costs incurred during the process at each station; Formula (5) represents the vehicle route constraints. Formula (6) represents the vehicle access constraints; The method process in step (2) includes: 2.1) Calculate the Gaussian probability variation matrix; 2.2) Set the generation counter Maximum number of generations ; 2.3) Randomly generate the initial population; 2.4) According to the fitness function Evaluate all individuals; 2.5) Selection operation: Individuals with high fitness values are retained for the next generation; 2.6) Crossover operation: based on crossover probability Select individuals in pairs from the existing population, use the crossover operator to select genes for crossover operations, and generate new individuals; 2.7) Mutation operation: based on mutation probability Select individuals from the existing population and use the Gaussian matrix mutation operator to mutate the genes of the individuals; 2.8) Update the generation counter Determine whether the maximum number of generations has been reached. ,like (Jump to step 2.4); if If the evolution stops, the individual with the highest fitness in the population is the optimal solution. The calculation process of the Gaussian probability mutation matrix in step 2.1) is as follows: 2.1.1) Sort the station numbers in ascending order by distance from the starting point, in descending order by distance from the ending point, and in descending order by recovery volume. The vectors are obtained by arranging them in ascending order. , and Construct a sorted site base sequence matrix : 2.1.2) Using This represents the station number, starting from 1. 2.1.3) Searching Each column and The row number corresponding to equal elements , forming vectors ; 2.1.4) Calculation and : ; 2.1.5) In the interval Top Truncate to obtain probability density function of the truncated distribution and distribution function : in and Let represent the probability density function and distribution function of the standard normal distribution, respectively; 2.1.6) Computing Station In feasible solutions Median order is probability : 2.1.7) Add 1, then check Is it less than or equal to? ,like Execute step 2.1.3); if The loop ends, and the Gaussian probability matrix is obtained. : ; In step 2.4), the fitness function for: ; In step 2.7) of the method, the specific steps of the Gaussian matrix mutation operator are as follows: 2.7.1) Using Indicates the first in the population Each individual, starting with a value from 3; 2.7.2) Use roulette wheel selection to select the first [number] [unit] in the population. The gene loci to be mutated in each individual constitute a vector. ,judge length If the value is 0, skip step 2.7.3; otherwise, proceed with step 2.7.
3. 2.7.3) Using the Gaussian matrix mutation operator on the first Perform mutation operations on each individual, and define variables. ; 2.7.3.1) Select The Middle element Select the first Genotype of an individual The first in element For the gene to be mutated, calculate No. Cumulative probability of rows : 2.7.3.2) Using roulette wheel selection to select genes exist The new order of positions ; 2.7.3.3) Genes and Swap positions to complete one mutation; 2.7.3.4) Add 1, then check. Is it greater than If it is greater than, the process ends. Perform mutation operations on each individual; otherwise, proceed to step 2.7.3.1). 2.7.4) Add 1, then check. If the mutation is greater than the population size, end the mutation operation; otherwise, proceed to step 2.7.2.