You are on page 1of 14

Optimization of Multiple Traveling Salesman Problem using

Heuristic Methods
Dr.P.Venkateswara Reddy1, and Dr.A.C.S.Kumar2
1
Professor, Department of Mechanical Engineering, ACE Engineering College, Anukshapur, Ghatkesar,
Medchal (Dist.) Telangana-mail: pvreddy1965@yahoo.in
2
Retd.Professor & Vice Principal, Department of Mechanical Engineering, J.N.T.U College of
Engineering, Hyderabad, A.P. E-mail:acskumar@yahoo.com

KEYWORDS: Travelling Salesman Problem (TSP), multiple travelling salesman problem


(MTSP), Ant Colony Optimization (ACO), K-Means Clustering

ABSTRACT:
Travelling Salesman Problem (TSP) is a well-studied problem in the combinatorial optimization
area. But the most computationally complex combinatorial optimization problem is the multiple
travelling salesman problem (MTSP) which is an extension of the former. This problem related
to accommodating real world problems where there was a need to account for more than one
salesman.
This project involved the application of heuristic methods to solve 180 cities, 6 traveling
salesmen problem to minimize the distance of the tours. A k-means clustering algorithm was
used to transform an m-TSP to a TSP.

Once the clustering had been done and after the cities were allocated to the various salesmen,
each cluster/tour was taken as an individual Traveling Salesman problem (TSP).

Now every cluster is solved as a TSP by applying the Ant Colony Optimization (ACO) algorithm
to determine the optimal distance value. This was done by the probabilistic selection of the next
city which depends on pheromone level updated by the previous ant as well as the heuristic bias
value. The evaporation of pheromone was also taken into consideration.
INTRODUCTION:
The Travelling Salesman Problem (TSP) is a deceptively simple combinatorial problem. It is a
prominent illustration of a class of problems in computational complexity theory which are
classified as NP-hard.
It can be stated very simply:
A salesman spends his time visiting n cities (or nodes) cyclically. In one
tour he visits each city just once, and finishes up where he started. In
what order should he visit them to minimize the distance travelled?
Many TSP's are symmetric - that is, for any two
cities A and B, the distance from A to B is the
same as that from B to A. In this case you will get
exactly the same tour length if you reverse the order in which they are
visited - so there is no need to distinguish between a tour and its reverse,
and you can leave off the arrows on the tour diagram.
If there are only 2 cities then the problem is trivial, since only one tour is possible. For the
symmetric case a 3 city TSP is also trivial. If all links are present then there are n-different tours
for an n city asymmetric TSP. To see why this is so, pick any city as the first - then there are n-1
choices for the second city visited, n-2 choices for the third, and so on. For the symmetric case
there are half as many distinct solutions - (n-(n-1))! /2 for an n city TSP. In either case the
number of solutions becomes extremely large for large n, so that an exhaustive search is
impracticable.
Various approximation algorithms, which quickly yield good solutions with high probability,
have been devised. Modern methods can find solutions for extremely large problems (millions of
cities) within a reasonable time which are with a high probability just 2-3% away from the
optimal solution.
The above mentioned all are for single travelling salesman problem. But the general real would
situation is very different from the mentioned scenarios. We have number of salesman (m)
greater than one. And so allocation of cities to these salesman becomes a very tough job. In this
scenario the entire cluster of cities are divided in groups or batches. The number batches to
which the cluster must be divided will depend on the number of salespersons available.
Hence this becomes an M-TSP problem with constrains like uniform loading of number of cities
to the salesperson is taken care of properly. Thus to provide efficient methodology to solve his
problem is converting it to normal TSP. Thus the problem arises is how efficiently this can be
transformed. Algorithms are built to solve this particular situation. There are many variants in
multiple travelling salesman problem. Those are:
 mTSP with Multiple Depots (mTSPMD): In the single depot case, all salesmen start from and
