You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
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.
Cite As
Santhanakrishnan Narayanan (2026). Travelling Salesman Problem (https://se.mathworks.com/matlabcentral/fileexchange/64654-travelling-salesman-problem), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.2.3.0 (102 KB)
MATLAB Release Compatibility
- Compatible with R2016a to R2019b
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 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 |
