Professional Documents
Culture Documents
Lei Yang1(B) , Xin Hu1 , Kangshun Li1 , Weijia Ji1 , Qiongdan Hu1 , Rui Xu1 ,
and Dongya Wang2
1
College of Mathematics and Informatics, South China Agricultural University,
Guangzhou 510642, China
yanglei s@scau.edu.cn
2
University of Exeter, College of Engineering, Mathematics and Physical Sciences,
Exeter EX4 4QF, UK
1 Introduction
In the era of information explosion, the amount of information may be too large
to imagine. New requirements are necessary to put forward for the processing of
massive data. However, many non-linear and uncertain factors make it difficult
to establish accurate mathematical models for many problems. And the combi-
natorial optimization is just one of them, it is still an important issue when the
computer capacity cannot be broken, and the TSP problem is one of the NPC
problems that are difficult to solve completely through computer operations. The
TSP is described as follows: Given a series of cities and their coordinates, the
traveler is required to start from a certain city, then visit all the cities one by one,
c Springer Nature Singapore Pte Ltd. 2020
K. Li et al. (Eds.): ISICA 2019, CCIS 1205, pp. 473–487, 2020.
https://doi.org/10.1007/978-981-15-5577-0_37
474 L. Yang et al.
and each city only visits once, and finally returns to the starting city. The goal
is to find the path that is as small as possible. For a TSP problem with n cities,
the number of solutions is (n − 1)!/2 [10], if n is a small number, such as 10 or
100, under the great computing power of the computer, we can exhaustively find
the optimal path. With the increase of n, the scale of the solution has exploded,
the approximate infinity of the solution can be said to be the biggest problem
of large-scale TSP problem. For the number of approximate infinite solutions, it
is also difficult for computer algorithms to obtain quickly better solutions and
evaluate the solution.
With the increasing scale of the TSP problem, the exponential growth rate of
the solution scale makes the solution extremely complicated. Branch-and-bound
algorithm, branch-and-cut algorithm, cutting plane algorithm, plane discovery
algorithm, or branch and price are known as the most effective precise algo-
rithms. As an algorithm for solving large-scale TSP problem, the branch-and-
bound algorithm requires one or more loosely structured decisions. It can be
used to process TSP branches and cutting algorithms with 40 to 60 cities. Ralph
Gomory proposed cutting plane algorithm in the 1950s, which can solve inte-
ger programming and mixed-integer programming problems. The cutting plane
algorithm based on linear programming proposed by George Dantzig discovered
the exact solution of the 15112 German towns in TSPLIB in 2001, whose com-
putation time is equivalent to 22.6 years. In the branch and price algorithm,
the model of the original problem usually contains a large number of decision
variables [1]. Many experts and scholars at home and abroad have studied the
solution of large-scale TSP problem. However, there is still no perfect solution
to this problem, and no algorithm can solve all possible examples in polyno-
mial time [9]. The approximation algorithm achieves a good solution compared
to the precise algorithm but does not guarantee that the optimal solution will
be found. Therefore, if a small deviation can be accepted, an approximation
algorithm can be used to solve the large-scale TSP problems. It is necessary to
use heuristic algorithms (or approximation) to provide the best possible, but
not necessarily the best feasible solution. The Simulated Annealing Algorithm is
derived from the principle of solid annealing, starting from a certain higher ini-
tial temperature, with the continuous decline of temperature parameters. The
algorithm combines the probability jump feature to randomly find the global
optimal solution of the objective function in the solution space, i.e., the local
optimal solution can jump out probabilistically and eventually tend to be glob-
ally optimal. This algorithm is a probability-based algorithm [14], which regards
the initially disordered state as high temperature, and gradually finds the best
path by looking for stable low-temperature ordered state. It has been proved
to be an excellent and efficient algorithm with mild and fast convergence rate
and exceptional efficiency in solving TSP problems [8,15,16]. However, with the
increase of city scale, the Simulated Annealing Algorithm has low efficiency and
weak optimization effect when solving large-scale TSP problems.
Given the characteristics of large-scale TSP problems, this paper improves the
Simulated Annealing Algorithm by incorporating recursive diffusion strategies,
Nested Simulated Annealing Algorithm to Solve Large-Scale TSP Problem 475
which makes it more adaptable to large-scale TSP problems. Also, the speed and
efficiency of finding the optimal solution are improved. Then we test the proposed
algorithm using three large-scale TSP problems in the TSPLIB database and com-
pare it with the traditional Simulated Annealing Algorithm. The experimental
results verify the usefulness and effectiveness of the new algorithm.
The remainder of this study is organized as follows. Section 2 presents a dis-
cussion of the basic Simulated Annealing Algorithm. Our new Nested Simulated
Annealing Algorithm(NSA) is presented in Sect. 3. The experimental results and
discussion are shown in Sect. 4. Finally, Sect. 5 concludes this study and gives
future research directions.
2 Background
Because of the characteristics of large-scale TSP problems, this paper improves
the Simulated Annealing Algorithm. Both Diffusion-and-Clustering Strategies
and K-means clustering algorithms are used in this paper. So this section, we
will introduce these two basic algorithms.
The idea of the Simulated Annealing Algorithm was first put forward by
N. Metropolis et al., and it was introduced into the field of combinatorial opti-
mization by S. Kirkpatrick. The Simulated Annealing Algorithm is a stochastic
optimization algorithm based on the Monte-Carlo iterative solution strategy,
which utilizes the similarity between the general combinatorial optimization
problem and the annealing process of solid matter in physics [4]. The Simulated
Annealing Algorithm is derived from the principle of solid annealing. The solid
is warmed to a sufficiently high temperature and then allowed to cool slowly.
When heating, the internal particles of the solid become disordered with the
increase of heat, and its internal energy also increase. While slowly cooling, the
particles become more and more orderly and reaching an equilibrium state at
each temperature, finally reaching the ground state at normal temperature, and
its internal energy is also reduced to a minimum [6].
The Simulated Annealing Algorithm can be decomposed into three parts:
solution space, objective function, and initial solution. Simulated Annealing
Algorithm has nothing to do with the initial value. The solution obtained by
the algorithm is also independent of the initial solution state (i.e., the starting
point of algorithm iteration). The Simulated Annealing Algorithm is asymptot-
ically convergent and has been theoretically proved to be a global optimization
algorithm converging to the global optimal solution with probability 1. The Sim-
ulated Annealing Algorithm has parallelism [11].
Nested Simulated Annealing Algorithm to Solve Large-Scale TSP Problem
proposed in this paper calls the Simulated Annealing Algorithm twice. It is used
to calculate the shortest loop and the shortest path of the urban agglomerations,
and also the shortest path within the urban agglomeration.
476 L. Yang et al.
Give a set of n data points, and the K-means algorithm is to divide them into k
groups in the d-dimensional Euclidean space r (i.e., clustering) [5].
The K-means algorithm first randomly selects K objects as the initial clus-
tering center, then calculates the distance between each object and each cluster
center, and assign each object to the cluster center closest to it. The cluster
centers and objects assigned to them represent a cluster. Once all objects are
allocated, the center of each cluster will be recalculated according to existing
objects in the cluster. This process will be repeated until a stopping criterion
is met [3]. The stopping criterion may be no objects are reassigned to different
clusters. No cluster centers are re-changed, or the Square sum of errors reaches
local minimum local [2].
The computational complexity of the K-means algorithm is O(N kn), where
N is the number of iterations, n is the number of cities, k is the number of
clusters. The criterion of the K-means algorithm is that the distance between
data points in each cluster is as close as possible, and each cluster is as far as
possible.
If X = {x1 , x2 , . . . , xn }, where X1 (l = 1, 2, . . . , k) is k partitions given by
K-means and E = {e1 , e2 , . . . , ek } represent the center of the k partitions, then
the objective function of the K-means algorithm is:
k
2
F = min xi − e1 (1)
l=1 xi ∈xl
The first step of the Nested Simulated Annealing Algorithm is to cluster. After
receiving the urban coordinate data from the total algorithm, they are clus-
tered by the clustering algorithm, then the cluster grouping is labeled after each
coordinate, and the central coordinate system E is generated to record the cen-
tral coordinates of each cluster at the same time. Two clustering algorithms
Nested Simulated Annealing Algorithm to Solve Large-Scale TSP Problem 477
Visual Studio software. It runs on the platform of AMD Ryzen 5 2500U in mem-
ory 8G (software allocated memory with dynamic distribution, about 100M-2G).
The original Simulated Annealing Algorithm is abbreviated as SA (Simulated
Annealing Algorithm). The Nested Simulated Annealing Algorithms has two
algorithm models; one is the K-means clustering improved algorithm, which is
abbreviated as SA-KS (Simulated annealing algorithm-K-means). And the other
is the improved algorithm using diffusion clustering, which is abbreviated as SA-
SP (Simulated annealing algorithm-Spread).
Experiments compare the advantages and disadvantages of the two algo-
rithms. The comparison method is to find out the shortest path calculated at
the same time. The experimental interval is 5, 10, 15, 20, 25, 30, 40, 50, 60, the
unit is in seconds, and termination time is determined by whether the optimal
result is obvious or not. Since the simulated annealing algorithm is calculated
by continuous iteration, it is only necessary to set the number of iterations to
be close to infinity, and then insert the time for judgment. As long as the time
arrives, the distance is output to get the shortest path at that time.
The Nested Simulated Annealing Algorithm divides the data set into several
urban agglomerations for calculation. Therefore, it is necessary to divide the total
time into time segments and then distribute them to the urban agglomeration.
A uniform strategy is adopted at the beginning of the algorithm. And the result
shows that the time to find out the shortest path of SA-SP is often several times
that of other algorithms. It is finally found that the use of recursive diffusion clus-
tering makes it easy to form a large scale urban agglomeration and some small
scale urban agglomerations. Therefore, we use the principle of proportionality
for the time fragment of SA-SP. That is, the time segment of large-scale urban
agglomeration is large, while the time segment of small-scale urban agglomer-
ation is small. Due to the improvement of the previous algorithm, SA-KS can
form an urban agglomeration with about 100 cities. The error is about plus or
480 L. Yang et al.
(1) d15112
Number of cities: 15112
Number of city groups formed by SA-KS: 151
Number of city groups formed by SA-SP: 153, Distance between boundary
cities: 250
From the chart, it can be intuitively felt that the shortest path obtained by
the new algorithm is better than the original algorithm. However, the result of
the new algorithm is inferior to the original algorithm at the beginning of 5 min,
which shows that the new algorithm is not superior to the original algorithm
at the beginning of the operation. With the increase of time, the convergence
speed of the new algorithm is greatly accelerated, while the original algorithm
that is relatively stable. The convergence speed of the new algorithm has a great
potential of opening and closing, which makes it nearly complete in 20 min.
However, the original algorithm is nearly complete in 30 min. That is to say, the
new algorithm not only achieves a shorter path but also takes a shorter time. It
shows that the efficiency of the new algorithm is better. Compared with the two
new algorithms, the final result of SA-KS is better than that of SA-SP (Figs. 1,
2, 3 and 4).
(2) pla33810
Number of cities: 33810
Number of city groups formed by SA-KS: 338
Nested Simulated Annealing Algorithm to Solve Large-Scale TSP Problem 481
Fig. 1. d15112 Compare the shortest Fig. 2. d15112 The shortest path dif-
path of the three algorithms ference between the new and the origi-
nal algorithms
Fig. 3. d15112 Compare the shortest Fig. 4. d15112 The shortest path dif-
path of the three algorithms ference between the new and the origi-
nal algorithms
Fig. 5. pla33810 Compare the shortest Fig. 6. pla33810 The shortest path dif-
path of the three algorithms ference between the new and the origi-
nal algorithms
Fig. 7. pla33810 Compare the shortest Fig. 8. pla33810 The shortest path dif-
path of the three algorithms ference between the new and the origi-
nal algorithms
in 20 min. Although it is not like pla3810, which gets the effect with five min-
utes, it can also be regarded as a three-fold increase in efficiency. For SA-SP, its
advantages are distinct. For its efficiency, it reaches the optimal result in 5 min.
The shortest path obtained by SA-SP is also much better than the other two
algorithms (Table 3).
Firstly, the difference between the NSA algorithms and the original algorithm is
compared. According to the above experimental results for the large-scale TSP
problem, the NSA algorithms are superior to the original algorithm in the efficient
and final result. The NSA algorithms obtain the optimal path within 25 min, while
the original algorithm generally takes 60 min. For most of the data, the NSA algo-
rithm can get an optimal path far beyond the original algorithm within 5 min, or
even just a fraction of it. After 20 min, the shortest path of the NSA algorithm
484 L. Yang et al.
Fig. 9. rl5934 Compare the shortest Fig. 10. rl5934 The shortest path dif-
path of the three algorithms ference between the new and the origi-
nal algorithms
Fig. 11. rl5934 Compare the shortest Fig. 12. rl5934 The shortest path dif-
path of the three algorithms ference between the new and the origi-
nal algorithms
is basically no longer updated. The original algorithm can also achieve the same
shortest path that the NSA algorithm can make on some data sets, but it takes sev-
eral times the time of the new algorithm. The original algorithm gets the shortest
path smoothly and gradually, while the NSA algorithm, especially SA-KS, gets the
shortest path more vigorously and rapidly. So the improvement of the NSA algo-
rithms is successful. Through the NSA algorithm’s basic ideas, we can know that
it first calculates the shortest path between urban agglomerations, laying a gen-
eral framework. The shortest path will not be too bad under this framework. This
is why the NSA algorithms can quickly get the shortest path. Then there is the
refinement calculation within the urban agglomeration. This process is completed
within 20 min, which is also the reason why SA-KS is difficult to make further
progress after 20 min. Because internal refinement has been achieved, it is chal-
lenging to continue to optimize. According to this principle, the original algorithm
can theoretically obtain a shorter optimal path than the NSA algorithm because
the shortest path of the new algorithm is limited to the urban group. Going to an
Nested Simulated Annealing Algorithm to Solve Large-Scale TSP Problem 485
urban group then returns to the original city. It is maybe the shortest distance.
But it takes a lot of time to get this result. From the above experimental result,
we can know it did not appear within 60 min. The original algorithm is stable at
60 min, so it is impossible to achieve the shortest path produced by the new algo-
rithm (Figs. 9, 10, 11 and 12).
Then compare the difference between the two NSA algorithms SA-KS and
SA-SP. From the experimental results, there are advantages and disadvantages.
For larger urban agglomerations, SA-KS has better results, while SA-SP is more
adaptable. The SA-SP has an excellent solution to address large-scale and small-
scale TSP problems. The reason is that they use different clustering algorithms.
SA-KS uses the improved K-means clustering algorithm to get urban agglomera-
tions. The SA-SP uses a recursive diffusion algorithm to easily form an oversized
urban cluster and several small-scale urban agglomerations. The experimental
time is proportionally distributed so that large-scale urban agglomerations can
calculate thoroughly.
During the experiment, it is easy to see the difference between the two kinds
of clustering. When obtaining the shortest path, SA-KS often has a sharp decline
in a certain period. This is because the size of urban agglomeration is similar, and
the allocation time is the same. With increases in time, the internal operation get
deepens in each urban agglomeration, and this is easy to form a superposition
effect. That is, every little reduction of each urban agglomeration is a lot of dis-
tance. SA-SP can be regarded as a combination of SA-KS and SA because of its
megacities. From the experimental chart, it can be seen that the SA-SP descent
process is relatively smooth, and the descent time is longer, too. SA-KS can
hardly be further explored after the stabilization of each urban agglomeration
(it is generally found in the experiment that this time is 20 min).
In summary, the two NSA algorithms have improved to a certain extent, and
SA-SP has better adaptability. SA-KS is better at processing some specific data
sets, especially large-scale data sets.
5 Conclusion
Although this experiment proves the feasibility of the Nested Simulated Anneal-
ing Algorithm, there is still room for further improvement. In the growth of
K-means in this paper, it automatically generates urban agglomerations with
about 100 cities, ignoring the total number of cities. For example, for 1000 cities,
only ten urban agglomerations are created, which is fatal for finding the short-
est path. This may be one of the reasons for the gap between SA-KS and the
original algorithm on small-scale TSP problems. As for SA-SP, firstly, it is a rel-
atively primitive method to input the boundary distance manually. It can try to
make a secondary improvement by determining the boundary distance through
the number of cities and the maximum value of city coordinates. Also, we can
automatically adjust the boundary distance and reclassify when the number of
city clusters is too large or too small.
486 L. Yang et al.
In the future, we will further study and improve the algorithm, then try
to investigate whether the NSA algorithm can be extended for other classical
combinatorial optimization problems.
References
1. Gao, J.: Hierarchical Solving Method for Large Scale TSP Problems. Master’s
thesis, Inner Mongolia University For Nationlities (2014)
2. Hu, X., Zhang, J., Qi, P., Zhang, B.: Modeling response properties of v2 neu-
rons using a hierarchical k-means model. Neurocomputing 134, 198–205 (2014).
https://doi.org/10.1016/j.neucom.2013.07.052
3. Huang, Q.: Based on Fusion on Feature-Level Image Technique Study Intelligent.
Master’s thesis, China University of Petroleum (2012)
4. Khan, N.A., Shaikh, A.: A smart amalgamation of spectral neural algorithm for
nonlinear lane-emden equations with simulated annealing. J. Artif. Intell. Soft
Comput. Res. 7(3), 215–224 (2017). https://doi.org/10.1515/jaiscr-2017-0015
5. Lam, Y.K., Tsang, P.W.: eXploratory k-means: A new simple and efficient algo-
rithm for gene clustering. Appl. Soft Comput. 12(3), 1149–1157 (2012). https://
doi.org/10.1016/j.asoc.2011.11.008
6. Li, J.: Color separation research and implementation based on printing and dyeing
CAD system. Master’s thesis, Zhejiang University (2004)
7. Liu, X.: The Application and Research of an Improved Genetic Algoruthm on the
TSP Problem. Master’s thesis, Harbin University of Science and Technology (2011)
8. Pan, J., Cheng, Z.G., Lv, J.Y.: Study on the TSP problem based on SA algorithm.
In: Applied Mechanics and Materials, vol. 687–691, pp. 1316–1319 (2014). https://
doi.org/10.4028/www.scientific.net/amm.687-691.1316
9. Shi, Z.: The single machine parallel-batching scheduling problem with family-jobs.
Master’s thesis, Zhengzhou University (2008)
10. Wang, P.: Research on Parallel Ant Colony Algorithm and Application. Master’s
thesis, Southwest Jiaotong University (2008)
11. Xiaoping, Z., Shengbowen, L.: Fetal electrocardiogram extraction based on inde-
pendent component analysis and particle swarm optimizer. Inf. Electron. Eng. 6
(2009)
12. Xie, Y.: A summary on the simulated annealing algorithm. Control Autom. 5,
66–68 (1995)
13. Yang, M., Gao, X., Li, L.: Improved bidirectional CABOSFV based on multi-
adjustment clustering and simulated annealing. Cybern. Inf. Technol. 16(6), 27–42
(2016). https://doi.org/10.1515/cait-2016-0075
14. Lu, Y.T., Lin, Y.Y., Peng, Q.Z., Wang, Y.Z.: A review of improvement and research
on parameters of simulated annealing algorithm. Coll. Math. 31(6), 96–103 (2015)