A vehicle path planning method based on firefly algorithm

By discretizing the firefly algorithm and combining fluorescein and transportation costs to redefine the neighborhood range, the problem of local optimality and slow convergence speed in vehicle path planning is solved, and more efficient path planning is achieved.

CN115619305BActive Publication Date: 2025-08-22HANGZHOU DIANZI UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211251085.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-13
Publication Date
2025-08-22
Estimated Expiration
2042-10-13

AI Technical Summary

Technical Problem

Existing heuristic optimization algorithms are prone to falling into local optimization or slow convergence speed in vehicle path planning problems, making it difficult to effectively solve the problem of large-scale logistics distribution.

Method used

The firefly algorithm is discretized, the neighborhood range and neighborhood collection are redefined, and the path selection is selected in combination with fluorescein and transportation costs, and the path planning method is improved.

Benefits of technology

It improves the solution efficiency of vehicle path planning problems, reduces the cost of algorithm calculation, and obtains better path planning solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115619305B_ABST
    Figure CN115619305B_ABST
Patent Text Reader

Abstract

The present invention discloses a static vehicle path planning method based on the firefly algorithm. The method first discretizes the firefly algorithm (Glowworm Swarm Optimization, GSO), and by simulating the ant colony algorithm, converts the carriers of fluorescein from fireflies to edges, and then uses the fluorescein value and weight value on the edge to calculate the probability of the vehicle selecting the next node, thereby forming an access path. At the same time, considering that a large computational cost will be incurred when the problem scale is too large, the patent of the present invention redefines the neighborhood range and neighborhood set in the firefly algorithm. Through the method of the present invention, the solution effect of the vehicle path planning problem can be effectively improved, and the distribution cost in the logistics distribution process can be reduced, which has very important practical significance for vehicle path planning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention discloses a static vehicle path planning method, in particular to a static vehicle path planning method based on a firefly algorithm, and belongs to the technical field of computer application. Background Art

[0002] With the rapid development of e-commerce, more and more people prefer to purchase items online, and logistics is an effective solution to the problem of goods distribution. However, with the rapid increase in logistics volume, the cost of logistics distribution has also become increasingly high. Improving the efficiency of logistics distribution and controlling logistics distribution costs has become a very important issue. Vehicle Routing Problems (VRP) are recognized as theoretical models for solving logistics distribution problems to achieve the lowest goods distribution cost. It refers to the distribution center finding the minimum cost of the minimum number of vehicles to meet the needs of all users while minimizing travel time or the shortest driving route, while meeting customer needs and certain constraints. The vehicle routing problem is a combinatorial optimization problem that has very important practical significance for reducing logistics costs. Therefore, solving this problem has attracted the interest of a large number of researchers.

[0003] Currently, researchers have proposed many methods to solve this problem, which can be mainly divided into two categories: exact algorithms and heuristic algorithms. Exact algorithms are methods that can obtain optimal solutions by solving the problem mathematically, such as linear programming, greedy algorithms, and branch-and-bound methods. However, these algorithms can only solve optimization problems of relatively small scales. When the problem scale is relatively large, the time cost increases exponentially. In recent years, heuristic optimization algorithms have been widely used to solve vehicle path planning problems. Heuristic algorithms gradually approach the optimal solution by evaluating the quality of positions in state space. Therefore, a set of optimal solutions or near-optimal solutions can be obtained within an acceptable time limit. Common heuristic algorithms include ant colony algorithms, particle swarm algorithms, and evolutionary algorithms. However, existing heuristic optimization algorithms are prone to problems such as local optimality and slow convergence when solving path planning problems.

[0004] This paper discretizes the Glowworm Swarm Optimization (GSO) algorithm by simulating the ant colony algorithm process and applies it to the vehicle path planning problem. At the same time, by redefining the neighborhood range and neighborhood set in the GSO algorithm, the algorithm's computational cost can be effectively reduced. Summary of the Invention

[0005] The purpose of the present invention is to provide a vehicle path planning method based on the firefly algorithm to address the above problems, which can effectively improve the efficiency of solving vehicle path planning problems.

[0006] To achieve the above object, the technical solution of the present invention is:

[0007] A vehicle path planning method based on the firefly algorithm comprises the following steps:

