Ant Colony Optimization (ACO) has been successfully applied to solve a wide range of combinatorial optimization problems such as minimum spanning tree, traveling salesman problem, and quadratic assignment problem. Basic ACO has drawbacks of trapping into local minimum and low convergence rate. Simulated annealing (SA) and mutation operator have the jumping ability and global convergence; and local search has the ability to speed up the convergence. Therefore, this paper proposed a hybrid ACO algorithm integrating the advantages of ACO, SA, mutation operator, and local search procedure to solve the traveling salesman problem. The core of algorithm is based on the ACO. SA and mutation operator were used to increase the ants population diversity from time to time and the local search was used to exploit the current search area efficiently. The comparative experiments, using 24 TSP instances from TSPLIB, show that the proposed algorithm outperformed some well-known algorithms in the literature in terms of solution quality.
One of the most popular combinatorial optimization problems is the traveling salesman problem (TSP) [
Metaheuristic algorithms are formally defined as algorithms that inspired by nature and biological behaviors. They produce high-quality solutions by applying a robust iterative generation process for exploring and exploiting the search space efficiently and effectively. Recently, metaheuristic algorithms seem to be a hot and promising research areas [
Metaheuristic algorithms such as genetic algorithms (GAs) [
In applying standalone metaheuristic algorithms, there is possibility of losing the diversity of the population through premature convergence and thus the algorithm gets stuck in local optima. Therefore, maintaining the diversity and making tradeoff between diversification and intensification by combining two or more algorithms to produce high-quality solutions and speed up the execution time is indispensable [
For hybrid ACO, the earliest study was conducted by McKendall and Shang [
As noted above, previous studies show that ACO still has drawbacks. The performance of these studies was dramatically decreased when dealing with large-scale instances. To the best of my knowledge, no research has been done to hybridize elitist ant system with SA, mutation, and local search. Therefore, in this research a new hybrid elitist ant system with SA, mutation operator, and local search procedure is introduced for solving TSP. Introducing SA can help ACO to escape from the local optima. On the other hand, determining initial solution of SA is almost difficult. Therefore, the use of the ACO is useful in the generation of SA initial solution. While introducing the mutation operation to ACO algorithm will enhance the algorithm performance, expand the diversity of population, and inhibit the premature convergence. Applying either SA or mutation is based on the diversity level of the population. After applying SA or mutation, elitist ant system goes through a local search procedure to speed up the convergence.
The rest of the paper is structured as follows. Section
TSP is an active field of research in computer science. It demonstrates all the aspects of combinatorial optimization and comes under the set of NP-hard problems which cannot be solved optimally in a polynomial time [
TSP is represented as a connected graph
An overview of the ACO, SA, mutation operator, and the proposed algorithm is presented in the following subsections.
ACO is a population-based metaheuristic algorithm which was inspired by the foraging behavior of the real ants when searching for the shortest path from the food source to their nest. Analogically, the artificial ants search for good solutions iteratively in several generation. In each generation, every ant constructs its feasible solution path step by step guided by a transition rule that is a function of artificial pheromone and distance between two cities (heuristic information) [
TSP is identical to the foraging behaviors of real ants in nature. Therefore, applying ant colony optimization to solve TSP will be very simple. Equation (
In the dynamic evaluation, two pheromone update rules are used to calculate the amount of pheromone on each edge between cities. The first rule is called the local update rule as shown in
The pseudocode of the basic ACO is illustrated in Algorithm
(1) (2) (3) (4) (5) (6) Candidates (7) (8) (9) (10) (11) (12) (13) (14) Candidates (15) (16) DecayPheromone (Pheromone, (17) (18) UpdatePheromone (Pheromone, (19) (20) (21) (22)
SA is a trajectory-based optimization technique. It is basically an iterative improvement strategy with a criterion that accepts higher cost configurations sometimes. The first attempt to apply SA for solving the combinatorial optimization problems was in the 80s of the last century [
The original Metropolis acceptance criterion was that the initial state of a thermodynamic system was chosen at energy
(1) Simulated_Annealing( ) (2) (3) Solution = InitialSolution; (4) Cost = Evaluate(Solution); (5) Temperature = InitialTemperature; (6) (7) NewSolution = Mutate(Solution); (8) NewCost = Evaluate(NewSolution); (9) (10) (11) Cost = NewCost; (12) Solution = NewSolution; (13) (14) Temperature = codling rate (15) (16) return the best solution; (17)
Mutation operator is inspired from the evolutionary algorithms in which each ant in the population will be given the chance to be altered based on a predefined probability. This operator may help the ant colony algorithm to explore new areas in the search space. It can be applied by randomly exchanging the position of two cities in the tour which leads to generate a new solution that is not very far from the original one. Algorithm
(1) (2) random as (3) (4) (5) (6) (7) (8) (9) (10) (11)
In this section, a new algorithm called annealing elitist ant system with mutation operator and local search for solving the traveling salesman problem is introduced. Given
After the initial stage mentioned above, each ant in the population builds its tour by applying the transition rule followed by the local pheromone update rule:
Calculate the route cost of each ant. After that, apply the global pheromone update rule in which the amount of pheromone is added to the best route which has the lowest cost. This rule is defined in (
Calculate the diversity of the population. If the diversity is high, the algorithm needs intensification by applying SA. Otherwise, the algorithm needs to regain the diversity by applying the mutation operator.
Apply the local search procedure for further enhancement.
Again, apply the global pheromone update rule according to (
If the termination condition is satisfied, then return the best route with its length. Otherwise, go to Step
The flowchart of the proposed method algorithm.
The experimental results to examine the validity and the performance of the proposed algorithm were introduced in this section. The experiments were conducted using 24 TSP standard benchmark problems, with different length, from TSPLIB [
As in other metaheuristic algorithms, the quality of the solutions created by the proposed algorithm was affected largely by the different values of the parameters. Thus, a number of different alternative values were examined to tune the parameters of the proposed algorithm. Table
Parameter setting of the proposed algorithm.
Proposed algorithm parameters | Tested values | Optimum value |
---|---|---|
| 1 | 1 |
| 1 | 5 |
| 0.01 | 0.1 |
| 0.01 | 0.05 |
Number of ants | 25 | 25 |
| 50 100 | 100 |
SA Temp. | 100 1000 | 1000 |
SA Alpha | 0.5 | 0.99 |
Mutation rate | 0.001 | 0.1 |
All of the instances included in TSPLIB have already been examined in the literature and their optimality results can be used to compare algorithms according to the best and the average values. Different instances with different size were selected. These instances can be classified into three groups based on their lengths. The first group is the smallest group which includes 8 instances varying in length between 51 and 100 cities. The second is the medium group which includes 10 instances varying in length between 101 and 318 cities. The third is the large-scale group which includes 5 instances with length between 575 and 1655 cities. Therefore, the results were collected after conducting the experiments 10 times for each instance and took the best results, the average results, and the standard deviation for comparison with previous work. Two different experiments were conducted for the evaluation. Both of them were configured according to the parameters setting as shown in Table
In the first experiment, the proposed algorithm was compared with the basic elitist ant system algorithm (EAS). Six evaluation measures were used to evaluate both algorithms. These measures are best solution, worst solution, average solution, standard deviation, number of iterations, and running time of algorithms. Table
Results obtained by the EAS and the proposed algorithm for the test problems according to the best solution, worst solution, average solution, standard deviation, number of iterations, and running time of algorithms.
Instance | Opt. | Method | Best | Worst | Average | Std. dev. | Iteration | Time (s) |
---|---|---|---|---|---|---|---|---|
eil51 | 426 | EAS | 430 | 474 | 442.3 | 14.38 | 999 | 0.01 |
Proposed | | | | | | | ||
eil76 | 538 | EAS | 547 | 653 | 563.9 | 13.25 | 999 | 0.02 |
Proposed | | | | | | | ||
eil101 | 629 | EAS | 661 | 778 | 677.1 | 9.27 | 999 | 0.04 |
Proposed | | | | | | | ||
berlin52 | 7542 | EAS | 7633 | 10674 | 7816.9 | 141.35 | 999 | 0.01 |
Proposed | | | | | | | ||
bier127 | 118282 | EAS | 121978 | 151016 | 125064.1 | 1866.12 | 999 | 0.07 |
Proposed | | | | | | | ||
ch130 | 6110 | EAS | 6386 | 7757 | 6515.3 | 83.80 | 999 | 0.07 |
Proposed | | | | | | | ||
ch150 | 6528 | EAS | 6734 | 7771 | 6865.5 | 101.49 | 999 | 0.07 |
Proposed | | | | | | | ||
rd100 | 7910 | EAS | 8240 | 10161 | 8422.2 | 151.46 | 999 | 0.04 |
Proposed | | | | | | | ||
lin105 | 14379 | EAS | 14756 | 18010 | 15102.3 | 278.80 | 999 | 0.02 |
Proposed | | | | | | | ||
lin318 | 42029 | EAS | 44981 | 58151 | 46293.6 | 917.35 | 999 | 1.42 |
Proposed | | | | | | | ||
kroA100 | 21282 | EAS | 22085 | 29227 | 22603.8 | 450.09 | 999 | 0.04 |
Proposed | | | | | | | ||
kroA150 | 26524 | EAS | 27560 | 31282 | 28370 | 504.96 | 999 | 0.12 |
Proposed | | | | | | | ||
kroA200 | 29368 | EAS | 31499 | 41604 | 31886.1 | 249.14 | 999 | 0.11 |
Proposed | | | | | | | ||
krob100 | 22141 | EAS | 22652 | 27908 | 23134.8 | 281.92 | 999 | 0.04 |
Proposed | | | | | | | ||
krob150 | 26130 | EAS | 27248 | 34550 | 28099.5 | 512.53 | 999 | 0.14 |
Proposed | | | | | | | ||
krob200 | 29437 | EAS | 31054 | 38684 | 32019 | 559.76 | 999 | 0.23 |
Proposed | | | | | | | ||
kroc100 | 20749 | EAS | 21194 | 22485 | 21777.8 | 348.02 | 999 | 0.03 |
Proposed | | | | | | | ||
krod100 | 21294 | EAS | 22205 | 29101 | 22872.5 | 457.97 | 999 | 0.03 |
Proposed | | | | | | | ||
kroe100 | 22068 | EAS | 22699 | 31216 | 23460.4 | 486.84 | 999 | 0.07 |
Proposed | | | | | | | ||
rat575 | 6773 | EAS | 7365 | 8398 | 7436.6 | 72.57 | 999 | 9.11 |
Proposed | | | | | | | ||
rat785 | 8806 | EAS | 9706 | 12596 | 9860.8 | 128.84 | 999 | 26.79 |
Proposed | | | | | | | ||
rl1323 | 270199 | EAS | 297599 | 392473 | 304626.9 | 5122.59 | 999 | 110.29 |
Proposed | | | | | | | ||
fl1400 | 20127 | EAS | 22432 | 43829 | 23669.5 | 820.80 | 999 | 93.12 |
Proposed | | | | | | | ||
d1655 | 62128 | EAS | 68182 | 92988 | 71629.3 | 1905.70 | 999 | 33.58 |
Proposed | | | | | | |
Figure
The performance of the proposed algorithm with three TSP instances representing short, medium, and large instances.
kroB200
lin318
rl1323
Figure
Figure
Figure
In the second experiment, the proposed algorithm was compared with four state-of-the-art metaheuristic algorithms: Chen and Chien [
A comparison of the proposed algorithm with Chen and Chien [
Instance | Opt. | Method | Best | Average | Std. dev. | | |
---|---|---|---|---|---|---|---|
eil51 | 426 | Proposed algorithm | | | | | |
Chen and Chien [ | 427 | 427.27 | 0.450 | 0.235 | 0.298 | ||
Wang et al. [ | | | N/A | | | ||
eil76 | 538 | Proposed algorithm | | | | | |
Chen and Chien [ | | 540.2 | 2.940 | | 0.409 | ||
Wang et al. [ | | | N/A | | | ||
eil101 | 629 | Proposed algorithm | | | | | |
Chen and Chien [ | 630 | 635.23 | 3.590 | 0.159 | 0.990 | ||
Wang et al. [ | | | N/A | | | ||
berlin52 | 7542 | Proposed algorithm | | | | | |
Chen and Chien [ | | | | | | ||
Wang et al. [ | | | N/A | | | ||
bier127 | 118282 | Proposed algorithm | | | | | |
Chen and Chien [ | | 119421.8 | 580.830 | | 0.964 | ||
Wang et al. [ | | | | | |||
ch130 | 6110 | Proposed algorithm | | | | | |
Chen and Chien [ | 6141 | 6205.63 | 43.700 | 0.507 | 1.565 | ||
Wang et al. [ | | 6112.4 | | 0.039 | |||
ch150 | 6528 | Proposed algorithm | | | | | |
Chen and Chien [ | | 6563.7 | 22.450 | | 0.547 | ||
Wang et al. [ | | 6531.84 | N/A | | 0.059 | ||
rd100 | 7910 | Proposed algorithm | | | 0.000 | | |
Chen and Chien [ | | 7987.57 | 62.060 | | 0.981 | ||
Wang et al. [ | | | N/A | | | ||
lin105 | 14379 | Proposed algorithm | | | | | |
Chen and Chien [ | | 14406.37 | 37.280 | | 0.190 | ||
Wang et al. [ | | 14379 | N/A | | | ||
lin318 | 42029 | Proposed algorithm | | | | | |
Chen and Chien [ | 42487 | 43002.9 | 307.510 | 1.090 | 2.317 | ||
Wang et al. [ | 42081 | 42204.16 | N/A | 0.124 | 0.417 | ||
kroA100 | 21282 | Proposed algorithm | | | | | |
Chen and Chien [ | | 21370.47 | 123.360 | | 0.416 | ||
Wang et al. [ | | 21284.24 | N/A | | 0.011 | ||
kroA150 | 26524 | Proposed algorithm | | | | | |
Chen and Chien [ | | 26899.2 | 133.020 | | 1.415 | ||
Wang et al. [ | | 26528.12 | N/A | | 0.016 | ||
kroA200 | 29368 | Proposed algorithm | | | | | |
Chen and Chien [ | 29383 | 29738.73 | 356.070 | 0.051 | 1.262 | ||
Wang et al. [ | | 29374.84 | N/A | | 0.023 | ||
kroB100 | 22141 | Proposed algorithm | | | | | |
Chen and Chien [ | | 22282.87 | 183.990 | | 0.641 | ||
Wang et al. [ | | 22186.28 | N/A | | 0.205 | ||
kroB150 | 26130 | Proposed algorithm | | | | | |
Chen and Chien [ | | 26448.33 | 266.760 | | 1.218 | ||
Wang et al. [ | | 26133.2 | N/A | | 0.012 | ||
kroB200 | 29437 | Proposed algorithm | | | | | |
Chen and Chien [ | 29541 | 30035.23 | 357.480 | 0.353 | 2.032 | ||
Wang et al. [ | | 29439.64 | N/A | | 0.009 | ||
kroC100 | 20749 | Proposed algorithm | | | | | |
Chen and Chien [ | | 20878.97 | 158.640 | | 0.626 | ||
Wang et al. [ | | 20749 | N/A | | | ||
kroD100 | 21294 | Proposed algorithm | | | | | |
Chen and Chien [ | 21309 | 21620.47 | 226.600 | 0.070 | 1.533 | ||
Wang et al. [ | | 21297.2 | N/A | | 0.015 | ||
kroE100 | 22068 | Proposed algorithm | | | | | |
Chen and Chien [ | | 22183.47 | 103.320 | | 0.523 | ||
Wang et al. [ | | 22075.52 | N/A | | 0.034 | ||
rat575 | 6773 | Proposed algorithm | | | | | |
Chen and Chien [ | 6891 | 6933.87 | 27.620 | 1.742 | 2.375 | ||
Wang et al. [ | 6807 | 6830.88 | N/A | 0.502 | 0.855 | ||
rat783 | 8806 | Proposed algorithm | | | | | |
Chen and Chien [ | 8988 | 9079.23 | 52.690 | 2.067 | 3.103 | ||
Wang et al. [ | 8859 | 8877.92 | N/A | 0.602 | 0.817 | ||
rl1323 | 270199 | Proposed algorithm | | | | | |
Chen and Chien [ | 277642 | 280181.5 | 1761.660 | 2.755 | 3.694 | ||
Wang et al. [ | 270919 | 271481.6 | N/A | 0.266 | 0.475 | ||
fl1400 | 20127 | Proposed algorithm | | | | | |
Chen and Chien [ | 20593 | 21349.63 | 527.880 | 2.315 | 6.075 | ||
Wang et al. [ | 20314 | 20428.48 | N/A | 0.929 | 1.498 | ||
d1655 | 62128 | Proposed algorithm | | | | | |
Chen and Chien [ | 64151 | 65621.13 | 1031.940 | 3.256 | 5.622 | ||
Wang et al. [ | 62463 | 62670.52 | N/A | 0.539 | 0.873 |
A comparison of the proposed algorithm with Yousefikhoshbakht et al. [
Instance | Opt. | Method | Best | Average | Std. dev. | | |
---|---|---|---|---|---|---|---|
eil51 | 426 | Proposed algorithm | | | | | |
Yousefikhoshbakht et al. [ | | N/A | N/A | 0.000 | N/A | ||
Mahi et al. [ | N/A | 426.45 | 0.610 | N/A | 0.106 | ||
eil76 | 538 | Proposed algorithm | | | | | |
Yousefikhoshbakht et al. [ | | N/A | N/A | | N/A | ||
Mahi et al. [ | N/A | 538.3 | 0.470 | N/A | 0.056 | ||
eil101 | 629 | Proposed algorithm | | | | | |
Yousefikhoshbakht et al. [ | | N/A | N/A | 0.000 | N/A | ||
Mahi et al. [ | N/A | 632.7 | 2.120 | N/A | 0.588 | ||
berlin52 | 7542 | Proposed algorithm | | | | | |
Yousefikhoshbakht et al. [ | | N/A | N/A | 0.000 | N/A | ||
Mahi et al. [ | N/A | 7543.2 | 2.370 | N/A | 0.016 | ||
ch150 | 6528 | Proposed algorithm | | | | | |
Mahi et al. [ | N/A | 6563.95 | 27.580 | N/A | 0.551 | ||
lin105 | 14379 | Proposed algorithm | | | | | |
Yousefikhoshbakht et al. [ | | N/A | N/A | | N/A | ||
Mahi et al. [ | N/A | 14379.15 | 0.480 | N/A | 0.001 | ||
lin318 | 42029 | Proposed algorithm | | | | | |
Yousefikhoshbakht et al. [ | 42543 | N/A | N/A | 1.223 | N/A | ||
kroA100 | 21282 | Proposed algorithm | | | | | |
Yousefikhoshbakht et al. [ | | N/A | N/A | | N/A | ||
Mahi et al. [ | N/A | 21445.1 | 78.240 | N/A | 0.766 | ||
kroA150 | 26524 | Proposed algorithm | | | | | |
Yousefikhoshbakht et al. [ | 26611 | N/A | N/A | 0.328 | N/A | ||
kroA200 | 29368 | Proposed algorithm | | | | | |
Yousefikhoshbakht et al. [ | | N/A | N/A | | N/A | ||
Mahi et al. [ | N/A | 29646.05 | 114.710 | N/A | 0.947 | ||
kroB100 | 22141 | Proposed algorithm | | | | | |
Yousefikhoshbakht et al. [ | | N/A | N/A | | N/A | ||
kroB150 | 26130 | Proposed algorithm | | | | | |
Yousefikhoshbakht et al. [ | 26202 | N/A | N/A | 0.276 | N/A | ||
kroB200 | 29437 | Proposed algorithm | | | | | |
Yousefikhoshbakht et al. [ | 29509 | N/A | N/A | 0.245 | N/A | ||
kroC100 | 20749 | Proposed algorithm | | | | | |
Yousefikhoshbakht et al. [ | 20754 | N/A | N/A | 0.024 | N/A | ||
kroD100 | 21294 | Proposed algorithm | | | | | |
Yousefikhoshbakht et al. [ | 21335 | N/A | N/A | 0.193 | N/A | ||
kroE100 | 22068 | Proposed algorithm | | | | | |
Yousefikhoshbakht et al. [ | | N/A | N/A | | N/A |
Percentage deviations of the average solution to the best known solution of the large-scale TSP instances for the proposed algorithm and the other algorithms.
In Tables
In Table
In Table
Figure
In summary, numerical results show that the proposed algorithm was effective. It was able to solve small and large size instances better than the existing algorithms. This is because of the proposed algorithm capability of searching the optimal solution until the last iterations without stagnation or premature convergence, especially for the medium and large TSP instances, compared to the other algorithms. In general, the results indicate that the structure of the proposed algorithm, which depends on the concepts of embedding simulated annealing, mutation operation, and local search procedure, achieved the balance between diversification and intensification and enabled algorithm to escape from local optima and speed up the convergence. These gave the proposed algorithm the superiority over the other algorithms in reaching the suboptimal/optimal solutions for TSP problems.
In this paper, a new hybridized metaheuristic algorithm, called annealing elitist ant system with mutation operator for traveling salesman problem, has been introduced. Experiments were conducted using 24 data sets obtained from the TSPLIB and the experimental findings of the proposed algorithm were compared with different state-of-the-art algorithms. The results illustrate that the proposed algorithm outperforms other algorithms and has smaller percentage deviations in comparison to Chen and Chien [
The author declares that they have no competing interests.
The author would like to thank Dr. Waleed Mohammed Abdullah Ahmed for his quick and precise proofreading of this paper.