公交换乘问题在公共交通中是一个重要的问题。针对十分流行的8684公交网络查询系统只能查询到2次换乘的缺点,提出了一种对公交线路信息预先进行处理,然后采用减少站点和线路剪枝的优化枚举算法,可以实现换乘4次的优化线路;并用Visucal C++实现了该算法。通过对大型城市的公交网络的实际计算,与8684的查询结果进行比较;结果表明该算法不但可以提供更好的线路,而且还能提供8684无法提供的线路。实际计算时间不到1s,能够到达实时性要求,因此算法具有很强的实用性和通用性,在公交网络中可以广泛采用。
Public traffic transfer is an important problem.The shortcoming of the popular 8684 public transport network query system can only take two transfer times inquiries of the bus information.This paper offers the optimal enumeration algorithm,which processes the route information firstly,then uses to reduce stations and cut routes,can achieve optimization routes of four transfer times.The algorithm is realized with Visual C++.Through verifying the large cities public transportation information,and comparing with 8684 bus network query result,the results show that this algorithm can give a better route,and also can provide the routes that the 8684 can not give.The actual calculate time less than one second,can satisfy the real-time.Therefore the algorithm is of great practical and versatile,and can be widely used in the transit network.