A Hill Climbing Differential Evolutionary Algorithm For Solving Multiple Travelling Salesman Problem
A Hill Climbing Differential Evolutionary Algorithm For Solving Multiple Travelling Salesman Problem
Abstract: The Multiple Travelling Salesman Problem (MTSP) is a basic deformation of the Travelling Salesman Problem
(TSP), which is a typical NP-Hard problem. For combinatorial optimization problems shaped like MTSP, researchers often use
intelligent optimization algorithms such as genetic algorithms, differential evolutionary algorithms, simulated annealing
algorithms and other intelligent optimization algorithms to approximate the solution. However, typical intelligent optimization
algorithms have the disadvantage of being prone to local convergence and failing to produce theoretically optimal solutions.
Based on this, we propose an HCA&DE algorithm that improves the DE algorithm by using the hill-climbing algorithm, and
carry out data experiments using the solution set of TSPLIB, which proves the practicality and effectiveness of the algorithm.
Keywords: MTSP Problem; Differential Evolution Algorithm; Hill Climbing Algorithm.
4
is equal to the parent's current dimension value. The formula Algorithm 1: DE algorithm
is as follows: Input: Population:P;Dimension:D;Generation:R;
vij (t 1) randij Pc or j rand(i) Output: The Best solution path: BestPath
uij (t 1) { (2) 1: r←1(initialization):
xij (t ) randij Pc and j rand(i) 2: for i = 1 to P do
randij is a random decimal between [0,1], Pc is the 3: for j=1 to D do
crossover probability, Pc∈[0, 1], and rand (i) is a random 4:
17: if then
18:
19: end
20: else
21:
22: end
23: end
24: r←r+1;
25: end
26: return the Best solution path BestPath
The Hill-Climbing algorithm is a typical local optimal 3-opt algorithm is to randomly select the cities in an interval
search algorithm, which uses various crossover operators to and randomly insert a sequence of cities into the solution set.
generate the neighbors of the current solution, and iterates another location. The 3-opt algorithm is to randomly select
using the better individuals in the generated neighboring three cities, exchange their order and generate a new path. The
solutions to keep updating the current optimal solution until flowchart of the Hill-Climbing algorithm designed in this
there is no better solution in the current generated neighboring paper is shown in Figure 1.
solutions. For the MTSP problem, the more classical
crossover operators include 2-opt, double-bridge-swap, 3. HCA&DE Algorithm
insert-swap, etc. These operators are able to form new
neighboring individuals flexibly and extensively, thus 3.1. HCA&DE Algorithm Introduction
effectively forming and updating the current optimal solution. HCA&DE algorithm is a combination algorithm of
As a typical local search algorithm, hill-climbing algorithm Differential Evolutionary Algorithm and Hill-Climbing
can effectively solve the problem that DE algorithm is easy to search algorithm, he has the powerful global search
fall into the local optimum and cannot obtain the optimal performance of Differential Evolutionary Algorithm, and at
solution. the same time, the local search ability of DE algorithm is
The performance of Hill-Climbing algorithm depends on enhanced by the Hill-Climbing algorithm, which makes the
the selection of crossover operators, and in this paper, 2-opt, HCA&DE algorithm have both powerful local search ability
insert-opt and 3-opt are selected as the crossover operators of and global search ability, and it can search for better solutions
Hill-Climbing algorithm. 2-opt-swap algorithm is to more efficiently. The HCA&DE algorithm includes
exchange all the cities in the two cities in the reverse order to initialization, mutation, crossover, selection, 2-opt, insert-opt,
form a new path. insert-opt algorithm is to randomly select 3-opt and other operations.
the cities in an interval and randomly insert a sequence of First, initialize the population and randomly generate N
cities in the segment into another position of the solution set. paths that meet the requirements. After that, we set the
5
crossover and mutation probabilities of DE algorithm and better solution than the current solution i in Si1, update the
start to calculate the number of iterations of HCA & DE current solution and re-execute Step6, otherwise go to Step7.
algorithm, perform the regular DE mutation, crossover and Step7:Execute insert-swap crossover operator to randomly
selection operations, update the current population solution select a city in an interval and randomly insert this sequence
and then select an city path solution set i from the current of cities into another position in the solution set to form the
population in a roulette wheel way, and then enter into the neighbor Si2 of the current solution, if there exists a solution
Hill-Climbing search algorithm, which first performs the 2- in Si2 that is better than the current solution i, then update the
opt algorithm to form the neighbors of the current solution, current solution and execute Step6, otherwise go to Step8.
then the 2-opt algorithm to form the neighbors of the current Step8:Perform 3-opt algorithm operation, randomly select
solution. opt algorithm to form the neighbor S of the current three cities at a time to form the neighbor Si3 of the current
solution, if the fitness of all the individuals in the current solution, if there exists a better solution than the current
neighbor S is lower than the fitness of the current optimal solution i in Si3, update the current solution and execute Step6,
solution, then enter insert-swap swap algorithm, if the fitness otherwise go to Step9.
of all the individuals in the neighbor of the current solution Step9:make g=g+1,if g<800 then go to Step2,otherwise it
formed by the insert-swap algorithm is lower than the fitness represents that the upper limit of iteration number of
of the current optimal solution, then enter the 3-opt algorithm, HCA&DE algorithm is reached at this time, end HCA&DE
and if it still can't replace the optimal solution, then the algorithm.
HCA&DE will be used. The current round of HCA&DE
algorithm ends, so that the number of HCA&DE iterations is 4. Experiment
increased by 1. If one of the solutions generated during the
The HCA&DE algorithm proposed in this paper is
execution of the three local search algorithms is better than
implemented in Codeblocks software using C++. In order to
the current optimal solution, the current optimal solution is
test the performance of the HCA&DE algorithm in solving
updated immediately and the search is restarted by jumping
the multi-starting-point MTSP problem and to compare the
to the 2-opt algorithm. The HCA&DE algorithm ends when
difference in performance between the HCA&DE algorithm
the upper limit of the HCA&DE algorithm iterations is
and the ordinary DE algorithm, we use the TSPLIB test
reached.
dataset and choose three city datasets with a large difference
3.2. HCA&DE Algorithm Design in the number of cities, for each test set, we set the number of
travel quotients as 4, 8, and 12, and set fixed starting points
Step1: Initialize HCA&DE parameters: set DE mutation
for each of them, after which the algorithm is run for testing.
probability 0.08, crossover probability 0.65, HCA&DE
In order to set the optimal HCA&DE algorithm parameters
algorithm iteration number upper limit is 800, Population size
for the multi-starting point MTSP problem, we utilize the
Pop_Size=500, make current HCA&DE iteration count
eil51 dataset, which has fewer cities and is relatively easy to
variable g=0, greedy initialization to generate initial
compute the optimal solution, for the parameter test, and
population P.
finally determine the optimal crossover probability parameter
Step2: Randomly select three solution sets from the current
for the DE algorithm to be 0.65, the variance probability to be
population, perform DE algorithm mutation operation to
0.08, the population size to be 500, and the upper limit of the
generate new city solution paths, and calculate the fitness of
iteration number of the HCA&DE algorithm to be 800.
the new solutions.
Table 1 gives the optimal paths generated by DE algorithm,
Step3: Select city solution sets from the current population
HCA algorithm and HCA&DE algorithm under the test of
and perform DE algorithm crossover operation with mutated
dataset with city size of 51,100,150. The data show that under
individuals to generate new city solution paths and calculate
the same parameter settings, HCA&DE is not only able to
the fitness of new solutions.
find a better path to the city solution set, but also the solution
Step4:Perform the DE algorithm selection operation,
differences are more stable than the ordinary DE algorithm
update the current population, and select an city solution set
and HCA algorithm, which proves that HCA&DE can jump
by the rule of “roulette”.
out of the localoptimum timely when the algorithm falls into
Step5:Start Hill-Climbing algorithm and select an initial
the local optimum, ensure the diversity of the population
solution i in the rule of “roulette”.
solution, and find the optimal solution with a greater
Step6:Execute 2-opt crossover algorithm, randomly select
probability.
two cities at a time, exchange their order in the solution set,
and form the neighbor Si1 of the current solution, if there is a
6
[2] YANG Hua, CHEN Yanhua, LI Hongyi. Automatic
5. Conclusion preparation method of contact network maintenance plan based
on multi-traveler problem[J]. Electrified Railway,2023,34(01):
In this paper, for the shortcomings of DE algorithm which 81-85.DOI:10.19587/j.cnki.1007-936x.2023.01.016.
is easy to fall into local optimization, the hill-climbing search [3] Liu Pin. Research based on two-stage heuristic algorithm for
algorithm is introduced to enhance the local search ability of multi-traveler problem[D].Northern-Nationalities-University,
DE algorithm, so that DE algorithm can jump out of the local 2024. DOI:10.27754/d.cnki.gbfmz.2024.000383.
optimization in time and obtain the optimal solution more
[4] Bao Cong.Research on Evolutionary Algorithms for Access-
efficiently. The experimental data proves that for the multi- Constrained Multi-Traveler Problem[D]. Nanjing University of
start MTSP problem, the results of the HCA&DE algorithm Information Engineering, 2023.DOI: 10.27248/ d.cnki. gnjqc.
proposed in this paper are proved to be better than the 2023.001033.
ordinary DE algorithm and the ordinary hill-climbing search
[5] H.R. Zhu. Research on Improving Monophilic Genetic
algorithm, and the probability of obtaining the optimal Algorithm to Solve Multi-TravelerProblem[D]. West-China-
solution is larger, which proves that the HCA&DE algorithm NormalUniversity,2023.DOI:10.27859/d.cnki.gxhsf.2023.000
combines the local search ability of the HCA algorithm and 111.
the global search ability of the DE algorithm, and proves the
[6] Dong Yafei. Optimization study of two classes of complex
effectiveness of the HCA&DE algorithm. However, the time multi-traveler problems based on evolutionary algorithms[D].
complexity of HCA&DE algorithm is larger, and with the Chongqing University, 2022.DOI: 10.27670/ d.cnki. gcqdu.
increase of city scale, the time complexity of HCA&DE 2022.002674.
algorithm needs to be further improved.
[7] SUN Bing, WANG Chuan, YANG Qiang, et al. Evolutionary
algorithms for the multiple starting point equilibrium multi-
Acknowledgments traveler problem[J]. Computer Engineering and Design, 2023,
44(07):2030-2038.DOI:10.16208/j.issn1000-7024.
This work it was supported by National College Students'
2023.07.015.
innovation and entrepreneurship training program project
(No. ???).
References
[1] Zhao Xiaoqiang,Tuo Mingfu. An applied study of task
planning problem based on multi-traveler problem model for
solving workload equalization[J]. Internet of Things
Technology, 2024,14(07): 84-89.DOI:10.16667/j.issn.2095-
1302. 2024.07.022.