end their tours at a single point. On the other hand, if there exist multiple depots with a number
of salesman located at each, the salesmen can either return to their original depot after
completing their tour or return to any depot with the restriction that the initial number of
salesmen at each depot remains the same after all the travel. The former is referred as the fixed
destination case whereas the latter is named as the nonfixed destination case.
 mTSP with Time Windows (mTSPTW): In this variation, certain nodes need to be visited in
specific time periods, named as time windows. This is an important extension of the mTSP and
referred to as the multiple traveling salesman problem with time windows (mTSPTW). The
mTSPTW has immediate applications in school bus, ship and airline scheduling problems.
 TSP with Multi Periods (mTSPMP): The problem arises in efficient scheduling of optimal
interviews among tour brokers and vendors at conventions of the tourism and travel industry. In
classical TSP vocabulary, a salesman is a tour broker at the convention and a city is a vendor's
booth. In this problem, more than one salesman may be required to visit a city, but at most one
salesman per time period can visit each city.
 mTSP with Fixed Charges (mTSPFC): When the number of salesmen in the problem is not fixed,
then each salesman usually has an associated fixed cost incurring whenever this salesman is used
in the solution. In this case, the minimization of the number of salesman to be activated in the
solution may also be of concern.
Thus the multiple travelling salesman problem is the most important problem and most required
in all the industries. In our paper we have used ACO to solve MTSP.
METHODOLOGY:
K-Means Clustering
K-means is one of the simplest unsupervised learning algorithms that solve the well-known
clustering problem. The procedure follows a simple and easy way to classify a given data set
through a certain number of clusters (assume k clusters) fixed a priori. The main idea is to define
k centroids, one for each cluster. These centroids should be placed in a cunning way because of
different location causes different result. So, the better choice is to place them as much as
possible far away from each other. The next step is to take each point belonging to a given data
set and associate it to the nearest centroid. When no point is pending, the first step is completed
and an early group age is done. At this point we need to re-calculate k new centroids as bary
centers of the clusters resulting from the previous step. After we have these k new centroids, a
new binding has to be done between the same data set points and the nearest new centroid. A
loop has been generated. As a result of this loop we may notice that the k centroids change their
location step by step until no more changes are done. In other words centroids do not move any
more.
Finally, this algorithm aims at minimizing an objective function, in this case a squared error
function. The objective function

Where is a chosen distance measure between a data point and the cluster Centre

, is an indicator of the distance of the n data points from their respective cluster centres.
The algorithm is composed of the following steps:

Place K points into the space represented by the objects that are being clustered.
These points represent initial group centroids.
Assign each object to the group that has the closest centroid.
When all objects have been assigned, recalculate the positions of the K centroids.
Repeat Steps 2 and 3 until the centroids no longer move. This produces a
separation of the objects into groups from which the metric to be minimized can be
calculated.

Although it can be proved that the procedure will always terminate, the k-means algorithm does
not necessarily find the most optimal configuration, corresponding to the global objective
function minimum. The algorithm is also significantly sensitive to the initial randomly selected
cluster centers. The k-means algorithm can be run multiple times to reduce this effect.
K-means is a simple algorithm that has been adapted to many problem domains. As we are going
to see, it is a good candidate for extension to work with fuzzy feature vector.
Suppose that we have n sample feature vectors x1, x2, ..., xn all from the same class, and we know
that they fall into k compact clusters, k < n. Let mi be the mean of the vectors in cluster i. If the
clusters are well separated, we can use a minimum-distance classifier to separate them. That is,
we can say that x is in cluster i if || x - mi || is the minimum of all the k distances. This suggests
the following procedure for finding the k means:

1. Make initial guesses for the means m1, m2, ..., mk.
2. Until there are no changes in any mean
a. Use the estimated means to classify the samples into clusters For i from 1 to k , replace mi with
the mean of all of the samples for cluster i
b. End for
3. end until
ALGORITHM
STEPS IN K-MEANS CLUSTERING
Step 1: K initial cluster centers m1, m2, …..,mk were chosen from the ‘n’ points

