How can I take the row of the cities from the Travel Salesman Problem?

2 vues (au cours des 30 derniers jours)
Ang Vas
Ang Vas le 2 Oct 2015
Commenté : Ang Vas le 2 Oct 2015
Hello everybody I need your help about an issue. I found a TSP code from http://www.mathworks.com/matlabcentral/fileexchange/24857-another-tsp-solver/content/solveTSP.m , which I run it in and everything is crystal clear. What I want to ask is how I can take the exactly row of cities after the TSP in an Nx2 matrix. For instance let’s say that the X,Y coordinates of 8 cities is : 2.2592 9.0488 1.7071 9.7975 2.2766 4.3887 4.3570 1.1112 3.1110 2.5806 9.2338 4.0872 4.3021 5.9490 1.8482 2.6221 When I run the program I can take the solution of the problem but not the row of the cities.

Réponse acceptée

Walter Roberson
Walter Roberson le 2 Oct 2015
Look at the comments in the code:
[cities ind] = solveTSP( cities, display) returns the aranged cities and an index vector of the visiting order
  1 commentaire
Ang Vas
Ang Vas le 2 Oct 2015
ok thanks you so much. Sorry for this ,but I am amateur in matlab and I am not so keen on

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Traveling Salesman (TSP) dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by