7127 PDF
7127 PDF
net/publication/3949438
CITATIONS READS
52 184
3 authors, including:
All content following this page was uploaded by Huai-Kuang Tsai on 01 June 2014.
O u t p u t t h e b e s t s o lu t io n
II. APPROACH
In this section the details of the proposed genetic
algorithm for TSP are presented. Our algorithm consists of (a). SolutionA (b). Solution B (c). Graph G
the edge assembly crossover (EAX) for global search and a Fig. 2. A, B, and the graph G. G is obtained by overlapping A and B.
new genetic operator for local search, called neighbor-join
(NJ). The EAX and the NJ are used to balance exploration
and exploitation in the search space.
Fig. 1 shows the main steps of the proposed
evolutionary algorithm. N solutions are generated as the
initial population. Each solution is represented as a
permutation from 1 to n, where n is the number of cities of (a) (b) (c). (d)
a TSP. After evaluating the fitness, each individual (Si) in
the population sequentially applied the following steps to Fig. 3. An example of the division of undirected edges into AB-cycles on
G. (a), (b), and (c) are effective AB-cycles, while AB-cycles in (d)
produce a child: Si randomly selects another individual Sj are ineffective.
and these two individuals produce an intermediate offspring
(Ii) by conducting the EAX. Then the NJ is executed L
times (L is the local search length) to generate a child Ci by
refining from the offspring Ii. Each solution in the
population executes above steps to generate its child and
these N children become the new population of the next
generation. (a). (b). (c). (d).
Our algorithm terminated when one of following Fig. 4. Four examples of EAX individually apply some AB-cycles on A.
criteria is satisfied: 1) all individuals of a population are the (a), (b), and (c) are the results of applying AB-cycle shown in Fig.
3(a), 3(b), and 3(c), respectively, and (d) is the result of applying
same, or 2) all of the children generated in continuous ten AB-cycles shown in Fig. 4(a) and 4(b) on A.
generations are worse than their parents. In the following
subsections, the EAX and the NJ are described.
A. EAX
The EAX proposed by Nagata [1] was considered a
powerful crossover operator. The EAX has two important
(a). (b). (c). (d).
features: preserving parents’ edges using a novel approach
and adding new edges by applying a greedy method, Fig. 5. After Modification, all examples in Fig. 5 are
analogous to a minimal spanning tree. The EAX is individually modified to valid solutions.
considered as the global search strategy in our proposed
algorithm.
The EAX is briefly described here and the detail
TypeII 0 1 2 6 5 4 3 7 8 9
The new edges, (vr, vs+1) and (vs, vr+1), are inserted to
c c’
replace the original edges, (vr, vr+1) and (vs, vs+1), to form
After modify
the new solution.
0 1 2 4 3 7 6 5 8 9
TypeIII 0 1 2 3 4 5 6 7 8 9
c c’
c c’ C. AN EXAMPLE OF THE NEIGHBOR-JOIN
After modify
Let’s illustrate a single iteration of the NJ on the
TypeIV 0 1 2 3 4 5 6 7 8 9
0 1 5 4 6 2 3 7 8 9 following example. Assume that the current individual Si is
c c’
c c’ Ii’ = (0,1,2,3,4,5,6,7,8,9)
Fig. 7. Four possible types are considered to connect city c and c’ together.
and the current city c is 3. If rand() > 0.5, another
The results of Type I and Type II are obtained via the simple invert
individual, (0,3,7,2,9,8,4,1,5,6), is randomly selected from
operation. The results of Type III and Type IV are constructed by
the current population. Since the city 7 connect the city 3 in
applying a greedy method (see text) from two disjoint subtours.
this individual and does not align next to the city 3 in
individual Ii’, the cities 3 and 7 are decided to be connected.
B. NEIGHBOR-JOIN OPERATOR Four types of candidate are considered (see Fig. 7) and the
one with lowest fitness function value is accepted. If type III
The neighbor-join (NJ) operator constructs a new
is the lowest one and the gain of exchanging edge-pair (v2,
solution by stealing edges from other individuals in the
v8)- (v4, v5) by edge-pair (v2, v4) - (v5, v8) is maximum, Ii’ is
population or by considering the geometric information.
updated as (0,1,2,4,3,7,6,5,8,9) if the fitness function value
Although the NJ is applied only on the single solution, the
is better than the original Ii’.
offspring is generated considering both the neighborhood
information and knowledge from other individuals. Thus, Again, randomly assign the new city c as 5. If one, c, of
the NJ operator is a genetic operator combining with the the geometric three nearest cities is selected, assume, city 4
characteristics of local search, mutation, and recombination. is determined to connect to city 5. Four candidates are
considered:
The NJ is inspired by the inver-over mutation [11] and
by analyzing the TSP search space [20]. The main Type I : (0,1,2,4,5,6,7,3,8,9)
difference between the inver-over mutation and the other Type II : (0,1,2,6,7,3,4,5,8,9)
mutations is that it inherits edges both from parent and Type III : (0,1,2,8,9,0) (4,3,7,6,5,4)
from other individuals in the current population. According Type IV : (0,1,2,4,5,8,9,0) (3,7,6,3)
0.00020
200
solution quality is not significant when L exceeds 20. In
0.00015
Time
150 practice, the longer L is, more time will spend. Therefore, L
0.00010
100 is set to 20 in this paper.
50
0.00005
0 Time
0
100 200 300 400 500 600 700 800 900 1000 Error
Population size rate B. THE PERFORMANCE OF NJ
Fig. 8. Relationship among population size, error rate, and Table I summarizes the results of the NJ operator, 2-opt,
convergence time of our algorithm tested on the att532 problem. and city swap on some benchmark problems. Each problem
was tested 50 independent runs. In the table, the “Error
rate (%)” is the relative error of the average of best value
to the optimum in percentage; The column, “Opt/trail”
denotes the number of finding the optimal solution in 50
trails; and “Gen (CPU)” denotes the values of the average
Optimal times
Length = 5 generation and average CPU time required for finding the
Length = 20 best tours, respectively. By the observation, the solution
Length = 50
qualities of the NJ operator outperform the 2-opt and city
swap. For all test instances the average value of solution
quality stays within only 0.1% from the optimum. For the
problem lin318, although the NJ is not able to find the
Eil101
KroA200
Lin318
Pcb442
Att532
U574
Rat575
U724
Rat783
Vm1084
Pcb1173
U1432
Vm1748
Pr2392
Pcb3038
Here we analyzed the influences of our method by Comparisons of the proposed algorithm (denoted as HGA) with other
cooperating different heuristics, such as 2-opt and NJ methods, including NGA [24], ACS [10], DGA [9], and EGA[1], on five
mutation, into the EAX operators. Table II shows the TSP problems based on the best tour length, average tour length, and the
results of our methods with applying different operators for standard deviation. “N/A” represents not available in original papers.
15 TSP problems. According to the results, the methods Problems/ σ
combining 2-opt into EAX is limited for improving the Methods Best (Error %) Average (Error %)
(optimum) n
solution quality. On the other hand, the method combining ACS N/A N/A N/A
the NJ into EAX significantly promotes the solution Lin318
DGA 42029(0.000) 42033.44(0.011) 1.35
qualities for all test problems. Although the NJ cannot be NGA 42029(0.000) 42029.00(0.000) 0.00
(42029)
EGA 42029(0.000) 42041.23(0.011) 1.81
proved to be complementary with EAX, incorporating the HGA 42029(0.000) 42029.00(0.000) 0.00
NJ with the EAX indeed improves the solution qualities. ACS N/A N/A N/A
The key novelty of the present work is the seamless ability DGA 50778(0.000) 50778(0.000) 0.00
pcb442
of integrating global and local search mechanism through (50778)
NGA 50778(0.000) 50778(0.000) 0.00
incorporation of a number of genetic operators each having EGA 50778(0.000) 50778(0.000) 0.00
HGA 50778(0.000) 50778(0.000) 0.00
unique search mechanisms.
ACS 27693(0.000) 27718.20(0.112) 0.72
DGA 27686(0.000) 27697.58(0.042) 0.48
att532
D. COMPARISONS WITH OTHER METHODS NGA 27686(0.000) 27695.61(0.035) 0.71
(27686)
EGA 27686(0.000) 27696.33(0.037) 0.62
Following the discussions of the proposed algorithm HGA 27686(0.000) 27688.49(0.009) 0.00
(denoted as HGA) in the previous subsection, we compare ACS 8818(0.136) 8837.90(0.362) 0.19
DGA 8806(0.000) 8806.00(0.000) 0.00
the results of the proposed approach with the best-known rat783
NGA 8806(0.000) 8806.00(0.000) 0.00
results of four methods based on our best knowledge. Five (8806)
EGA 8806(0.000) 8806.00(0.000) 0.00
TSP benchmark problems, including lin318, pcb442, att532, HGA 8806(0.000) 8806.00(0.000) 0.00
rat783, and pcb3038, shown in Table III are used because ACS N/A N/A N/A
DGA 137705(0.008) 137760.55(0.048) 4.28
they have been widely used to compare the performance pcb3038
NGA 137695(0.001) 137765.02(0.052) 4.55
among algorithms. Our proposed algorithm was executed (137694)
EGA 137694(0.000) 137703.77(0.007) 0.93
30 trials for each problem. HGA 137694(0.000) 137700.19(0.004) 0.00
TABLE II
Comparisons of our method with applying different local search methods. Table III summarizes the results of our method and four
These methods are tested on 15 TSP problems based on the average CPU
other approaches, including nature crossover genetic
time (Time), the number of trails that optimal solutions found (Opt times),
and average solution qualities in 30 trails (Error). Here the error (%) is algorithm (NGA) [24], ant colony system (ACS) [10],
defined as average − optimum . distance-preserving crossover genetic algorithm (DGA) [9],
optimum
and EAX genetic algorithm (EGA) [1]. NGA integrated
All of three methods use the same parameters, including search length nature crossover and LK local search [6]; ACS is an ant
(L), population size (N), EAX crossover and stop criteria. The only
difference is the use of local search.
colony system cooperated with 3-opt operator; DGA
combined the distance-preserving crossover and 3-opt; and
Local
search
No local search NJ 2-opt EGA used the EAX crossover. These four approaches
Time Opt Error Time Opt Error Time Opt Error perform well on these test problems according to our
problem surveys. The results of first three methods were directly
(Sec.) times (%) (Sec.) times (%) (Sec.) times (%)
eil101 1.03 30 0.0000 1.50 30 0.0000 1.22 30 0.0000 summarized from original papers [9][10][24]. The best tour
kroA200 3.24 30 0.0000 4.82 30 0.0000 3.97 30 0.0000 length, average tour length, and standard deviation of trails
lin318 14.54 26 0.0291 19.1 30 0.0000 15.65 27 0.0191 are used to measure the performance of comparative
pcb442 39.91 30 0.0000 52.26 30 0.0000 43.57 30 0.0000 methods. The values in parentheses of the best and the
att532 97.93 7 0.0373 128.2 24 0.0090 105.4 11 0.0312 average tour length represent the percentages of error
u574 64.65 30 0.0000 89.47 30 0.0000 76.89 30 0.0000 sol − optimum
defined as optimum , where sol is the experimental
rat575 128.73 21 0.0043 172.9 28 0.0009 147.5 23 0.0031
u724 257.60 18 0.0122 335.4 27 0.0019 279.3 16 0.0059 value and optimum is the optimum of a TSP problem. The
rat783 σ
375.45 30 0.0000 487.3 30 0.0000 396.7 30 0.0000 column “ ” shows the group standard deviation of trails
n
vm1084 810.12 18 0.0277 1045 21 0.0227 854.9 20 0.0099
pcb1173 1089 24 0.0050 1401 29 0.0005 1171 27 0.0005 where is the standard derivation and N is the number of
u1432 2034 16 0.0145 2664 26 0.0080 2160 24 0.0038 cities.
vm1748 4295 19 0.0189 5663 27 0.0074 4633 21 0.0125 Table III shows that our algorithm performs better and
pr2392 9989 21 0.0049 13172 30 0.0000 10750 28 0.0009 more robustly than comparative methods for testing
pcb3038 22341 24 0.0071 29813 28 0.0045 24296 25 0.0006 problems. For each problem the proposed algorithm can
find the best tour in almost each trial and the error rate is
only 0.01% away from the optimal.