针对具有大量道路节点的大型交通网络,提出了一种改进的深度优先算法.该算法在搜索过程中,首先对节点进行方向性选择,缩小了搜索的范围,同时引入启发式搜索函数,优先选择权值较低的点进行扩展,降低了深度优先的盲目性.因此,算法不仅能够在搜索早期找到最短路径,还能够提供多条备选路径.
For a large traffic network that contains a great amount of nodes, an improved algorithm based on depth- first search is figured out. In the searching process, the algorithm firstly selects nodes according to the direction, which can largely decreases the searching area. Meanwhile, a heuristic function to calculate the value of each node is introduced and the search by choosing the node with the lowest value is extended, which improves the efficiency of depth-first search. Hence, the algorithm not only can find the shortest routine in the early time, but also provides users with some more routines in support.