[0008] Step 1, problem definition: Represent the entire city's road traffic network as a weighted undirected graph G = (V, E), where the point set V = {0, 1, 2, ..., n} and the edge set E = {(i, j), i, j∈V, i≠j}. Node i (i = 0, 1, 2, ..., n) in the point set represents the coordinates of the center point (distribution center or central warehouse) and all customers, 0 represents the center point, and the other n points represent n customers; edge (i, j) represents the path between node i and node j, and d(i, j) represents the weight of node i to node j, i.e., the transportation cost; g i represents the total demand for goods by customer i, and q represents the maximum load of all transport vehicles.

[0009] Step 2, Initialization: Set the number of fireflies, m, and change the carriers of luciferin from fireflies to edges. The initial luciferin value for all edges is l0. Set the luciferin volatility factor, ρ, and the luciferin update factor, γ, the current iteration number, t = 1, and the maximum iteration number, Maxiter. The firefly's step size is denoted by s, which is the weight of the edge from the current node to the next node. Use global to record the global optimal solution.

[0010] Step 3, movement phase: The original firefly movement only considers the influence of the fluorescein value. When solving the path planning problem, the influence of both the fluorescein value and the edge weight should be considered.

[0011] Step 3-1. Each firefly starts from the center point, and set k=1.

[0012] Step 3-2. For firefly k (i.e. vehicle k), open a new path and determine the sequence set of user nodes it has visited route k and the set of user nodes currently allowed to access allowed k .

[0013] Step 3-3. Assume that the current location of firefly k is c k , set the neighborhood range of firefly k to r k .

[0014] Step 3-4. Determine the neighboring user set N of Firefly k based on the neighborhood range k .

[0015] Step 3-5. Calculate fireflies k to N kThe transition probability of all nodes in

[0016] Step 3-6. Use the roulette method to determine the next moving node c' k , calculate the vehicle k serving user c′ k After the load.

[0017] Step 3-7. Determine whether vehicle k exceeds the maximum load q. If so, return to the center point, k = k + 1; otherwise, transfer to the next node c′ k , c′ k From allowed k Delete and add to route k , go to step 3-3.

[0018] Step 3-8. According to allowed k The number of elements in the middle determines whether all users have been visited. If so, return to the center point and go to step (4); otherwise, repeat steps 3-2 to 3-8 until all users have been visited.

[0019] Step 4: Form a feasible solution: In the original firefly algorithm, the location of each firefly is a feasible solution. However, in the path planning problem, the entire path formed by all fireflies constitutes a feasible solution. For example, X = (0, 2, 4, 5, 0, 1, 3, 9, 8, 0, 7, 6, 0) is a feasible solution. The first firefly visits user nodes 2, 4, and 5; the second firefly visits user nodes 1, 3, 9, and 8; and the third firefly visits user nodes 7 and 6.

[0020] Step 5: Calculate the feasible solution X formed by the tth iteration t The fitness function value f(X t ).

[0021] Step 6, Fluorescence Update Phase: After all users have been visited, update the fluorescence value on the edge. If the edge (i, j) is in the feasible solution, the following formula is used to update the fluorescence value:

[0022]

[0023] Among them, l c / d(i,j) is the fluorescein enhancement constant, parameter l c It plays a key role in determining the convergence speed of the algorithm and can usually be set to l c =l0.

[0024] If the edge (i, j) is not in the feasible solution, the fluorescence update formula for this edge is:

[0025] lt+1 (i, j) = (1 - ρ)l t (i, j)

[0026] Step 7, update the global optimal solution global. If f(X t ) < f(global), then global = X t , otherwise global remains unchanged; update the iteration number t = t + 1.

[0027] Step 8, repeat Steps 3 to 7 until the maximum number of iterations Maxiter is reached, and return the global optimal solution.

[0028] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0029] The vehicle path planning method based on the firefly algorithm involved in the present invention can effectively obtain a vehicle path planning solution and improve the problem-solving efficiency. In the present invention, the firefly algorithm is discretized, and the carrier of luciferin is changed from a firefly to an edge. By combining luciferin and transportation costs to select a path, it can effectively improve the path deviation problem caused by a single factor in path selection. The present invention redefines the neighborhood range and neighborhood set of fireflies, which can effectively reduce the algorithm and computational cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 is a flowchart of the vehicle path planning method based on the firefly algorithm of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0031] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0032] Data source: We downloaded 8 instance sets from the VRP instance database (https: / / www.sintef.no / projectweb), which respectively include 25, 50, 100, 200, 400, 600, 800, and 1000 users. Each instance set contains several instances. The coordinate positions of the users in each instance are different, and there are large differences in the number of vehicles and the load capacity of the vehicles involved. At the same time, there are also large differences in the demands of customers. Using these instances can effectively verify the effectiveness of the method in the present invention.

