Travelling Salesman Problem

Can be used to solve both symmetric and asymmetric tsp; The script reads the distance matrix from an input file.
다운로드 수: 1.6K
업데이트 날짜: 2019/10/21

라이선스 보기

The script is a modification of the TSP Example, Matlab Optimization Toolbox (https://mathworks.com/help/optim/ug/travelling-salesman-problem.html) to solve asymmetrical TSPs.
*detectSubtours.m has been kept intact without any change.
1. The script solves TSPs (both symmetric and asymmetric) based on binary integer programming
2. Required inputs: Distance matrix file. Place the input file in the same folder as the script. Distance matrix should be a square matrix.
3. Enter the file name in the prompt along with extension like .csv/.xls
4. Distance between (i,i) should be 0. Also if there is no route between two nodes, the corresponding matrix value should be zero.

인용 양식

Santhanakrishnan Narayanan (2026). Travelling Salesman Problem (https://kr.mathworks.com/matlabcentral/fileexchange/64654-travelling-salesman-problem), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2016b
R2016a에서 R2019b까지의 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
버전 게시됨 릴리스 정보
1.2.3.0

Minor modifications in the code

1.2.2.0

csvread function has been replaced with readmatrix function

1.2.1.0

There was a numerical issue when using the script in Matlab 2018 or later. The issue has been rectified and the script has been tested in Matlab 2019.

1.2.0.0

There was a bug related to constraint for (i->i) and non-existing routes in previous version and has been rectified in this version.

1.1.0.0

There was a request for sample csv file. I have added a csv file containing distances corresponding to 79 German cities. The distances were taken from google maps. In the command prompt for distance matrix file, enter germanCities.csv

1.0.0.0