Next Article in Journal
Common Fixed Points Theorems for Self-Mappings in Menger PM-Spaces
Previous Article in Journal
A Stacking Learning Model Based on Multiple Similar Days for Short-Term Load Forecasting
Order Article Reprints
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:

Visibility Adaptation in Ant Colony Optimization for Solving Traveling Salesman Problem

Department of Computer Science and Engineering, Khulna University of Engineering & Technology, Khulna 9203, Bangladesh
Graduate School of Science and Technology, Gunma University, Kiryu 376-8515, Japan
Authors to whom correspondence should be addressed.
Mathematics 2022, 10(14), 2448;
Received: 8 June 2022 / Revised: 7 July 2022 / Accepted: 11 July 2022 / Published: 13 July 2022
(This article belongs to the Topic Soft Computing)


Ant Colony Optimization (ACO) is a practical and well-studied bio-inspired algorithm to generate feasible solutions for combinatorial optimization problems such as the Traveling Salesman Problem (TSP). ACO is inspired by the foraging behavior of ants, where an ant selects the next city to visit according to the pheromone on the trail and the visibility heuristic (inverse of distance). ACO assigns higher heuristic desirability to the nearest city without considering the issue of returning to the initial city or starting point once all the cities are visited. This study proposes an improved ACO-based method, called ACO with Adaptive Visibility (ACOAV), which intelligently adopts a generalized formula of the visibility heuristic associated with the final destination city. ACOAV uses a new distance metric that includes proximity and eventual destination to select the next city. Including the destination in the metric reduces the tour cost because such adaptation helps to avoid using longer links while returning to the starting city. In addition, partial updates of individual solutions and 3-Opt local search operations are incorporated in the proposed ACOAV. ACOAV is evaluated on a suite of 35 benchmark TSP instances and rigorously compared with ACO. ACOAV generates better solutions for TSPs than ACO, while taking less computational time; such twofold achievements indicate the proficiency of the individual adoption techniques in ACOAV, especially in AV and partial solution update. The performance of ACOAV is also compared with the other ten state-of-the-art bio-inspired methods, including several ACO-based methods. From these evaluations, ACOAV is found as the best one for 29 TSP instances out of 35 instances; among those, optimal solutions have been achieved in 22 instances. Moreover, statistical tests comparing the performance revealed the significance of the proposed ACOAV over the considered bio-inspired methods.

1. Introduction

The Traveling Salesman Problem (TSP) is one of the challenging combinatorial optimization problems that attracted the bio-inspired research community. TSP falls in the class of combinatorial optimization problems with various practical applications [1]. In TSP, a traveler visits a set of cities and finally returns to the initial city, making a closed-loop tour [2]. A TSP instance contains a list of cities having geographical coordinates (i.e., x and y) of individual ones. The distance between two cities is generally the Euclidean distance, and tour cost is the total distance to be passed by the traveler for visiting all the cities [3,4]. The problem is to complete the tour with minimum cost. Due to the importance of optimal route generation issues in many real-life applications (e.g., vehicle routing problem, task scheduling, and logistics), TSP is the most studied optimization task.
Various techniques and methods have been investigated to solve TSP in the last few decades; among those, bio-inspired swarm intelligence (SI) based methods are the most popular ones. In SI, Ant Colony Optimization (ACO) is the pioneer method to solve TSP [5,6]. Later, Artificial Bee Colony (ABC) [7], Particle Swarm Optimization (PSO) [8], Cuckoo Search (CS) [9], and other SIs are used to solve TSP. An SI algorithm starts with an initial population, and then knowledge from different agents (i.e., members) is utilized to build a better solution. Recently, several ACO-based improved methods with modifications in individual ACO components have been investigated to solve TSP [10,11,12,13]. In [11], a parallel cooperative ACO (PACO) is proposed by splitting the ants into several groups to form multiple independent ant colonies. Each colony shares its best solution with the others to generate the overall best solution. The heterogeneous adaptive ACO (HAACO) [10] initializes the control parameters and employs the elitism method to replace the worst ant with the child of the best ant. In [13], a dynamic evaporation strategy of pheromone is adopted to enhance ACO, called DEACO, which clusters the cities and intelligently chooses the first city to find the shortest path. In addition, several hybrid methods by integrating ACO with other SI methods have also been proposed recently [14,15,16].
This study investigates an efficient bio-inspired ACO method, incorporating a new heuristic function and solution updating strategy with the conventional ACO for solving TSPs. In ACO, an ant selects the next city to visit according to the pheromone trail and the visibility heuristic [17]. ACO assigns a higher visibility heuristic to the nearest city without considering returning to the initial city or destination. Few studies identified that choosing the nearest city is not always a good decision [18,19]. A common scenario of ACO is that it got stuck to local optima, and its convergence speed is low [20]. Considering the above-mentioned issues regarding conventional ACO, a new ACO-based method is proposed in this study, adopting transition rules emphasizing distance to the returning city. Notably, recent ACO-based studies [10,11,12,14], focused on various issues without considering such an important feature that the ants have to return to the initial city. In the proposed ACO with adaptive visibility (ACOAV) method, partial updates of individual solutions and the 3-Opt algorithm are adopted to achieve better performance. The proposed method is tested on a set of benchmark TSPs, and it outperformed ACO and some other recent methods. The research contributions of adaptive visibility formulation and partial updating of individual solutions made the proposed ACOAV an effective TSP solving method.
The remaining paper is organized into four sections. Section 2 presents TSP basics and reviews recent methods to solve it. Section 3 describes the proposed method, including the formulation of the visibility heuristic function. Experimental results and performance comparison are provided in Section 4. Section 5 discusses major contributions and main achievements briefly. Finally, Section 6 gives a brief conclusion of the present study and directions for further work.

2. TSP and Recent Methods to Solve It

This section describes the traveling salesman problem (TSP) with its mathematical formulation and its importance. Next, a brief review of recent prominent TSP solving methods, including ACO-based techniques and other bio-inspired methods, is provided.

2.1. TSP and Its Importance

TSP is the problem of visiting a set of cities and returning to the initial city with the minimum cost. TSP can be represented by a complete weighted graph, G = (V, E); vertex set V = { v 1 ,   v 2 ,   v 3 ,   ,   v N }, here vertex v i represents the ith city; edge set E = {( v i ,   v j ) | 1 ≤ i, jN and ij}, where N is the number of vertices, and each edge represents the direct link between the cities v i and v j . Distance between two cities s and l is calculated using the following Euclidean distance formula.
d s l   = ( x s x l ) 2 + ( y s y l ) 2
Suppose, C = { c 1 ,   c 2 ,   c 3 ,   ,   c N ,   c 1 } is a complete solution for a TSP of N cities, where c i V, 1 ≤ iN. C is the order the traveler visits cities. Visiting each city exactly once and returning to the starting city makes a Hamiltonian loop in the graph. The sum of the distance of the edges used by the traveler is the total cost of the tour:
f ( c ) = i = 1 N 1 d c i c i + 1   +   d c N c 1 .
TSP aims to complete the tour with minimum cost (i.e., the lowest value of Equation (2)). Therefore, the main task of TSP is to choose the city order to visit that gives a minimum tour length. In other words, TSP belongs to the class of combinatorial optimization problems to select N appropriate edges from N(N − 1)/2 edges to complete the tour optimally with the minimum cost [2].
The significance of TSP is that it represents many practical applications [1]; a method for TSP may also be applied for solving other optimization problems [2]. It has practical applications in the traveling purchaser problem, vehicle routing problem [21], cellular manufacturing, frequency assignment problem, circuit wiring, clustering, job-shop scheduling, etc. [1,22]. The TSP model is also applicable in different cases such as X-ray crystallography, overhauling gas turbine engines, warehouse order-picking problems, data analysis in psychology, and wallpaper cutting [22]. TSP is intensively studied in theoretical computer science, operations research, and engineering [13,22]. TSPs are NP-hard and cannot be solved in polynomial time [2]. However, several metaheuristic methods, including SI methods, have been developed to handle TSP effectively.

2.2. Solving TSP with ACO and Its Updated Models

