CN109345026A - A method of solving the problems, such as traffic trip route planning - Google Patents
A method of solving the problems, such as traffic trip route planning Download PDFInfo
- Publication number
- CN109345026A CN109345026A CN201811241187.9A CN201811241187A CN109345026A CN 109345026 A CN109345026 A CN 109345026A CN 201811241187 A CN201811241187 A CN 201811241187A CN 109345026 A CN109345026 A CN 109345026A
- Authority
- CN
- China
- Prior art keywords
- point
- path
- shortest path
- node
- chained list
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
- G06Q10/047—Optimisation of routes or paths, e.g. travelling salesman problem
Landscapes
- Business, Economics & Management (AREA)
- Human Resources & Organizations (AREA)
- Engineering & Computer Science (AREA)
- Strategic Management (AREA)
- Economics (AREA)
- Marketing (AREA)
- Game Theory and Decision Science (AREA)
- Entrepreneurship & Innovation (AREA)
- Development Economics (AREA)
- Operations Research (AREA)
- Quality & Reliability (AREA)
- Tourism & Hospitality (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Navigation (AREA)
Abstract
The present invention relates to a kind of methods for solving the problems, such as traffic trip route planning, wherein, it include the following steps: (1) using intersection in traffic network route map as node, section between each intersection is line, road section length is the weight of line, and traffic network can be reduced to a cum rights line graph G;Using node quantity as ranks number, a two-dimensional matrix is constructed, and record the two-dimensional matrix with two-dimensional array;Step 2, using the source point of line graph G as the root node of shortest path tree, according to the Growing law of shortest path tree, gradually by other node join shortest path trees, until shortest path tree covers every other node or covers the node that problem needs to solve;Step 3 retrieves shortest path tree using depth-first or breadth first search method, obtains shortest path of the source point to certain any point, as required optimal traffic route.The present invention is able to solve traffic trip problems faced in actual life using a kind of new single-source shortest-paths algorithm.
Description
Technical field
The present invention relates to communication navigation technology, special volume is related to a kind of method for solving the problems, such as traffic trip route planning.
Background technique
With social development, city size is growing, traffic route is increasingly complicated, increasing, the people of private car trip
When going on a journey the selection of traffic route become particularly important.Radio network technique continues to develop simultaneously, and electronic map is improved day by day,
Mobile hand-held device and mobile unit are widely available, this to provide route selection in real time also for user.Single source point
Shortest path first is widely used in solving the problem.
The algorithm of classical single-source shortest-paths is just given early in nineteen fifty-nine Dijkstra and is used till today, but
There are a large amount of computing redundancies for dijkstra's algorithm.The many optimization algorithms occurred successively, such as algorithm based on A* search, they
By estimating that current vertex carries out vertex selection at a distance from representative points, make search that there is sense of direction, wherein ALT is typical generation
Table, but what it obtained is heuristic solution rather than accurate solution;Pruning algorithms, they firstly generate some relevant auxiliary datas,
Judged according to these data shortest path whether possibly through some vertex or certain side, unacceptable vertex and side not into
Row processing, wherein Reach pruning algorithms are the Typical Representatives of this kind of algorithm;These researchs reduce to a certain extent
The search space of dijkstra's algorithm, but effect is still not fully up to expectations.
Summary of the invention
The purpose of the present invention is to provide a kind of methods for solving the problems, such as traffic trip route planning, go out for solving traffic
Row route planning problem.
A kind of method for solving the problems, such as traffic trip route planning of the present invention, wherein include the following steps: (1) with traffic road network
As node, the section between each intersection is line for intersection in line chart, and road section length is the weight of line, can be with
Traffic network is reduced to a cum rights line graph G;Using node quantity as ranks number, a two-dimensional matrix is constructed, and with two dimension
Array records the two-dimensional matrix;Step 2, using the source point of line graph G as the root node of shortest path tree, according to shortest path tree
Growing law, gradually by other node join shortest path trees, until shortest path tree covers every other node or covering
The node solved is needed to problem;Step 3 retrieves shortest path tree using depth-first or breadth first search method, obtains
Shortest path of the source point to certain any point, as required optimal traffic route.
One embodiment of the method according to the present invention for solving the problems, such as traffic trip route planning, wherein in two-dimensional matrix
If having line between the two o'clock of cum rights line graph G, use the weight of route as distance value;If two o'clock is connected without directapath, use
∞ indicates distance value.
One embodiment of the method according to the present invention for solving the problems, such as traffic trip route planning, wherein the data are pre-
In processing step 1, comprising: step 11: by a traffic roadmap, using intersection in traffic network route map as node,
Section between each intersection is line, and road section length is the weight of line, and traffic network can be reduced to a band
Weigh line graph G;Using node quantity as ranks number, a two-dimensional matrix is constructed;Step 12: initial adjacency matrix arcs is constructed,
Arcs [i] [j] indicates that connection vertex i, the weight on the side of j connect i if there is side, and j, arcs [i] [j] are the weight on the side;
If there is no while connect the two points while, then arcs [i] [j] is ∞, wherein arcs [i] [i]=0.
One embodiment of the method according to the present invention for solving the problems, such as traffic trip route planning, wherein step 2 packet
It includes: step 21: establishing void growth point chained list P, chained list P is by the path values ascending sort in place path, wherein the road where putting
Diameter is the sequence for all the points passed through from source point to current point;Path values are that adjacency matrix arcs has recorded between any two points
Distance value, path values are source points to the cumulative of the distance value of the current point i all the points passed through, and are denoted as cost [i];Step 22: building
To be determined chained list N is found, chained list N is by the path values ascending sort in place path;Step 23: establishing shortest path tree, record
All reality growths point, the path of source point to each real growth point is exactly shortest path, adjacency matrix arcs value on the path
Cumulative is exactly path values;Root node v0 is inserted into shortest path tree by the root node v0 for determining shortest path tree;
Step 24: will be connected to newly-increased real growth point and all nodes not in shortest path tree are as the youngster of the newly-increased reality growth point
Child node is inserted into shortest path tree, and is added in be determined chained list N;Step 25: newly-increased point to be determined is handled one by one:
(1) if the point is not present in chained list P, this is pressed into path values ascending order arrangement insertion chained list P;The point is deleted from chained list N;
(2) if the point is already present in chained list P, if the path values in newly-increased path are less than the path in former empty growth point place path
Value, the point is deleted from shortest path tree, the point is deleted from chained list N;(3) if the point is already present in chained list P, if
The path values in newly-increased path are less than the path values in the path where former empty growth point, delete original from shortest path tree and increase emptily length
Point " deletes the point from chained list N;(4) process for step (1) arriving (3) is repeated, until chained list N is sky;Step 26: selection chained list N
The middle the smallest point of path values, determines it as real growth point, and execute step 24 and step 25, until chained list P be sky, at this point,
Shortest path tree has recorded source point to the shortest path of every other node, and the path values of each node indicate source point to the node
Shortest path value.
One embodiment of the method according to the present invention for solving the problems, such as traffic trip route planning, wherein excellent using depth
Shortest path tree is first retrieved, obtains source point to arbitrarily certain shortest path put.
One embodiment of the method according to the present invention for solving the problems, such as traffic trip route planning, wherein excellent using range
First searching method retrieves shortest path tree, obtains source point to arbitrarily certain shortest path put.
The present invention uses a kind of new single-source shortest-paths algorithm, and what traffic trip faced in solution actual life asks
Topic.It is for classic algorithms efficiency during the Solve problems such as Dijkstra lower (when especially handling sparse matrix)
Situation cleverly utilizes " tree " structure convenient for the characteristic of record and retrieval, designs the cutting as early as possible of rigorous Pruning strategy
Non- shortest path improves efficiency of algorithm, and it is this " sparse matrix " which is especially suitable for traffic network.
Detailed description of the invention
Fig. 1 show a kind of flow chart for the method for solving single-source shortest-paths problem of the present invention;
Fig. 2 show the extraction result figure of certain urban district section traffic roadmap;
Fig. 3 show the first growth figure of shortest path tree;
Fig. 4 show the second growth figure of shortest path tree;
Fig. 5 show the third growth figure of shortest path tree.
Specific embodiment
To keep the purpose of the present invention, content and advantage clearer, with reference to the accompanying drawings and examples, to of the invention
Specific embodiment is described in further detail.
Fig. 1 show a kind of flow chart for the method for solving single-source shortest-paths problem of the present invention, as shown in Figure 1, should
Method the following steps are included:
Step 1, using intersection in traffic network route map as node, section between each intersection is to connect
Line, road section length are the weight of line, and traffic network can be reduced to a cum rights line graph G;Using node quantity as ranks
Number, constructs a two-dimensional matrix and (if there is line between two o'clock, uses the weight of route as distance value;If two o'clock is without directapath
Connection, indicates distance value with ∞;), the matrix is recorded with two-dimensional array;
Step 2, using source point as the root node of shortest path tree sp_tree, according to the Growing law of shortest path tree, by
Step is by other node joins shortest path tree sp_tree, until shortest path tree sp_tree covers every other node or covering
The node solved is needed to problem;
Step 3 retrieves shortest path tree sp_tree, available source using depth-first or breadth first search method
Shortest path of the point to certain any point.
For an embodiment, in the data prediction step 1, comprising:
Step 11: data abstraction processing.By a traffic roadmap, using intersection in traffic network route map as
Node v, the section between each intersection are line e, and road section length is the length of line, construct a cum rights line graph G
=(V, E), which is that weighted graph is (oriented, undirected), to be indicated, V is the set of all the points in figure, and E is the set on all sides in figure;It will
The weight of figure is set as the length of corresponding edge, and all weights are all non-negative;
Step 12: constructing initial adjacency matrix arcs, arcs [i] [j] indicates connection vertex i, the weight on the side of j.If
There are sides to connect i, and j, arcs [i] [j] are the weight on the side;If there is no while connect the two points while, then arcs [i]
[j] is ∞, wherein arcs [i] [i]=0.As shown in the table.
V0 | V1 | …… | Vn | |
V0 | 0 | a | ∞ | ∞ |
V1 | a | 0 | ∞ | b |
…… | ∞ | ∞ | 0 | ∞ |
Vn | ∞ | b | ∞ | 0 |
The weight adjacency matrix of 1 figure G of table
In the shortest path tree constitution step 2, comprising:
Step 21: establishing " empty growth point " chained list P, chained list is by the path values ascending sort in place path;
(1) path where point: the sequence for all the points passed through from source point to current point;
(2) path values: adjacency matrix arcs has recorded the distance between any two points value, and path values are source points to current point
Adding up for the distance value for all the points that i passes through, is denoted as cost [i];
Step 22: establishing " point to be determined " chained list N, chained list is by the path values ascending sort in place path;
Step 23: establishing sp_tree (shortest path tree), record all " real growths point ", source point is " real to increase to each
The path of point " is exactly shortest path, and the cumulative of arcs value is exactly path values on the path;Determine sp_tree (shortest path tree)
Root node v0, be inserted into sp_tree for v0 as real growth point;
Step 24: will be connected to newly-increased " real growth point " and all nodes not in sp_tree are newly-increased " real to increase as this
In son's Knots inserting sp_tree (shortest path tree) of long point ", and it is added in " point to be determined " chained list N;
Step 25: " point to be determined " that processing increases newly one by one:
(1) if the point is not present in " empty growth point " chained list, this is pressed into the arrangement insertion of path values ascending order and " increases emptily length
Point " chained list;The point is deleted to be determined chained list;
(2) it if the point is already present in " empty growth point " chained list, " is increased emptily if the path values in newly-increased path are less than original
The path values in path, the point is deleted from sp_tree, the point is deleted to be determined chained list where long point ";
(3) it if the point is already present in " empty growth point " chained list, " is increased emptily if the path values in newly-increased path are less than original
The path values in the path where long point " delete former " empty growth point " from sp_tree, the point are deleted to be determined chained list;
(4) process for repeating step 25, until " point to be determined " chained list is sky;
Step 26: the smallest point of path values in selection " empty growth point " chained list determines it as " real growth point ", and execute
Step 24, step 25;
Step 27: step 26 is repeated, until " empty growth point " chained list P is empty (all points all become real growth point);This
When, sp_tree (shortest path tree) has recorded source point to the shortest path of every other node, and the path values of each node indicate
Shortest path value of the source point to the node;
In the path query step 3, comprising:
Step 31: using the shortest path of sp_tree (shortest path tree) record source point to every other node, using depth
The mode for spending preferential (or breadth First) traverses sp_tree, can be obtained source point to arbitrary point shortest path;
For another embodiment, in the data prediction of the step 1, further includes:
Step 11: data abstraction processing.Using intersection in traffic network route map as node, each intersection
Between section be line, road section length be line weight, traffic network can be reduced to a cum rights line graph G;With
Node quantity is ranks number, constructs a two-dimensional matrix and (if there is line between two o'clock, uses the weight of route as distance value.
Fig. 2 show the extraction result figure of certain urban district section traffic roadmap, as shown in Fig. 2, cutting for a kind of embodiment
Certain urban district section traffic roadmap is taken, according to the figure, extracts 10 intersections: v=v0, v1, v2, v3, v4, v5, v6,
v7,v8,v9};According to traffic roadmap, each point is connected;The weight of wire length is that actual range is (single in traffic roadmap
Position: 100 meters).The connection figure G=(V, E) constructed.
Step 12: constructing initial adjacency matrix arcs, arcs [i] [j] indicates connection vertex i, the weight on the side of j.If
There are sides to connect i, and j, arcs [i] [j] are the weight on the side;If there is no while connect the two points while, then arcs [i]
[j] is ∞, wherein arcs [i] [i]=0.
When implementing, according to connection figure, adjacency matrix arcs such as table 2 is constructed:
Table 2:
V0 | V1 | V2 | V3 | V4 | V5 | V6 | V7 | V8 | V9 | |
V0 | 0 | 1 | 5 | ∞ | ∞ | ∞ | ∞ | ∞ | ∞ | 1 |
V1 | 1 | 0 | 3 | 7 | 5 | ∞ | ∞ | ∞ | ∞ | ∞ |
V2 | 5 | 3 | 0 | ∞ | 1 | 7 | ∞ | ∞ | ∞ | ∞ |
V3 | ∞ | 7 | ∞ | 0 | 2 | ∞ | 3 | ∞ | ∞ | ∞ |
V4 | ∞ | 5 | 1 | 2 | 0 | 3 | 6 | 9 | ∞ | ∞ |
V5 | ∞ | ∞ | 7 | ∞ | 3 | 0 | ∞ | 5 | ∞ | ∞ |
V6 | ∞ | ∞ | ∞ | 3 | 6 | ∞ | 0 | 2 | 7 | ∞ |
V7 | ∞ | ∞ | ∞ | ∞ | 9 | 5 | 2 | 0 | 4 | ∞ |
V8 | ∞ | ∞ | ∞ | ∞ | ∞ | ∞ | 7 | 4 | 0 | ∞ |
V9 | 1 | ∞ | ∞ | ∞ | ∞ | ∞ | ∞ | ∞ | ∞ | 0 |
In the shortest path tree constitution step 2, comprising:
Step 21: establishing " empty growth point " chained list P, chained list is by the path values ascending sort in place path;
(1) path where point: the sequence for all the points passed through from source point to current point;
(2) path values: adjacency matrix arcs has recorded the distance between any two points value, and path values are source points to current point
Adding up for the distance value for all the points that i passes through, is denoted as cost [i];
When implementing, the pointer of node in shortest path tree sp_tree is directed toward in creation, which is " empty growth point " chained list
Head.
Step 22: establishing " point to be determined " chained list N, chained list is by the path values ascending sort in place path;
When implementing, the pointer of node in shortest path tree sp_tree is directed toward in creation, which is " point to be determined " chained list
Head.
Step 23: establishing sp_tree (shortest path tree), record all " real growths point ", source point is " real to increase to each
The path of point " is exactly shortest path, and the cumulative of arcs value is exactly path values on the path;Determine sp_tree (shortest path tree)
Root node v0, be inserted into shortest path tree sp_tree for v0 as real growth point;
When implementing, a node is created, the number of the node is v0, and the path values of the node are 0;Creation is directed toward most short
The pointer of node in path tree sp_tree, the pointer are directed toward the root node v0 of sp_tree;
Step 24: will be connect with newly-increased " real growth point " and all nodes not in sp_tree are newly-increased " real to increase as this
In son's Knots inserting sp_tree (shortest path tree) of long point ", and it is added in " point to be determined " chained list N;
Fig. 3 show the first growth figure of shortest path tree, as shown in figure 3, first newly-increased " real to increase when implementing
Point " is v0, and by point v1, v2, the v9 addition sp_tree with v0 connection and not in sp_tree, " point to be determined " chain is also added
In table N:
Step 25: " point to be determined " that processing increases newly one by one:
(1) if the point is not present in " empty growth point " chained list, this is pressed into the arrangement insertion of path values ascending order and " increases emptily length
Point " chained list;The point is deleted to be determined chained list;
(2) it if the point is already present in " empty growth point " chained list, " is increased emptily if the path values in newly-increased path are less than original
The path values in path, the point is deleted from sp_tree, the point is deleted to be determined chained list where long point ";
(3) it if the point is already present in " empty growth point " chained list, " is increased emptily if the path values in newly-increased path are less than original
The path values in the path where long point " delete former " empty growth point " from sp_tree, the point are deleted to be determined chained list;
(4) process for repeating step 25, until " point to be determined " chained list is sky;
When implementing, judge that v1, v2, v9 are not present in " empty growth point " chained list, by v1, v2, v9 addition " increase emptily length
Point " chained list, " empty growth point " chained list after ascending order arrangement are as follows: N={ v1, v9, v2 }.
Step 26: the smallest point of path values in selection " empty growth point " chained list determines it as " real growth point ", and execute
Step 24, step 25;
When implementing, the smallest point v1 of path values in " empty growth point " chained list is selected, real growth point is determined as;Execute step
24, the node v2 that will be connected to v1, v3, v4 are added in " point to be judged " chained list N;
Step 25 is executed, v2 is already present in " empty growth point " chained list, and new route value 1+3 < original route value 5, from sp_
It is deleted in tree former " empty growth point ", the point is deleted to be determined chained list, as shown in Figure 3;V3, v4 are not present in " increasing emptily
In long point " chained list, " empty growth point " chained list, " empty growth point " chained list after ascending order arrangement are as follows: P={ v9, v2, v4, v3 } is added;
Step 27: step 26 is repeated, until " empty growth point " chained list P is empty (all points all become real growth point);This
When, sp_tree (shortest path tree) has recorded source point to the shortest path of every other node, and the path values of each node indicate
Shortest path value of the source point to the node;
Fig. 4 show the second growth figure of shortest path tree, as shown in figure 4, executing step 24 when implementing, selects v9
To increase " real growth point " newly, it is connect without node with v9 and not in sp_tree, update " empty growth point " chained list P=v2, v4,
v3};
Step 24 is executed, selects v2 for " real growth point ", at this time " point to be determined " chained list N={ v4, v5 };Execute step
25, v4 are present in sp_tree, and new route value 4+1 < original route value 6 deletes original point v4 from sp_tree, " empty
Original point v4 is deleted in the chained list of growth point ";V5 is not present in " empty growth point " chained list, is added " empty growth point "
In chained list, " empty growth point " chained list P={ v4, v3, v5 } at this time;
Step 24 is executed, selects v4 for " real growth point ", at this time " point to be determined " chained list N={ v3, v5, v6, v7 };It is " empty
Growth point " chained list P={ v4, v3, v5 }.Step 25 is executed, v3 is present in P, 5+2 < 8, and the path of " empty growth point " v3 needs
It updates;V5 is present in P, 5+3 < 12, and " empty growth point " v5 needs to update;V6, v7 are not present in P.Step is executed
Rapid 25, " point to be determined " chained list N={ } at this time;" empty growth point " chained list P={ v3, v5, v6, b7 };
Fig. 5 show the second growth figure of shortest path tree, as shown in figure 5, the above process is repeated, until " increasing emptily
Long point " chained list P={ };
In the path query step 3, comprising:
Step 31: using the shortest path of sp_tree (shortest path tree) record source point to every other node, using depth
The mode for spending preferential (or breadth First) traverses sp_tree, can be obtained source point to arbitrary point shortest path;
When implementing, the sp_tree stated in traversing graph 5 by the way of breadth First, available source point v0 to institute
There is the shortest path of node:
Path (v0-v1)={ v0, v1 };
Path (v0-v2)={ v0, v1, v2 };
Path (v0-v3)={ v0, v1, v2, v4, v3 };
Path (v0-v4)={ v0, v1, v2, v4 };
Path (v0-v5)={ v0, v1, v2, v4, v5 };
Path (v0-v6)={ v0, v1, v2, v4, v3, v6 };
Path (v0-v7)={ v0, v1, v2, v4, v3, v6, v7 };
Path (v0-v8)={ v0, v1, v2, v4, v3, v6, v7, v8 };
Path (v0-v9)={ v0, v9 };
A kind of the step of method solving the problems, such as traffic trip route planning of the invention, this method includes: that (1) data are pre-
Processing step: using intersection in traffic network route map as node, the section between each intersection is line, section
Length is the weight of line, and traffic network can be reduced to a cum rights line graph G;Using node quantity as ranks number, construction
One two-dimensional matrix (if there is line between two o'clock, uses the weight of route as distance value;If two o'clock is connected without directapath, use
∞ indicates distance value;), the matrix is recorded with two-dimensional array;(2) shortest path tree (shortest paths tree, abbreviation sp_
Tree) constitution step: gradually other are tied according to the Growing law of shortest path tree using source point as the root node of sp_tree
Sp_tree is added in point, needs the node that solves until sp_tree covers every other node or covers problem;(3) shortest path
Diameter obtaining step: retrieving sp_tree using depth-first or breadth first search method, available source point to arbitrary point most
Short path.Be growing in city size, traffic route is increasingly complicated, private car trip is increasing, vehicle mounted guidance more not
The today that can or lack, there is bigger meaning.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, without departing from the technical principles of the invention, several improvement and deformations can also be made, these improvement and deformations
Also it should be regarded as protection scope of the present invention.
Claims (6)
1. a kind of method for solving the problems, such as traffic trip route planning characterized by comprising
Step 1, using intersection in traffic network route map as node, section between each intersection is line, road
Segment length is the weight of line, and traffic network can be reduced to a cum rights line graph G;Using node quantity as ranks number, structure
A two-dimensional matrix is made, and records the two-dimensional matrix with two-dimensional array;
Step 2, using the source point of line graph G as the root node of shortest path tree, according to the Growing law of shortest path tree, gradually
By other node join shortest path trees, until shortest path tree covers every other node or covers what problem needed to solve
Node;
Step 3 retrieves shortest path tree using depth-first or breadth first search method, obtain source point to it is any certain put most
Short path, as required optimal traffic route.
2. the method for solving the problems, such as traffic trip route planning as described in claim 1, which is characterized in that if in two-dimensional matrix
There is line between the two o'clock of cum rights line graph G, uses the weight of route as distance value;If two o'clock is connected without directapath, ∞ is used
Indicate distance value.
3. the method for solving the problems, such as traffic trip route planning as described in claim 1, which is characterized in that the data are located in advance
It manages in step 1, comprising:
Step 11: by a traffic roadmap, using intersection in traffic network route map as node, each intersection it
Between section be line, road section length be line weight, traffic network can be reduced to a cum rights line graph G;With knot
Point quantity is ranks number, constructs a two-dimensional matrix;
Step 12: construct initial adjacency matrix arcs, arcs [i] [j] indicates connection vertex i, the weight on the side of j, if there is
Side connects i, and j, arcs [i] [j] are the weight on the side;If there is no while connect the two point while, then arcs [i] [j] is
∞, wherein arcs [i] [i]=0.
4. the method for solving the problems, such as traffic trip route planning as claimed in claim 2, which is characterized in that step 2 packet
It includes:
Step 21: establishing void growth point chained list P, chained list P is by the path values ascending sort in place path, wherein where putting
Path is the sequence for all the points passed through from source point to current point;Path values are that adjacency matrix arcs has recorded between any two points
Distance value, path values are source points to the cumulative of the distance value of the current point i all the points passed through, and are denoted as cost [i];
Step 22: establishing to be determined chained list N, chained list N is by the path values ascending sort in place path;
Step 23: establishing shortest path tree, record all real growths point, the path of source point to each real growth point is exactly most short
Path, the cumulative of adjacency matrix arcs value is exactly path values on the path;The root node v0 for determining shortest path tree, by root node
V0 is inserted into shortest path tree as real growth point;
Step 24: all nodes using being connected to newly-increased real growth point and not in shortest path tree increase real growth point newly as this
Son's Knots inserting shortest path tree in, and be added in be determined chained list N;
Step 25: newly-increased point to be determined is handled one by one:
(1) if the point is not present in chained list P, this is pressed into path values ascending order arrangement insertion chained list P;It is deleted from chained list N
This point;
(2) if the point is already present in chained list P, if the path values in newly-increased path are less than former empty growth point place path
Path values delete the point from shortest path tree, and the point is deleted from chained list N;
(3) if the point is already present in chained list P, if the path values in newly-increased path are less than the path where former empty growth point
Path values, from deleting former empty growth point in shortest path tree " point is deleted from chained list N;
(4) process for step (1) arriving (3) is repeated, until chained list N is sky;
Step 26: the smallest point of path values in selection chained list N determines it as real growth point, and execute step 24 and step 25,
Until chained list P is sky, at this point, shortest path tree has recorded source point to the shortest path of every other node, the road of each node
Diameter value indicates source point to the shortest path value of the node.
5. the method for solving the problems, such as traffic trip route planning as described in claim 1, which is characterized in that use depth-first
Shortest path tree is retrieved, obtains source point to arbitrarily certain shortest path put.
6. the method for solving the problems, such as traffic trip route planning as described in claim 1, which is characterized in that use breadth First
Searching method retrieves shortest path tree, obtains source point to arbitrarily certain shortest path put.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811241187.9A CN109345026B (en) | 2018-10-24 | 2018-10-24 | Method for solving traffic travel route planning problem |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811241187.9A CN109345026B (en) | 2018-10-24 | 2018-10-24 | Method for solving traffic travel route planning problem |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109345026A true CN109345026A (en) | 2019-02-15 |
CN109345026B CN109345026B (en) | 2022-02-01 |
Family
ID=65311817
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811241187.9A Active CN109345026B (en) | 2018-10-24 | 2018-10-24 | Method for solving traffic travel route planning problem |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109345026B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110860061A (en) * | 2019-10-31 | 2020-03-06 | 南方电网调峰调频发电有限公司 | Decentralized arrangement cooperative fire extinguishing method for electrochemical energy storage device |
CN112419779A (en) * | 2020-11-09 | 2021-02-26 | 北京京东乾石科技有限公司 | Selection method and device of unmanned vehicle stop point, storage medium and electronic equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106096783A (en) * | 2016-06-13 | 2016-11-09 | Tcl集团股份有限公司 | A kind of method for optimizing route based on Dijkstra and system thereof |
CN106600062A (en) * | 2016-12-15 | 2017-04-26 | 湖南第师范学院 | Method for calculating the shortest path of single source in multi-region-cross complex network diagram |
-
2018
- 2018-10-24 CN CN201811241187.9A patent/CN109345026B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106096783A (en) * | 2016-06-13 | 2016-11-09 | Tcl集团股份有限公司 | A kind of method for optimizing route based on Dijkstra and system thereof |
CN106600062A (en) * | 2016-12-15 | 2017-04-26 | 湖南第师范学院 | Method for calculating the shortest path of single source in multi-region-cross complex network diagram |
Non-Patent Citations (2)
Title |
---|
何松柏等: "应急物流配送公路网络最短路径模型的构建及优化", 《天津科技大学学报》 * |
张红科: "基于链表的Dijkstra算法优化研究", 《电脑知识与技术》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110860061A (en) * | 2019-10-31 | 2020-03-06 | 南方电网调峰调频发电有限公司 | Decentralized arrangement cooperative fire extinguishing method for electrochemical energy storage device |
CN112419779A (en) * | 2020-11-09 | 2021-02-26 | 北京京东乾石科技有限公司 | Selection method and device of unmanned vehicle stop point, storage medium and electronic equipment |
CN112419779B (en) * | 2020-11-09 | 2022-04-12 | 北京京东乾石科技有限公司 | Selection method and device of unmanned vehicle stop point, storage medium and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN109345026B (en) | 2022-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103533501B (en) | A kind of geography fence generation method | |
CN106503789A (en) | Loop-free shortest path searching method based on Di Jiesitela and minimax ant colony | |
CN103714234B (en) | Method and equipment for determining moving paths of objects in games | |
US7949467B2 (en) | Road map data structure, road map data structure creating method, road map data storage medium, and navigation device | |
US9677904B2 (en) | Generating travel time data | |
CN103971184B (en) | Transmission line of electricity path generating method based on GIS Spatial GISs | |
CN107133700A (en) | Mobile phone signaling data road network method based on R* tree indexes | |
CN104215254B (en) | The method and apparatus of path navigation | |
CN107679189A (en) | A kind of point of interest update method, device, server and medium | |
CN106022531A (en) | Searching method of shortest path passing by necessary peak points | |
CN103902521A (en) | Chinese statement identification method and device | |
US20210172753A1 (en) | Scenic Route-Based Navigation Directions | |
CN104102637B (en) | A kind of method and device of generation hot spot region | |
CN108021686A (en) | A kind of method of public bus network and road network in Rapid matching electronic map | |
CN106289287B (en) | Vehicle-mounted end multi-target shortest path calculation method based on route selection experience | |
CN109345026A (en) | A method of solving the problems, such as traffic trip route planning | |
CN105606116B (en) | A kind of air navigation aid, navigation device and its system of navigation of satisfying the need | |
CN104866903B (en) | The most U.S. path navigation algorithm of based on genetic algorithm | |
CN110399445A (en) | A kind of processing method of point of interest, device and equipment | |
CN107860393A (en) | A kind of fast searching method of a plurality of shortest path | |
KR20220160534A (en) | Encoding method of geographical location zone, method and apparatus for constructing encoding model | |
CN107193877A (en) | Land cover classification system and method | |
WO2017173783A1 (en) | Method of displaying point of interest, and terminal | |
Vamshi et al. | Dynamic route planning framework for minimal air pollution exposure in urban road transportation systems | |
CN113865589A (en) | Long-distance rapid path planning method based on terrain slope |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |