文件名称:BranchAndBound
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:59.84kb
-
已下载:1次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
本程序是用分支定界法求最短路径的程序,用C++编写。采取的基本思想是:使用最小优先队列分支界限法来构建程序,细节是对于每个节点,包含三个变量:当前走过的路径长度、当前的花费和该节点对应的实际城市的编号。关于确定节点优先级,我们规定首先以“当前走过的路径长度”来确定优先级,当路径长度相等时,以“当前的花费”来确定优先级。同时,我们还定义两个数组dist[i]和pric[i]保存当前求得的从源城市到每个城市的最短距离和花费,用于剪枝时的评判标准。-This procedure is to use branch and bound procedure for seeking the shortest path, using C++ to implement. The basic idea is: Using the minimum priority queue Branch and Bound method to build a program, the details are: for each node, containing three varibles: the current path length traversed, the current cost and the node number corresponding to the actual city. On the determination of priorities, we first use the current path length traversed to determine the priority if the path length is equal, then current cost is used to determine priority. At the same time, we also define two arrays dist [i] and the pric [i] to save the current shortest distance and cost from the source city to every other city . This will be used as the evaluation criterion when pruning.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
BranchAndBound
BranchAndBound/分支定界文档.pdf
BranchAndBound/分支定界求最短路径.cpp
BranchAndBound/分支定界文档.pdf
BranchAndBound/分支定界求最短路径.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.