Professional Documents
Culture Documents
Meta-Heuristic Hybrid Algorithmic Approach For Solving Combinatorial Optimization Problem (TSP)
Meta-Heuristic Hybrid Algorithmic Approach For Solving Combinatorial Optimization Problem (TSP)
Usman Ashraf1 , Jing Liang1 , Aleena Akhtar1 , Kunjie Yu1 , Yi Hu1 , Caitong
Yue1 , Abdul Mannan Masood2 , and Muhammad Kashif3
1
School of Electrical Engineering, Zhengzhou University, Zhengzhou 450001, China
2
School of Computer Science and Engineering, Jiangsu University of Science and
Technology, Jiangsu, China
3
School of Computer Science and Technology, Beijing Institute of Technology,
Beijing, China
usmanjadoon@ymail.com
1 Introduction
G = (V, E) (1)
Multiple literatures have discussed the use of GA for solving TSP, and many
literatures generally focused on designing the representation of solution, and
initializing an initial population [18][19], designing crossover, mutation and se-
lection operator and designing a self-adaptive method to use multiple mutation
or crossover operators[20-22]. Research in which a new method called greedy
permuting method (GPM) was introduced to initialize an initial population and
then the efficiency of proposed method was tested on some TSP benchmark
problems, with promising results[23].
2 Methodology
Generally, the parameter tuning for GA is problem oriented and set as per
requirements but in case of TSP it has been tuned as per the work requirement.
The selection of parameter which should be tuned are selection, cross over and
mutation probability which in general varies from 0.1 to 1. GA specifically uses
fixed length of chromosome strings for coding the solution of the problem. There
should be a proper balance between exploitation and exploration. GA always
fails because of the not being balanced properly between crossover and mutation
probability. Proper allocation of values will help the algorithm not to be trapped
in local solution.
α β ρ % M axIt nAnT
1 2 0.9 10 1000 30
4 Usman Ashraf et al.
a. Pheromone Rate First, the other parameters will be kept constant, only
the value of α will be changed. Result can be seen as shown below in Table 2.
b. Heuristic Rate Now keeping other parameters constant while changing the
value of β, and observe the changes in results as shown Table 3.
d. nc ← nc+1
e. If the iteration number nc reaches the maximum iteration number, then
go to Step a. Otherwise, go to Step 3.
3) Choose the better 30 tours based on the cost Lk (length of tour done by ant
k) from these 100 tours, and pheromone laid on edge of these 30 better tours.
4) Crossover and Mutate the tours and calculate the new evaluated tours,
a. mc ←0 (mc is iteration number).
b. Choose the next city j
c. mc ← mc+1
d. If the iteration number mc reaches the maximum iteration number, then
go to Step a. Otherwise, go to Step 5.
5) Compute Lk (k = 1, 2, .., m) (Lk is the length of tour done by ant k). Save the
current best tour.
6) c ← n+1
7) If the iteration number c reaches the maximum iteration number, then go to Step
8. Otherwise, go to Step 2.
8) Print the current best tour.
value then the trail value is updated, else it remains the same. This results in
improvement of ants laying on the better tours, and also affect the ants which
are following. A large number of tours can be generated (e.g. 100), out of which
some better tours (e.g. 30) are then selected. These selected best tours undergo
mutation and crossover operations under Genetic Algorithm, and after these op-
erations are performed then we can calculate the cost of newly mutated tours.
Mutation
1. Mutation A
Strategy: Swap a randomly selected city with next visiting city.
Detail: Choose one city j1 randomly and then swap it with the next visiting city
in the tour C0 , this will generate a new tour calling C1 .
2.Mutation B
Strategy: swap a randomly selected city with the city after next visiting city.
Detail: Choose one city j1 randomly and then swap it with the city after next
visiting city in the tour C0 , this will generate a new tour calling C1 .
3. Mutation C
Strategy: Swap a randomly selected city and the city adjacent to it with the
next visiting city.
Detail: Choose random city j1 , then swap j1 and next adjacent city with after
coming next city the tour C0 , this will generate a new tour calling C1 .
4. Mutation D
Strategy: Swap randomly chosen 2 adjacent cities with 2 other random adjacent
cities.
Detail: Choose two adjacent cities j1 and j2 randomly and then swap them ad-
jacently at a randomly selected place in the tour C0 , this will generate a new
tour calling C1 .
5. Mutation E
Strategy: Put randomly chosen 2 adjacent cities at a random place.
Detail: Choose two adjacent cities j1 and j2 randomly and then put them adja-
cently at a randomly selected place in the tour C0 , this will generate a new tour
calling C1 .
6. Mutation F
Strategy: 2 different randomly selected cities put adjacently at a place adjacently.
Meta-Heuristic Hybrid Algorithm for TSP 7
Detail: Choose two random cities j1 and j2 , then put them adjacently at a ran-
domly selected place in the tour C0 , this will generate a new tour calling C1 .
7. Mutation G
Strategy: 2 different randomly selected cities put adjacently at 2 different ran-
dom locations.
Detail: Choose two random cities j1 and j2 , then swap them at randomly selected
places separately in the tour C0 , this will generate a new tour calling C1 .
Crossover
Similarly, several Crossover methods were used to improve the currently dis-
cussed hybrid algorithm. Let’s suppose we have two parent tours given by old1
and old2. A substring from old2 for crossover purpose will be selected and it will
be called as donor.
1. Crossover A
Strategy: Replace random length substring at the same place in the old1.
Detail: We will swap a substring of random length generated from old2. This
substring will be then replaced at the exact starting location of the old1.
2. Crossover B
Strategy: Replace random length substring at the beginning at the old1.
Detail: A substring is selected randomly of random length. Then we insert the
substring into the beginning of old1.
3. Crossover C
Strategy: Replace random length substring at the end at the old1.
Detail: A substring is selected randomly of random length. Then we insert the
substring into the end of old1.
4. Crossover D
Strategy: Replace random length substring at the random place at the old1.
Detail: A substring is selected randomly of random length. Then we insert the
substring at a random place of old1.
5. Crossover E
Strategy: Replace random length substring starting in first half and ending in
second half of old2, placed at a random location.
Detail: substring will be selected from random place of first half of the string
and ending in second half of the string. The length of this substring will random.
Then we insert the substring into random location of old1.
6. Crossover F
Strategy: Replace substring of 1/4th length of old2 starting in first half of old2,
placed at a random location.
Detail: this substring will be selected from random place of first half of the string.
The length of this substring will be 1/4th of the length of full string. Then we
insert the substring into random location of old1.
7. Crossover G
Strategy: Replace substring of 1/4th length of old2 starting in first 1/3rd part of
old2, placed at a random location.
Detail: This substring will be selected from random place of first 1/3rd part of
8 Usman Ashraf et al.
the string. The length of this substring will be 1/4th of the length of full string.
Then we insert the substring into random location of old1.
8. Crossover H
Strategy: Replace substring of 1/4th length of old2 starting in middle half part
of old2, placed at a random location.
Detail: this substring will be selected from random place of first middle half of
the string. The length of this substring will 1/4th of the length of full string.
Then we insert the substring into random location of old1.
9. Crossover I
Strategy: Replace substring of 4 adjacent cities from old2 starting in middle half
part of old2, placed at a random location.
Detail: this substring will be selected from random place of first middle half of
the string. The length of this substring will be of 4 cities. Then we insert the
substring into random location of old1.
10. Crossover J
Strategy: Replace substring of 4 adjacent cities from old2, placed at a random
location.
Detail: this substring will be selected from random place of first middle half of
the string. The length of this substring will be of 4 cities. Then we insert the
substring into random location of old1.
3 Results
Ant Colony Optimization and Genetic Ant Colony Optimization, which are dis-
cussed above have been run for 10 times with the best parameters known as per
previous testing. After applying the best parameters, the algorithms have been
run for 10 times on the six Benchmarks of TSPLIB varying from 16 cities to 120
cities. The Benchmarks used as the test bed are Ulysses16, Ulysses22, bayg29,
att48, berlin52 and g120m. All results are rounded up to two decimal points.
The results obtained for the benchmark of TSP are shown below. The Results
are compared with basic ACO Algorithm, and it can be clearly noticed that the
hybrid Algorithm outperformed the basic ACO algorithm. Environment used to
run the above said strategies was suitable enough to obtain good results and has
the following characteristics.
variations of Hybrid Algorithm, 5 minimum values have been selected from each
TSPLIB. Further to refine these results only highly productive variations of Hy-
brid Algorithm were selected that have been shown in Table 5 and then plotted
in Figure 2. Where it can be easily deduced that as the number of cities or the
distance between the cities increases hybrid algorithm produces better results
than basic ACO.
The ANT Colony Optimization Algorithm has been run for the above men-
tioned Benchmarks for 10 times and then those results are used as benchmarks
to compare with other results generated from hybrid Genetic Ant Colony Algo-
rithm. Best solution has been taken from the 10 test runs. The parameter set
for the algorithms are as follows in Table 7.
Paramter Value
Pheromone Exponential weight (α) 1
Heuristic Exponential weight (β) 2
Evaporation Rate (ρ) 0.9
% 10
Number of Ants 30
Selected Best tours from ACO 30
Number of tours Generated (M axIt) 1000
Number of Mutations 1000
4 Conclusion
This research proposed a hybrid algorithm to see the change in results with re-
spect to standard algorithm (Ant Colony Optimization Algorithm) and Hybrid
algorithm (Genetic Ant Colony Optimization Algorithm). Further the perime-
ters for Ant Colony Optimization Algorithm and values are instinctively tuned
to different levels of all heuristics to obtain suboptimal level. And then multi-
ple crossovers and mutations are used alongside those selected parameters while
Meta-Heuristic Hybrid Algorithm for TSP 11
generating results with hybrid algorithm. From the results in section 3 the fol-
lowing information can be concluded for the selection of crossover and mutation
as shown in Table 8. The results show that if the mutation, crossover and their
Crossover Mutation
Ulysses16 B A
Ulysses22 A A
bayg29 J F
att48 B F
berlin52 B D
g120m A A
5 Acknowledgement
This work is supported by the National Natural Science Foundation of China
(61922072, 61876169, 61673404, 61976237).
References
1. K. Ilavarasi and K. S. Joseph, Variants of travelling salesman problem: A survey
”International Conference on Information Communication and Embedded Systems
(ICICES2014),” 2014.
2. David Applegate and William Cook, ”The Traveling Salesman Problem: A Compu-
tational Study,” in Princeton Series in Applied Mathematics, Princeton, NJ, USA,
Princeton University Press, 2007, pp. Chapter 1–5,12–17.
3. Malik Muneeb Abid and Iqbal Anjum Muhammad, ”Heuristic Approaches to Solve
Traveling Salesman,” TELKOMNIKA Indonesian Journal of Electrical Engineering,
vol. 15, no. 2, p. 390 396, August 2015.
4. Cook and William, ””History of the TSP.” The Traveling Salesman Problem.,” Geor-
gia Tech, October 2009. [Online]. Available: http://www.tsp.gatech.edu/index.html.
5. Amanur Rahman Saiyed, ”The Traveling Salesman problem,” Indiana State Uni-
versity USA, April 11, 2012.
6. N. M. Sureja and B. V. Chawda, ”Random Travelling Salesman Problem using SA,”
International Journal of Emerging Technology and Advanced Engineering, vol. 2,
no. 3, 2012.
12 Usman Ashraf et al.
7. S. Wang and A. Zhao, ”An Improved Hybrid Genetic Algorithm for Traveling Sales-
man problem,” IEEE Proc. Int. Conf. Computational Intelligence and Software En-
gineering, 2009.
8. Y. Nagata, S. Kobayashi, ”A powerful genetic algorithm using edge assembly
crossover for the traveling salesman problem”, Informs Journal on Computing, vol.
25, no. 2, pp. 346-363, 2013.
9. P. Tian, Z. H. Yang, ”An improved simulated annealing algorithm with genetic
characteristics and the traveling salesman problem”, Journal of Information and
Optimization Sciences, vol. 14, no. 3, pp. 241-255, 2013.
10. M. Birattari, P. Pellegrini, M. Dorigo, ”On the invariance of ant colony optimiza-
tion”, IEEE Transactions on Evolutionary Computation, Vol.11, No.6, 732-742,
2008.
11. E. Lizárraga, O. Castillo, J. Soria, ”A method to solve the traveling salesman
problem using ant colony optimization variants with ant set partitioning”, Studies
in Computational Intelligence, vol. 451, no. 1, pp. 237-246, 2013.
12. J. H. Ho, H. C. Shih, B. Y. Liao, S. C. Chu, ”A ladder diffusion algorithm using
ant colony optimization for wireless sensor networks”, Information Sciences, Vol.192,
No.6, 204-212, 2012.
13. J. Xiao, X. T. Ao, Y. Tang, ”Solving software project scheduling problems with
ant colony optimization”, Computers and Operations Research, vol. 40, no. 1, pp.
33-46, 2013.
14. C. Nothegger, A. Mayer, A. Chwatal, G. Raidl, ”Solving the post enrolment course
timetabling problem by ant colony optimization”, Annals of Operations Research,
Vol.194, No.1, 325-339, 2012.
15. K. S. Yoo, S. Y. Han, ”A modified ant colony optimization algorithm for dynamic
topology optimization”, Computers and Structures, vol. 123, no. 4, pp. 68-78, 2013.
16. Xue Yang, Jie-sheng Wang “Application of improved ant colony optimization al-
gorithm on traveling salesman problem” in IEEE 2017 International Conference on
Robotics and Automation Sciences (ICRAS)
17. Kashif Muhammad, Shang Gao, “Comparitive analysis of meta-hueristic algo-
rithms for solving optimization problems”, Advances in Intelligent Systems Re-
search, volume 163, Proceedings of the 2018 8th International on Management,
Education and Information (MEICI 2018).
18. Y. Deng, Y. Liu, D. Zhou, ”An Improved Genetic Algorithm with Initial Population
Strategy for Symmetric TSP”, Mathematical Problems in Engineering, vol. 2015,
no. 3, pp. 1-6, 2015.
19. Y. Luo, B. Lu, F. Liu, ”Neighbor field method for population initialization of TSP”,
Journal of Chongqing University, vol. 32, no. 11, pp. 1311-1315, 2009.
20. Ahmad B. Hassanat, E. Alkafaween, ”On Enhancing Genetic Algorithms Using
New Crossovers”, International Journal of Computer Applications in Technology,
vol. 55, no. 3, pp. 202-212, 2017.
21. Noraini Mohd Razali, John Geraghty, ”Genetic algorithm performance with dif-
ferent selection strategies in solving TSP”, Proceedings of the World Congress on
Engineering 2011 (WCE 2011), vol. 2, pp. 1134-1139, 2011.
22. Martin C. Serpell, James E. Smith, ”Self-adaptation of mutation operator and
probability for permutation representations in genetic algorithms”, Evolutionary
Computation, vol. 18, no. 3, pp. 491-514, 2010.
23. Junjun Liu, Wenzheng Li “Greedy Permuting Method for Genetic Algorithm on
Travelling Salesman Problem” in IEEE 8th International Conference on Electronics
Information and Emergency Communication (ICEIEC) 2018