Colored Traveling Salesman Problem and Solution
Colored Traveling Salesman Problem and Solution
On the other hand, the basic elements of such a problem, i.e., Fig. 2. Example of CTSP
individuals, operations, and workspaces, are still similar to
The nodes in the areas V1 , V2 , and V3 represent the private
the salesmen, city visits and city set of TSP, respectively. The
difference lies in that each individual (salesman) of the cities of salesmen 1, 2, and 3. They have the only shared city
former not only has a private workspace (city set) but also set V0 .
shares a common workspace with others. To distinguish the
different cities, we define a new multiple traveling salesman
2.2 0-1 Integer Programming Model
problem by coloring the cities, called Colored TSP (CTSP).
CTSP frequently arises in real-life applications where some
CTSP is formulated over a complete digraph G (V , E ) ,
closely dependent relations between the salesmen and the
cities must be obeyed when one determines a solution. It is a where the vertex set V 0,1, 2,..., n 1 corresponds to the
significant problem in theory and practice. We call the same cities and each edge in (i, j ) E , i j , is associated with a
problem as MTSP* by Li, et al. (2013) and present a genetic
weight ij representing a visit cost (distance) between two
algorithm (GA) solution. However, CTSP has not been
formulated in a mathematically rigorous way. This paper cities i and j . The vertex 0 represents the home city (depot).
formally defines CTSP and improves the prior method in (Li, Let V V \ 0 . V is divided into m+1 sets, i.e., V , the 0
et al., 2013) by combining GA with Greedy Algorithm and
Hill-climbing Algorithm. public one, and Vi , the private ones of the salesmen for all
i Z m . The objective of CTSP is to determine m
Next, CTSP is formulated in Section 2. Section 3 presents
Hamiltonian cycles or circuits on G with the least total cost
two improved GAs. Section 4 gives a case study with the
such that any vertex of each private set is visited exactly once
comparison results. The paper is concluded in Section 5.
by the specified salesman and any vertex of the public set is
visited by any salesman exactly once and eventually return to
2. DEFINITION AND FORMULATION OF CTSP
city 0. Of course, it allows each salesman to have an
exclusive home city in their private set, like the waterjet
2.1 CTSP Definition cutting example shown in Fig. 1. However, this work will not
discuss such cases.
Let n, m Z 1, 2,3,... and m n . CTSP aims to
Binary variable xijk =1 , i j , i, j V , and k Z m , if the k-th
determine a family of tours with the minimal total cost for m
salesmen to visit n cities exactly once given public and salesman passes through edge (i, j); and otherwise, xijk 0 .
private ones, and eventually return to the home city (depot). uik is the number of nodes visited on the k-th salesman’s tour
Let Vi , i Z m 1, 2,..., m be the private city set assigned
from the depot up to node i.
to the i-th salesman and U j , j Z r , r 1 be the j-th shared
The integer programming model of CTSP is presented as
city set, and Wi be the accessible city set of the i-th salesman, follows.
i.e., the union of sets of i-th salesman’s private cities and
m n 1 n 1
shared cities.
Minimize ij xijk (3)
k 1 i 0 j 0
The city sets meet the following constraints, given i j :
n 1
U i U j , i, j Z r (1) Subject to x
i 1
0 ik 1, (4)
Wi W j and W j Wi , i, j Z m (2) n 1
x
i j
jik 0 , i Vk , j V \ (V0 Vk ), k Z m , (7)
V2
x
i j
ijl 0, (8)
V1 U0
x
i j
jil 0 , i Vk , j V , i j , k l , l Z m , (9)
V3
n 1 m
9576
19th IFAC World Congress
Cape Town, South Africa. August 24-29, 2014
n 1 m
x
j 0 k 1
jik 1 , i V , j i , (11)
x
h
jhk xijk , j V0 , i, h Vk V0 , i j h ,
i
(12)
Equations (4) and (5) require that every salesman start from
and return to city 0, and (6) ensures that salesman k cannot
start from his own exclusive city to visit a private city of
other salesmen and (7) that another salesman is forbidden to
Fig. 3. Example of CC
visit a private city of salesman k from its own private city as
well. Equations (8) and (9) ensure that salesman l ( k ) can In Step 1, given two parents, a section of a city individual is
neither start from a private city of salesman k nor return to it. selected at random, and then its genes are swapped with those
Each city except city 0 can be visited exactly once as of another individual, thereby resulting in two new
described by (10) and (11). Equation (12) represents that a individuals as shown in Step 2. The mapping relationship of
public city can be visited by any salesman while (13) the selected sections in two city individuals is 8—3, 9—8,
prohibits the formation of any sub-tour among nodes in V 5—2, 4—7, 7—1, and 1—10. Step 3 exchanges the
\{0}. redundant genes according to the selected section, and then
finds that private cities 5, 3, 7, 1, and 6 in the left
Like MTSP, CTSP is also NP-hard. Moreover, the restriction chromosome and cities 2, 5, and 4 in the right one are
on city colours makes its solution more difficult and time- assigned to the wrong salesmen. Next, Step 4 reassigns the
consuming than that of MTSP. It is proven that the heuristics private cities to the correct salesmen and obtains two
are faster and more efficient than the exact methods in the reasonable generations.
solution of MTSP with respect to the problem size. In many
cases, however, the former cannot be guaranteed to obtain the A city mutation (CM) process in a dual-chromosome is
optimal solution and are thus applicable to solve those cases illustrated in Fig.4.
in which good-quality solutions suffice. With this in mind,
this paper presents GA for CTSP.
9577
19th IFAC World Congress
Cape Town, South Africa. August 24-29, 2014
optimize the individuals of the initial population generated algorithm is very strong and it is a common method used for
randomly at the first step of GA. Initial population of high the local optimum search.
quality will accelerate the population evolution of GA and
reach satisfactory solution rapidly. We name this improved GA in (Li, et al., 2013) adopts the combinatorial selection
algorithm as a greedy GA. strategy of elite reservation and roulette in (Sun, 2013). After
a certain period of evolution, it may be trapped into a local
With regard to CTSP, the criterion is defined as the shortest optimum. To escape from it, the best individual of each
distance between two cities. Namely, a city will be selected generation can be optimized by using Hill-Climbing
as the next one that the corresponding salesman will visit Algorithm. Specifically, if a better individual is obtained
once it is nearest to the current city in the visited sequence. It through hill-climbing, it replaces the original one; and
can optimize a solution by reordering its sequence. For otherwise, the original one remains in it. Note that the hill-
example as shown in Fig. 5, the randomly generated visit climbing GA adopts Greedy Algorithm to optimize the initial
sequence is 0→2→5→3→1→4→0. The sum of distances is population too.
25+50+50+45+45+25=240. It can be optimized to be
The neighbourhood point selection impacts greatly on the
sequence 0 → 3 → 4 → 5 → 1 → 2 → 0 by using the greedy
hill-climbing algorithm and the paper adopts two point
algorithm. The improved distance is 22+25+27+35+25+
swapping. Given CTSP with m( 2) salesmen, it should
25=159. Obviously, it is a better solution.
select 2m genes by this selection strategy. The fitness must
be recalculated after every time of gene swapping.
A hill-climbing GA includes the following steps:
Step 1: Determine if the i-th salesman performing the current
swapping is the m-th salesman, i.e., i =m . If so, end this hill-
climbing; otherwise, go to the next step.
Step 2: Select two city genes assigned to the i-th salesman,
from the city chromosome of a. Swap them and obtain
individual a , and go to the next step.
Fig. 5. Distances between cities
Step 3: Determine if the value of fitness of a is greater than
The generation process of the initial population in greedy GA that of a. If so, let a a ; and otherwise, give up a and keep
is as follows. a.
Step 1: Determine if the number of individuals in the current Step 4: Let i i 1 , and return to Step 1.
initial population is equal to the set number N or not. If it is
true, terminate the process; otherwise, go to the next step. The main procedure of hill-climbing GA is summarized in
Fig. 6.
Step 2: Generate a city sequence randomly and assign the
private cities to the specified salesman and the public cities to
all the salesmen randomly. It results in individual a.
Step 3: Reorder the city sequence of a by the shortest
distance criterion to minimize the visit cost and obtain
individual a .
3.3 Hill-Climbing GA
9578
19th IFAC World Congress
Cape Town, South Africa. August 24-29, 2014
4. CASE STUDY
A CTSP with n 51 and m 4 is shown in Fig. 7, where V0
is the public city set (visit area) and V1-V4 are the private city
sets (visit areas) of Salesmen 1-4, respectively. All the
algorithms and processes are implemented in C++ on the
platform Microsoft Visual Studio 2010. The computer used is
Dell Inspiron620s having Windows 7 (32 bits) with CPU
Intel Corei3 and 2GB RAM at 3.30GHz.
9579
19th IFAC World Congress
Cape Town, South Africa. August 24-29, 2014
result at about the 14000th epoch with the total tour length of REFERENCES
about 560(km). With the help of the Hill-climbing operation,
Basu, A., Elnaga, A., and Al-Hajj, A. (2000). Efficient
it is clear that after reaching the same result of Greedy GA,
coordinated motion. Mathematical and Computer
Hill-climbing GA can continue to obtain a better solution as
Modelling, vol. 31, pp. 39-53.
shown in Fig. 8.
Bektas, T. (Jun 2006). The multiple traveling salesman
The total tour length of the best solution with Hill-climbing problem: an overview of formulations and solution
GA is 519.256(km). The solution of visit tours is: procedures. Omega, vol. 34, pp. 209-219.
Carter, A.E., and Ragsdale, C.T. (2006). A new approach to
Salesman 1: 0→35→39→3→49→45→6→5→7→2→1→ solving the multiple traveling salesperson problem using
4→50→0; Salesman 2: 0→40→31→47→42→48→13→34 genetic algorithms. European journal of operational
→9→11→14→8→12→10→38→41→0; Salesman 3: 0→32 research, vol. 175, pp. 246-257.
→36→16→20→17→22→15→21→18→19→43→33→0; Cheong, T., and White, C.C. (2012). Dynamic traveling
and Salesman 4: 0→37→44→28→24→30→26→25→27→ salesman problem: Value of real-time traffic information.
23→29→46→0. IEEE Transactions on Intelligent Transportation Systems,
vol. 13, pp. 619-630.
The visit routes are shown in Fig. 10. Gutin, G., and Punnen, A. (2002). The Traveling Salesman
Problem and Its Variations. pp. 625-629. Kluwer,
Dordrecht.
Hirogaki, T., Aoyama, E., Ogawa, K., Hashimoto, N., and
Matsumura, M. (2005). CAM systems based on traveling
salesman problem from time perspective for high density
through-hole drilling. In Pts A-C (ed.), Advances in
Electronic Packaging, pp. 1783-1789.
Johnson, O., and Liu, J. (2006). A traveling salesman
approach for predicting protein functions. Source Code
for Biology and Medicine, vol. 1, pp. 1-7.
Li, J., Sun, Q.R., Zhou, M.C., and Dai, X.Z. (Oct 13-16,
2013). A New Multiple Traveling Salesman Problem and
its Genetic Algorithm-based Solution. In Proc. 2013
IEEE Int. Conf. Systems, Man and Cybernetics, pp. 1-6.
Manchester, UK.
Lim, A., Rodrigues, B., and Zhang, X. (2006). A simulated
annealing and hill-climbing algorithm for the traveling
Fig. 10. Visit tours of four salesmen tournament problem. European Journal of Operational
Research, vol. 174, pp. 1459-1478.
In summary, (1) Hill-climbing GA overcomes the deficiency
Ray, S.S., Bandyopadhyay, S., and Pal, S.K. (2007). Gene
of local search of GA to some extent by keeping its global
ordering in partitive clustering using microarray
search capability. It possesses better optimization ability and
expressions. Journal of Biosciences, vol. 32, pp. 1019-
yields better results than Greedy GA; and (2). The
1025.
convergence rate of Hill-climbing GA is the highest among
Ryan, J.L., Bailey, T.G., Moore, J.T., and Carlton, W.B. (Dec
the three considered GAs. This attributes to the introduction
13-16, 1998). Reactive tabu search in unmanned aerial
of the hill-climbing operation in GA.
reconnaissance simulations. In Proc. 30th Simulation
Conf. Winter. Washington, DC, vol.1, pp. 873-880.
5. CONCLUSION
Saleh, H.A., and Chelouah, R. (2004). The design of the
In this paper, we formulate a new multiple traveling salesman global navigation satellite system surveying networks
problem, CTSP, where different salesmen have different using genetic algorithms. Engineering Applications of
private city sets and share a set of public cities. It is Artificial Intelligence, vol. 17, pp. 111-122.
significant for modelling the applications where multiple Sun, Q.R. (2011). The research and application of the colored
individuals’ workspaces are not the same but partially traveling salesman problem. Master Dissertation, School
overlap with each other. To overcome the shortcomings of of Automation, Southeast University.
the classic GA, we present two improved genetic algorithms Tang, L., Liu, J., Rong, A., and Yang, Z. (2000). A multiple
(GA), called greedy GA and hill-climbing GA, by combining traveling salesman problem model for hot rolling
the classic one with the greedy algorithm and the hill- scheduling in Shanghai Baoshan Iron & Steel Complex.
climbing algorithm to solve CTSP. Finally, the presented European Journal of Operational Research, vol. 124, pp.
GAs are used to solve an example CTSP and the result shows 267-282,.
that the hill-climbing GA enjoys the best performance in Toth, P., Vigo, D.(Eds.) (2002). The Vehicle Routing
terms of convergence rate and solution quality. In the future, Problem. SIAM Monographs on Discrete Mathematics
we intend to research other heuristics of CTSP and explore and Applications. SIAM, Philadelphia.
the related applications.
9580