[0033] Such as Figure 1As shown, step (1) problem definition: the entire city's road traffic network is represented as a weighted undirected graph G = (V, E), where the point set V = {0, 1, 2, ..., n} and the edge set E = {(i, j), i, j∈V, i≠j}. The node i (i = 0, 1, 2, ..., n) in the point set represents the coordinate position of the center point (distribution center or central warehouse) and all customers, 0 represents the center point, and the other n points represent n customers; the edge (i, j) represents the path between node i and node j, and d(i, j) represents the weight of node i to node j, that is, the transportation cost; g i represents the total demand for goods by customer i, and q represents the maximum load of all transport vehicles.

[0034] Step (2) Initialization: Set the number of fireflies m (which should be greater than the minimum number of vehicles required for each instance), change the carriers of fluorescein from fireflies to edges, and set the initial fluorescein value of all edges to l0 = 100; set the fluorescein volatility factor ρ = 0.4, the fluorescein update factor γ = 0.6, the current iteration number t = 1, and the maximum iteration number Moxiter = 100; the step size of the firefly's movement is represented by s, which is the weight of the edge from the current node to the next node. Use global to record the global optimal solution.

[0035] Step (3) Movement phase: The original firefly movement only considers the influence of the fluorescein value. When solving the path planning problem, the influence of both the fluorescein value and the edge weight should be considered simultaneously.

[0036] Step 3-1. Each firefly starts from the center point, and set k=1.

[0037] Step 3-2. For firefly k (i.e. vehicle k), open a new path and determine the sequence set of user nodes it has visited route k and the set of user nodes currently allowed to access allowed k .

[0038] Step 3-3. Assume that the current location of firefly k is c k , set the neighborhood range of firefly k to Among them|allowed k | indicates the set allowed k Number of elements.

[0039] Step 3-4. Determine the neighboring user set N of Firefly k based on the neighborhood range k =min{j∈allowed k :d(c k ,j)≤r k}.

[0040] Step 3-5. Calculate fireflies k to N k The transition probability of all nodes in:

[0041]

[0042] in, Indicates that firefly k starts from the current node c k The transition probability to the accessible node j, l(c k ,j) represents the edge (c k ,j) Fluorescein concentration on .

[0043] Step 3-6. Use the roulette method to determine the next moving node c' k , calculate the vehicle k serving user c′ k After the load.

[0044] Step 3-7. Determine whether vehicle k exceeds the maximum load q. If so, return to the center point, k = k + 1; otherwise, transfer to the next node c′ k , c′ k From allowed k Delete and add to route k , go to step 3-3.

[0045] Step 3-8. According to allowed k The number of elements in the middle determines whether all users have been visited. If so, return to the center point and go to step (4); otherwise, repeat steps 3-2 to 3-8 until all users have been visited.

[0046] Step (4) forms a feasible solution: In the original firefly algorithm, the location of each firefly is a feasible solution. However, in the path planning problem, the entire path formed by all fireflies constitutes a feasible solution. For example, X = (0, 2, 4, 5, 0, 1, 3, 9, 8, 0, 7, 6, 0) is a feasible solution. The first firefly visits user nodes 2, 4, and 5, the second firefly visits user nodes 1, 3, 9, and 8, and the third firefly visits user nodes 7 and 6.

[0047] Step 5: Calculate the feasible solution X formed by the tth iteration t The fitness function value f(X t ):

[0048]

[0049] Among them, n t is the feasible solution X at the tth iteration t The number of elements in f(X t) is the feasible solution X formed in the t-th iteration t The corresponding fitness function value, which is the sum of the transportation costs of the edges passed by the vehicle when visiting all users.

[0050] Step (6) Fluorescence update stage: When all users have been visited, update the fluorescence values on the edges. If edge (i, j) is in the feasible solution, the fluorescence value is updated using the following formula:

[0051]

[0052] where, l c / d(i, j) is the fluorescence enhancement constant, and the parameter l c plays a key role in determining the convergence speed of the algorithm and can usually be set to l c = l0.

