Travelling Salesman Problem by Dynamic Programming
DATA FROM TXT FILES ARE RETRIVED AND SOLVE USING tsp.dp1.m
DESCRIPTION OF VARIABLES
n : number of cities
coor : txt file-name of coordinates, i.e. 'coor.txt'
dist : txt file-name of distance between cities, i.e. 'dist.txt'
city : txt file-name of cities' name, i.e. 'city.txt'
TXT FILES NEEDED:
1) coor.txt
* table of n-by-2 matrix
* first column contains latitude of each cities
* second column contains longitude of each cities
2) dist.txt
* table of n-by-n matrix
* each element represent distance between two cities
* all diagonal elements must be Inf
3) city.txt
* table of n-by-1 vector
* each row hold the name of cities
* name of cities cannot contain any spaces or symbols
引用
Faiq Izzuddin Kamarudin (2025). Travelling Salesman Problem by Dynamic Programming (https://www.mathworks.com/matlabcentral/fileexchange/54744-travelling-salesman-problem-by-dynamic-programming), MATLAB Central File Exchange. に取得済み.
MATLAB リリースの互換性
プラットフォームの互換性
Windows macOS Linuxカテゴリ
- Mathematics and Optimization > Global Optimization Toolbox > Particle Swarm >
- AI and Statistics > Statistics and Machine Learning Toolbox > Cluster Analysis and Anomaly Detection > Nearest Neighbors >
- Mathematics and Optimization > Optimization Toolbox > Solver-Based Optimization Problem Setup >
- MATLAB > Mathematics > Graph and Network Algorithms > Shortest Path > Traveling Salesman (TSP) >
タグ
謝辞
ヒントを得たファイル: Dynamic Programming solution to the TSP
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!バージョン | 公開済み | リリース ノート | |
---|---|---|---|
1.0.0.0 |