{ x1, x2, ……, xn}

Step 2 : Point Xi, i = 1,2,….,n were assigned to cluster Cj, j Є { 1, 2, ….., K }

if |xi – mj | < |xi – mp | , p = 1,2,…,K, and j # p

Step 3: New clusters were computed with cluster centers m1*, m2*, …..,mk* as follows:

mi*= 1/ni ⅀ xj

Where ni is the number of elements belonging to cluster Ci

Step 4: If mi* = mi , i = 1, 2… K the program was terminated

Otherwise continue from step 2.

ANT COLONY OPTIMISATION


Ant colony optimization is a part of the larger field of swarm intelligence in which scientists
study the behavior patterns of bees, termites, ants and other social insects in order to simulate
processes. The ability of insect swarms to thrive in nature and solve complex survival tasks
appeals to scientists developing computer algorithms needed to solve similarly complex
problems. Artificial intelligence algorithms such as ant colony optimization are applied to large
combinatorial optimization problems and are used to create self-organizing methods for such
problems.
Ant colony optimization is a meta-heuristic technique that uses artificial ants to find solutions to
combinatorial optimization problems. ACO is based on the behavior of real ants and possesses
enhanced abilities such as memory of past actions and knowledge about the distance to other
locations. In nature, an individual ant is unable to communicate or effectively hunt for food, but
as a group, ants possess the ability to solve complex problems and successfully find and collect
food for their colony. Ants communicate using a chemical substance called pheromone. As an
ant travels, it deposits a constant amount of pheromone that other ants can follow. Each ant
moves in a somewhat random fashion, but when an ant encounters a pheromone trail, it must
decide whether to follow it. If it follows the trail, the ant’s own pheromone reinforces the
existing trail, and the increase in pheromone increases the probability of the next ant selecting
the path. Therefore, the more ants that travel on a path, the more attractive the path becomes for
subsequent ants. Additionally, an ant using a short route to a food source will return to the nest
sooner and therefore, mark its path twice, before other ants return. This directly influences the
selection probability for the next ant leaving the nest.
Over time, as more ants are able to complete the shorter route, pheromone accumulates faster on
shorter paths and longer paths are less reinforced. The evaporation of pheromone also makes less
desirable routes more difficult to detect and further decreases their use. However, the continued
random selection of paths by individual ants helps the colony discover alternate routes and
insures successful navigation around obstacles that interrupt a route. Trail selection by ants is a
pseudo-random proportional process.

In all available ACO algorithms for TSP, the pheromone trails are associated with arcs and
therefore TIJ refers to the desirability of visiting city j directly after city i. The heuristic
information is chosen as ηij = 1/dij that is the heuristic desirability of going t city from I to j is
inversely proportional to the distance between the two cities. In case d ij=0 for some arc (i,j) the
corresponding η is set to a very small value .
Tours are constructed by applying the following simple constructive procedure to each ant:
1. Choose, according to some criterion, a start city at which the ant is positioned.
2. Use pheromone and heuristic values to probabilistically construct a tour by iteratively
adding cities that the ant has not visited yet until all cities have been visited.
3. Go back to initial city.
After all the ants have completed their tour, they may deposit pheromone on the tours they have
followed. In some cases before adding pheromone the tours constructed by the ants may be
improved by the application of a local search procedure. The high level description applies to
most of the ACO algorithms for TSP.
Set parameters, initialize pheromone trials
while (termination condition not met) do
Construct Ant solutions
Apply local search
Update pheromones
end
Ant System
The first Ant colony algorithm the Ant system was introduced using the TSP as an example
application. AS achieved encouraging initial results but was found to be inferior to the state of
the art algorithms for TSP. The importance of AS therefore mainly lies in the inspiration it
provided for a number of extensions that significantly improved performance and are among the
most successful ACO algorithms. In fact most of these extensions are direct extensions of AS in
the sense that they keep the same solution construction procedure as well as the same pheromone
evaporation procedure.