Ant colony optimization (ACO) is a pioneer SI method to solve TSP. ACO is developed based on the natural ants foraging for food interacting through deposited pheromone on the paths. In ACO, an ant selects the order of the cities according to a probability function considering pheromone level and distances between individual cities. Two control parameters α and β in ACO regulate the pheromone and visibility, respectively, to select an edge. A brief description of ACO is available in the coming section before presenting the proposed model. However, at a glance, the intensity of pheromone increases on the edges that are visited mostly by the ants, and finally, tours of individual ants converge to a single tour path. Though ACO discovers good solutions rapidly, it can easily be trapped into local optima [13]. Several studies investigated to increase searching diversity and overcome other limitations of ACO [23]. Some recently proposed modified ACO on solving TSP are discussed below.
The heterogeneous adaptive ACO (HAACO) method [10] adaptively initializes the control parameters (i.e., α and β) of the conventional ACO, resulting in homogenous behavior for early iterations and heterogeneous behavior at later iterations exhibited by ants. Ants give a higher preference towards the heuristic value (e.g., β = 10) over the pheromone trail (e.g., α = 0) at the initial phase. HAACO ensures retaining the fittest individual in the population through an elitism mechanism where the best ant undergoes mutation, and the offspring replaces the worst ant. Both uniform and Gaussian mutation operators are investigated and Gaussian mutation showed better performance than uniform mutation. It also considered the 3-Opt local search method to improve individual solutions. These mechanisms explore the search space and prevent converging to local optima.
The dynamic pheromone evaporation (DPE) strategy is adopted with ACO in [13] to propose DEACO. Dynamic pheromone effectiveness and dynamic pheromone convergence speed parameters are introduced for DPE; thus, the evaporation rate changes dynamically over iterations. Such a dynamic evaporation rate prevents premature convergence and reinforces search space discovery. DEACO considers a new objective function to determine the worth of the solutions, which can also be used for heuristic value calculation when the tour is incomplete. It also chooses the first city to find the better solution using a clustering method.
The parallel cooperative ACO (PACO) [11] operates multiple ant colonies in parallel and shares the local best and global best tours with other colonies to determine the globally optimum tour. PACO fragments the population of ants into subpopulations to mitigate the premature stagnation problem of the conventional single colony in the ACO algorithm. Every colony exchanges information in a master-slave paradigm, and the greedy information swap shows better performance over the other strategies. A best-fit mitigation interval is chosen through experiments to specify how often colonies exchange information. Each colony employs the 3-Opt algorithm after a fixed number of iterations to improve itself. This process stops on a pre-specified termination condition and returns the global best tour.
In the hybrid PSO-ACO method [14], PSO is used to optimize the control parameters. Initially, a small amount of pheromone is deposited on every edge, considering the number of ants and the number of cities. Ants complete their first tours considering only the visibility heuristic value. PSO considers ACO parameters to encode particles, and parameter values of individual ants are used to initialize the particles. After PSO operations, optimal parameters are sent to ACO for further actions, i.e., update pheromone. After the termination of hybrid operations of ACO and PSO, the 3-Opt algorithm is used to update the individual solutions. Some other recent hybrid methods integrating ACO with other metaheuristic methods are Slime Mold-Ant Colony Fusion Algorithm [24], ACO with Levy Flight [15], Density Peaks Clustering and ACO with K-Opt algorithm [16], Coordinating PSO, ACO, and K-Opt [25], ACO-based Memetic Algorithm with local search [26], and ACO with Immigrants Schemes [23].

2.3. Solving TSP with Other Prominent Bio-Inspired Methods

Similar to ACO, several bio-inspired algorithms are found efficient in solving TSP. Individual bio-inspired optimization algorithms are developed mimicking actions, interactions, or survivals of natural or living organisms. Among those, group behavior of swarm or natural organisms (such as bees, lions, spider monkeys, fish, cuckoos, etc.) is well studied to develop different Swarm Intelligent (SI) algorithms for different optimization tasks, including TSP [7,9,27,28,29]. This section briefly describes several prominent bio-inspired algorithms for solving TSP.
The Artificial Bee Colony (ABC) algorithm [30] is a well-known method for continuous optimization (e.g., function optimization), and Swap Sequence-based ABC (SSABC) [31] incorporates different types of swap operations and a 3-Opt algorithm to tackle TSP efficiently. The SSABC considered a group of eight different rules, and one is chosen based on the proposed probability mechanism to perform a swap operation for interaction among individual bees. There are three different functional bee types (i.e., employed, onlooker, and scout bees). Bees use the roulette wheel technique to select a rule and update the solution. 3-Opt algorithm is applied on stagnant solution i.e., not improved for a number of iterations.
Lion Swarm Optimization (LSO) is inspired by lion hunting behavior and its discrete version, called discrete LSO (DLSO) [32], is a recent algorithm for TSP. In DSLO, each lion represents an individual solution by discrete coding of TSP, and it uses a proposed order crossover mechanism for movement. DLSO divides the swarm into three categories (i.e., lion king, lioness, and lion cubs) and operates in parallel. A ring topology is used in DLSO to transfer relevant information. A complete 2-Opt (C2-Opt) local search is incorporated in DLSO to improve individual solutions.
Spider Monkey Optimization (SMO) is based on the Fission-Fusion style movement of spider monkeys during their food searching, and the Discrete SMO (DSMO) [33] is the modified one for TSP. Every spider monkey is assigned an initial random solution, and monkeys do different types of interactions to upgrade the solution quality. The monkey population is split into subgroups, and the monkey with the best solutions in the group is known as the local leader, and the monkey containing the overall best solution is the global leader. In six stages, spider monkeys continue to search for better food sources, i.e., TSP solutions.
Discrete Symbiotic Organisms Search (DSOS) [34] algorithm extends the continuous SOS algorithm for TSP. The SOS algorithm is a population-based metaheuristic inspired by the symbiotic interactions among different organisms in nature. In the initial phase, random organisms (i.e., solutions) are created in the ecosystem, and these organisms are adapted through different symbiosis strategies to increase fitness and chances of survival. Symbiosis is performed in three phases: mutualism, commensalism, and parasitism phases. A transformation methodology is proposed to generate a neighbor state by randomly swapping, inserting, and inverting the order of two cities.
A hybrid algorithm combining genetic algorithm (GA), multiagent reinforcement learning (MARL) heuristic, and nearest insertion into the convex hull (NICH) local search is investigated for TSP in [35]. The primary tour is constructed using the MARL algorithm, and some of the best solutions are given to the GA. GA improves the solutions by using varieties of crossover and mutation operators. Then the tours further improved using 2-Opt and NICH local search algorithms. Creating a convex hull for a partial tour, NICH manipulates the cities of the partial tour and the rest of the tour by the nearest insertion method.
Some other recent bio-inspired algorithms for TSP are Velocity Tentative PSO (VTPSO) [8], Discrete Cat Swarm Optimization (DCSO) [36], Discrete Grey Wolf Optimizer (DGWO) [37], Discrete Cuckoo Search (DCS) algorithm [9], ABC algorithm with variable degree of perturbation [38], and Whale Optimization Algorithm (WOA) [39].

3. ACO with Adaptive Visibility (ACOAV) for TSP

This section first discusses conventional ACO [5,17] and draws attention to its visibility heuristic to update it for solving TSP more efficiently. Next, the proposed ACOAV with a new solution updating strategy is explained in detail.

3.1. Review of Conventional ACO

