Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jerrychen97/tsp_branch_and_bound
旅行商问题,采用分支定界法求解Sovling TSP problem with the method of Branch and Bound
https://github.com/jerrychen97/tsp_branch_and_bound
Last synced: 13 days ago
JSON representation
旅行商问题,采用分支定界法求解Sovling TSP problem with the method of Branch and Bound
- Host: GitHub
- URL: https://github.com/jerrychen97/tsp_branch_and_bound
- Owner: JerryChen97
- Created: 2017-07-08T13:14:48.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-22T09:00:03.000Z (over 7 years ago)
- Last Synced: 2024-11-11T14:58:44.845Z (2 months ago)
- Language: C++
- Homepage:
- Size: 9.77 KB
- Stars: 4
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TSP_Branch_and_Bound
Sovling TSP problem with the method of Branch and Bound
## 解决TSP问题的分支定界法类
### 使用说明
先通过BranchAndBound(int VertexNum, int EdgeNum, vector initEdge)初始化该类
其中VertexNum为节点数目,EdgeNum为边的数目,initEdge为所有边组成的向量
注意边的编号从0开始,节点的编号也是从0开始
getHLoopLength()返回最短H回路的大小
FinalHLoop[0]--FinalHLoop[VertexNum]中存储着最短哈密顿回路中各边的编号
通过printFinalResult()即可打印结果