Solution for The Travelling Salesman Problem:
- A salesman has to visit a number of cities in a single closed tour.
- He always starts and ends the tour in his home city.
- He has to visit each other city on the tour exactly once.
-> The solution attempts to minimize the overall travelling distance.
Duc Chung Tran (2021). TSP.zip (https://www.mathworks.com/matlabcentral/fileexchange/46629-tsp-zip), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
Respected sir and other persons i am having a non linear optimization problem in matlab could any one please help me for this
so kindly provide some help
I couldn't run it. Sir would plz help me to run it.
Anyone pleas provide me code for lion optimization algorithm...
hkc@cusat.ac.in my mail id..
Thank you everyone for your constructive comments and support. However, at the moment I do not have time to provide detail support to each individual. Thus, I hope through the easy-to-understand function names, you can study/investigate the algorithm yourself. If it is too difficult to understand, please take a piece of paper, a pencil and draw a flowchart of the algorithm, surely you can understand it quickly.
oh, my gosh, I spent my 2 hours on understanding tour and tourlength. hope the author could give more detailed explanation to help others. wow..
thankyou
can i get example of your work regarding TSP because I still could not solve my TSP problem
thanks
Dear Duc Chung Tran,
Thank you very much for this software. This is very nice program. Could you please suggest the literature you have followed to write this software?
Thank you !
is this enumerated version of it?
Is this method guarantee the optimal solution?
Please can you post a numerical example.
position=[2000,2000;2000,1500;1500,1750;1000,1500]
Hi can you also send me an example of what "position" looks like? Thanks!
sir i need an error free travellig salesman code without using any algorithm but this generates a number of errors.if any one have it please help!!!
Yes, I sent an example to your email just now, please check. In this page, I show only my complete solutions rather than fragmented parts of them.
Would you be able to post an example?
Probably you wrongly used "tsp" function. You may change data matrix to 2x148 and try. Please check the source code in GUI file as well.
position is an 148*2 matrice in my example but error appears "Undefined function 'tsp' for input arguments of type 'double' "
what can be position please!
In order to plot both my solution and your alternative solution on a same figure, you need to:
1. Generate same set of data as input to the algorithm
2. Run my algorithm and obtain a solution of TSP, save this result to a variable
3. Run your alternative algorithm and obtain a solution of TSP, save this result to another variable
4. Plot the results on the same figure, using legend command to differentiate between the two.
Hope this information address your query.
If i also had to find an alternative solution including the original one in this kind of problem. I have got an original solution but when i have an alternative solution it doesn't include the circles as cities and the alternative tour crosses paths therefore making it worse tour then original one?