The main differences between AS and these extensions are the way the pheromone update is
performed as well as some details in the management of the pheromone trails.

Tour construction
In Ant system, m artificial ants concurrently build a tour of the TSP. Initially, ants were put on
randomly chosen cities. At each construction step ant k applies a probabilistic action choice rule
called random proportional rule to decide which city to visit next.

In particular the probability with which the ant k currently at city i chooses to go to city j is

= , if j

Where =1/dij is a heuristic value that is available a priori, are two parameters which

determine the relative influence of the pheromone trial and the heuristic information and is

the feasible neighborhood of ant k when being at city i, that is the set of cities that ant k has not

visited yet (the probability of choosing a city outside is 0). But the probabilistic rule, the

probability of choosing a particular arc (i, j) increases with the value of the associated

pheromone trial and of the heuristic information value . The role of the parameters

is as following. If =0 the closest cities are more likely to be selected: this corresponds to a

classic stochastic greedy algorithm (with multiple starting points since the ants are randomly
distributed over the cities).

If =0 the pheromone amplification is at work, that is, only pheromone is used without ant

heuristic bias. This leads to rather poor results and particular for values of >1 it leads to the

rapid emergence of the stagnation condition, that is the situation where all the ants flow the same
path and construct the same tour. This is generally suboptimal.
Each ant k maintains a memory MK which contains the cities already visited and the order in

which they were visited. The memory is used to define the feasible neighborhood .

Moreover the memory allows the ant k both to compute the length of the tour TK it generated and
to retrace the path to deposit pheromone.

Concerning solution construction, there are two ways of implementing it:


1. Parallel solution construction
2. Sequential solution construction.
In the parallel implementation, at each construction step all the ants move from their current city
to the next one, while in the sequential application, an ant builds a complete tour before the next
one starts to build another one.
In the AS case both forms of implementation of the tour construction are equivalent in the sense
that they do not significantly affect the algorithm s behavior.
Update pheromone trials
After all the ants have constructed their tours, the pheromone trials are updated. This is done by
first lowering the pheromone value on all arcs T by a constant factor, and then adding
pheromone on the arcs the ants have crossed in their tours.

Where is the pheromone evaporation rate? The parameter is used to avoid

unlimited accumulation of the pheromone trials and it enables the algorithm to forget bad
decisions taken previously. In fact if an arc is not chooses by an ant, its associated pheromone
value decreases exponentially in the number of iterations.

After evaporation, all ants deposit pheromone on the arcs they have crossed in their tour.

,
Where is the amount of pheromone ant k deposits on the arc it has visited. It is defined as

follows:

, if arc (i,j) belongs to

= 0, otherwise

Where , the length of the tour Tk built by the k-th ant, is computed as the sum of the length of

the arcs belonging to Tk .


By means of the above equation the better an ant’s tour is, the more pheromone the ants
belonging to this tour receive. In general arcs that are used by many ants and which are part of
short tours receive more pheromone and are therefore more likely to be choosen by ants in the
future iterations of the algorithm.
As we said the relative performance of AS when compared to other Meta heuristics decrease
dramatically as the size of the test instance increases. Therefore a substantial amount of research
has focused on how to improve AS.
CO ORDINATES OF THE 180 CITIES/INPUT
RESULTS:
After performing k-means clustering algorithm

Cities allocated or assigned to the 6 salesmen:-

Cluster /Salesman Cities allocated

1 138 35 109 124 135 5 112 118 140 137 127


108 123 107 132 133 136 4 116 119 120 121
110 117 34 129 122 111 106 131 115 142 126
113 141 114 14 13 125 130 128 38 139 134

2 144 145 169 66 159 173 155 167 163 177 154
60 176 65 170 172 171 175 148 165 161 143
152 158 160 153 146 149 147 174 151 157 168
150 178 180 164 156 61 166 162 179

3 104 39 63 62 50 105 42 46 55 48 40 49 47 54
51 45 53 41 43 57 59 52 56 58 44

