File Exchange

image thumbnail

Solving Symmetrical and DisSymmetrical TSP base on Ant Colony Algorithm

version 1.0 (28.2 KB) by

Using Ant Colony Optimization Algorithm to solve Traveling Salesman Problem

3.62857
31 Ratings

19 Downloads

Updated

No License

Editor's Note: This file was a File Exchange Pick of the Week

In this M-file, the implementation of ACO Algorithm is given with the support of reference papers listed. You can easily use it as following command to see the pictures of result and the playing iterative course.
ACO('filename.tsp');
filename.tsp is the problem file of the Symmetrical or Asymmetrical TSP problem which you can download from the following site: http://elib.zib.de/pub/mp-testdata/tsp/tsplib/tsp/index.html
As there is several type of ACO algorithm, the basic one Ant System(AS) is given, which is original. For more problems or other ACO algorithms, you can contact me by the email codstar@126.com. plealse make me known if you want to use it commercially.
And many thanks for Doug Hull's advice!

Comments and Ratings (46)

Ao Liu

Ao Liu (view profile)

Doesn't work. Look at the results. Crappy.

good day i am writing in request for the source code on ant colony optimization ... i will be glad if you can write me back ... thank you

Hello Mr.Wang,
But when I call the ACO function as u mentioned in line 1 and line 4 with 'ch150.tsp', I still get the same error :
"Error: File: ACO.m Line: 1 Column: 14
Unexpected MATLAB expression."
And the first line show this massage "Invalid syntax at 'ch150.tsp'.Possibly,a ),} or ]is missing".
Thank u very much.

Nimmy Cleetus

kindly please send me the matlab code for antcolony optimization

Hock Hung

Error: File: ACO.m Line: 1 Column: 14
Unexpected MATLAB expression.
Why this could happen? izit bacause of the matlab's version?
Appreciate your help..

It's very slow even with 22 nodes and the results can be pretty inefficient. Maybe the author could try to improve the performance from both points of view of speed and efficiency.

Zainab ASUS

it works

Bharath

Could someone tell me where can I get the code for solving the same MTSP using ACO in MATLAB?

Ayman Esmat

Hello Mr.Wang,
Its a very useful code. Thank u very much.
But when I call the ACO function as u mentioned in line 1 and line 4, I still get the same error :
"Error: File: ACO.m Line: 1 Column: 14
Unexpected MATLAB expression."

Please help..
Thank u very much

In program where 2 call d ACO('ulysses22.tsp')....plz help me i need ths urgently......

i hv corrected d program by changing d ACO('filename') to ACO('ulysses22.tsp'). but still it gives error like
Error: File: ACO.m Line: 1 Column: 14
Unexpected MATLAB expression.
plz guide me....i shall b highly thankful 2 u.....

LUKAS

LUKAS (view profile)

:)

Jeci

Jeci (view profile)

for those getting "Input argument "inputfile" is undefined." errors, you need to call the function with ACO('filename'). filename must include the extension name.
for example, I'm using ACO('ch150.tsp')

amit singh

I got an error
Input argument "inputfile" is undefined.

Error in ==> ACO at 4
[Dimension,NodeCoord,NodeWeight,Name]=FileInput(inputfile);

wat will i do?
this will help my M.Tech project.
please tell me solution.

Amirah 'Aisha

I need a solution for solving ant colony optimization to solve travelling salesman problem.

ravi teja

I got an error
Input argument "inputfile" is undefined.
wat will i do?
this will help my M.Tech project.
please tell me solution.

neeti saxena

my project is ant colony algorithms for web page classification pls provide source code in C/C++/java language

poof

poof (view profile)

poof

poof (view profile)

Hi Wang H, I want to make a toolbox of Ant Colony Algorithm. currently, I have implemented only ACS, MMAS for TSP and several versions of CACA for continous optimization, and there were other kinds of problem which ACA can solve, but I dont konw them very well, who has the same interest, please contact me to complete it!

abdo brad

? ?

??

xiaoping ren

thank you for your job,i am now studying the ant algorithm

Yong Lee

zhou jin

excellent

ali nadizadeh

Hi
I am very glad if I receive your code about ant colony optimization for my project.
Very tanks

gou sheng

good

hamoudi samir

salut

liu bing

wang jia

it 's good but i meet some error

k m

i am a studenta also interested in tsp problems. thanks in advanse

Alvin Guo

Nice program! Many thanks! I want to combine it with Bayesian network learning!
my mail: gwq66@yahoo.com.cn

jaesung lee

thank you

Thanh Nguyen

Now, I am a student and I am very interested in ant colony. Because, the part of my thesis have to use this algorithm to solve some problem...
I am very glad if I receive your code about ant colony optimization. Thank you very much

11 1111

Thank you so much!

jack newly

pretty good! many thanks for your files!

shivangi singhal

this site is very helpful for me

stty satty

simpler implimentation is the the greatest adv of this paper

hojat hosseinzadeh

wojciech mastalerz

Wang H. I have used them for 2 years to the FAP (frequency asign problem) with very good result.
I have this unfortunately implemented in SCILAB, but I serve help.

chuanli zhuang

thanks

Wang H

Hi, I want to make a toolbox of Ant Colony Algorithm. currently, I have implemented only ACS, MMAS for TSP and several versions of CACA for continous optimization, and there were other kinds of problem which ACA can solve, but I dont konw them very well, who has the same interest, please contact me to complete it!

haed tavakkoli

vahid majazi

very excellent

chin hang

did very well...........

Wang H

The link in the introduce is corrected to
http://elib.zib.de/pub/mp-testdata/tsp/tsplib/tsp/index.html

MATLAB Release
MATLAB 7.2 (R2006a)

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

» Watch video

Win prizes and improve your MATLAB skills

Play today

AntSystem-WithPlay/