Large-scale material support route planning method and system based on improved Dijkstra algorithm
By improving the Dijkstra algorithm, initializing and updating the path point set, and calculating and optimizing the Dijkstra algorithm value, the problems of inefficient and redundant path points of large-scale material support route planning in the existing technology are solved, and more efficient route planning is achieved.
Patent Information
- Application Number
- CN202411817913.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-25
AI Technical Summary
The existing Dijkstra algorithm is inefficient in large-scale material support route planning and the path contains more redundant path points.
The improved Dijkstra algorithm is adopted to initialize the path point set and calculate the optimized Dijkstra algorithm values of each path point, select the optimal path point, and gradually update the path point set until the end point is reached, and the optimal support path is obtained.
It improves the efficiency and effectiveness of route planning, reduces redundant route points, and improves the optimization ability of material support routes.
Smart Images

Figure CN119687949A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of path planning, and more specifically to a large-scale material support route planning method and system based on an improved Dijkstra algorithm. Background Art
[0002] Flood control, emergency rescue and disaster relief often require large quantities of materials, and large-scale material transportation planning is a complex and critical task. It is directly related to the lives of people in the disaster area and the progress of post-disaster reconstruction. At present, determining the optimal route for material support has become a "bottleneck" that restricts the success of emergency rescue and disaster relief.
[0003] The existing Dijkstra algorithm has a relatively simple criterion for finding the optimal route. It expands outward from a certain point as the center, which is similar to drawing a circle. As the search radius gradually increases, the desired target point can always be found in the end. This method has the problems of low efficiency and the path contains many redundant path points.
[0004] Therefore, how to provide a large-scale material support route planning method and system that can improve the efficiency and effectiveness of route planning is an urgent problem that technical personnel in this field need to solve. Summary of the invention
[0005] In view of this, the object of the present invention is to provide a large-scale material support route planning method and system based on an improved Dijkstra algorithm.
[0006] In order to achieve the above object, the present invention adopts the following technical solution:
[0007] On the one hand, a large-scale material support route planning method based on an improved Dijkstra algorithm is provided, comprising the following steps:
[0008] S1: Initialize the path point set P of the large-scale material support route as P = {V star}, where V star Indicates the starting point of the large-scale material support route;
[0009] S2: Calculation and V star The optimized Dijkstra algorithm value of each directly connected path point is selected, and the path point with the smallest optimized Dijkstra algorithm value is selected as the second path point V2, and the path point set P is updated to P = {V star , V2};
[0010] S3: Calculation and V i-1 The optimized Dijkstra algorithm value of each directly connected path point is selected, and the path point with the smallest optimized Dijkstra algorithm value is selected as the i-th path point V i; Update the path point set P to P = {V star , V2, ... V i-1 , V i}; where i>=2;
[0011] S4: Repeat S3 until you reach the end point V of the large-scale material support route. end , update the path point set P to P = {V star , V2, ..., V end} to obtain the optimal support path.
[0012] Preferably, the optimized Dijkstra algorithm value of each path point is obtained based on the following formula:
[0013] f Dijkstra (V i )=λ1*distance(V i ,V star )+λ2*distance(V i ,V end )+λ3*min{distance(V i ,V j )}
[0014] Among them, f Dijkstra (V i ) represents the path point V i Optimized Dijkstra algorithm value; distance(V i ,V end ) table represents the path point V i To waypoint V end distance(V i ,V star ) represents the path point V i To waypoint V star distance(V i ,V j ) represents the path point V i To waypoint V j The distance of the path point V i To waypoint V j The road sections between are delayed or impassable routes; λ1, λ2, and λ3 represent adjustment coefficients.
[0015] Preferably, distance(V i ,V end )、distance(V i ,V star ) and distance(V i ,V j) is obtained based on the following formula:
[0016]
[0017] Among them, (V i,x , V i,y ) indicates V i Coordinates of (V star,x , V star,y ) indicates V star Coordinates of (V end,x , V end,y ) indicates V end Coordinates of (V j,x V j,y ) indicates V j The coordinates of .
[0018] Preferably, the objective function of the large-scale material support route planning method is:
[0019] min D=distance(V star ,V2)+distance(V2,V3).,..,+distance(V end-1 ,V end );
[0020] Where D represents the total distance of the support path; distance(V star , V2) represents the path point V star The distance to the path point V2; distance(V2,V3) represents the distance from the path point V2 to the path point V3; distance(V end-1 ,V end ) represents the path point V end-1 To waypoint V end distance.
[0021] Preferably, the constraint condition of the objective function is: ∑B ij =0; where B ij Represents the path point V i To waypoint V j The usage of the road section between ij =1 means passing the road section; if B ij =0 means that the road section has not been passed.
[0022] On the other hand, a large-scale material support route planning system based on an improved Dijkstra algorithm is provided, including a path initialization module and a path update module:
[0023] The path initialization module is used to initialize the path point set P of the large-scale material support route as P = {V star}, where Vstar Indicates the starting point of the large-scale material support route;
[0024] The path update module is used to calculate V i-1 The optimized Dijkstra algorithm value of each directly connected path point is selected, and the path point with the smallest optimized Dijkstra algorithm value is selected as the i-th path point V i ; Update the path point set P to P = {V star , V2, ... V i-1 , V i}; where i>=2.
[0025] Preferably, the path updating module includes an optimized Dijkstra algorithm value calculation module:
[0026] The optimized Dijkstra algorithm value calculation module is used to calculate the optimized Dijkstra algorithm value of each path point; wherein the optimized Dijkstra algorithm value of each path point is obtained based on the following formula:
[0027] f Dijkstra (V i )=λ1*distance(V i ,V star )+λ2*distance(V i ,V end )+λ3*min{distance(V i ,V j )}
[0028] Among them, f Dijkstra (V i ) represents the path point V i Optimized Dijkstra algorithm value; distance(V i ,V end ) table represents the path point V i To waypoint V end distance(V i ,V star ) represents the path point V i To waypoint V star distance(V i ,V j ) represents the path point V i To waypoint V j The distance of the path point V i To waypoint V j The road sections between are delayed or impassable routes; λ1, λ2, and λ3 represent adjustment coefficients.
[0029] Preferably, the optimized Dijkstra algorithm value calculation module includes a distance calculation module, and the distance calculation module is used to calculate the distance between two path points, specifically including the following formula:
[0030]
[0031] Among them, (V i,x , V i,y ) indicates V i Coordinates of (V star,x , V star,y ) indicates V star Coordinates of (V end,x , V end,y ) indicates V end Coordinates of (V j,x V j,y ) indicates V j The coordinates of .
[0032] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a large-scale material support route planning method and system based on the improved Dijkstra algorithm, which can improve the efficiency and effect of route planning. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0034] Figure 1 A flow chart of a large-scale material support route planning method based on an improved Dijkstra algorithm provided by the present invention. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0036] like Figure 1 As shown, the embodiment of the present invention discloses a large-scale material support route planning method based on an improved Dijkstra algorithm, comprising the following steps:
[0037] S1: Initialize the path point set P of the large-scale material support route as P = {V star}, where V star Indicates the starting point of the large-scale material support route;
[0038] S2: Calculation and V star The optimized Dijkstra algorithm value of each directly connected path point is selected, and the path point with the smallest optimized Dijkstra algorithm value is selected as the second path point V2, and the path point set P is updated to P = {V star , V2};
[0039] It is understandable that: there may be multiple second path points V2, so there may be multiple different path point sets P = {V star , V2}.
[0040] S3: Calculation and V i-1 The optimized Dijkstra algorithm value of each directly connected path point is selected, and the path point with the smallest optimized Dijkstra algorithm value is selected as the i-th path point V i ; Update the path point set P to P = {V star , V2, ... V i-1 , V i}; where i>=2;
[0041] It can be understood that: the i-th path point V i There may be multiple, so there may be multiple different path point sets P = {V star , V2, ... V i-1 , V i}.
[0042] S4: Repeat S3 until you reach the end point V of the large-scale material support route. end , update the path point set P to P = {V star , V2, ..., V end} to obtain the optimal support path.
[0043] It is understandable that: due to V star , V2, ... V i-1 There may be multiple paths, so there may be multiple different path point sets P = {V star , V2, ..., V end}.
[0044] Furthermore, the optimized Dijkstra algorithm value of each path point is obtained based on the following formula:
[0045] f Dijkstra (V i)=λ1*distance(V i ,V star )+λ2*distance(V i ,V end )+λ3*min{distance(V i ,V j )}
[0046] Among them, f Dijkstra (V i ) represents the path point V i Optimized Dijkstra algorithm value; distance(V i ,V end ) table represents the path point V i To waypoint V end distance(V i ,V star ) represents the path point V i To waypoint V star distance(V i ,V j ) represents the path point V i To waypoint V j The distance of the path point V i To waypoint V j The road sections between are delayed or impassable routes; λ1, λ2, and λ3 represent adjustment coefficients.
[0047] Furthermore, distance(V i ,V end )、distance(V i ,V star ) and distance(V i ,V j ) is obtained based on the following formula:
[0048]
[0049] Among them, (V i,x , V i,y ) indicates V i Coordinates of (V star,x , V star,y ) indicates V star Coordinates of (V end,x , V end,y ) indicates V end Coordinates of (V j,x V j,y ) indicates V j The coordinates of .
[0050] Furthermore, the objective function of the large-scale material support route planning method is:
[0051] min D=distance(V star ,V2)+distance(V2,V3).,..,+distance(V end-1 ,V end );
[0052] Where D represents the total distance of the support path; distance(V star , V2) represents the path point V star The distance to the path point V2; distance(V2,V3) represents the distance from the path point V2 to the path point V3; distance(V end-1 ,V end ) represents the path point V end-1 To waypoint V end distance.
[0053] Furthermore, the constraint condition of the objective function is: ∑B ij =0; where B ij Represents the path point V i To waypoint V j The usage of the road section between ij =1 means passing the road section; if B ij =0 means that the road section has not been passed.
[0054] It can be understood that: since there may be multiple different path point sets P = {V star , V2, ..., V end}, so we can select multiple different path point sets P = {V star , V2, ..., V end}Select the optimal support path.
[0055] The embodiment of the present invention also provides a large-scale material support route planning system based on the improved Dijkstra algorithm, including a path initialization module and a path update module:
[0056] The path initialization module is used to initialize the path point set P of the large-scale material support route as P = {V star}, where V star Indicates the starting point of the large-scale material support route;
[0057] The path update module is used to calculate V i-1The optimized Dijkstra algorithm value of each directly connected path point is selected, and the path point with the smallest optimized Dijkstra algorithm value is selected as the i-th path point V i ; Update the path point set P to P = {V star , V2, ... V i-1 , V i}; where i>=2.
[0058] Furthermore, the path updating module includes an optimized Dijkstra algorithm value calculation module:
[0059] The optimized Dijkstra algorithm value calculation module is used to calculate the optimized Dijkstra algorithm value of each path point; wherein the optimized Dijkstra algorithm value of each path point is obtained based on the following formula:
[0060] f Dijkstra (V i )=λ1*distance(V i ,V star )+λ2*distance(V i ,V end )+λ3*min{distance(V i ,V j )}
[0061] Among them, f Dijkstra (V i ) represents the path point V i Optimized Dijkstra algorithm value; distance(V i ,V end ) table represents the path point V i To waypoint V end distance(V i ,V star ) represents the path point V i To waypoint V star distance(V i ,V j ) represents the path point V i To waypoint V j The distance of the path point V i To waypoint V j The road sections between are delayed or impassable routes; λ1, λ2, and λ3 represent adjustment coefficients.
[0062] Furthermore, the optimized Dijkstra algorithm value calculation module includes a distance calculation module, which is used to calculate the distance between two path points, specifically including the following formula:
[0063]
[0064] Among them, (V i,x , V i,y ) indicates V i Coordinates of (V star,x , V star,y ) indicates V star Coordinates of (V end,x , V end,y ) indicates V end Coordinates of (V j,x V j,y ) indicates V j The coordinates of .
[0065] An embodiment of the present invention further provides an electronic device, including:
[0066] processor;
[0067] a memory for storing processor-executable instructions;
[0068] The processor implements the above-mentioned large-scale material support route planning method by running the executable instructions.
[0069] The processor includes but is not limited to a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC) or a readily available field-programmable gate array (FPGA).
[0070] The memory may include at least one type of storage medium, including flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc.
[0071] An embodiment of the present invention also provides a computer-readable storage medium on which computer instructions are stored. When the instructions are executed by a processor, the steps of the above-mentioned large-scale material support route planning method are implemented.
[0072] For example, the computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
[0073] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0074] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A large-scale material support route planning method based on an improved Dijkstra algorithm, characterized in that: The following steps are involved: S1: Initialize the path point set P of the large-scale material support route as P = {V star }, where V star Indicates the starting point of the large-scale material support route; S2: Calculation and V star The optimized Dijkstra algorithm value of each directly connected path point is selected, and the path point with the smallest optimized Dijkstra algorithm value is selected as the second path point V2, and the path point set P is updated to P = {V star , V2}; S3: Calculation and V i-1 The optimized Dijkstra algorithm value of each directly connected path point is selected, and the path point with the smallest optimized Dijkstra algorithm value is selected as the i-th path point V i ; Update the path point set P to P = {V star , V2, ... V i-1 , V i }; where i>=2; S4: Repeat S3 until you reach the end point V of the large-scale material support route. end , update the path point set P to P = {V star , V2, ..., V end } to obtain the optimal support path.
2. According to claim 1, a large-scale material support route planning method based on improved Dijkstra algorithm is characterized in that: The optimized Dijkstra algorithm value for each path point is obtained based on the following formula: f Dijkstra (V i )=λ1*distance(V i ,V star )+λ2*distance(V i ,V end )+λ3*min{distance(V i ,V j )} Among them, f Dijkstra (V i ) represents the path point V i Optimized Dijkstra algorithm value; distance(V i ,V end ) table represents the path point V i To waypoint V end distance(V i ,V star ) represents the path point V i To waypoint V star distance(V i ,V j ) represents the path point V i To waypoint V j The distance of the path point V i To waypoint V j The road sections between are delayed or impassable routes; λ1, λ2, and λ3 represent adjustment coefficients.
3. The large-scale material support route planning method based on the improved Dijkstra algorithm according to claim 2 is characterized by: distance(V i ,V end )、distance(V i ,V star ) and distance(V i ,V j ) is obtained based on the following formula: Among them, (V i,x , V i,y ) indicates V i Coordinates of (V star,x , V star,y ) indicates V star Coordinates of (V end,x , V end,y ) indicates V end Coordinates of (V j,x V j,y ) indicates V j The coordinates of .
4. The large-scale material support route planning method based on the improved Dijkstra algorithm according to claim 1 is characterized in that: The objective function of the large-scale material support route planning method is: min D=distance(V star ,V2)+distance(V2,V3).,..,+distance(V end-1 ,V end ); Where D represents the total distance of the support path; distance(V star , V2) represents the path point V star The distance to the path point V2; distance(V2,V3) represents the distance from the path point V2 to the path point V3; distance(V end-1 ,V end ) represents the path point V end-1 To waypoint V end distance.
5. The large-scale material support route planning method based on the improved Dijkstra algorithm according to claim 4 is characterized in that: The constraint condition of the objective function is: ∑B ij =0; where B ij Represents the path point V i To waypoint V j The usage of the road section between ij =1 means passing the road section; if B ij =0 means that the road section has not been passed.
6. A large-scale material support route planning system based on an improved Dijkstra algorithm, characterized in that: Including path initialization module and path update module: The path initialization module is used to initialize the path point set P of the large-scale material support route as P = {V star }, where V star Indicates the starting point of the large-scale material support route; The path update module is used to calculate V i-1 The optimized Dijkstra algorithm value of each directly connected path point is selected, and the path point with the smallest optimized Dijkstra algorithm value is selected as the i-th path point V i ; Update the path point set P to P = {V star , V2, ... V i-1 , V i }; where i>=2.
7. A large-scale material support route planning system based on improved Dijkstra algorithm according to claim 6, characterized in that: The path updating module includes an optimized Dijkstra algorithm value calculation module: The optimized Dijkstra algorithm value calculation module is used to calculate the optimized Dijkstra algorithm value of each path point; wherein the optimized Dijkstra algorithm value of each path point is obtained based on the following formula: f Dijkstra (V i )=λ1*distance(V i ,V star )+λ2*distance(V i ,V end )+λ3*min{distance(V i ,V j )} Among them, f Dijkstra (V i ) represents the path point V i Optimized Dijkstra algorithm value; distance(V i ,V end ) table represents the path point V i To waypoint V end distance(V i ,V star ) represents the path point V i To waypoint V star distance(V i ,V j ) represents the path point V i To waypoint V j The distance of the path point V i To waypoint V j The road sections between are delayed or impassable routes; λ1, λ2, and λ3 represent adjustment coefficients.
8. A large-scale material support route planning system based on improved Dijkstra algorithm according to claim 7, characterized in that: The optimized Dijkstra algorithm value calculation module includes a distance calculation module, which is used to calculate the distance between two path points, specifically including the following formula: Among them, (V i,x , V i,y ) indicates V i Coordinates of (V star,x , V star,y ) indicates V star Coordinates of (V end,x , V end,y ) indicates V end Coordinates of (V j,x V j,y ) indicates V j The coordinates of .
9. An electronic device, comprising: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 5 by running the executable instructions.
10. A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Improved Dijkstra algorithm-based logistics delivery path selection method and system
CN108038576A
Path planning method based on improved Dijkstra algorithm
CN116822774A