GLS Optimization Algorithm for Solving Travelling Salesman Problem

2009 Second International Conference on Computer and Electrical Engineering
GLS Optimization Algorithm for Solving Travelling Salesman Problem
Nourolhoda Alemi Neissi
Masoud Mazloom
Office of Standard and Research
Khouzestan Regional Electrical Company
Ahvaz, Iran
[email protected]
Computer Engineering Department
Faculty of Engineering, Shahid Chamran University
Ahvaz, Iran
[email protected]
individuals for mating is selected; giving higher chance for
fitter individuals, and then a crossover operator is applied,
producing offspring, on which mutation is applied.
Selection pressure lets fitter individuals to survive after the
replacement. The evolution continues until some termination
criteria are satisfied [5].
Abstract— Travelling salesman problem (TSP) is well known
as one of the combinatorial optimization problems. There are
many approaches for finding solution to the TSP. In this paper
we used combination of local search heuristics and genetic
algorithm (GLS) that has been shown to be an efficient
algorithm for finding near optimal to the TSP. We also
evaluate the run time behavior and fitness of our approach and
compare it with other methods. A reasonable result is obtained
and the proposed algorithm is able to get to a better solution in
less time.
A. Crossover Operator
Crossover operator aims to interchange the information
and genes between chromosomes. Therefore, crossover
operator combines two or more parents to reproduce new
children, then, one of these children may hopefully collect
all good features that exist in his parents [6]. Different
operators have been used for solving TSP [5]. What we used
in this paper are PMX, OX and PBX.
In PMX (Partially Matched Crossover) method two
random crossover points are chosen, and we begin by
exchanging the values of the parents between these points.
OX (Order Crossover) method is somewhat different than
PMX. It attempts to maintain the order of integers as if the
chromosome vector were wrapped in a circle, so the last
element is followed by the first element. It begins, like
PMX, by choosing two crossover points and exchanging the
integers between them. This time, however, holes are left in
the spaces where integers are repeated [7]. In PBX (Position
Based Crossover) method, it first generates a random mask
and then exchanges relative genes between parents
according to the maps [8].
Keywords-component; Combinatorial Optimization; Genetic
Algorithm; Local Search; Genetic Local Search; Metaheuristic;
Travelling salesman problem.
I.
INTRODUCTION
Traveling Salesman Problem (TSP) [9] is a classical
combinatorial optimization problem which has been studied
by many researchers. There are different approaches for
solving the TSP. Classical methods for solving the TSP
usually result in exponential computational complexities [1]
and because of this reason researchers have suggested
numerous heuristic algorithms, such as genetic algorithms,
local search and tabu search. In the last 20 years, a new kind
of approximate algorithm has emerged which basically tries
to combine basic heuristic methods in higher level
frameworks aimed at efficiently and effectively exploring a
search space. These methods are nowadays commonly
called metaheuristics [2]. One of the metaheuristic
algorithms that we used in our work is genetic local search
algorithm (GLS). In this article we used genetic local search
algorithm and some of its operators on TSP. In the next
sections genetic algorithm, local search and genetic local
search are briefly reviewed. Then the experimental design
and result is discussed. Finally the last section followed by
conclusions and suggestions.
II.
B. Mutation
In mutation process, a gene from a selected chromosome
is randomly changed. This provides additional chances of
entering unexplored sub-regions [1]. There are different
mutation operators [5], what we proposed in this article are
Inversion and Exchange. In Inversion method the
chromosomes divide into three parts and the middle part
will turnover. In Exchange method two random genes are
chosen then they will replace with each other.
GENETIC ALGORITHM
Genetic Algorithms (GAs) were introduced by J. Holland
[3], and has been used to solve many difficult problems [4].
A population of individuals, representing candidate
solutions, is evolved from an initial generation towards a
final generation. An evaluation function is used to measure
how fit an individual is. At each evolutionary step, a pool of
978-0-7695-3925-6/09 $26.00 © 2009 IEEE
DOI 10.1109/ICCEE.2009.102
291
C. Termination
VI.
The code of the proposed algorithm was written in C++
and tested on a Pentium with 1700 MHz and 256 MB of
RAM.
There are many types of temination criterion [4] and the
method we used here is a Generation Number.
III.
A. Comparison Based on Fitness Function
The diagrams in figure 1, figure 2 and figure 3 are the
comparison of mutation operators IVM and EM and
crossover operators PMX, OX and POS in KroA, KroB and
KroC. The diagrams show that Pm=0.1 and Pc=0.9 obtained
a better fitness and the combinatorial operator POS-IVM
have a better fitness.
LOCAL SERACH ALGORITH M
Local search algorithms are at the core of the most
successful metaheuristics to solve a wide variety of single
objective combinatorial problems such TSP [9]. Various
methods of local search are introduced by Goldberg [4], in
our approach we used 2-Opt algorithm. The 2-opt algorithm
basically removes two edges from the tour, and reconnects
the two paths created [12].
IV.
EXPERIMENTAL RESULTS
GENETIC LOCAL SEARCH ALGORITHM
Genetic local search was first introduced by Moscato
[13]. Unlike classical genetic algorithm, where mutation is
referred to as a background operator, GLS makes equal use
of both crossover and mutation operators. The goal of
operators used in conjunction with the local search method is
to produce hopefully better individuals from existing ones by
utilizing the information already contained in the current
population [10].
V.
IMPLEMENTATION ISSUES
In our proposed algorithm we used three instances with
100 cities kroA, kroB and kroC [11]. Every chromosome
shows a tour of cities and each city defined with a number.
The first generation (N) is chosen randomly then the cost of
the tour is calculated. In our implementation 1000 generation
are created that for producing each generation (except the
first generation) N/2 pair chromosomes are selected
randomly from previous generation. Our selecting operator is
roulette wheel selection [7]. We put c1…cn as the costs of the
N tours. Then we find C= Max (c1...cn) and calculate S,
S = ∑ C − ci
i = 1,..., n . Now we choose a random
Figure 1. Solving KroA problem with 2-Opt based on fitness.
number (R), between 0 and S. After that, we test that if the
condition R ≤ ∑ C − ci
i = 1,..., k is established or not. If
it is not, we increase a unit to k until the condition be
established or k= n-1. When the condition stops the number
of k is the number of related tour that is selected. In this
method the possibility of the worst selection is zero (ci=C).
Whenever the parents are selected by roulette wheel
operator, the crossover operator applies on the parents with
the possibility of Pc (Pc=0.7 or Pc=0.8 or Pc=0.9). Then
mutation operator with the possibility of Pm (Pm =0.1 or Pm =
0.2) applies on parents. After that we apply 2-opt local
search operator on parents.
After selecting a pair of chromosomes for N/2 times and
applying our operators on them, we have N new
chromosomes (new generation) and N previous
chromosomes. During selecting N tours among N parents
and N children, N*0.02 parent will be selected from the best
of parents and N*0.98 children will be selected randomly.
Random selection of new generation prevents to be in a local
optimum.
Figure 2.
292
Solving KroB problem with 2-Opt based on fitness.
Figure 6. Solving KroC problem with 2-Opt (run time behavior)
VII. CONCLUSION
Figure 3.
All the results are obtained with local search 2-opt
operator and the fitness is approximately 1. The experimental
result of local search 3-opt operator on 100 generation have
the exact fitness of 1. However the run time performance of
3-opt algorithm is much more than 2-opt algorithm.
The results on kroA, kroB and kroC show that
combination of two genetic operators, IVM and POS, and 2opt have a better fitness for solving TSP problem. But when
we use 3-opt algorithm the solution converges to global
optimum in more time. So due to the kind of the problem, if
time of arriving to the optimum is more important than
getting global optimum we can use 2-opt and if global
optimum is more important than time we can use 3-opt
algorithm.
Solving KroC problem with 2-Opt based on fitness.
B. Comparison Based on Run Time
We analyzed the run time behavior of algorithm on
KroA, KroB and KroC problems in figure 4, figure 5
and figure 6. As it is obvious the time in combinatorial
operators PMX-EX and PMX-IVM is more than other
combinatorial operators, also other operators are almost
in a unit level.
ACKNOWLEDGMENT
We would like to thank Office of Research and
Standard, Khouzestan Regional Electrical Company, for
economic performance for financial support.
REFERENCES
[1]
Figure 4. Solving KroA problem with 2-Opt (run time behavior)
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
Figure 5. Solving KroB problem with 2-Opt (run time behavior)
293
M. Bonyadi, M. Azghadi and H. Shah-Hosseini, “Population based
optimization algorithms for solving the Travelling Salesman
Problem”, ITECH publications, ISBN 978-953-7619-10-7, pp:1-34,
2008.
C. Blum, A. Roli, “Metaheuristics in combinatorial optimization:
overview and conceptual comparison”, ACM Comput. Surv. 35(3),
268-308, 2003.
J. H. Holland, “Adaptation in natural and artificial Systems”, Univ.
Mich. Press, 1975.
D. E. Goldberg, “Genetic algorithms in search, optimization, and
machine learning”, Addison-Wesley, Reading (MA), 1989.
E. Ozcan and M. Erenturk, “A brief review of memetic algorithm for
solving Euclidean 2D Travelling Saleman Problem”, 2002.
A.E. Eiben and J.E. Smith, “Introduction to evolutionary
computing”, Springer, 2003.
R. L. Haupt and S. Ellen Haupt, “Practical genetic algorithm”, 2004.
M. Gen and R. Cheng, “Genetic algorithms and engineering
optimization”, 1999.
L.Paquete, M.Chiarandini and T.Stützle, “A Study of local optima in
the biobjective Travelling Salesman Problem”. In Proceedings of the
Workshop on Multiple Objective MetaHe uristics, Paris, France,
2002.
[10] P. Merz, B. Freisleben, “Genetic local search for the Tsp: New
Results”, IEEE international conference on evolutionary computation,
1997.
[11] M.P. Hansen, “Use of substitute scalarizing functions to guide a local
search based heuristics : The case of moTSP”, Journal of Heuristics,
In Press, 2000.
[12] C. Nilsson, “Heuristics for the traveling salesman problem”, Tech.
Report, Linköping University, Sweden,. 2003.
[13] P. Moscato, “On Evolution, Search, Optimization, Genetic Algorithms
and Martial Arts: Towards Memetic lgorithms”, Caltech Concurrent
Computation Program (report 826), 1989.
294