Script which solves the Travelling Salesman Problem (TSP) for rectangular grid
The script MinimizeSuccessiveTilts.m solves the Travelling Salesman Problem (TSP) for rectangular grid. After solution the script will display interactively the result of solution. In this script Nx and Ny are integer numbers for dimensions of the grid. i0 and j0 are the starting points for salesman on the rectangular grid (x and y coordinates). After execution the script will print the elapsed time for solution itself, the edge will the maximum length of the step between two successive cites on the grid, the algorithm which gives the best result and the total elapsed time. The solution is based on heuristic search. The script can be adjusted in such a way that it minimizes the total length of the path. For that just uncomment one commented line in the script.
Cite As
Dmitry Tyutyunnikov (2024). Script which solves the Travelling Salesman Problem (TSP) for rectangular grid (https://www.mathworks.com/matlabcentral/fileexchange/52432-script-which-solves-the-travelling-salesman-problem-tsp-for-rectangular-grid), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- AI, Data Science, and Statistics > Statistics and Machine Learning Toolbox > Cluster Analysis and Anomaly Detection > Nearest Neighbors >
- MATLAB > Mathematics > Graph and Network Algorithms > Shortest Path > Traveling Salesman (TSP) >
- Mathematics and Optimization > Optimization Toolbox > Linear Programming and Mixed-Integer Linear Programming > Problem-Based Linear Programming >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
MinimizeSuccessiveTilts/
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 | The picture changed. |