13.07.2015 Views

A Fast TSP Solver Using GA on JAVA - Gcd.org

A Fast TSP Solver Using GA on JAVA - Gcd.org

A Fast TSP Solver Using GA on JAVA - Gcd.org

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Table 3: Opti<strong>on</strong>al ags of <str<strong>on</strong>g>TSP</str<strong>on</strong>g>.classOpti<strong>on</strong> Meaning Default-p M The populati<strong>on</strong> 100-e p e Eliminate p e % 30individuals-R p i Improve p i % individuals 20by 2opt-v Increment verbositylevelthe Euclidean distance. The X and Y coordinates describedabove mean the latitude and the l<strong>on</strong>gitude respectively.If the <str<strong>on</strong>g>TSP</str<strong>on</strong>g> le c<strong>on</strong>tains the lineMin:nwhere n is the positive real number, the programwill stop when the elite, whose tour length is n, isfound.On Windows 2 95 with the Java Development Kit(JDK)[7], for example, type the following commandin the \MS-DOS 2 Prompt" window.java <str<strong>on</strong>g>TSP</str<strong>on</strong>g> -v -p 200 gr96.data 300That command means to solve the <str<strong>on</strong>g>TSP</str<strong>on</strong>g> storedin the le `gr96.data' (Africa-Subproblem of 666-city<str<strong>on</strong>g>TSP</str<strong>on</strong>g> in <str<strong>on</strong>g>TSP</str<strong>on</strong>g>LIB[5]), where the populati<strong>on</strong> is 200, andthe maximum generati<strong>on</strong> is 300.The output from the command follows (partiallyomitted):C:\>java <str<strong>on</strong>g>TSP</str<strong>on</strong>g> -v -p 200 gr96.data 300File: gr96.dataPopulati<strong>on</strong>: 200Selecti<strong>on</strong>: 30 %2 opt: 20 %1:3[93 94 92 91 76 11111111111111111111 27 64 95]572842:253[94 93 95 64 65 1111111111111111 76 91 92]558403:119[37 34 33 32 10 1111111111111111 31 35 36]5548119:1251[49 51 52 54 50 111111111111 47 46 45]5533244:2646[93 94 92 91 76 111111111111 65 64 95]55322120:7132[41 40 39 38 78 1111111111 49 48 42]55291165:9780[49 45 46 47 53 1111111111 54 52 51]55259180:10692[52 51 49 45 46 11111111 48 50 54]55209The program outputs the elite, when a new elite is2MS-DOS and Windows are registered trademarks of MicrosoftCorporati<strong>on</strong>found, in the following format:g : i [ tour ] `where g, i, tour, and ` mean the generati<strong>on</strong>, theID of the individual, the tour (a list of towns in thevisiting order) that corresp<strong>on</strong>ds to the individual, andthe length of the tour.The last line, for example, says that a new elite isfound at 180th generati<strong>on</strong>, it is the 10692nd individual,and the length of the tour is 55209. According to<str<strong>on</strong>g>TSP</str<strong>on</strong>g>LIB, it is the minimum soluti<strong>on</strong>.4 C<strong>on</strong>clusi<strong>on</strong>We presented an algorithm for rapid soluti<strong>on</strong> of the<str<strong>on</strong>g>TSP</str<strong>on</strong>g> that combines the <str<strong>on</strong>g>GA</str<strong>on</strong>g> and the 2opt method. Wepublished a program based <strong>on</strong> the algorithm <strong>on</strong> ourweb pages. Because the program is written in <strong>JAVA</strong>language and can be executed <strong>on</strong> many platforms, any<strong>on</strong>ecan verify the eciency of our algorithm. Any<strong>on</strong>ewho designed a new algorithm can compare his own<str<strong>on</strong>g>TSP</str<strong>on</strong>g> solver with ours by running both programs <strong>on</strong> thesame machine. Our <str<strong>on</strong>g>TSP</str<strong>on</strong>g> solver is useful as a criteri<strong>on</strong>for evaluating the performance of <str<strong>on</strong>g>TSP</str<strong>on</strong>g> solvers.References[1] Holland, J.H.: Adaptati<strong>on</strong> in Natural and ArticialSystems, Univ. of Michigan Press (1975)[2] Sengoku, H., Yoshihara, I.: A<str<strong>on</strong>g>Fast</str<strong>on</strong>g> <str<strong>on</strong>g>TSP</str<strong>on</strong>g> Soluti<strong>on</strong>using Genetic Algorithm (Japanese), Informati<strong>on</strong>Processing Society of Japan 46th Nat'lC<strong>on</strong>v. (1993)[3] Sengoku, H., Yoshihara, I.: An Evaluati<strong>on</strong> of OptimizingCapability of Genetic Algorithm | <str<strong>on</strong>g>GA</str<strong>on</strong>g>vs SA | (Japanese), Informati<strong>on</strong> Processing Societyof Japan 47th Nat'l C<strong>on</strong>v. (1993)[4] Moscato, P.: <str<strong>on</strong>g>TSP</str<strong>on</strong>g>BIB, http://www.ing.unlp.edu.ar/cetad/mos/<str<strong>on</strong>g>TSP</str<strong>on</strong>g>BIB_home.html[5] Reinelt, G.: <str<strong>on</strong>g>TSP</str<strong>on</strong>g>LIB, ftp://softlib.rice.edu/pub/tsplib/tsplib.tar[6] Yamamura, M., Ono, T., Kobayashi, S.:Character-Preserving Genetic Algorithms forTraveling Salesman Problem (Japanese), Journalof Japanese Society for Articial IntelligenceVol.7, No.6 (1992)[7] Cornell, G., Horstmann, C.S.: core <strong>JAVA</strong>, Sun-Soft Press (1996)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!