An ant colony consists of a group of ants where each ant uses a metaheuristic-based approach to build a solution for TSP individually. Ants maintain indirect interaction among themselves through the deposited pheromone on the accessed routes [40]. An ant selects the order of the cities according to a probability function based on the pheromone on the path and visibility heuristic value. All the ants continue this process until converging to a single path. The rules of transition (ants’ movement) and pheromone update are the key points in ACO.
In ACO, an ant on city s moves to city l according to the following probability function
P s l = τ s l α × η s l β m C i t i e s T o O r d e r τ s m α × η s m β ,
where CitiesToOrder is the list of the remaining cities to visit, τ s l is the pheromone value over the (s, l) edge, and n s l is visibility heuristic value between the nodes; parameters α and β are empirical variables for controlling importance toward pheromone trail and visibility heuristic values, respectively. The visibility between the nodes is the inverse of the distance.
n s l = 1 d s l ,
where d s l is the distance between city s and city l.
At every iteration, the pheromone trail is updated, considering individual solutions developed by the ants. Pheromone is deposited on the edges that the ant traveled. A part of the pheromone is ao considered to evaporate at a constant rate. The well-known pheromone trail updating formula [17] over the (s, l) edge is
τ s l = ( 1 ρ )   τ s l + i = 1 P o p S i z e Δ τ s l i ,
where ρ (0 < ρ < 1) is the pheromone trail evaporation rate, Δ τ s l i is the amount of the deposited pheromone by ant i, which is calculated as of Equation (6).
Δ τ s l i   =   { 1 L i ,   if   edge   ( s ,   l )   is   used   by   ant   i 0 ,     otherwise .
Here, L i is the tour cost of ant i using Equation (2).
In ACO, the visibility heuristic ( n s l ) used in Equation (3), simply inversing the distance ( d s l ) using Equation (4), has limitations in solving TSP. ACO assigns higher heuristic desirability to the nearest city without considering the issue of returning to the initial city or the origin of the tour. Once the last city is visited, it completes the TSP tour returning to the initial city. Pheromone updates on the most visited paths converge individual solutions into a single solution. However, an initial fixed amount of pheromone on all the paths motivates the individual ants to choose the nearest city, which might be different (divert) from the optimal tour. Thus, a common scenario of ACO is that it got stuck to local optima, and its convergence speed is low [20]. Therefore, a different visibility heuristic considering the target city might be more realistic to solve TSP by generating a better solution, which is the main motivation of this study.

3.2. Adaptive Visibility Integration to ACO for TSP

This section proposes a new visibility heuristic to alter the visibility heuristic in conventional ACO (i.e., Equation (4)). A partial solution updating strategy with the new heuristic is explained for better solution development. The 3-Opt algorithm is also explained briefly, which is employed to overcome the stagnation problem. The proposed method is a population-based method, and initialization is the first common issue in it, similarly to conventional ACO and other bio-inspired algorithms. The major steps of the proposed method are explained first, and then the complete process is summarized in an algorithm.

3.2.1. Population Initialization

ACOAV starts with an initial population similarly to conventional ACO. A small amount of pheromone is deposited on each link at this initialization stage. Values of other parameters (e.g., evaporation rate) are also assigned in this stage. Each ant is initialized by a random tour taking cities to visit randomly, each city exactly once, and returns to the starting city. Ants are assigned constant relative importance towards pheromone and visibility heuristic value. These initial tours are updated over the iterations.

3.2.2. Adaptive Visibility (AV) Heuristic and Formulation

The motivation for developing a new AV technique is easily understandable for a case of optimal path selection from the start/source to the destination. Suppose there are four cities (C1, C2, C3, and C4) in Figure 1, and an ant is in city C1 and its destination C4 visiting C2, C3. Distances between the cities for path options are assigned with city indexes. As an example, d 12 (=d21) is the distance between C1 and C2. The tour cost will be different on the visiting priority between C2 and C3. There are two tour options: C1-C2-C3-C4 having the tour cost ( d 12 + d 23 + d 34 ) and C1-C3-C2-C4 having tour costs ( d 13 + d 23 + d 24 ), which are shown in Figure 1b,c, respectively. Their tour cost difference is
Δ TC = ( d 12 + d 23 + d 34 ) ( d 13 + d 23 + d 24 ) = ( d 12 d 24 ) ( d 13 d 34 ) .
The above formulation can be generalized based on the distances of the intended city, l from the current city, s and destination city, e by the following equation of adaptive distance (ad)
adaptive distance, adsle = dsldle
Equation (7) can be rewritten using the adaptive distance of Equation (8) as
ΔTC = ad124ad134,
where ad124, ad134 are the adaptive distances of C2 and C3, considering C1 as the current city and C4 as the destination city. According to Equation (9), ΔTC < 0, i.e., ad124 < ad134 means the tour choosing C2 first (i.e., C1-C2-C3-C4) is better than the second one choosing C3 first (i.e., C1-C3-C2-C4). On the other hand, the second tour (choosing C3 first) is better than the first one if ΔTC > 0, i.e., ad124 > ad134. It concludes that choosing the city first with a lesser adaptive distance may lead to a shorter path. It is evident for producing the optimal tour that the next city should be selected considering an overall path distance regardless of the nearest issue. Thus, Equation (8) depicts an interesting hypothesis for choosing the next city, emphasizing the distance between the intended city and the destination city: prioritizing the city with a long distance from the destination city.
Figure 2 illustrates the proposed AV technique in solving a sample small-sized TSP problem compared with conventional ACO. Suppose there are five cities (C1, C2, C3, C4, and C5), and the distances between the cities are mentioned in the graph in Figure 2a. An ant in city C1 will visit C2, C3, C4, C5 and return to city C1. The tour cost will be different depending on the visiting priority between the cities. If the ant chooses the nearest city first, the path will be C1-C2-C5-C4-C3-C1; the total route distance is 2000 = (100 + 300 + 500 + 400 + 700) with ACO visibility without considering the destination (Figure 2b). Considering C1 is both the current and destination city at the beginning and with AV (Equation (8)), the adaptive distances for all the cities are zero, and we are taking C2 as the next city same as ACO, to understand further effects of AV. After traveling from C1, C2 becomes the current city, and the destination city C1 remains the same for all the stages. Now the adaptive distances for cities C3, C4, and C5 are −200, 0, and 100, respectively. So, AV selects city C3 to visit next for its less adaptive distance (Equation (8)) and C3 becomes the current city. At the next stage, the adaptive distances for the remaining cities C4 and C5 are −200 and 500, respectively. Therefore, C4 is the next city to be visited, and finally, C5 will be visited as the only unvisited one. Thus, the AV technique chooses cities C3, C4, and C5 successively, and the final tour path becomes C1-C2-C3-C4-C5-C1. Figure 2c shows the tour path with AV having the tour cost of 1700 (=100 + 500 + 400 + 500 + 200), which holds a lower cost than the previous path.
Based on the above demonstration in Figure 2, a generalized formula is developed for adaptive visibility. The AV formulation considers both the distances to the current city (s) and destination city (e) from the intended city (l). Based on distances d s l and d l e , the weighted adaptive distance f s l e based on Equation (8) is
f s l e = w 1 × d s l w 2 × d l e min k C i t i e s T o O r d e r ( w 1 × d s k w 2 × d k e ) + 1 ,
where w1 and w2 are weighting factors, denoting the respective importance of the distances on the scale from 0 to 1. Increasing w1 prioritizes the cities close to the current city, while increasing w2 prioritizes the cities far from the destination city. The first portion of Equation (10) is the simple extended version of Equation (8) employing weights w1 and w2, and it may produce a negative value that is not appropriate to place as a distance factor in calculating transition probability. The last portion of the equation ( min k C i t i e s T o O r d e r ( w 1 × d s k w 2 × d k e ) + 1 ) is added to map the values into a positive form while maintaining rationality and a 1 for the lowest value for any case, even though the first portion gives a negative value. Suppose, from the current location, three values of the first portion for their intended cities (i.e., CitiesToOrder) are −200, 0, and 100. Thus, min k C i t i e s T o O r d e r ( w 1 × d s k w 2 × d k e ) returns the minimum value among the three values, and it is −200. Therefore, outcomes of Equation (10) for the three intended cases are 1, 201, and 301, those are appropriate as well as distinguishable for distance measure. Finally, the adaptive visibility (AV) value n s l e is calculated by inversing f s l e as
n s l e = 1 f s l e .
Notably, the proposed weighted adaptive distance (Equation (10)) is a generalized case for distance calculation; for w1 = 1 and w2 = 0, AV is the same as ACO. In the proposed ACO with AV (ACOAV), transition probability, P s l e is calculated using the same probability function of ACO (Equation (3)) by putting deposited pheromone and adaptive visibility.
P s l e = τ s l α × η s l e β   m C i t i e s T o O r d e r τ s m α × η s m e β
Finally, the ant chooses the next city to visit that gets the highest probability value from Equation (12) as
n e x t c i t y = a r g m a x l : l C i t i e s T o O r d e r P s l e .

3.2.3. Partial Solution Update with AV

In each iteration, an ant in ACO updates its complete solution following Equation (13). ACOAV may also update the complete solution of individual ants, considering the starting city as the destination city. However, a portion of the tour is also possible to update; such a partial update is identified as an effective approach. In the partial update, the transition rule is applied for a selected portion of a tour by choosing two random numbers, r1 and r2 (1 ≤ r1, r2 ≤ NoOfCities), where cities at indexes r1 and r2 are considered as start and destination cities, respectively. For the transition rule with AV, an ant considers the start city as the current city CitiesToOrder contains the cities between r1 and r2 indexes. The current city is updated every time after visiting a city, CitiesToOrder is reduced by one until the ant reaches the destination city. In the case of r1 > r2, updating is performed considering a solution circularly, i.e., the update starts from r1, continues up to the end, and next continues from the starting to r2. The updated tour portion is deployed in the ant’s solution to ensure improvement with the partial update if an improvement is observed in the selected portion through the AV-based operation. For such a partial update, ACOAV keeps a copy of the last tour of the previous iteration to update a random portion of it. In contrast, conventional ACO does not use the last tour since it generates a complete tour [18].

3.2.4. 3-Opt Algorithm Adaptation

The K-Opt algorithm is one of the best local search algorithms and has been considered in several recent TSP studies [10,11,14]. The 3-Opt algorithm, a special case of the K-Opt algorithm where K = 3 [41], has been adopted in the proposed ACOAV. It removes three edges of a tour and makes three sub-tours. These sub-tours are reversed and positionally changed to generate a new tour. Three sub-tours can be reconnected in eight different combinations. Suppose a complete tour is divided into three segments A, B, C. A-B-C is the original tour, and the other 3-Opt movements are A-Br-C, A-B-Cr, A-Br-Cr, A-C-B, A-Cr-B, A-C-Br, A-Cr-Br, where Br and Cr are the reversed tours of B and C segments. The tour is updated according to the combination, which has the lowest cost [12]. Embedding the 3-Opt algorithm helps to overcome stagnation problems and increase searching capability.

3.3. ACOAV Algorithm

Figure 3 shows the flowchart for the proposed algorithm with major operational steps already explained in the previous section. Algorithm 1 shows the complete pseudocode of the proposed ACOAV for solving TSP as described above. In the algorithm, solution update (Line 6) is the most crucial step and is described separately in Algorithm 2. Specifically, the notable difference between ACOAV and ACO is the implication of the proposed AV in the partial solution update mode. The 3-OptOperation (Line 8) on the individual solution is also an additional operation with respect to ACO.
Algorithm 1 ACOAV
Mathematics 10 02448 i001
Algorithm 2 UpdateSolution( S o l i )//Partial Solution Update
1.TempSol   S o l i
2.r1 ← RandInt(1, NoOfCities), r2 ← RandInt(1, NoOfCities)
3.rr1 + 1
4.CitiesToOrder ← Ø
5.while (r != r2) do
6.CitiesToOrderCitiesToOrder ∪ {[r]}
7. if (r < NoOfCities)
8. rr + 1 // Increase the index number by one
9. else
10. r1//Reset the index number to start from the first visited city
11. end if
12.end while
13.r ← r1 + 1
14.s ←[r1]
15.e ←[r2]
16.while (CitiesToOrder ≠ Ø or Null)
17.[r]   a r g m a x l : l C i t i e s T o O r d e r P s l e //Equation (13)
18. s ←[r]
19. CitiesToOrderCitiesToOrder − {s}
20. if (r < NoOfCities)
21. rr + 1
22. else
23. r1
24. end if
25.end while
26.if (TempSol.Cost < S o l i .Cost)
27. S o l i TempSol
28.end if
29.return S o l i

4. Experimental Studies

This section describes the implementation details and verification of the effectiveness of ACOAV by comparing its performance with conventional ACO and several state-of-the-art methods, including the latest ACO-based methods.

4.1. Experimental Setup

For the proposed ACOAV, every edge is assigned an initial pheromone value ( τ 0 = 1), and control parameters are set as α = 1, β = 4, ρ = 0.1, w1 = 1 and w2 = 0.5. The parameter values were set based on several trial runs. The algorithm is run for a maximum iteration (MaxIt) 1000, and results are taken from 20 independent trials. A suite of 35 TSP instances is taken from TSPLIB, which is a well-known TSP benchmark repository [3]. The size of the selected problems varies from 51 (i.e., eil51) to 2392 (i.e., pr2392), which brings a diverse test set. The tour length (TL) obtained from the solutions is compared to evaluate the quality of the solution. Note that a lower value of the TL indicates a better quality of the solution. Moreover, the error rate is calculated by comparing the tour length with the known optimal solution according to Equation (14).
Error   rate = Achieved   Best   Solution   TL Optimal   Solution   TL Optimal   Solution   TL × 100 % .
A PC equipped with Intel(R) Core (TM) i5-4210U CPU (1.70–2.40 GHz) with 8.00 GB RAM and Windows 10 OS is used to conduct the experiments and analysis. The algorithm is implemented using C++ language in Visual Studio 2019 program.

4.2. Experimental Results and Performance Comparison

Performance comparisons of the ACOAV algorithm are presented on the benchmark TSP instances in two steps. At first, performance is compared with conventional ACO, and then the same is compared with several latest ACO-based methods and prominent bio-inspired methods. It is already mentioned that ACOAV transforms to conventional ACO when w1 = 1 and w2 = 0 and considers only full solution updates.
Figure 4 presents tour costs improvement through iterations for conventional ACO and proposed ACOAV on four selected problems: berlin52, eil76, kroA200, and pr439. In the experiments, ACOAV without 3-Opt on full solution update (FSU) and partial solution update (PSU) is also included to realize the effect of AV and PSU in solving TSPs. At a glance, ACOAV (FSU) is the implication of AV on conventional ACO, and ACOAV (PSU) is the implication of AV in PSU mode on conventional ACO. It is shown from Figure 4 that AV employment (on FSU or PSU) improves conventional ACO and the proposed ACOAV with 3-Opt significantly better than ACO for all four problems. As an example, for the berlin52 problem with 500 iterations, ACO and ACOAV achieved tour costs of 7989 and 7542, respectively. For the same problem, ACOAV (FSU) and ACOAV (PSU) show tour costs of 7777 and 7664, respectively. These outcomes reflect the performance improvement with PSU instead of FSU. The notion of performance for other problems is also similar.
The graphs in Figure 4 give an outline of the performance improvement over iterations. When comparing the graphs between ACO and ACOAV (FSU), it shows that the introduction of the proposed AV leads to faster convergence with lower tour costs than conventional ACO, for all four problems. An interesting observation is that FSU shows better performance than PSU at early iterations, and PSU leads to a better solution than FSU with iterations increasing. Such a phenomenon is understandable, as partial updates usually require several iterations to develop a complete solution sequence. A small improvement due to the 3-Opt operation in the proposed ACOAV is also visualized while comparing with ACOAV (PSU) for the problems. More importantly, the significant performance of the proposed method is realized by the graphs that proposed ACOAV and ACOAV (PSU or FSU) without 3-Opt converge faster and generate better quality solutions than ACO.
It might be interesting to observe the cost-effectiveness of the new features, i.e., AV with PSU and 3-Opt operation, which is introduced in ACOAV. Figure 5 shows the training time of the experiments on the four selected problems for the achieved tour costs presented in Figure 4. It is observed that ACOAV (FSU) took a little longer time than ACO as AV employment holds additional operations using Equation (10). As an example, for 500 iterations on the pr439 problem, ACO and ACOAV (FSU) took 647 and 763 s, respectively. Most interestingly, ACOAV (PSU) took much less time than ACO since updating a portion (in PSU mode) takes less time than updating the full solution as in ACO. For the same pr439 problem, ACOAV (PSU) took 254 s for 500 iterations, which is less than half of ACO. Finally, the 3-Opt operation in the proposed ACOAV is a computational overhead on ACOAV (PSU), and ACOAV took 366 s for 500 iterations on the pr439 problem. At a glance, the proposed ACOAV is more cost-effective than conventional ACO for any problem, and its efficiency for the larger problem is remarkable. For 500 iterations on the eil76 problem, ACO and ACOAV took 21 and 9 s, respectively. On the other hand, for 500 iterations on the kroA200 problem, ACO and ACOAV took 135 and 69 s, respectively. Such analysis though experimental outcomes, reveals the cost-effectiveness of individual components in the proposed ACOAV, especially AV and PSU.
Table 1 illustrates the detailed performance comparison among ACO, ACOAV (FSU), ACOAV (PSU), and proposed ACOAV. For a fair comparison, all four methods were run for the same number of iterations and trials. Comparison is performed based on achieved best and average tour costs among 20 independent runs. The table also contains the optimal tour length of individual problems, and the ER is presented following Equation (14). The comparison between ACO and ACOAV (FSU) illustrates that AV adaptation significantly improves the solution quality for TSP instances; ACOAV (FSU) is better than ACO for 30 TSP cases on best tour length, and it also achieved an average best TL for 33 TSP cases out of 35. FSU has a lesser standard deviation because of the first converging. Results comparison between ACOAV (FSU) and ACOAV (PSU) shows the effect of PSU in solving TSP instances. For all TSP instances, ACOAV (PSU) outperformed ACOAV (FSU) for all the cases based on the best and average TLs. The table shows that employing 3-Opt on ACOAV (PSU) leads ACOAV towards the optimal tour. The achieved optimal count and best count (among four methods) are given at the bottom of the table for overall performance comparison. ACO and ACOAV (FSU) cannot reach optimal or best tours for both best and average TLs. ACOAV (PSU) generates the optimal and best tour for only eil51 (the smallest problem). Whereas ACOAV generates the overall best solution for all TSP instances, and for 22 cases of TSP instances, it achieved optimal tour. Moreover, ACOAV has a lesser standard deviation in general which indicates better global optimization ability.
Table 2 compares the proposed ACOAV with several state-of-the-art bio-inspired methods based on the achieved best tour length and error rate respecting the optimal tour length. Among the considered methods, PSO-ACO [14], PACO [11], DEACO [13], and HAACO [10] are the recent ACO-based methods. At the same time, the other five methods are the prominent bio-inspired ones for TSP. Results presented for ACOAV are collected from Table 1, and outcomes of the compared methods are collected from the respective articles. Several case outcomes are not available for a particular method, which are marked in ‘-’. The optimal and best tour count is placed at the end of the table to understand the performance of the methods. Among the methods, DSMO [33] and DLSO [32] show the worst performance and cannot generate any optimal or overall best tour. PSO-ACO and PACO could generate the optimal and best tours for 4 and 6 TSP instances, respectively. SSABC [31] and HAACO show good performance, but tour cost for larger TSP instances is not available. Both of the algorithms generate optimal and best tours for 7 TSP instances. DSOS [34] shows optimal and best tours for 6 and 7 TSP instances. Among the compared methods, GA-MARL + NICH-LS [35] and DEACO are comparatively better than others and show optimal tours for 15 and 14 TSP instances, respectively. On the other hand, the proposed ACOAV shows the optimal solution for 22 cases. Among the ten methods in the table, ACOAV generates the overall best solution for 30 TSP instances while GA-MARL + NICH-LS and DEACO for 16 instances, respectively. At a glance, ACOAV reaches optimal tours for up to 200 city TSP problems and several larger problems, such as fl417 and pcb442.
Table 3 compares ACOAV with other state-of-the-art bio-inspired methods in terms of the average tour cost. The table also contains the optimal tour length of individual problems. Among the 35 TSP instances, DSMO, DLSO, and PSO-ACO failed to get the best tour for any TSP instances. SSABC, PACO, and HAACO generate the best tour for a small-sized TSP instance, berlin52. Among the compared methods, DEACO showed the highest number of the best tours in 16 cases and achieved the average TLs equal to the optimal TLs with zero standard deviation (SD) (i.e., all individual solutions reached the same optimal TLs) in 13 cases. On the other hand, ACOAV showed optimal values for 19 cases with zero SD for small-sized TSP instances. In the case of larger TSP instances, ACOAV also has lower SD values than other methods, which indicates better stability of the solutions generated by ACOAV. The comparison claims that the proposed ACOAV performs the best as it can show the best average tour costs for 31 TSP cases. Finally, the result compared in Table 2 and Table 3 revealed ACOAV as a promising method for solving TSP instances.

4.3. Statistical Analysis of Presented Results

Statistical tests are used to detect the significance of performance differences among a group of methods. Two well-known tests were conducted in this study. At first, the Friedman test is conducted to compare the identicalness of the algorithms. Then Post-hoc test is performed to compare the performance of the algorithms pairwise.

4.3.1. Friedman Test

The Friedman test [42] is a nonparametric statistical test that can detect if there exists any significant difference among several samples or not. The following statements are the two assumptions for this test:
  • Observations are mutually independent. That is, the results within one row do not affect the results of other rows.
  • For each row, results can be ranked based on their performance.
H 0 and H 1 are two hypotheses for the Friedman test. The null hypothesis, H 0 states that results came from the algorithms are similar. The alternative hypothesis, H 1 states that results are different for at least one of the algorithms.
In Table 4, a rank is given to every algorithm based on its average cost for each TSP instance from Table 3. In the case of ties in performance, an average rank is assigned to the algorithms [43,44]. Here, we considered seven popular TSP instances for the Friedman test because the tour costs (i.e., lengths) for other TSP instances are not available. Here, the number of algorithms, k = 10, and the number of TSP instances, n = 7. The Friedman test statistics, TF is
T F = 12 n k ( k + 1 ) j = 1 k R . j 2 3 n ( k   +   1 ) = 12 7   ×   10   ×   ( 10   +   1 ) ( 45 2 + 55 2 + 24 2 + 70 2 + 57 2 + 43 2 + 30 2 + 12 2 + 37 2 + 12 2 ) 3 × 7 × ( 10 + 1 ) = 52.34
However, the test statistic T F is a Chi-square-based approximation that is poor and conservative when the number of algorithms increases. Therefore, the test statistic T I D proposed by Iman and Davenport [42] is also measured.
T I D = ( n 1 ) × T F n ( k 1 ) T F = ( 7 1 ) × 52.34 7 × ( 9 1 ) 52.34 = 29.46
The null hypothesis H 0 is rejected if T I D > F k 1 ;   ( k 1 ) ( n 1 ) ;   1 α where F k 1 ;   ( k 1 ) ( n 1 ) ;   1 α is the critical value of F distribution with significance level α and degrees of freedom df1 = k − 1, df2 = (k − 1) × (n − 1).
From the F distribution table at α = 0.01, the critical value of F k 1 ;   ( k 1 ) ( n 1 ) ;   1 α = F 9 ;   54 ;   0.99 ≃ 2.75.
Since T I D > F 9 ;   54 ;   0.99 , according to the Friedman test, the performances of some algorithms are significantly different from others. As of Table 4, ACOAV and DEACO hold the same average rank value 1.71. Therefore, the proposed ACOAV is significantly better than all the methods except DEACO.

4.3.2. Post-Hoc Test

The post-hoc test can be performed to find out the comparative difference between the algorithms when Friedman’s test rejects the null hypothesis. Fisher’s LSD test [42] is considered in this study from several post-hoc test methods. When R . i and R . j are the summation of ranks for two algorithms, then the algorithms are considered significantly different if
| R . i R . j |   >   t ( n 1 ) ( K 1 ) ; 1 α 2 2 n i = 1 n j = 1 k R i j 2 j = 1 k R . j 2 ( n 1 ) ( k 1 ) ,
where t ( n 1 ) ( K 1 ) ;   1 α 2 is the critical value from t distribution table with significance level α and degrees of freedom (n − 1)(k − 1). Again, the number of algorithms, k = 10, and the number of TSP instances, n = 7. Thus,
t ( n 1 ) ( K 1 ) ; 1 α 2 × 2 × n i = 1 n j = 1 k R i j 2 j = 1 k R . j 2 ( n 1 ) ( k 1 ) = 2.67 ×   2 × 7 × 2682 18181 ( 7 1 ) × ( 10 1 ) = 12.51
Table 5 contains the absolute difference in the summation of ranks of other algorithms with ACOAV. Notably, the statistical tests were performed for only seven TSP instances as outcomes for those problems are available for all the compared methods. The post-hoc test concludes that ACOAV significantly outperforms seven methods (showing a test value greater than the critical value 12.51) and is competitive with DEACO/SSABC. At a glance, ACOAV outperformed all the compared methods considering results presented in Table 2 and Table 3; and, the outperformance is significant with respect to most of the methods as on the basis of statistical test measures are shown in Table 4 and Table 5.

5. Discussion

For a particular TSP problem, visibility values among different cities remain fixed as distance based on coordinates are constant. Therefore, the nearest city gets the highest visibility heuristic desirability in the conventional ACO regardless of the destination city or return to the originating city. Such a constraint does not reflect the issue of destination or returning to the starting city of TSP solution development. Adaptive visibility (AV), the different better approach, is the main contribution of the study to cop the destination city issue in solving TSP.
Through the concept and step-by-step processes to formulate AV, the development of the generalized formula of Equation (10) is an interesting technical contribution to devising an efficient ACO-based method for TSP, called ACOAV. Equation (12) only modifies the heuristic desirability and applies to ACO instead of the distance between cities, while other factors remain unchanged. Conventional ACO feature is also achieved from AV for setting w1 = 1 and w2 = 0 in Equation (10). Although Equation (10) seems computationally heavy, the overall computational proficiency of an algorithm depends on its adaptation technique. Another innovative idea of partial solution update (PSU) is adopted in the proposed ACOAV to minimize the computational cost. In the PSU mode, only a portion of a TSP solution is considered to update, i.e., reorder the nodes of the selected portion for a better TSP solution. The proficiency of AV and PSU is rigorously investigated with experimental outcomes on TSP instances.
The proposed ACOAV is an effective updated model of ACO and efficient concerning the recent ACO-based methods. Several ACO-based methods adapt the control parameters using different techniques. HAACO [10] uses different parameter settings for initial phases with heterogeneous ants. DEACO [13] uses a dynamic pheromone evaporation strategy, and PSO-ACO [14] uses PSO to adjust the control parameters of ACO. On the other hand, PACO runs multiple ant colonies in parallel to increase search diversity. In short, recent ACO-based methods only focused on increasing the searching diversity of the ants. Nevertheless, none of these methods focused on improving the visibility heuristic that plays an indispensable role in ant movements. Ants perform intelligent movement using AV, and that makes ACOAV superior to other existing ACO-based methods. Moreover, other methods employ complex strategies, such as multiple ant colonies or other algorithms, to improve ACO performance. On the other hand, ACOAV skillfully updates the visibility heuristic, which enhances the performance significantly.

6. Conclusions

In this study, ant colony optimization with adaptive visibility (ACOAV) is proposed as a better method than the conventional ACO to solve TSP. The visibility heuristic value in conventional ACO is given by the simple inverse of the distance between nodes without considering the necessity of returning to the tour originating city at the last step. In contrast, the proposed ACOAV intelligently managed the issue of returning to the originating city (the final destination) by introducing a generalized AV formula. In addition, partial updates of individual solutions are adopted in the proposed ACOAV to accelerate convergence. The proposed ACOAV is tested on several benchmark TSP instances, and rigorously compared with ACO. At first, the new functionalities introduced in ACOAV are evaluated individually to justify their incorporation. Specifically, it is found from the simulation that the AV enables ACOAV to have a better-converging speed showing relatively better results with fewer iterations. Furthermore, it is found that partial updates effectively push the solution towards the best tour eventually. In such a way, both functionalities (i.e., AV and partial update) play an essential role indirectly in achieving faster convergence towards the best tour, and therefore, they eventually make the ACOAV the best solution for TSP. It is remarkable that ACOAV significantly outperformed ACO in twofold achievements, i.e., yielding better TSP solutions and requiring less computational time. The performance of the proposed ACOAV is also compared with ten state-of-the-art methods, including several recent ACO-based methods. The proposed ACOAV can be stated as the best method for generating optimal solutions for several cases. Furthermore, the statistical test also justifies the significance of the performance of ACOAV over recent bio-inspired methods.
Different future research scopes have emerged from the present study. Proposed ACOAV is shown to achieve optimal tours for the small-sized TSPs, especially for the problem size of fewer than 200 cities. Further experiments while varying parameter values might generate optimal tours for larger TSP instances. The present study considered a 3-Opt local search; the effects of other local search algorithms might improve the performance of ACOAV. An exciting but challenging future research topic might be to develop a more efficient and robust visibility function for ACO to solve TSP and other combinatorial optimization problems, such as job shop scheduling, the vehicle routing problem, etc.

Author Contributions

Conceptualization, M.A.H.A.; Data curation, A.S.B.S.; Methodology, A.S.B.S. and M.A.H.A.; Software, A.S.B.S.; Supervision, M.A.H.A.; Visualization, A.S.B.S., M.A.H.A. and M.A.S.K.; Writing—original draft, A.S.B.S. and M.A.H.A.; Writing—review & editing, M.A.H.A. and M.A.S.K. All authors have read and agreed to the published version of the manuscript.


This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.


  1. Lenstra, J.K.; Kan, A.H.G.R. Some Simple Applications of the Travelling Salesman Problem. J. Oper. Res. Soc. 1975, 26, 717–733. [Google Scholar] [CrossRef]
  2. Hoffman, K.L.; Padberg, M.; Rinaldi, G. Encyclopedia of Operations Research and Management Science; Springer: Boston, MA, USA, 2013. [Google Scholar]
  3. Reinelt, G. Tsplib 95. Interdiszip. Zent. Für Wiss. Rechn. (IWR) Heidelb. 1995, 338, 1–16. [Google Scholar]
  4. Reinelt, G. TSPLIB—A Traveling Salesman Problem Library. ORSA J. Comput. 1991, 3, 376–384. [Google Scholar] [CrossRef]
  5. Dorigo, M.; Gambardella, L. Ant colony system: A cooperative learning approach to the traveling salesman problem. IEEE Trans. Evol. Comput. 1997, 1, 53–66. [Google Scholar] [CrossRef][Green Version]
  6. Selvi, V.; Umarani, R. Comparative Analysis of Ant Colony and Particle Swarm Optimization Techniques. Int. J. Comput. Appl. 2010, 5, 1–6. [Google Scholar] [CrossRef]
  7. Li, W.H.; Yang, Y.; Liao, H.Q.; Li, J.L.; Zheng, X.P. Artificial Bee Colony Algorithm for Traveling Salesman Problem. Adv. Mater. Res. 2011, 314–316, 2191–2196. [Google Scholar] [CrossRef]
  8. Akhand, M.A.H.; Akter, S.; Rashid, M.A.; Yaakob, S.B. Velocity tentative PSO: An optimal velocity implementation based particle swarm optimization to solve traveling salesman problem. IAENG Int. J. Comput. Sci. 2015, 42, 221–232. [Google Scholar]
  9. Ouaarab, A.; Ahiod, B.; Yang, X.-S. Discrete cuckoo search algorithm for the travelling salesman problem. Neural Comput. Appl. 2013, 24, 1659–1669. [Google Scholar] [CrossRef]
  10. Tuani, A.F.; Keedwell, E.; Collett, M. Heterogenous Adaptive Ant Colony Optimization with 3-opt local search for the Travelling Salesman Problem. Appl. Soft Comput. 2020, 97, 106720. [Google Scholar] [CrossRef]
  11. Gülcü, Ş.; Mahi, M.; Baykan, Ö.K.; Kodaz, H. A parallel cooperative hybrid method based on ant colony optimization and 3-Opt algorithm for solving traveling salesman problem. Soft Comput. 2018, 22, 1669–1685. [Google Scholar] [CrossRef]
  12. Dahan, F.; El Hindi, K.; Mathkour, H.; AlSalman, H. Dynamic Flying Ant Colony Optimization (DFACO) for Solving the Traveling Salesman Problem. Sensors 2019, 19, 1837. [Google Scholar] [CrossRef] [PubMed][Green Version]
  13. Ebadinezhad, S. DEACO: Adopting dynamic evaporation strategy to enhance ACO algorithm for the traveling salesman problem. Eng. Appl. Artif. Intell. 2020, 92, 103649. [Google Scholar] [CrossRef]
  14. Mahi, M.; Baykan, Ö.K.; Kodaz, H. A new hybrid method based on Particle Swarm Optimization, Ant Colony Optimization and 3-Opt algorithms for Traveling Salesman Problem. Appl. Soft Comput. 2015, 30, 484–490. [Google Scholar] [CrossRef]
  15. Liu, Y.; Cao, B. A Novel Ant Colony Optimization Algorithm with Levy Flight. IEEE Access 2020, 8, 67205–67213. [Google Scholar] [CrossRef]
  16. Liao, E.; Liu, C. A Hierarchical Algorithm Based on Density Peaks Clustering and Ant Colony Optimization for Traveling Salesman Problem. IEEE Access 2018, 6, 38921–38933. [Google Scholar] [CrossRef]
  17. Dorigo, M.; Maniezzo, V.; Colorni, A. Ant system: Optimization by a colony of cooperating agents. IEEE Trans. Syst. Man Cybern. Part B Cybern. 1996, 26, 29–41. [Google Scholar] [CrossRef][Green Version]
  18. Li, B.; Wang, L.; Song, W. Ant Colony Optimization for the Traveling Salesman Problem Based on Ants with Memory. In Proceedings of the 2008 Fourth International Conference on Natural Computation, Jinan, China, 18–20 October 2008; Volume 7, pp. 496–501. [Google Scholar] [CrossRef]
  19. Guntsch, M.; Middendorf, M. A Population Based Approach for ACO. Lect. Notes Comput. Sci. Incl. Subser. Lect. Notes Artif. Intell. Lect. Notes Bioinform. 2002, 2279, 72–81. [Google Scholar] [CrossRef]
  20. Dorigo, M.; Gambardella, L.M. A study of some properties of Ant-Q. In Parallel Problem Solving from Nature—PPSN IV. PPSN 1996; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 1996. [Google Scholar] [CrossRef][Green Version]
  21. Peya, Z.J.; Akhand, M.A.H.; Sultana, T.; Rahman, M.M.H. Distance based Sweep Nearest Algorithm to Solve Capacitated Vehicle Routing Problem. Int. J. Adv. Comput. Sci. Appl. 2019, 10, 259–264. [Google Scholar] [CrossRef]
  22. Punnen, A.P. The Traveling Salesman Problem: Applications, Formulations and Variations. In The Traveling Salesman Problem and Its Variations; Springer: Boston, MA, USA, 2007; Volume 12, pp. 1–28. [Google Scholar] [CrossRef]
  23. Mavrovouniotis, M.; Yang, S. Ant colony optimization with immigrants schemes for the dynamic travelling salesman problem with traffic factors. Appl. Soft Comput. 2013, 13, 4023–4037. [Google Scholar] [CrossRef]
  24. Liu, M.; Li, Y.; Li, A.; Huo, Q.; Zhang, N.; Qu, N.; Zhu, M.; Chen, L. A Slime Mold-Ant Colony Fusion Algorithm for Solving Traveling Salesman Problem. IEEE Access 2020, 8, 202508–202521. [Google Scholar] [CrossRef]
  25. Khan, I.; Maiti, M.K.; Maiti, M. Coordinating Particle Swarm Optimization, Ant Colony Optimization and K-Opt Algorithm for Traveling Salesman Problem. Commun. Comput. Inf. Sci. 2017, 655, 103–119. [Google Scholar] [CrossRef]
  26. Mavrovouniotis, M.; Muller, F.M.; Yang, S. Ant Colony Optimization with Local Search for Dynamic Traveling Salesman Problems. IEEE Trans. Cybern. 2016, 47, 1743–1756. [Google Scholar] [CrossRef] [PubMed][Green Version]
  27. Yazdani, M.; Jolai, F. Lion Optimization Algorithm (LOA): A nature-inspired metaheuristic algorithm. J. Comput. Des. Eng. 2015, 3, 24–36. [Google Scholar] [CrossRef][Green Version]
  28. Sharma, H.; Hazrati, G.; Bansal, J.C. Spider Monkey Optimization Algorithm. In Studies in Computational Intelligence; Springer International Publishing: Berlin/Heidelberg, Germany, 2019; Volume 779, pp. 43–59. [Google Scholar]
  29. Ahmad, Y.; Ullah, M.; Khan, R.; Shafi, B.; Khan, A.; Zareei, M.; Aldosary, A.; Mohamed, E.M. SiFSO: Fish Swarm Optimization-Based Technique for Efficient Community Detection in Complex Networks. Complexity 2020, 2020, 6695032. [Google Scholar] [CrossRef]
  30. Li, L.; Cheng, Y.; Tan, L.; Niu, B. A Discrete Artificial Bee Colony Algorithm for TSP Problem. Int. J. Adv. Comput. Technol. 2012, 4, 566–573. [Google Scholar]
  31. Khan, I.; Maiti, M.K. A swap sequence based Artificial Bee Colony algorithm for Traveling Salesman Problem. Swarm Evol. Comput. 2019, 44, 428–438. [Google Scholar] [CrossRef]
  32. Daoqing, Z.; Mingyan, J. Parallel discrete lion swarm optimization algorithm for solving traveling salesman problem. J. Syst. Eng. Electron. 2020, 31, 751–760. [Google Scholar] [CrossRef]
  33. Akhand, M.; Ayon, S.I.; Shahriyar, S.; Siddique, N.; Adeli, H. Discrete Spider Monkey Optimization for Travelling Salesman Problem. Appl. Soft Comput. 2019, 86, 105887. [Google Scholar] [CrossRef]
  34. Ezugwu, A.E.-S.; Adewumi, A.O. Discrete symbiotic organisms search algorithm for travelling salesman problem. Expert Syst. Appl. 2017, 87, 70–78. [Google Scholar] [CrossRef]
  35. Alipour, M.M.; Razavi, S.N.; Derakhshi, M.R.F.; Balafar, M.A. A hybrid algorithm using a genetic algorithm and multiagent reinforcement learning heuristic to solve the traveling salesman problem. Neural Comput. Appl. 2017, 30, 2935–2951. [Google Scholar] [CrossRef]
  36. Bouzidi, A.; Riffi, M.E. Discrete Cat Swarm Optimization to Resolve the Traveling Salesman Problem. Int. J. Adv. Res. Comput. Sci. Softw. Eng. 2013, 3, 13–18. [Google Scholar]
  37. Panwar, K.; Deep, K. Discrete Grey Wolf Optimizer for symmetric travelling salesman problem. Appl. Soft Comput. 2021, 105, 107298. [Google Scholar] [CrossRef]
  38. Pandiri, V.; Singh, A. An artificial bee colony algorithm with variable degree of perturbation for the generalized covering traveling salesman problem. Appl. Soft Comput. 2019, 78, 481–495. [Google Scholar] [CrossRef]
  39. Zhang, J.; Hong, L.; Liu, Q. An Improved Whale Optimization Algorithm for the Traveling Salesman Problem. Symmetry 2020, 13, 48. [Google Scholar] [CrossRef]
  40. Colorni, A.; Dorigo, M.; Maniezzo, V. Distributed Optimization by ant colonies. Proc. First Eur. Conf. Artif. Life 1991, 142, 134–142. [Google Scholar]
  41. Helsgaun, K. General k-opt submoves for the Lin–Kernighan TSP heuristic. Math. Program. Comput. 2009, 1, 119–163. [Google Scholar] [CrossRef]
  42. Pereira, D.G.; Afonso, A.; Medeiros, F.M. Overview of Friedman’s Test and Post-hoc Analysis. Commun. Stat. Simul. Comput. 2014, 44, 2636–2653. [Google Scholar] [CrossRef]
  43. Riffenburgh, R.H. Tests on Ranked Data. In Statistics in Medicine; Elsevier: Amsterdam, The Netherlands, 2012; pp. 221–248. [Google Scholar]
  44. Derrac, J.; García, S.; Molina, D.; Herrera, F. A practical tutorial on the use of nonparametric statistical tests as a methodology for comparing evolutionary and swarm intelligence algorithms. Swarm Evol. Comput. 2011, 1, 3–18. [Google Scholar] [CrossRef]
Figure 1. Adaptive visibility demonstration for optimal path selection from start city (C1) to destination city (C4) visiting C2 and C3. Tour option C1-C2-C3-C4 will be optimal when (d12d24) < (d13d34); otherwise, tour option C1-C3-C2-C4 will be optimal having (d12d24) > (d12d34).
Figure 1. Adaptive visibility demonstration for optimal path selection from start city (C1) to destination city (C4) visiting C2 and C3. Tour option C1-C2-C3-C4 will be optimal when (d12d24) < (d13d34); otherwise, tour option C1-C3-C2-C4 will be optimal having (d12d24) > (d12d34).
Mathematics 10 02448 g001
Figure 2. Demonstration of TSP solving with the proposed adaptive visibility compared with ACO visibility. Tour cost emphasizing nearest city for ACO is 2000 and tour cost with proposed adaptive visibility is 1700.
Figure 2. Demonstration of TSP solving with the proposed adaptive visibility compared with ACO visibility. Tour cost emphasizing nearest city for ACO is 2000 and tour cost with proposed adaptive visibility is 1700.
Mathematics 10 02448 g002
Figure 3. The flowchart of the proposed method.
Figure 3. The flowchart of the proposed method.
Mathematics 10 02448 g003
Figure 4. Tour cost improvement over iterations for conventional ACO, with different methods with adaptive visibility in different modes. ACOAV (FSU) is ACO + AV with full solution update mode, ACOAV (PSU) is ACO + AV with partial solution update mode, and ACOAV is the proposed model as ACOAV (PSU) + 3-Opt.
Figure 4. Tour cost improvement over iterations for conventional ACO, with different methods with adaptive visibility in different modes. ACOAV (FSU) is ACO + AV with full solution update mode, ACOAV (PSU) is ACO + AV with partial solution update mode, and ACOAV is the proposed model as ACOAV (PSU) + 3-Opt.
Mathematics 10 02448 g004
Figure 5. Process time (in the second) comparison over iterations for conventional ACO, with different methods with adaptive visibility in different modes. ACOAV (FSU) is ACO + AV with full solution update mode, ACOAV (PSU) is ACO + AV with partial solution update mode, and ACOAV is the proposed model as ACOAV (PSU) + 3-Opt.
Figure 5. Process time (in the second) comparison over iterations for conventional ACO, with different methods with adaptive visibility in different modes. ACOAV (FSU) is ACO + AV with full solution update mode, ACOAV (PSU) is ACO + AV with partial solution update mode, and ACOAV is the proposed model as ACOAV (PSU) + 3-Opt.
Mathematics 10 02448 g005
Table 1. Performance Comparison among ACO, ACOAV (FSU), ACOAV (PSU), and ACOAV on 20 trials.
Table 1. Performance Comparison among ACO, ACOAV (FSU), ACOAV (PSU), and ACOAV on 20 trials.
Optimal Tour LengthBest Tour Length (TL) and Error Rate (ER) ComparisonAverage Tour Length (TL) and Standard Deviation (SD)
Best TLER (%)Best TLER (%)Best TLER (%)Best TLER (%)Avg. TLSDAvg. TLSDAvg. TLSDAvg. TLSD
21kroB20029,43737,30526.7332,3049.7429,8571.4329,4380.00338,516.3605.5832,304030,155.8112.829,439.5 0.67
22tsp2253861459218.9342088.9939973.5239231.614733.461.17420804047.1515.413956.9 11.62
25pr29948,19163,75932.354,47013.0350,1594.0848,2150.0567,450.61132.0554,470.30.4850,458.7146.5248,519.3 70.16
26lin31842,02957,58637.0144,8926.8143,0792.542,2030.4158,481.8514.2244,892043243.276.542,220.9 9.99
27rd40015,28120,66435.2316,89910.5915,9734.5315,4671.2221,210.2199.216,899016,055.542.8515,576 44.23
28fl41711,86114,37021.1512,9489.1611,9210.5111,861014,725.4149.1512,948011,9378.2311,861.2 0.4
29pr439107,217135,08025.99121,36013.19111,0243.55107,6130.37139,7451847.98121,3600111,490251.24107,965 182.42
30pcb44250,77872,68243.1456,99112.2453,8336.0250,778075,440.81069.7556,991.83.4954,150.7171.1850,945.2 54.98
31rat5756773901233.0673448.4371185.0969352.399213.3585.317345.853.67141.9511.876972.25 15.73
32rat783880612,28639.52971210.2994076.8290502.7712,554.5119.389712.80.989451.4521.139101.1 20.77
33pr1002259,045371,08743.25300,75716.1284,98510.01266,1552.74374,4012224.55300,972214.5288,9911397.71268,111 678.67
35pr2392378,032581,87853.92439,84916.35428,52313.36392,4613.82588,3963977.43440,033140.07431,5041610.47397,871 1805.49
Optimal/Best Count0/00/01/122/350/00/01/119/35
Win-Draw-Loss over ACO-30-0-535-0-035-0-0-33-0-235-0-035-0-0
Win-Draw-Loss over ACOAV (FSU)5-0-30-35-0-035-0-02-0-33-35-0-035-0-0
Win-Draw-Loss over ACOAV (PSU)0-0-350-0-35-34-1-00-0-350-0-35-34-1-0
Table 2. Best Tour Length (TL) and Error Rate (ER) Comparison of ACOAV with Existing State-of-the-Art Bio-inspired Methods.
Table 2. Best Tour Length (TL) and Error Rate (ER) Comparison of ACOAV with Existing State-of-the-Art Bio-inspired Methods.
Optimal Tour LengthGA-MARL + NICH-LS [35]DSOS [34]SSABC [31]DSMO [33]DLSO [32]PSO-ACO [14]PACO [11]DEACO [13]HAACO [10]Proposed
Best TLER (%)Best TLER (%)Best TLER (%)Best TLER (%)Best TLER (%)Best TLER (%)Best TLER (%)Best TLER (%)Best TLER (%)Best TLER (%)
5pr76108,159108,1590108,1590 108,159.40.0004108,159.430.01108,1590
21kroB20029,437 30,716.54.3529,652.940.7329,4380.003
24a280257925950.62 2609.541.1825810.08
Optimal/Best Count15/166/77/70/00/04/46/614/167/722/30
Table 3. Average Tour Length (TL) and Standard Deviation (SD) Comparison of ACOAV with Existing State-of-the-Art Bio-inspired Methods.
Table 3. Average Tour Length (TL) and Standard Deviation (SD) Comparison of ACOAV with Existing State-of-the-Art Bio-inspired Methods.
Optimal Tour LengthGA-MARL + NICH-LS [35]DSOS [34]SSABC [31]DSMO [33]DLSO [32]PSO-ACO [14]PACO [11]DEACO [13]HAACO [10]Proposed
5pr76108,159109,556.57 111,299.32050.48108,572.35341.96108,1590
9rd1007910 8377.76209.479100 79100
11lin10514,37914,385.6314,431.73 14,379.101.3015,114500.7614,433.3334.2314,379.150.4814,39319.7614,379014,411.814,3790
12pr10744,30344,424.7344,445.10181.3545,666.991300.43 44,3030
13pr12459,03059,208.8359,030264.0862,443.491644.93 59,0300
15ch15065286547.676552.58 6597.8338.836563.9527.586601.415.01652806578.865280
16kroA15026,52426,891.83 28,354.09524.9126,524026,5240
17kroB15026,13026,477.33 27,576.16625.2626,130026,1300
18rat1952323 2488.5550.482330.21.6
19d19815,780 16,270.47171.215,896.4835.2115,7800
20kroA20029,36829,62129,651.23 29,46920.0331,828.64652.3229,766.27118.3729,646.05114.7129,644.553.4329,368029,633.229,3680
Optimal/Best Count0/11/11/10/00/00/01/113/161/119/31
Table 4. Ranking of the Friedman Test among proposed ACOAV and Existing State-of-the-Art Bio-inspired Methods.
Table 4. Ranking of the Friedman Test among proposed ACOAV and Existing State-of-the-Art Bio-inspired Methods.
nMethodGA-MARL + NICH-LS [35]DSOS [34]SSABC [31]DSMO [33]DLSO [32]PSO-ACO [14]PACO [11]DEACO [13]HAACO [10]Proposed
Rank(R) R i 1 R i 2 R i 3 R i 4 R i 5 R i 6 R i 7 R i 8 R i 9 R i 10
R . j = i = 1 n R i j for i = 1,2,3…, n R . 1 = 45 R . 2 = 55 R . 3 = 24 R . 4 = 70 R . 5 = 57 R . 6 = 43 R . 7 = 30 R . 8 = 12 R . 9 = 37 R . 10 = 12
Average rank ( R . j n ) 6.437.863.43108.
Table 5. Post-hoc Test of proposed ACOAV with Existing State-of-the-Art Bio-inspired Methods.
Table 5. Post-hoc Test of proposed ACOAV with Existing State-of-the-Art Bio-inspired Methods.
| R . i R . j | GA-MARL + NICH-LS [35] (R.1)DSOS [34]
SSABC [31]
DSMO [33]
DLSO [32]
PSO-ACO [14] (R.6)PACO [11]
DEACO [13]
HAACO [10]
ACOAV (R.10)33431258453118025
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Shahadat, A.S.B.; Akhand, M.A.H.; Kamal, M.A.S. Visibility Adaptation in Ant Colony Optimization for Solving Traveling Salesman Problem. Mathematics 2022, 10, 2448.

AMA Style

Shahadat ASB, Akhand MAH, Kamal MAS. Visibility Adaptation in Ant Colony Optimization for Solving Traveling Salesman Problem. Mathematics. 2022; 10(14):2448.

Chicago/Turabian Style

Shahadat, Abu Saleh Bin, M. A. H. Akhand, and Md Abdus Samad Kamal. 2022. "Visibility Adaptation in Ant Colony Optimization for Solving Traveling Salesman Problem" Mathematics 10, no. 14: 2448.

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop