View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Ant System TSP Solver

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

2.8 | 4 ratings Rate this file 20 Downloads (last 30 days) File Size: 273 KB File ID: #33448 Version: 1.2
image thumbnail

Ant System TSP Solver


Johannes (view profile)


26 Oct 2011 (Updated )

A demo of an Ant System algorithm solving classical Traveling Salesman Problems.

| Watch this File

File Information

A demo of an Ant System algorithm solving classical Traveling Salesman Problems.

To run, type:

ant_system_tsp(@Qatar, 50000)

The code should be pretty self-explanatory.

Required Products MATLAB
MATLAB release MATLAB 7.11 (R2010b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (8)
08 Aug 2016 Renu Jangra

ant_system_tsp(@Qatar, 50000)

I use above command to run prgm.But didn't work gives error .

06 Apr 2016 ant edi Widodo

Hi, Jon may get the main program ?

Comment only
09 Oct 2013 mehdi izri

where is the main program all the files its function file

15 Apr 2013 Johannes

Johannes (view profile)

Hi Zhang, I incorporated the change that you suggested. This was a bug.

Comment only
03 Aug 2012 ZHANG

ZHANG (view profile)

Hi, Johannes, thanks for uploading the code. It seems that there is a bug in the program.
"curnode = startnode(m)" in "ant_system_tsp.m" should be "curnode = startnode(k)". Because an ant should be put on a randomly vertex each time.

27 Feb 2012 Johannes

Johannes (view profile)

Hi Chetak, I don't have a point set for Portugal. However, you could construct it yourself using, e.g., the data from

Comment only
25 Feb 2012 chetak k

Thank you. Is it possible to get the Map of Portugal to try.

11 Dec 2011 panya hantula

thank you

Comment only
16 Apr 2013 1.2

Bugfix suggested by ZHANG.

Contact us