19 24 33 103 32 27 22 20 15 30 21 16 8 25 18
26 17 12 23 36 29 31 28 9 37

2 7 10 11 3 6 1

6 97 92 84 69 99 77 80 74 86 82 68 90 81 72 73
75 71 64 70 87 88 78 96 93 89 79 85 102 95 76
83 91 101 67 98 100 94

RESULTS OBTAINED FROM ANT COLONY OPTIMIZATION(AC0)

Salesman/Cluster Distance covered(units) Iteration number


1 64 1
2 76 1
3 43 1
4 49 1
5 11 1
6 27 1

Comparison of results obtained from ACO and GA

Salesman ACO distance(units) GA distance(units)


1 64 132.393

2 76 126.258

3 43 51.3596

4 49 41.6981

5 11 10.3284
6 27 115.618
CONCLUSION AND INFERENCE:
From the results obtained, we find that k-means clustering proved to be effective as it was able to
group the cities into clusters in an optimal manner and convergence took place in a short
execution time and the optimal clusters were obtained.
ACO proved to be a promising optimization technique for solving complex combinatorial
optimization problems like the MTSP. This is because in our MTSP, the large group of cities
was broken down into smaller clusters. Ant Colony Optimization is a very good technique for
small number and the time consumed is very less for carrying out the procedure.

REFERENCES
[1] A E Rizzoli, F.Oliverio, R.Montemanni, L.M Gambardella, Ant Colony Optimization for
vehicle routing problems from the theory of applications,

[2] Allan Larsen, a study material, The Dynamic Vehicle Routing Problem.

[3] David S Johnson in 8th DIMACS Implementation Challenge, Travelling Salesman Problem,
AT&T Labs-Research, Florham Park.
[4] Jorg Homberger and Hermann Gehring, Two Evolutionary Meta-Heuristics for the vehicle
routing problem with time windows.

[5] Jan.M.Weiner and Thora Tenbrink, a study material, Travelling Salesman Problem.

[6] Hannes Schabauer, Erich Schikuta, Thomas Weishaup, Solving Very Large Travelling
Salesman Problems by SOM parallelization on cluster architecture, IEEE.

[7] Yoshiyuki Nakamichi, Takaya Arita; Diversity control in Ant Colony Optimization.

[8]Max Manfrin, Maurro Birattari, Thomas Stutzle, and Margo Darigo, Parent Ant Colony
Optimization for Travelling Sales Program, IRIDIA,CODE,

[9] Snezana Mitrovic-Minic and Ramesh Krishnamurti, “Multiple Travelling salesman Problem
with time windows bounds for Minimum Number of vehicles”, November 2006.

[10] Pan Junjie and Wang Dingwei, An Ant Colony Optimization Problem for Multiple
Travelling salesman Problem, School of Information Science and Engineering,

[11] MarceTurkensteen, Diptesh Ghosh, Boris Goldengorin, Gerard Seisksma, Tolerance Based
Branch and Branch Algorithm for the ATSP, February 2007

[12] Yerim Chung, Marc Demange, Some Inverse Travelling Salesman problems, January 2008

[13] Jean-Charles Creput and Abderrafiaa Koukam, A Memetic Neural Network for Euclidean
Travelling Salesman Problem, January 2013

[14] Yu-Hsin liu, Diversified Local search strategy under scatter search frame work for the
probabilistic Travelling Salesman Problem, August 2017

[15] Tolga Bektashave, The Multiple Travelling Salesman Problem: An Overview of


formulations and solution procedures, January 2015

[16] Imdat Kara and Tolga Bektas, Integer Linear programming Formulations of Multiple
Salesman problems and its variations, March 2015

[17] Sharlie Climer and Weixiong Zhang, Cut and Solve: An Iterative Search Strategy for
Combinatorial Optimization Problems, April 2016

[18] Arthur .E. Carter, Traditional Methodologies to solve VRP, January 2015

[19]Heming Giacho, Evolution strategy for VRP, March 2014

You might also like