CN103439726A - Rapid K shortest path planning method applied to GPS - Google Patents

Rapid K shortest path planning method applied to GPS Download PDF

Info

Publication number
CN103439726A
CN103439726A CN2013104007490A CN201310400749A CN103439726A CN 103439726 A CN103439726 A CN 103439726A CN 2013104007490 A CN2013104007490 A CN 2013104007490A CN 201310400749 A CN201310400749 A CN 201310400749A CN 103439726 A CN103439726 A CN 103439726A
Authority
CN
China
Prior art keywords
path
node
shortest path
shortest
limit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2013104007490A
Other languages
Chinese (zh)
Other versions
CN103439726B (en
Inventor
刘贵松
邱钊
谢娟
张�浩
屈鸿
陈文宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Electronic Science and Technology of China
Original Assignee
University of Electronic Science and Technology of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Electronic Science and Technology of China filed Critical University of Electronic Science and Technology of China
Priority to CN201310400749.0A priority Critical patent/CN103439726B/en
Publication of CN103439726A publication Critical patent/CN103439726A/en
Application granted granted Critical
Publication of CN103439726B publication Critical patent/CN103439726B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a rapid K shortest path planning method applied to a GPS. The method applies a dynamic load data searching method and an elicitation type searching thought to recursively calculate K shortest paths: an A* algorithm is utilized to obtain the shortest paths, bead edges of each node on a former shortest path are traversed successively so that a candidate path collection is obtained; recursive searching from the ith shortest path so that the i+1th shortest path is obtained. Advantages of the rapid K shortest path planning method applied to the GPS are that the K shortest paths are rapidly obtained and applied to the GPS so that a problem that the GPS is single in navigation path is solved to a certain degree. Besides, K path schemes are provided for users to select, other needs in driving process of the users are fully considered and practicality of the device is obviously enhanced.

Description

A kind of quick K shortest path planning method that is applied to GPS
Technical field
The invention belongs to computer network field, be specifically related to a kind of K method for searching shortest route, and be applied in GPS navigation equipment.
Background technology
The route searching problem generally can solve by the shortest-path method in graph theory.Shortest path method commonly used has the classical ways such as Dijkstra, breadth first method.Yet these methods can only be found in figure set point to the shortest path between arbitrfary point.This is inadequate often in practice, such as, in GPS navigation, except shortest path, may need to find the second short path standby, even under certain conditions, may need to find the 3rd, the 4th short path.This class problem is called K short path problem.
With single source shortest route problem, compare, K short path problem is more complicated in the method design, does not still have a kind of K short path method obtain the industry common recognition and reach extensive degree of being practical as the Dijkstra method in the shortest-path method of single source at present.
K short path searching method commonly used has the limit of deletion method, departs from limit method etc.But these methods are only a kind of theoretic models, in practical application, also have problems.
The GPS positioning system refers to utilizes satellite, and the system that positions in real time in the world, navigates is called for short GPS (Global Positioning System).GPS can provide the functions such as vehicle location, antitheft, anti-misfortune, travel route monitoring and calling commander.Round-the-clock, the high precision had due to the GPS technology and automatically measuring, as advanced measurement means and new yield-power, incorporated each application of the development of the national economy, national defense construction and social development.
The terminal device that much has the GPS navigation function has been arranged at present, but shortest path but can only be provided or meet the path of certain condition, and can not consider that user's other demand under steam rationally provides alternative path.
Summary of the invention
The object of the present invention is to provide a kind of fast path planing method that can be applied to GPS, the method should be able to solve the problem of the following aspects:
(1) can provide the computerized algorithm of the K short path problem that limits loop free path, there is practicality, but not the algorithm concept on a kind of pure theory;
(2) any given number between providing from the source point to the destination node (being the K number) and all paths of sorting with path;
(3) can, by this algorithm application in GPS navigation, make K short path method obtain practical application.
For realizing above target, the present invention proposes the quick K shortest path planning method of a kind of GPS of being applied to, and its principal feature comprises the following steps:
A kind of quick K shortest path planning method that is applied to GPS, is characterized in that, comprises the following steps:
(1) import map, and determine starting point by the user according to GPS sand terminal tand corresponding K value, wherein K is that the user expects the shortest path number of searching;
(2) node t is called to the A* algorithm and obtain shortest path, defining variable k, make k=1;
(3) recursive calculation k bar is the shortest s-tpath: travel through successively each node on k bar shortest path the limit that enters of promising sidetrack edge obtain path candidate, and add set C, sidetrack edge means the not limit on shortest path tree;
(4) take out a shortest path as k+1 bar shortest path from set C;
(5) judgement k, if the path number does not reach the K value, enter step 6, otherwise jump to step 7;
(6) judgement set C, if this set non-NULL returns to step 3, otherwise enters step 8;
(7) algorithm successfully finishes, and returns to Search Results;
(8) algorithm finishes, and does not find enough K paths, returns to Search Results.
In technique scheme, after utilizing A* to obtain article one shortest path in described step 2, A* suspends, and again call A* in subsequent step and carry out the node expansion, in the operational process of A*, present node all are gone out to limit and carry out iteration, the limit that will be positioned on shortest path tree is labeled as tree edge, and the limit on shortest path tree is not labeled as sidetrack edge, for all its states of the apex marker be expanded, is close.
In technique scheme, in described step 3, each node of traversal is that caudal knot point sweep forward according to last the sidetrack edge limit from the k paths is to start node, path candidate means with the set of sidetrack edge, and the path finally meaned with sidetrack edge is expressed as a conventional path correspondingly.
In technique scheme, travel through successively each node on k bar shortest path in described step 3, its method comprises the following steps:
(4-1) all nodes traveling through successively on current k paths from the last item sidetrack edge to start node, be designated as v;
(4-2) all sidetrack edge that travel through successively node v go out limit, are designated as e;
(4-3) node of judgement limit e, if its state is not close, restart A* until the state of the node of e is marked as close;
(4-4) e is joined to the end of current path k bar, form a new path candidate and calculate its length, join in set C.
In technique scheme, described step 4 is taken out the shortest path candidate path pending as next of path in current set C, and path candidate length is d( t)-d(head(e))+w(e)+d(tail(e)).
In technique scheme, the judgement of described step 5 couple K, if reached the K value, return to K bar shortest path.
In technique scheme, described step 6 couple C is judged, gathers C empty if, and meaning does not have path candidate available, and algorithm finishes to return successfully to find the K paths.
In technique scheme, k is loop variable, and k++ after each circulation, mean the current path number obtained.
In technique scheme, it is characterized in that in step 1, the A* algorithm comprises the steps:
(9-1) initialization operation, order set open is empty, by start node sbe set to close, calculate node sthe f value on all sidetrack of going out limit be incorporated into the open set, wherein f is worth computing method to be: f(e)=d (tail (e))+w (e)+h (head (e)), function d(v) mean the bee-line of node d to initial node s, w(e) mean the weights of limit e, h(v) mean that node v is to destination node tthe estimated value of distance, tail (e) means the caudal knot point of limit e, head (e) means the node of limit e;
If (9-2) the open set is not empty, enters (9-3), otherwise jump to (9-4);
(9-3) take out a minimum limit of f value from the open set, be designated as e, if state head(e) is close, e is labeled as to sidetrack edge and jumps to step 2, otherwise by head(e) be set to close, and calculate head(e) allly go out limit and it joined to the open set, if head(e)=destination node t, jump to (9-5);
(9-4) return, can not find node t;
(9-5) return, successfully find node t.
In technique scheme, recursive calculation k bar is the shortest s-tpath, its step is as follows:
(10-1) current path π being set is article one shortest path, and π is the path that meaned by sidetrack edge, P(π) be with π with respect to the s-t path, make set of paths C for sky;
(10-2) for all nodes in path P (π), remove tgo out sidetrack edge e for this node all, if state head(e) is not close, restart A* until the state of the node of e is marked as close, e is joined in π and forms new route π *, calculating path π * length l (π *)=d(t)-d(head(e))+w(e)+d(tail(e)), path π * is added to set C;
If (10-3) obtained K bar shortest path, entered (10-7);
If (10-4) C is empty, enter (10-6);
(10-5) take out a shortest path as current shortest path π from set C, enter (10-2);
(10-6) return, do not find k bar shortest path;
(10-7) return, successfully find k bar shortest path.
The present invention has following features:
(1) used map datum dynamic loading characteristic in the route searching process, promoted search speed, reduced algorithm and taken up room;
(2) use heuristic search, improved search efficiency;
(3) adopt recurrence thought that a kind of quick K shortest route-planning algorithm is provided;
(4) this fast Route Planning Algorithm is applied in GPS navigation, has improved the practicality of this algorithm.
The accompanying drawing explanation
Fig. 1 is K short path method for fast searching process flow diagram;
Fig. 2 is the A* algorithm flow chart;
Fig. 3 is the use process flow diagram that is applied to GPS.
Embodiment
Below in conjunction with accompanying drawing and embodiment, the present invention is described in further detail.
With reference to figure 1, be K short path computerized algorithm flow process of the present invention, analyze to obtain concrete steps as described below in conjunction with top particular problem:
Step 1: node t is called to the A* algorithm and obtain shortest path, defining variable k, make k=1;
Step 2: (remove for all nodes in path P (π) t), go out sidetrack edge e for this node all, if state head(e) is not close, the operation A* until head(e) state be close, e is joined in π and forms new route π *, calculating path π * length l (π *)=d(t)-d(head(e))+w(e)+d(tail(e)), path π * is added to set C;
Step 3: if obtained K bar shortest path, enter step 7;
Step 4: if C is sky, enter step 6;
Step 5: take out a shortest path as current shortest path π from set C, enter step 2;
Step 6: return, do not find k bar shortest path;
Step 7: return, successfully find k bar shortest path.
According to top flow process, after algorithm finishes, obtain the K short path collection according to the path sequence.
In step 1, it is also an important process that node is called to the A* algorithm, below A* is described in detail as mentioned above.
With reference to figure 2, be A* algorithm flow of the present invention, its detailed step is as follows:
Step 1: initialization operation.Order set open is empty, by start node sbe set to close, calculate node sthe f value on all sidetrack of going out limit be incorporated into the open set, wherein f is worth computing method to be: f(e)=d (tail (e))+w (e)+h (head (e)), function d(v) mean the bee-line of node d to initial node s, w(e) mean the weights of limit e, h(v) mean that node v is to destination node tthe estimated value of distance;
Step 2: if the open set is not empty, enters step 3, otherwise jump to step 4;
Step 3: take out a minimum limit of f value from the open set, be designated as e, if state head(e) is close, e is labeled as to sidetrack edge and jumps to step 2, otherwise by head(e) be set to close, and calculate head(e) allly go out limit and it joined to the open set, if head(e)=destination node t, jump to step 5;
Step 4: return, can not find node t;
Step 5: return, successfully find node t.
As mentioned above, operation A* algorithm will obtain the shortest path from the source point to the impact point, and can call A* in K short path subsequent step node is expanded.After calling, obtain new expansion node set and sidetrack edge set at every turn.
With reference to figure 3, for of the present invention by K short path algorithm application in the flow process of GPS, in detail step is as follows for it:
Step 1: navigator imports electronic chart, and GPS locates current location, as source point;
Step 2: the user inputs the number K that path is found in destination and hope;
Step 3: operation K short path algorithm obtains Search Results and result is returned to the user;
Step 4: the result that the user obtains according to search is chosen a path easily, and GPS starts navigation.
As mentioned above, K short path searching method is applied in GPS, has both enlarged the range of application of K short path searching algorithm, also improved the practicality of GPS navigation equipment.

Claims (10)

1. a quick K shortest path planning method that is applied to GPS, is characterized in that, comprises the following steps:
(1) import map, and determine starting point by the user according to GPS sand terminal tand corresponding K value, wherein K is that the user expects the shortest path number of searching;
(2) node t being called to the A* algorithm obtains the shortest s-tpath, defining variable k, make k=1;
(3) recursive calculation k bar is the shortest s-tpath: travel through successively each node on k bar shortest path the limit that enters of promising sidetrack edge obtain path candidate, and add set C, sidetrack edge means the not limit on shortest path tree;
(4) take out a shortest path as k+1 bar shortest path from set C;
(5) judgement K, if the path number does not reach the K value, enter step 6, otherwise jump to step 7;
(6) judgement set C, if this set non-NULL returns to step 3, otherwise enters step 8;
(7) algorithm successfully finishes, and returns to Search Results;
(8) algorithm finishes, and does not find enough K paths, returns to Search Results.
2. a kind of quick K shortest path planning method that is applied to GPS according to claim 1, it is characterized in that, after utilizing A* to obtain article one shortest path in described step 2, A* suspends, and again call A* in subsequent step and carry out the node expansion, in the operational process of A*, present node all are gone out to limit and carry out iteration, the limit that will be positioned on shortest path tree is labeled as tree edge, the limit on shortest path tree is not labeled as sidetrack edge, for all its states of the apex marker be expanded, is close.
3. a kind of quick K shortest path planning method that is applied to GPS according to claim 2, it is characterized in that, in described step 3, each node of traversal is that caudal knot point sweep forward according to last the sidetrack edge limit from the k paths is to start node, path candidate means with the set of sidetrack edge, and the path finally meaned with sidetrack edge is expressed as a conventional path correspondingly.
4. a kind of quick K shortest path planning method that is applied to GPS according to claim 2, is characterized in that, travel through successively each node on k bar shortest path in described step 3, its method comprises the following steps:
(4-1) all nodes traveling through successively on current k paths from the last item sidetrack edge to start node, be designated as v;
(4-2) all sidetrack edge that travel through successively node v go out limit, are designated as e;
(4-3) node of judgement limit e, if its state is not close, restart A* until the state of the node of e is marked as close;
(4-4) e is joined to the end of current k paths, form a new path candidate and calculate its length, wherein path candidate length is that (tail (e) joins this path candidate in set C d (t)-d (v)+w (e)+d.
5. a kind of quick K shortest path planning method that is applied to GPS according to claim 1, is characterized in that, described step 4 is taken out the shortest path candidate path pending as next of path in current set C.
6. a kind of quick K shortest path planning method that is applied to GPS according to claim 1, is characterized in that the judgement of described step 5 couple K, if reached the K value, is returned to K bar shortest path.
7. a kind of quick K shortest path planning method that is applied to GPS according to claim 1, it is characterized in that, described step 6 couple C is judged, gathers C empty if, meaning does not have path candidate available, and algorithm finishes to return successfully to find the K paths.
8. a kind of quick K shortest path planning method that is applied to GPS according to claim 6, is characterized in that, k is loop variable, and k++ after each circulation, mean the current path number obtained.
9. a kind of quick K shortest path planning method that is applied to GPS according to claim 6, is characterized in that in step 1, the A* algorithm comprises the steps:
(9-1) initialization operation, order set open is empty, by start node sbe set to close, calculate node sthe f value on all sidetrack of going out limit be incorporated into the open set, wherein f is worth computing method to be: f(e)=d (tail (e))+w (e)+h (head (e)), function d(v) mean the bee-line of node d to initial node s, w(e) mean the weights of limit e, h(v) mean that node v is to destination node tthe estimated value of distance, tail (e) means the caudal knot point of limit e, head (e) means the node of limit e;
If (9-2) the open set is not empty, enters (9-3), otherwise jump to (9-4);
(9-3) take out a minimum limit of f value from the open set, be designated as e, if state head(e) is close, e is labeled as to sidetrack edge and jumps to step 2, otherwise by head(e) be set to close, and calculate head(e) allly go out limit and it joined to the open set, if head(e)=destination node t, jump to (9-5);
(9-4) return, can not find node t;
(9-5) return, successfully find node t.
10. a kind of quick K shortest path planning method that is applied to GPS according to claim 8, is characterized in that, recursive calculation k bar is the shortest s-tpath, its step is as follows:
(10-1) current path π being set is article one shortest path, and π is the path that meaned by sidetrack edge, P(π) be with π with respect to the s-t path, make set of paths C for sky;
(10-2) for all nodes in path P (π), remove t, go out sidetrack edge e for this node all, if head(e) state be not close, restart A* until the state of the node of e is marked as close, e is joined in π and forms new route π *, calculating path π * length l (π *)=d( t)-d(head(e))+w(e)+d(tail(e)), path π * is added to set C;
If (10-3) obtained K bar shortest path, entered (10-7);
If (10-4) C is empty, enter (10-6);
(10-5) take out a shortest path as current shortest path π from set C, enter (10-2);
(10-6) return, do not find k bar shortest path;
(10-7) return, successfully find k bar shortest path.
CN201310400749.0A 2013-09-06 2013-09-06 Rapid K shortest path planning method applied to GPS Active CN103439726B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310400749.0A CN103439726B (en) 2013-09-06 2013-09-06 Rapid K shortest path planning method applied to GPS

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310400749.0A CN103439726B (en) 2013-09-06 2013-09-06 Rapid K shortest path planning method applied to GPS

Publications (2)

Publication Number Publication Date
CN103439726A true CN103439726A (en) 2013-12-11
CN103439726B CN103439726B (en) 2015-01-21

Family

ID=49693431

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310400749.0A Active CN103439726B (en) 2013-09-06 2013-09-06 Rapid K shortest path planning method applied to GPS

Country Status (1)

Country Link
CN (1) CN103439726B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104142151A (en) * 2014-07-31 2014-11-12 上海闻泰电子科技有限公司 Navigation method
CN106788448A (en) * 2016-12-20 2017-05-31 中国地质大学(武汉) A kind of mobile trajectory data compression method and device
CN107860393A (en) * 2017-10-31 2018-03-30 刘靖宇 A kind of fast searching method of a plurality of shortest path
CN110617834A (en) * 2019-10-31 2019-12-27 电子科技大学 Shortest path planning method under Gaussian process road network
CN111813883A (en) * 2020-06-23 2020-10-23 上海阿尔卡特网络支援系统有限公司 Shortest path query method and query system
CN112464517A (en) * 2021-01-14 2021-03-09 奥特酷智能科技(南京)有限公司 Method for searching shortest path by simulation vehicle based on existing road data

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020156573A1 (en) * 2001-04-18 2002-10-24 General Motors Corporation Method and system for providing multiple beginning maneuvers for navigation of a vehicle
CN102944887A (en) * 2012-11-14 2013-02-27 东南大学 Vehicle three-dimension navigation method based on fuel consumption and tail gas exhaust

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020156573A1 (en) * 2001-04-18 2002-10-24 General Motors Corporation Method and system for providing multiple beginning maneuvers for navigation of a vehicle
CN102944887A (en) * 2012-11-14 2013-02-27 东南大学 Vehicle three-dimension navigation method based on fuel consumption and tail gas exhaust

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
谭强强: "《基于遗传算法的区域交通网络最短路径算法研究》", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104142151A (en) * 2014-07-31 2014-11-12 上海闻泰电子科技有限公司 Navigation method
CN106788448A (en) * 2016-12-20 2017-05-31 中国地质大学(武汉) A kind of mobile trajectory data compression method and device
CN106788448B (en) * 2016-12-20 2020-04-10 中国地质大学(武汉) Moving track data compression method and device
CN107860393A (en) * 2017-10-31 2018-03-30 刘靖宇 A kind of fast searching method of a plurality of shortest path
CN110617834A (en) * 2019-10-31 2019-12-27 电子科技大学 Shortest path planning method under Gaussian process road network
CN110617834B (en) * 2019-10-31 2021-02-26 电子科技大学 Shortest path planning method under Gaussian process road network
CN111813883A (en) * 2020-06-23 2020-10-23 上海阿尔卡特网络支援系统有限公司 Shortest path query method and query system
CN112464517A (en) * 2021-01-14 2021-03-09 奥特酷智能科技(南京)有限公司 Method for searching shortest path by simulation vehicle based on existing road data
CN112464517B (en) * 2021-01-14 2022-01-18 奥特酷智能科技(南京)有限公司 Method for searching shortest path by simulation vehicle based on existing road data

Also Published As

Publication number Publication date
CN103439726B (en) 2015-01-21

Similar Documents

Publication Publication Date Title
CN103439726B (en) Rapid K shortest path planning method applied to GPS
CN108444482B (en) Unmanned aerial vehicle autonomous road finding and obstacle avoiding method and system
JP6828044B2 (en) Route deviation recognition method, terminal, and storage medium
CN103149576B (en) Map matching method of floating car data
CN106582023B (en) Game way finding method and device
CN109564099A (en) Method and system for map match
Li et al. Lane-level map-matching with integrity on high-definition maps
CN107436148A (en) A kind of robot navigation method and device based on more maps
CN107727098A (en) A kind of unmanned water surface ship paths planning method for multiple target locations of patrolling successively
CN110515094A (en) Based on the robot point cloud map path method and system for planning for improving RRT*
CN104949679A (en) Navigation information determination method and navigation information determination device
JP6090226B2 (en) Route generation apparatus and route generation method
CN109240290A (en) A kind of electric inspection process robot makes a return voyage determining method of path
CN104156459A (en) Efficient path-finding method and system based on the same cost grids
CN107917716B (en) Fixed line navigation method, device, terminal and computer readable storage medium
CN109816131B (en) Path planning method, path planning device and computer readable storage medium
CN104034337B (en) Map matching method and device for geographic position point of floating vehicle
CN102523155B (en) Boost Graph library-based K shortest path searching method and system
CN105787126A (en) K-d (k-dimensional) tree generation method and k-d tree generation device
CN111337047B (en) Unstructured road macroscopic path planning method based on multi-task point constraint
CN114625162A (en) Hybrid algorithm-based optimal path planning method, system and medium for unmanned aerial vehicle
CN105698796B (en) A kind of method for searching path of multirobot scheduling system
CN103900596A (en) Method and device for planning navigation path based on road sections
Zhang et al. Uncertainty reduction via heuristic search planning on hybrid metric/topological map
CN113867356A (en) Robot path planning method and device and robot

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant