Jan 9, 2017 - The algorithms investigated include the enhanced .... best solutions found by the algorithm in a list called the Performance List ( ).
Contemporary Engineering Sciences, Vol. 10, 2017, no. 3, 129 - 144 HIKARI Ltd, www.m-hikari.com https://doi.org/10.12988/ces.2017.68146
The Enhanced Best Performance Algorithm for the Travelling Salesman Problem* Mervin Chetty and Aderemi O. Adewumi School of Mathematics, Statistics and Computer Science University of Kwa-Zulu Natal, University Road, Westville, Private Bag X 54001 Durban, 4000, South Africa Copyright © 2016 Mervin Chetty and Aderemi O. Adewumi. This article is distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Abstract The Travelling Salesman Problem (TSP) is a largely studied discrete optimization problem, which is 𝑁𝑃-Hard. This study compares the performances of three local search metaheuristic algorithms, in determining solutions to seven benchmark instances of symmetric TSP’s. The algorithms investigated include the enhanced Best Performance Algorithm (eBPA), Tabu Search (TS) and Simulated Annealing (SA). This study is the first on the eBPA for the TSP. eBPA is a newly introduced metaheuristic in the literature. The results demonstrate the effectiveness of eBPA as an alternative optimization technique for difficult optimization problems. Keywords: enhanced Best Performance Algorithm (eBPA), Simulated Annealing (SA), Tabu Search (TS), Symmetric Travelling Salesman Problem (sTSP)
1.
Introduction
The Travelling Salesman Problem (TSP) is defined as the problem of finding a minimal tour which traverses a list of 𝑛 cities in a way in which every city is visited exactly once, except for the original city of departure where the salesman would start and finish. The problem is accounted to Euler in 1759, who presented a problem of trying to move a knight to every block on a chest board exactly once. The problem gained fame in a handbook written by B. F. Voigt in 1832 [14]. *
The financial assistance of the National Research Foundation (DAAD-NRF) towards this research is hereby acknowledged. Opinions expressed and conclusions arrived at, are those of the authors and are not necessarily to be attributed to the DAAD-NRF.
130
Mervin Chetty and Aderemi O. Adewumi
Several classifications of TSP’s exist; yet in this study, we investigate Symmetric Travelling Salesman Problem’s (sTSP’s). For sTSP’s, the distance traveled from city 𝑖 to city 𝑗 is the same as the distance travelled from city 𝑗 to city 𝑖. The TSP is formally defined as follows [10]; Given a set of 𝑛 cities, a maximum travelling distance 𝐷, and for every pair of adjacent cities 𝑣𝑖 and 𝑣𝑗 a travelling distance 𝑑(𝑣𝑖 , 𝑣𝑗 ) (∀ 𝑖, 𝑗 = 1,2, … , 𝑛). The objective is to find a permutation 𝑃 = 𝑣𝑝1 , 𝑣𝑝2 , … , 𝑣𝑝𝑛 that minimizes the travelling distance in satisfying the constraint, ∑ 𝑑( 𝑣𝑝𝑖 , 𝑣𝑝𝑖+1 ) + 𝑑(𝑣𝑝𝑛, 𝑣𝑝1 ) ≤ 𝐷
(1)
1≤𝑖 random[0,1] then 6.1.4.2.1. 𝑢𝑠𝑒_𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 = true 6.1.4.3. end if 6.1.5. end else 6.1.6. if 𝑢𝑠𝑒_𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 then 6.1.6.1. 𝑢𝑠𝑒_𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 = false 6.1.6.2. 𝑓_𝑐𝑢𝑟𝑟𝑒𝑛𝑡 = 𝑓_𝑤𝑜𝑟𝑘𝑖𝑛𝑔 6.1.6.3. 𝑐𝑢𝑟𝑟𝑒𝑛𝑡 = 𝑤𝑜𝑟𝑘𝑖𝑛𝑔 6.1.6.4. if 𝑓_𝑐𝑢𝑟𝑟𝑒𝑛𝑡 better than 𝑓_𝑏𝑒𝑠𝑡 then 6.1.6.4.1. 𝑏𝑒𝑠𝑡 = 𝑐𝑢𝑟𝑟𝑒𝑛𝑡 6.1.6.4.2. 𝑓_𝑏𝑒𝑠𝑡 = 𝑓_𝑐𝑢𝑟𝑟𝑒𝑛𝑡 6.1.6.5. end if 6.1.7. end if 6.2. end for 6.3. Update 𝑇 according to cooling schedule 𝛼 7. end while 8. return 𝑏𝑒𝑠𝑡
4.
Benchmark Test Instances
This study investigates seven sTSP benchmark test instances from the TSPLIB collection. This collection has been made available online by Gerhard Reinelt. The problem instances, along with their characteristics, are given in Table 1. For each problem instance, the name, the number of vertices, the distance calculation type (i.e. Euclidean 2D-plane) and the optimal tour-lengths are given. Table 1: Symmetric Travelling Salesman Problem test instances, and their characteristics
5.
No.
sTSP
1 2 3 4 5 6 7
ch150 tsp225 a280 lin318 pcb442 rat575 d657
No. of Vertices 150 225 280 318 442 575 657
Type EUC_2D EUC_2D EUC_2D EUC_2D EUC_2D EUC_2D EUC_2D
Optimal TourLength 6,528 3,916 2,579 42,029 50,778 6,773 48,912
Results and Discussion
The objective of this investigation is to test using the same parameter settings, for each metaheuristic algorithm, in solving multiple instances of the sTSP’s. The problem instances differ in complexity, and range from 150 to 657 cities/vertices. This will provide sufficient challenges for the algorithms for testing purposes. The strength of the solutions determined by the eBPA will shed light on its abilities, in being compared to TS and SA for the multiple test instances investigated.
Enhanced best performance algorithm for the travelling salesman problem
137
To solve the problem instances, we first employ the Nearest Neighbor (NN) tour construction heuristic. This is used to provide the initial solution to each metaheuristic algorithm, per problem instance. The NN heuristic is straightforward: it is implemented by starting off at the first city, and thereafter it moves to the nearest adjacent unvisited city. The NN tour-length (or fitness) solutions is given in Table 2. Table 2: Nearest Neighbor tour-length solutions for each problem instance No. 1 2 3 4 5 6 7
sTSP ch150 tsp225 a280 lin318 pcb442 rat575 d657
Nearest Neighbor Tour-Length 8,191 5,030 3,157 54,019 61,979 8,605 61,627
In the execution of the metaheuristic algorithms, the solution at each iteration is determined by selecting the best of six moves. The best move is the one that will result in having the lowest fitness value. The six moves are as follows: 1. 2-opt – The 2-opt move removes two edges from a complete tour. It then reconnects the tour by introducing two new edges, which join the opposite ends of the removed edges. 2. 3-opt – The 3-opt move is similar to the 2-opt, except that with 3-opt, three edges are removed instead of two. It is implemented as two sequential 2-opt moves; this results in two solutions. 3. Double-bridge – The double-bridge move is a non-sequentially move (unlike 3-opt), which is implemented by randomly dividing the complete tour into four segments, and then reconnecting it in the reverse order. 4. Random swap – This move is implemented by randomly selecting two vertices from a complete tour, and then swapping them. 5. Vertex reposition – This move is implemented by repositioning a randomly selected vertex at a randomly selected position in the tour. The parameter settings for the algorithms will be as follows: a) SA will be set according to recommendations from literature [16]: The initial temperate (𝑇) will be set at 50% of the fitness of the initial solution, while the cooling rate alpha (𝛼) will be set at 85%. b) Likewise, the Tabu list size (𝑇𝐿_𝑠𝑖𝑧𝑒) of TS will be set at 7 [4, 13]. To determine the Candiate List size (𝐶𝐿_𝑠𝑖𝑧𝑒) for TS, we make use of the test instance pr439 from the TSPLIB collection; pr439 is also a EUC_2D sTSP. c) Since this is the first research on the eBPA for the TSP problem, we also make use of the pr439 problem to determine the probability factor (𝑝𝑎 ) and the Performance List size (𝑃𝐿_𝑠𝑖𝑧𝑒) for eBPA.
138
Mervin Chetty and Aderemi O. Adewumi
Once the set of experiments are run to determine the remaining parameter settings, all parameter settings will remain constant for the second set of experiments, which will be to compare the performances of the algorithms for the multiple sTSP test instances. For the first and second sets of experiments, the stopping criterion will be to terminate the execution at the point of convergence. Convergence is the point where further improvements in fitness will yield minimal benefits, compared to the large number of iterations required to yield those minimal benefits. In this study, convergence will be detected when no further improvements have been made to be 𝑏𝑒𝑠𝑡 solution for a large number of iterations. For the first set of experiments (i.e. to determine the parameter settings), convergence will be set at 3% of idle iterations. For the second set of experiments (i.e. in making algorithmic comparisons), convergence will be set at 5% of idle iterations. The termination criterion will apply provided that a minimum of 106 iterations have been executed. For example, if 106 iterations have executed, and the total number of consecutive idle iterations is 50,000 (assuming we are referring to the second set of experiments), then the algorithms will detect convergence and will terminate. For the first set of experiments, each algorithm will be run 50 times, per problem instance. For the second set of experiments, each algorithm will be run 30 times, per problem instance. The program was written in Java, using Netbeans® 7.0 on a Windows® 7 Enterprise system, with an Intel® Celeron® Processor 430, 3GB of RAM and a 500GB harddrive. The experiment run to determine the 𝐶𝐿 size for TS is seen in Figure 1. The 𝐶𝐿 size’s were randomly selected from within the range of 1 ≤ 𝐶𝐿_𝑠𝑖𝑧𝑒 ≤ 1,000. For the 50 runs, the 𝑇𝐿 size remained constant at size 7. Figure 1 shows that 𝐶𝐿 size’s below 200 determined weaker solutions, and that the most competitive solutions fell within the range of 400 to 1000. The best solution seen had a 𝐶𝐿 size value of 723. The 𝐶𝐿 size value of 723 will be the parameter value to be used for the second set of experiments. pr439: Fitness Values of Variable Candidate List Sizes 135000
𝑇𝐿 𝑠𝑖𝑧𝑒 = 7
130000
Fitness Value
125000
120000
115000
110000 723; 109446 105000 0
200
400
600
800
1000
Candidate List Size
Figure 1: Fitness values determined by randomly selecting the 𝑪𝑳 size values.
Enhanced best performance algorithm for the travelling salesman problem
139
The experiments run to determine 𝑝𝑎 and the 𝑃𝐿 size for eBPA is seen in Figures 2 and 3. In Figure 2, the 𝑃𝐿 size remained fixed at 50, while 𝑝𝑎 was randomly selected from within the range of 0 < 𝑝𝑎 ≤ 0.15. From Figure 2, it can be seen that for the 50 runs, the solutions are scattered throughout the entire probability range, and roughly within the same height of the fitness range. There is no specific value for 𝑝𝑎 that is best suited for this problem instance. The best solution seen had a 𝑝𝑎 value of 0.045 (truncated to three decimal places). This will be the value used for the rest of the experiments. For the experiment run to determine the 𝑃𝐿 size, the value of 𝑝𝑎 = 0.045 remained fixed, while the value of the 𝑃𝐿 size was randomly selected from within the range of 1 ≤ 𝑃𝐿_𝑠𝑖𝑧𝑒 ≤ 200. From the 50 runs, it can be seen that values greater than 130 determined the poorest solutions. The solutions determined in having used the values between that ranges of 50 to 130 determined competitive solutions; however, these solutions also show evidence of having determined slightly weaker solutions. The most consistent and competitive cluster of solutions can be seen within the value range of 4 to 31, with the best solution having had a 𝑃𝐿 size of 10. Together with 𝑝𝑎 = 0.045, these will be the parameter values for the eBPA for the second set of experiments. 117000
pr439: Fitness Values of Variable Probability at a Fixed 𝑙𝑖𝑠𝑡𝑆𝑖𝑧𝑒 Performance List Size
= 50
128000 126000
116000
124000
Fitness Value
115000
Fitness Value
pr439: Fitness Values of Variable Performance List Sizes at Fixed Probability 𝑝𝑎 = 0.045
114000 113000 112000
122000 120000 118000
130; 114530
116000 114000
0,045876253; 111160
111000
112000 110000
110000 0
0,03
0,06
0,09
0,12
0,15
Probability
Figure 2: Fitness values determined using randomly selected probability factors, at a fixed 𝑷𝑳 size of 50
0
10; 111530 50
100 Performance List Size
150
200
Figure 3: Fitness values determined using randomly selected 𝑷𝑳 sizes, at a fixed probability factor of 0.045
For the second set of experiments, the parameter values for all algorithms remained constant for all problem instances implemented. For each algorithm, per problem instance, their best (BFV) and average (AFV) fitness value solutions have been documented. For the average fitness values, their 95% Confidence Interval (95% CI) values are also given. The 95% CI values mean to be 95% certain that the 30 execution times of the algorithms, per problem instance, have fallen within those interval estimates. The statistical results are given in Table 3.
140
Mervin Chetty and Aderemi O. Adewumi
Table 3: Best, average and 95% CI fitness values, for each algorithm, per problem instance eBPA AFV 6,643 4,011 2,677 43,685 52,400 7,062 51,048
95% CI AVG ± 23 AVG ± 8 AVG ± 7 AVG ± 126 AVG ± 146 AVG ± 18 AVG ± 107
BFV 6,563 3,988 2,654 43,492 52,257 7,024 50,564
TS AFV 6,664 4,034 2,705 44,310 53,071 7,093 51,492
95% CI AVG ± 23 AVG ± 8 AVG ± 7 AVG ± 156 AVG ± 161 AVG ± 14 AVG ± 141
BFV 6,543 3,993 2,638 43,485 52,584 7,206 51,699
SA AFV 6,683 4,064 2,726 44,340 54,148 7,290 53,076
95% CI AVG ± 30 AVG ± 14 AVG ± 13 AVG ± 197 AVG ± 263 AVG ± 20 AVG ± 189
From Table 3, it is observed that eBPA determined the best BFV solutions for all problem instances, except for ch150. For ch150, SA determined the best BFV solution. However, eBPA did determine the best AFV solutions, and the lowest 95% CI values for all problem instances. Visual representations of the statistics given in Table 3 are seen in Figures 4 to 10. For the AFV solution towers, the 95% CI values are represented as the black interval estimates at the top. ch150: Best and Average Fitness Values with 95% CI 6750
BFV
tsp225: Best and Average Fitness Values with 95% CI 4100
AFV
BFV
AFV
6700 4050 6650 6600
6563
Fitness Value
Fitness Value
6563 6543
6550
3993
3988
4000 3971 3950
6500 6450
3900 eBPA
TS
SA
eBPA
Figure 4: The best and average fitness values, along with their 95% CI estimates for ch150 2750
a280: Best and Average Fitness Values with 95% CI BFV
SA
lin318: Best and Average Fitness Values with 95% CI 45000
AFV
BFV
AFV
44500
2700 2654 2650
TS
Figure 5: The best and average fitness values, along with their 95% CI estimates for tsp225
2638
2637
Fitness Value
ch150 tsp225 a280 lin318 pcb442 rat575 d657
BFV 6,563 3,971 2,637 43,233 51,519 6,955 50,475
Fitness Value
sTSP
44000 43492 43500
43485
43233
2600 43000
2550
42500 eBPA
TS
SA
Figure 6: The best and average fitness values, along with their 95% CI estimates for a280
eBPA
TS
SA
Figure 7: The best and average fitness values, along with their 95% CI estimates for lin318
Enhanced best performance algorithm for the travelling salesman problem
55000
pcb442: Best and Average Fitness Values with 95% CI BFV
141
rat575: Best and Average Fitness Values with 95% CI 7400
AFV
BFV
7300
54000
AFV
7206
52584
Fitness Value
Fitness Value
7200 53000 52257 52000
51519
7100 7000
7024 6955
6900 51000 6800 50000
6700 eBPA
TS
SA
Figure 8: The best and average fitness values, along with their 95% CI estimates for pcb442
eBPA
TS
SA
Figure 9: The best and average fitness values, along with their 95% CI estimates for rat575
d657: Best and Average Fitness Values with 95% CI 54000
BFV
AFV
Fitness Value
53000 51699
52000
51000
50475
50564
50000
49000 eBPA
TS
SA
Figure 10: The best and average fitness values, along with their 95% CI estimates for d657 The experiment shows the eBPA’s ability to determine competitive solutions across multiple problem instances, in using the same parameter settings. The strength of eBPA is attributed to its ability to influence the trajectory of the stochastic search by way of memory. The acceptance criterion of the eBPA memory structure allows for a 𝑤𝑜𝑟𝑘𝑖𝑛𝑔 solution to get inserted into the 𝑃𝐿, provided it meets the minimum requirements (please refer to section 3.1). The newly inserted solution will then become the next solution to be used to direct the search. Implicitly, any solution inserted into the 𝑃𝐿 could possibly be the next 𝑏𝑒𝑠𝑡 solution. With every insert into the 𝑃𝐿, the admissible criteria will constrain further as the quality of the 𝑤𝑜𝑟𝑠𝑡 solution will improve. This makes acceptance into the memory structure more difficult, and controls the transition from exploration to exploitation. Exploitation is further enhanced by reducing the 𝑃𝐿 size, which also serves the purpose for eliminating cycling for 𝑃𝐿 sizes greater than one.
6.
Conclusion
The TSP is largely studied in discrete optimization. Its complexity is 𝑁𝑃-Hard. In this study, the eBPA, TS and SA metaheuristic algorithms were compared in their abilities to determine their best and average tour-length solutions, for the seven benchmark test instances investigated. The complexities of the problem instances differed in ranging from 150 to 657 vertices. The results show the competitiveness
142
Mervin Chetty and Aderemi O. Adewumi
of eBPA in determining solutions across multiple problem instances, in using the same parameter settings. Further research is required to investigate eBPA’s ability to determine solutions for other types of optimization problems.
References [1]
S. Chetty and A.O. Adewumi, Three New Stochastic Local Search Algorithms for Continuous Optimization Problems, Computational Optimization and Applications, 56 (2013), 675-721. https://doi.org/10.1007/s10589-013-9566-3
[2]
D. Davendra, Traveling Salesman Problem, Theory and Applications, InTech, 2010. https://doi.org/10.5772/547
[3]
M. Dorigo and L. Gambardella, Ant Colonies for the Travelling Salesman Problem, Biosystems, 43 (1997), 73-81. https://doi.org/10.1016/s0303-2647(97)01708-5
[4]
F. Glover, Future Paths for Integer Programming and Links to Artificial Intelligence, Computers and Operations Research, 13 (1986), 533–549. https://doi.org/10.1016/0305-0548(86)90048-1
[5]
F. Glover, Tabu Search - Part 1, ORSA Journal on Computing, 1 (1989), 190– 206. https://doi.org/10.1287/ijoc.1.3.190
[6]
F. Glover, Tabu Search - Part 2, ORSA Journal on Computing, 2 (1990), 4– 32. https://doi.org/10.1287/ijoc.2.1.4
[7]
R.M. Karp, Reducibility among Combinatorial Problems, Chapter in Complexity of Computer Computations, Springer US, 1972. https://doi.org/10.1007/978-1-4684-2001-2_9
[8]
S. Kirkpatrick, C.D. Gelatt and M.P. Vecchi, Optimization by Simulated Annealing, Science, 220 (1983), 671–680. https://doi.org/10.1126/science.220.4598.671
[9]
S.N. Kumbharana and G.M. Pandey, Solving Travelling Salesman Problem using Firefly Algorithm, International Journal for Research in Science & Advanced Technologies, 2 (2013), 53-57.
[10] S. Lin, Computer Solutions of the Traveling Salesman Problem, Bell System Technical Journal, 44 (1965), 2245-2269. https://doi.org/10.1002/j.1538-7305.1965.tb04146.x
Enhanced best performance algorithm for the travelling salesman problem
143
[11] S. Lin and B.W. Kernighan, An effective heuristic algorithm for the travelling-salesman problem, Operations Research, 21 (1973), 498-516. https://doi.org/10.1287/opre.21.2.498 [12] S.J. Louis and R. Tang, Interactive Genetic Algorithms for the Travelling Salesman Problem, Proceedings of the Genetic and Evolutionary Computation Conference, Orlando, Florida, 1 (1999), 1043-1048. [13] M. Malek, M. Guruswamy and M. Pandya, Serial and Parallel Simulated Annealing and Tabu Search Algorithms for the Traveling Salesman Problem, Annals of Operations Research, 21 (1989), 59-84. https://doi.org/10.1007/bf02022093 [14] Z. Michalewicz, Genetic Algorithms + Data Structures = Evolution Programs, Springer-Verlag, 2nd Edition, 1994. https://doi.org/10.1007/978-3-662-07418-3 [15] M. Miki, T. Hiroyasu and T. Jitta, Adaptive Simulated Annealing for Maximum Temperature, Proceedings of the 2003 IEEE International Conference on Systems, Man & Cybernetics (SMC 2003), (2003), 20-25. https://doi.org/10.1109/icsmc.2003.1243786 [16] E. Soubeiga, Development and Application to Hyperheuristics to Personal Scheduling, Ph.D. Thesis, University of Nottingham, 2003. [17] C.M. Tan, Simulated Annealing, InTech Publisher, 2008. https://doi.org/10.5772/67 [18] F.M. Tasgetiren, P.N. Suganthan and Q.K. Pan, A Discrete Particle Swarm Optimization Algorithm for the Generalized Traveling Salesman Problem, Proceedings of the 9th Annual Conference on Genetic and Evolutionary Computation - GECCO '07 (2007), 158-167. https://doi.org/10.1145/1276958.1276980 [19] H.K. Tsai, J.M. Yang, Y.F. Tsai and C.Y. Kao, An Evolutionary Algorithm for Large Traveling Salesman Problems, IEEE Transactions on Systems, Man, and Cybernetics - Part B: Cybernetics, 34 (2004), 1718-1729. https://doi.org/10.1109/tsmcb.2004.828283 [20] S. Tsubakitani and J.R. Evans, Optimizing Tabu List Size for the Travelling Salesman Problem, Computers Operational Research, 25 (1998), 91-97. https://doi.org/10.1016/s0305-0548(97)00030-0
144
Mervin Chetty and Aderemi O. Adewumi
[21] X. Yan, C. Zhang, W. Luo, W. Li, W. Chen and H. Liu, Solve Traveling Salesman Problem Using Particle Swarm Optimization Algorithm, IJCSI International Journal of Computer Science Issues, 9 (2012), 264-271. [22] X. Yao, Dynamic Neighbourhood Size in Simulated Annealing, International Joint Conference on Neural Networks (IJCNN 1992), 1 (1992), 411-416.
Received: September 7, 2016; Published: January 9, 2017