TSPSEARCH
% [P,L] = TSPSEARCH(X,M) gives a tour P of length L. X is either a
% coordinate matrix of size Nx2 or Nx3 or a symmetric distance matrix.
% Euclidian distances are used in the coordinate case. M is an integer
% in the range 1 to N. Default is M = 1.
%
% METHOD
% M nearest neighbour tours are generated from randomly selected starting
% points. Each tour is improved by 2-opt heuristics (pairwise exchange of
% edges) and the best result is selected.
%
% EXAMPLES
%
% X = rand(100,2);
% [p,L] = tspsearch(X,100);
% tspplot(p,X)
%
% % Optimal tour length 1620
% X = load('hex162.dat');
% [p,L] = tspsearch(X,10);
% tspplot(p,X)
Citation pour cette source
Jonas Lundgren (2024). TSPSEARCH (https://www.mathworks.com/matlabcentral/fileexchange/71226-tspsearch), MATLAB Central File Exchange. Récupéré le .
Compatibilité avec les versions de MATLAB
Plateformes compatibles
Windows macOS LinuxCatégories
- Mathematics and Optimization > Global Optimization Toolbox > Particle Swarm >
- AI, Data Science, and Statistics > Statistics and Machine Learning Toolbox > Cluster Analysis and Anomaly Detection > Nearest Neighbors >
- Mathematics and Optimization > Optimization Toolbox > Solver-Based Optimization Problem Setup >
Tags
Remerciements
A inspiré : TSP2024
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
Version | Publié le | Notes de version | |
---|---|---|---|
1.0.0 |