[0053] If edge (i, j) is not in the feasible solution, the fluorescence update formula for this edge is:

[0054] l t+1 (i, j) = (1 - ρ)l t (i, j)

[0055] ]>Step (7) Update the global optimal solution global. If f(X t ) < f(global), then global = X t , otherwise global remains unchanged; update the iteration number t = t + 1.

[0056] Step (8) Repeat steps 3 - 7 until the maximum number of iterations Maxiter is reached, and return the global optimal solution.

[0057] The above has described the embodiments of the present invention in detail in conjunction with the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, without departing from the principles and spirit of the present invention, various changes, modifications, substitutions, and variations to these embodiments still fall within the protection scope of the present invention.

Claims

1. A vehicle path planning method based on the firefly algorithm, characterized in that: The following steps are involved: Step 1, problem definition: Represent the entire city's road traffic network as a weighted undirected graph G = (V, E), where the point set V = {0, 1, 2, ..., n} and the edge set E = {(i, j), i, j∈V, i≠j}; Node i (i = 0, 1, 2, ..., n) in the point set represents the coordinate position of the center point and all customers, 0 represents the center point, and the other n points represent n customers; Edge (i, j) represents the path between node i and node j, d(i, j) represents the weight of node i to node j; g i represents the total demand for goods by customer i, and q represents the maximum load of all transport vehicles; Step 2, initialization phase: Set the number of fireflies m, change the carriers of fluorescein from fireflies to edges, and set the initial fluorescein value of all edges to l0; set the fluorescein volatility factor ρ, the fluorescein update factor γ, the current iteration number t = 1, and the maximum iteration number Maxiter; the step size of the firefly's movement is represented by s, which is the weight of the edge from the current node to the next node; Use global to record the global optimal solution; Step 3, mobile phase: Each firefly corresponds to a vehicle. For firefly k, the next mobile node is selected based on the fluorescence value and the weight of the path until the load of vehicle k exceeds the maximum load or all users are visited, forming a path route k ; Step 3 includes the following sub-steps: Step 3-1. Each firefly starts from the center point, and set k = 1; Step 3-2. For firefly k, open a new path and determine the sequence set of user nodes it has visited. k and the set of user nodes currently allowed to access allowed k ; Step 3-3. Assume that the current position of firefly k is c k , set the neighborhood range of firefly k to r k ; Step 3-4. Determine the neighboring user set N of Firefly k based on the neighborhood range k ; Step 3-5. Calculate fireflies k to N k The transition probability of all nodes in Step 3-6. Use the roulette method to determine the next node to move c' k , calculate the vehicle k serving user c' k After the load; Step 3-7. Determine whether vehicle k exceeds the maximum load q. If so, return to the center point, k = k + 1; otherwise, transfer to the next node c' k , c' k From allowed k Delete and add to route k , go to step 3-3; Step 3-8. According to allowd k The number of elements in the middle determines whether all users have been visited. If so, return to the center point and go to step 4; Otherwise, repeat steps 3-2 to 3-8 until all users are visited; Step 4, forming a feasible solution: In the path planning problem, the set of paths formed by all fireflies constitutes a feasible solution; Step 5: Calculate the feasible solution X t The fitness function value f(X t ): Among them, n t is the feasible solution X at the tth iteration t The number of elements in f(X t ) is the feasible solution X formed at the tth iteration t The corresponding fitness function value; Step 6, Fluorescence Update Phase: After all users have been visited, update the value of the edge fluorescence; Step 7, update the global optimal solution global. If f(X t ) < f(global), then global = X t , otherwise global remains unchanged; update the iteration number t = t + 1; Step 8: Repeat steps 3 to 7 until the maximum number of iterations reaches Maxiter, and return to the global optimal solution.

2. The vehicle path planning method based on the firefly algorithm according to claim 1, characterized in that: The updating formula of the fluorescein value in step 6 is as follows: If edge (i, j) is in the feasible solution, the following formula is used to update the fluorescence value: Among them, l c / d(i,j) is the fluorescein enhancement constant, set to l c =l0; If the edge (i, j) is not in the feasible solution, the fluorescence update formula for this edge is: L t+1 (i,j)=(1-ρ)l t (,j)。

Citation Information

Patent Citations

  • Route planning method based on multi-target glowworm swarm algorithm

    CN102768536A

  • WSN clustering routing method based on optimization with salp swarm algorithm

    US20220256431A1