Greco F. (Ed.) - Travelling Salesman Problem (2008)
Greco F. (Ed.) - Travelling Salesman Problem (2008)
). I ay which computes the time taken to travel
such that time svel!
max(e,,, vel
from city i to city j with the velocity vel!” . Here, the function e(.) represents the two14 Travelling Salesman Problem
dimensional positional vector for the city. The function max(.,.) returns the maximum value
among its arguments, which is used here to threshold the negative velocities to a very small
positive number e,, = 0.0001.
8. Foreach IWD, update the soil of the path traversed by that IWD using equation 10.
soil(i, J) = (\~ p).soil(i, f) ~ p.Asoil(i, j)
,) Vy (10)
soit” = soit! + asoil(i, j)
WD ; , .
where soil!” represents the soil that the IWD carries. The IWD goes from city i to city j.
‘The parameter pis a small positive number less than one. Here we use p = 0.9.
9. For each WD, complete its tour by using steps 4 to 8 repeatedly. Then, calculate the
length of the tour traversed by the IWD, and find the tour with the minimum length
among all IWD tours in this iteration. We denote this minimum tour by Ty -
10. Update the soils of paths included in the current minimum tour of the IWD, denoted
by Ty which is computed based on equation 11
2.soit” a
j Wi ET y a)
“r=
TI. 11. If the minimum tour 7\, is shorter than the best tour found so far denoted by Ty
soil(i, j) = (I~ p).soil(i, j)~ p.
then we update the best tour by applying equation 12.
p= Ty and LenTp) = LenTyy) (2)
12. Go to step 2 unless the maximum number of iterations is reached or the defined
termination condition is satisfied.
13. The algorithm stops here such that the best tour is kept in 7p and its length is Len(’g)
It is reminded that it is also possible to use only Ty and remove step 11 of the IWD
algorithm. However, it is safer to keep the best tour 7 of all iterations than to count on only
the minimum tour T\, of the last iteration. The IWD algorithm is experimented by artificial
and some benchmark TSP environments. The proposed algorithm converges fast to
optimum solutions and finds good and promising results. This research (Shah-Hosseini,
2007) is the beginning of using water drops ideas to solve engineering problems. So, there is
much space to improve and develop the IWD algorithm.
6. Arti
6.1 Introduction
Recently, there was an increasing interest in the area of Artificial Immune System (AIS) and
its application for solving various problems specifically for the TSP (Zeng & Gu, 2007), (Lu
jal immune systemsPopulation-Based Optimization Algorithms for Solving the Travelling Salesman Problem 15
et al., 2007). AIS is inspired by natural immune mechanism and uses immunology idea in
order to develop systems capable of performing different tasks in various areas of research
such as pattern recognition, fault detection, diagnosis and a number of other fields including,
optimization. Here we want to know the AIS completely. To start with, it might be useful to
become more familiar with natural immune system,
Natural immune systems consist of the structures and processes in the living body that
provide a defence system against invaders and also altered internal cells which lead to
disease. In a glance, immune system's main tasks can be divided into three parts;
recognition, categorization and defence. As recognition part, the immune system firstly has
to recognize the invader and foreign antigens e.g. bacteria, viruses and etc. After
recognition, classification must be performed by immune systems, this is the second part.
And appropriate form of defence must to be applied for every category of foreign aggressive
phenomenon as the third part. The most significant aspect of the immune systems in
mammals is learning capability. Namely, the immune systems can grow during the life time
and is capable of using learning, memory and associative retrieval in order to solve
mentioned recognition and classification tasks. In addition, the studies show that the natural
immune systems are useful phenomena in information processing and can be helpful in
inspiration for problem solving and various optimization problems (Keko et al., 2003).
6.2 Artificial immune system
Like the natural immune systems the AIS is a set of techniques, which try to algorithmically
mimic natural immune systems’ behaviour (Dasgupta, 99). As mentioned earlier, the
immune system is susceptible to all of the invaders, also the outer influences, like vaccines
which are artificial ways of raising individual's immunity. Vaccines are other factors that
can stimulate the immune system’s susceptibility. This feature is the key point of the AIS
structure. The vaccines in the AIS are abstracted forms of the preceding information.
Vaccination modifies genes based on the useful knowledge of the problem to achieve higher
fitness in comparison to the fitness that obtained from a random process when for example a
classical GA is applied. Once again it is necessary to point out that, vaccines contain some
important information about the problem and in consequence the vaccination process
employed in a right manner can be very useful in the performance of the algorithm. Like
classical GA and based on its structure the AIS can work. The GA operators (crossover and
mutation) search the problem space randomly and hence they don’t have enough capability
of meeting the actual problem at the local level. GAs are known as incapable of search fine
local tuning because they are global search algorithms. Immune method through
vaccination tries to overcome such blindness of crossover and mutation (Keko et al., 2003).
After vaccination, the immune method might leads to deterioration. This case happens
when vaccination leads to smaller fitness values than previous ones. Hence, another
important part of immune algorithm is prevention of deterioration when inserting vaccine.
In short, immune operators perform in four steps: firstly, an individual is selected,
randomly. Now as the second step, the vaccine is inserted at the individual's randomly
chosen place. Vaccine insertion might leads to deterioration, the third step is checking for
deterioration. And finally the forth step is discarding every individual that shows
degeneration right after vaccine. This way of checking could be dangerous for diversity and
could result in algorithm's inability to avoid local optima, especially when combined with
small populations. The studies show that the use of immune systems resulted in faster16 Travelling Salesman Problem
convergence when population is large enough and diversity is secured. The combination of
immune algorithm and GA, form the immune genetic algorithm (IGA). Many of previous
works that are performed on the TSP used IGA. Now, we first investigate the IGA and its
structure in detail and after that we have a look at some previous works around the TSP.
In summery, the IGA consists of these steps:
1. Creation of initial population in some way, e.g. through a random process
Abstract vaccines according to the former information
Checking the termination criterion (if it is satisfied go to step 10 and else go to next step)
Crossover on the randomly selected individuals
Mutation on the produced children
Vaccination on the former step outcome
Deterioration checking
Discarding every individual that shows degeneration right after vaccine
9. Gotostep3
10. End
As it is obvious from the ten steps which have been mentioned above, the IGA is very
similar to the conventional GA, but they are different in operators. The IGA has vaccine
operator to overcome the universality problem of the conventional GA. For more
information on IGA you can refer to many cited papers which are prepared at the end of this
chapter.
SN ATELY
6.3 Solving the TSP using AIS and IGA
The first work in investigating potential application of the immune system in solving
numerical optimization problems was the study by Bersini and Varela (Bersini & Varela, 90),
who proposed immune employment mechanism. After that, many studies have been
performed that focus on the AIS and IGA. Also, the IGA and AIS have been applied for
solving the TSP in many cases. In (Jiao & Wang, 2000) the IGA and its parts have been
introduced in detail and the IGA has been shown as an algorithm that accomplished in two
steps: 1) a vaccination and 2) an immune selection. These phases are completely similar to
that we mentioned about IGA and AIS in this section. In the mentioned paper, it is proved
that the IGA theoretically converges with probability one. Besides, strategies and methods
of selecting vaccines and constructing an immune operator are also given. Also, the IGA has
been applied to the TSP and the results which are presented in this study illustrate that IGA
is able to restrain the degenerate phenomenon effectively during the evolutionary process
and can improve the searching ability, adaptability and greatly increase the converging
speed. Recently, some works have been performed on the TSP which employ IGA. In (Zeng
& Gu, 2007), a novel genetic algorithm based on immunity and growth for the TSP is
presented. In this paper at first, a reversal exchange crossover and mutation operator is
proposed which lead to preservation of the good sub-tours and making individuals various.
At the next part, a new immune operator is proposed to restrain individuals’ degeneracy. In
addition, a novel growth operator is proposed to obtain the optimal solution with more
chances. Results and investigations that performed in this study show that the algorithm is
feasible and effective as it is claimed. In addition, in another study (Lu et al., 2007), a
modified immune genetic algorithm is applied to solve the Travelling Salesman Problem
This method called an improved IGA by its authors. In this paper, at first, a new selection
strategy is incorporated into the conventional genetic algorithm to improve the performancePopulation-Based Optimization Algorithms for Solving the Travelling Salesman Problem 17
of genetic algorithm. Besides the authors changed the selection strategy and in a new form it
includes three computational procedures: evaluating the diversity of genes, calculating the
percentage of genes, and computing the selection probability of genes. Based on the
prepared results it is inferred that, by incorporating inoculating genes into conventional
procedures of genetic algorithm, the number of evolutional iterations to reach an optimal
solution can be significantly reduced and in consequence it results in faster answer in
comparison to conventional IGA.
In addition to the mentioned works, the biological immune idea can be combined with other
population based optimization algorithms which all of them are prepared in this chapter. As
an instance, the paper (Qin et al., 2006) proposes a new diversity guaranteed ant colony
algorithm by adopting the method of immune strategy to ant colony algorithm and
simulating the behaviour of biological immune system. This method has been applied to the
TSP benchmarks and results show that the presented algorithm has strong capability of
optimization; it has diversified solutions, high convergence speed and succeeds in avoiding
the stagnation and premature phenomena.
Based on the performed studies some points can be inferred as mentioned in the following
(Keko et al., 2003):
The simulation results show that the variation in population size has the same effect on the
GA and IGA. In both of the mentioned techniques, large population sizes require more
generation to achieve higher fitness, resulting in relatively slow rate of convergence. Hence
new ideas are required for faster convergence. Some of these new ideas had been presented
in some works as you see in some investigated papers.
Also, based on the simulation results, the running time of the IGA and the regular GA do
not have large differences, since in the IGA all the vaccines are determined before the
algorithm starts and when they are required they can be loaded from a look up table.
Combining immune operator with another local improving operator can be an additional
idea for getting better answers from the IGA,
One of the advantages of the IGA over the plain GA is that itis less susceptible to changing
control parameters such as crossover or mutation probability. The simulation results
demonstrate that changing these parameters has slight influence to the overall performance.
It is worth mentioning that more studies and attentions in the AIS and IGA are employing
other AIS features like adaptive vaccine selection.
7. Bee colony optimization
7.1 Introduction
Similar to other natural inspired and collective intelligence based algorithms such as PSO
which is taken from the bird’s life and ACO based on the ant colony social life, another kind
of artificial intelligence systems that can be useful in solving many engineering,
management, control and computational problems, is an algorithm inspired from Bee
colonies in nature. The Bee Colony Optimization (BCO) algorithms are interesting
metaheuristic algorithms that represent another direction in the field of swarm intelligence.
Here, firstly we introduce the bee system and bee colony optimization briefly and then some
recent works on the TSP which have used bee systems are investigated.
7.2 Bee colony optimization
The bee colony’s function according to nature is as follows. At first, each bee belonging to a
colony looks for the feed individually. When a bee finds the feed, it informs other bees by18 Travelling Salesman Problem
dancing, Other bees collect and carry the feed to the hive. After relinquishing the feed to the
hive, the bee can take three different actions,
1. Abandon the previous food source and become again uncommitted follower.
2. Continue to forage at the food source without recruiting the nestmates.
3. Dance and thus recruit the nestmates before the return to the food source.
With a certain probability that is dependent on the obtained feed quality, its distance from
the hive and the number of the bees which are now engaged with this feed resource, a bee
selects one of the stated actions and follows its work in a similar repetitive form (Todorovic
& Dell'Orco, 2005). This behaviour can be applied to many complicated engineering
problems including computational, control, optimization, transportation, etc. In the
following we study such a method that focuses on the TSP solving.
7.3 BCO applic
‘The BCO algorithm can be a significant method in local search applications. One of the most
primary works on the bees and their life is (Gato & Hagiwara, 97). In this study, the authors
applied bee system along with GA and introduced a modified and improved form of the
conventional GA. Based on this fact that the regular GA lacks the global search ability; the
improvement is regarding to overcome this shortcoming. Hence, a new GA inspired by the
bee colony's function has been presented, the authors called it, bee system. The main
Purpose of this modified GA (bee system) is to improve the local search ability of GAs
without degrading the global search ability. In the proposed bee system, firstly global search
is performed using the simple GA structure. Through this global search step, some
chromosomes with reasonable high fitness produced which are called superior
chromosome. These superior chromosomes are kept for the local search procedure and each
of them corresponds to a local population. At the beginning of the local search all of the
chromosomes in each local population make couple (cross over) with its population superior
chromosome. This crossover is named concentrated crossover which tries to search
concentratedly around the related superior chromosome. Another difference between the
bee system and ordinary GA is migration among the population. In this method, the bee
system selects one individual per predetermined generation, and transfers it to the
neighbouring population which is called migration. Using this migration technique, each
population tries to search independently and cooperatively. Moreover, for a more effective
search, a simplified Simplex Method named Pseudo-Simplex Method is introduced and
employed in the proposed bee system. All of the mentioned operators are in the local search
part. After passing the predetermined generations, the local search stops. If the best solution
found so far does not suffice the ending condition, the global search starts again and the
algorithm is repeated (Sato & Hagiwara, 97). It was a kind of application based on the bee
colony’s function which is used to solve the TSP. Simulation results depict that the
introduced method has a good potential to solve the TSP and other complicated problems.
7.4 Solving the TSP using BCO
Another study around bee colony and its applications is a work performed for
transportation modelling with focus on artificial life (ALife) approach (Lucic & Teodorovic,
2002). This paper shows that the ALife models that have been developed for solving
complex transportation problems are inspired by social insect’s behavior. Interaction
between individual insects in a colony of social insects has been well documented. ThePopulation-Based Optimization Algorithms for Solving the Travelling Salesman Problem 19
examples of such interactive behavior are bee dancing during the food procurement, ants’
pheromone secretion, and performance of specific acts which signal the other insects to start
performing the same actions. Based on these studies we can construct the artificial systems
such as bee systems. In the mentioned study, the artificial bee system has been applied to
solve the TSP. Assume that, the graph in which the traveling salesman route should be
discovered is shown by G = (N, A) that N= nodes (cities) and A= links connecting these
nodes. This graph can correspond to the network that the artificial bees are collecting nectar.
The hive can also be placed randomly in one of the network's nodes. For solving the TSP
using the bee system it is necessary that two parameters correspond to each others, tour
length and nectar quantity. Here, it is assumed that the nectar quantity that is possible to
collect flying along a certain link is inversely proportional to the link length. In other words,
the shorter the link, the higher the nectar quantity along that link. The artificial bees collect
the nectar during the predetermined time interval. After that, the hive position is changed
randomly and artificial bees start to collect the nectar from the new hive location. Each
iteration is composed of a certain number of stages. The stage is an elementary time unit in
the bees’ environment. During one stage the artificial bee will visit nodes, create partial
traveling salesman tour, and after that return to the hive (the number of nodes to be visited
within one stage is prescribed by the analyst at the beginning of the search process). In the
hive the bee will participate in a decision making process. The artificial bee will decide
whether to abandon the food source and become again an uncommitted follower, continue
to forage at the food source without recruiting nestmates, or dance and thus recruit
nestmates before returning to the food source (Lucic & Teodorovic, 2002). During any stage,
bees are choosing nodes to be visited in a random manner. The randomness in not useful
here and the mentioned paper’s authors assumed that the probability of choosing node j by
the k-th bee, located in node i (during stage u +1 and iteration z) equals to equation 13:
-ad;
y
nr)
@ remax(z-bl)
ston “ay i= gy (ez) FEN, (2), Vhot 2 o
5 (wh snl) ty)
. r=max(z-b.))
TEN ya.
0, otherwise
Where:
j- Node indexes (i, j= 1,2, ..., N),
di - Length of link (i,j),
k - Bee index (k = 1, 2, ..., B),
B - The total number of bees in the.
z- Iteration index (z = 1, 2, ..., M),
M - Maximum number of iteration,
u-Stage index (u = 1,2,...|(s0/s]),
- Number of nodes visited by every artificial bee during one stage,20 Travelling Salesman Problem
1ny(r) - total number of bees that visited link (i, 1) in r-th iteration,
b - Memory length,
gx(u, 2) - Last node that bee k visits at the end of stage u in iteration z,
Ni(u, 2) ~ Set of unvisited nodes for bee k at stage u in iteration z (in one stage bee will visits
s nodes; we have |Nk(u, z) | = |N] - us),
a- Input parameter given by analyst.
This equation is based on some simple rules in solving the TSP using the bee system. These
rules have been prepared as follows:
The greater distance between nodes i and j leads to the lower probability that the k-th bee
located in the node i will choose node j during stage u and iteration z.
The greater number of iterations (z) makes the higher influence of the distance. In other
words, at the beginning of the search process, artificial bees have “more freedom of flight”.
It means that, the bees have more chance to search the entire solution space. But when more
iterations have been performed the bees have less freedom to explore the solution space
such as the search at first, because, near the end of the search process, with a high
probability the solution is in our neighbourhood.
Probability of selecting a new link by a bee is related to the total number of the last bees
which had been visited this link, before this. The greater total number of bees results in a
higher probability of choosing that link in the future.
All of the above mentioned points have been employed in the equation 13. Another
important point in this problem is the bee decision about the following of the search process.
After relinquishing the food, the bee is making a decision about abandoning the food source
or continuing the foraging at the food source. It is assumed that every bee can obtain the
information about nectar quantity collected by every other bee. The probability that, at the
beginning of stage u + 1, bee k will use the same partial tour that is defined in stage u in
iteration z is equal to the following (equation 14):
Lg (u.z)-min( Lp,
. rewlu. a4
pyuttz)=e
Where Ly (u, 2) is the length of partial route that is discovered by bee k in stage u in iteration z.
Based on equation 14 if a bee has discovered the shortest partial travelling salesman tour in
stage u in iteration z, the bee will fly along the same partial tour with the probability equal
to one. Besides, the longer tour has the smaller chance to choose based on this equation. For
having a global search it is better that the individual bees have interaction with each others.
‘To follow this purpose the probability of that the artificial bee continues foraging at the food
source without recruiting nestmates is tuned to a very low value and hence the probability
of that the bee flies to the dance floor and dance with other bees becomes low. In other
words, when at the beginning of a new stage, the bee does not follow the previous partial
travelling salesman tour, it will follow other bees and interacts to their dancing, But the bee
must select one of the advertised dancing arenas (partial travelling salesman tour) in the
dancing area, and hence another selection must be performed. This selection can be carried
out in terms of two conditions: 1) the length of that partial tour and 2) the number of bees
which are engaged in that partial tour. It is clear that the selection can be done based on thePopulation-Based Optimization Algorithms for Solving the Travelling Salesman Problem 24
smaller tour length and also the greater number of bees. Based on these conditions the
authors prepare a relation as it is shown in equation 15, where:
P.@ ~ Parameters given by the analyst,
a (u,z)~ The normalized value of the partial route length
Bgla
Y(u, 2) - The set of partial tours that were visited by at least one bee.
The normalized value of the number of bees advertising the partial tour,
PP eit Haga )
Pelt. (15)
Ze
re¥(u.z)
As it is shown in the mentioned work (Lucic & Teodorovic, 2002), this bee system has been
tested ona large number of well known test benches such as Eil51.tsp, Berlind2.tsp, St70.tsp,
Pr76.tsp, Kroal00.tsp, Bil101.tsp, Tsp225.tsp and A280.tsp. Also, for improving the results in
each step, the 2-opt or 3-opt algorithms have been applied. The results reveal that the
mentioned method is very efficient. In all instances with less than 100 nodes, the bee system
achieves the optimal solution and in the large cases it has a significant improvement in
comparison to the other prevalent methods. The simulation results have been organized in
section nine.
One of the recent work for solving the TSP using bee's behaviour and BCO algorithm is
(Teodorovic et al., 2006). In this paper the authors propose the Bee Colony Optimization
Metaheuristic (BCO). Moreover, this study, describes two BCO algorithms that the authors
call them, the Bee System (BS) and the Fuzzy Bee System (FBS). In the case of EBS the agents
(artificial bees) use approximate reasoning and rules of fuzzy logic in their communication
and acting. In this way, the FBS is capable to solve deterministic combinatorial problems, as
well as combinatorial problems characterized by uncertainty. In this paper, The BCO as a
new computational paradigm is described in detail at first. After that the TSP as a case study
has been solved using the proposed bee system. The proposed bee system is similar to that
had been seen in the previous investigated study but in this paper the BCO algorithm has
been described completely. For further information about the BCO algorithm please refer to
the related resources prepared at the end of the chapter.
8. Electromagnetism
8.1 Introduction
‘The Electromagnetism-like mechanism is a heuristic that was introduced by (Birbil & Fang,
2003). The method utilizes an attraction-repulsion mechanism to move the sample points
towards the optimality. In other words, EM simulates the attraction-repulsion mechanism of
electromagnetism theory which is based on Coulomb's law. The main concentration of the
first introduction of this heuristic was on the problems with bounded variables on the form
equal to equation 16.
Min(£(x)) st. x €[1u] (16)22 Travelling Salesman Problem
where / and w are defined as the following form (equation 17):
[u]=xe &, |),