Abstract
Metaheuristic algorithms have been applied widely for real-world problems in many fields, e.g., engineering, financial, healthcare. Bats algorithm (BA) is a recent metaheuristic algorithm with considering as a robust optimization method that can outperform existing algorithms. However, when dealing with complicated combinatorial problems such as traveling salesman problems (TSP), the BA can be fallen in a local optimum. This paper proposes a new hybridizing Parallel BA (HPBA) with a mutation in local-search to escape such its drawback scenario for TSP. A graph theory mutation method is used to embed for hybridizing BA with exploiting similarities among individuals. The proposed method is extensively evaluated in TSP with series instances of the benchmark from TSPLIB to test its performance. The compared experimental result with the previous method and the best-known solutions (B.K.S) in the literature shows that the proposed approach offers competitive results.
Introduction
Many different types of optimization algorithms have been paid more attention and developed from researchers to deal with many real-world applications in daily life [1–4]. Metaheuristic approaches have been the most appropriate ways for such optimization problems over the last decades [5, 6].
Metaheuristic methods have been evolved based on creativity from natural phenomena, e.g., biological, swarms, physical aspects that are known as the natural-inspired intelligent scheme [7]. These algorithms are commonly simple, powerful and easy to implement. Some representative algorithms are Genetic algorithm (GA) [8], Particle swarm optimization algorithm (PSO) [9, 10], Artificial bee colony algorithm (ABC) [11], Cat swarm optimization algorithm (CSO) [12], Differential evolution algorithm (DE) [13, 14], Bat algorithm (BA) [15], etc.
Although no guarantee that always obtained the best solutions can be figured out as expected good quality, metaheuristic algorithms can figure out robust in delivering optimal global solutions. Among these algorithms, the BA is a simple yet effective intelligent optimization algorithm, which was first introduced in 2010 [15] for solving continuous optimization problems. In the last years, The BA has drawn the attention of many scholars included the fields of science and engineering, and its applications are to solve a variety of practical optimization problems [1, 17].
As an effective method to search for a globally optimal solution, the BA was taken inspiration based on the search process by utilizing artificial bats as search solutions. The algorithm is initial-ized by generating population randomly, then the optimal solution is searched by the rule of inspira-tion of bat finding prey behavior with iteration. Besides standard BA, which can deal with prob-lems in continuous search spaces [18], the other several proposed versions of the algorithm have arisen in the literature, e.g., the com-pact bat algorithm [19], parallel bats algorithm [20] and hybrid bat algorithm [21] to solve problems.
Moreover, a combinatorial problem is trying to figure out a set of discrete objects for arranging, sorting, or allocating that meet certain conditions [22]. The studies of practical algorithms for a solution to the combinatorial optimization problem have arisen in the scholar community as concerning smart exploring searching space. Besides, traditional deterministic optimization approaches have sealed with the optimization problem. Many metaheuristic algorithms also can have figured out to solve the combinatorial problem powerfully.
Most of the combinatorial optimization problems are considered as NP-hard. So, the traditional methods or the exact methods are typically challenging to find out the optimal or even suboptimal solutions for those problems [23, 24]. Metaheuristic algorithms can be promising methods to deal with the complex problem as combinatorial optimization problems in a reasonably practical time [25, 26].
A well-known combinatorial problem is known as TSP (Traveling Salesman Problem) [27] that assumed a traveling salesman wants to visit N cities in one time with the shortest distance of path or times. The shortest path is that each town can only visit once, and finally to return to the starting point departure. The route selected target is the required path of distance with a minimum value of all tracks. There are many essential applications of TSP in transportation and industry fields, e.g., vehicle routing problems, logistics, scheduling, and planning.
In this paper, we present a new hybridizing parallel BA with a mutation to escape from dropping the local optimum in processing search optimization for a solution to the combination problem as the TSP. A graph theory mutation method is used to embed for hybridizing BA with exploiting similarities among individuals.
The remaining paper is organized with sections as follows. Section 2 describes the combinatorial optimization problem. Section 3 introduces the parallel Bat algorithm as the related work method. Section 4 presents the proposed method. In Section 5, several experiments are carried on the scenario to evaluate the performance of the proposed method. Finally, the conclusion is discussed in Section 6.
Traveling salesman problem
Traveling Salesman Problem (TSP) is considered as one of the most well-known issues of combinatorial optimization that is easy to understand but hard to solve [28]. TSP is considered as the most intensely studied problems in mathematical computation that belongs to NP-hard problem [23]. The objective optimization for TSP is to find out the shortest tour of a salesman has to visit each one of a set of cities. The total length of the trip of the salesman traveling could be minimized as the fitness function of the TSP problem. Researchers have studied TSP for recent decades from the fields of computer science, mathematics, and other sciences.
There have been many proposed algorithms successful in solving the TSP problem. The proposed methods are classified into two types of solutions: exact solutions and approximate solutions. The exact solutions are a guarantee of finding optimal solutions at the expense of running time and space requirements. The exact solutions dealt with relaxations of the TSP formulation based on Linear and Dynamic programming uses methods like Branch and Bound, Cutting-plane, Interior Point, and Branch-and-Cut [29]. The approximation solutions figure out the solution with an approximation factor while processing optimization. The factors play a crucial role in optimization that is stochastic and matching. The traveling salesman problem can be presented as follows:
The TSP is modeled with three elements as { (G, f, t)}. G is a directed, edge-weighted graph that G = (V, E), where V is a collection of nodes or cities, and E is a set of the edge of the city i to city j. f is an objective function as a mathematical model for the optimization problem that contains a traveling salesman tour with the cost that does not exceed t. Figure 1 displays an example of a graph for the TSP problem. For a simplified setting environment of space problem, the nodes are generated coordinate locations randomly. Edge of the city(i) to the city (i + 1) is computed by the distance between these nodes. For the cities chain in a structure, each core city requires to occur only once in the chain; that is, it cannot reappear as any of the other spanning cities. A given city may possibly appear both as an entry city and as an exit city without violating the restriction.

An example of a graph for TSP.
Figure 1 shows an example of presenting the problem of the graph for TSP that considers as a set of cities. A minimizing path traveling through all vertices once is figured out for the problem lies of TSP. For example, a path of A1 with vertices as {A, B, C, D, E, A} or {1, 2, 3, 4, 5, 1} and the path A2 with vertices as {A, B, C, E, D, A} or {1, 2, 3, 5, 4, 1} pass all the vertices but A1 has a total length of 17 and A2 has a total length of 29. A mathematical formula for the TSP problem is expressed as follows.
The improved BA based on the technique of the parallel is reviewed in this section. The parallel scheme is significant for enhancing speed computations that exchanging messages with other groups, sharing the computation load, and improving the diversity of individuals. Before mentioning the Parallel BA, the original BA would be reviewed as follows.
Bats algorithm
The original Bats algorithm (BA) is a recent metaheuristic algorithm that simulates the behaviors detecting prey and avoiding enemies of a particular species of the bats [15]. The behaviors of the bats in identifying prey and locating obstacles by using ultrasound that is simulated to process of BA algorithm. In order to simulate the behavior of the bats in searching prey and avoiding enemies, the assumed BA is described as follows: All bats use echolocation methods to sense distances that distinguish between prey and background obstacles. Bat position x
i
with speed v
i
random flight, with a fixed frequency of f
min
, variable wavelength λ and volume A0 for searching for prey. Bat adjusts the transmitted pulse wavelength (or frequency) and adjusts the pulse emissivity r ∈ [0, 1] according to how close it is to the target. Although the volume varies in a variety of ways, in the BA algorithm, it is assumed that volume A changes from a maximum value of A0 (integer) to a fixed minimum A
min
.
For the optimization of the target function of Minf (x) and the target variable of x = (x1, x2, . . . . . . , x d ), the implementation process of the BA algorithm is described as follows:
Step 1: Population initialization, that is, a set of initial solutions for bats to spread in a D-dimensional space randomly. Maximum pulse amount A0, maximum pulse rate R0, search pulse frequency range f min , f max volume attenuation coefficient α, search frequency enhancement coefficient γ, search accuracy ɛ, or maximum iteration number iter _ max.
Step 2: Randomly initialize the position of the Bat x i , and according to the fitness is worth the advantages and disadvantages to find the current optimal solution x*.
Step 3: The parameters of the bats, e.g., velocity, position, and search pulse frequency, are updated as following formulas:
In the formula: β ∈ [0, 1] is the random number of uniform division, f
i
is the search pulse frequency of Bat i, f
i
∈ [f
min
, f
max
];
Step 4: Generate uniform distribution random number r, if new random number > r, the current optimal solution is randomly disturbed to produce a new solution and cross-boundary processing of the new solution.
Step 5: A uniform distribution random number r is generated for switching between exploiting and exploring the mechanism; and with the following condition, the new solution generated from Step 4 is accepted if r < A i andf (x i ) < f (x*), and then update it according to the below formula:
Step 6: The obtained fitness values from the objective function for the current optimal solutions are sorted to find out optimal values.
Step 7: Repeat from Step to Step 5 until the termination condition met or the iterations reached to the maximum.
Step 8: Global optimal value and optimal solution are obtained for the output.
According to the formula (8) (10) of the BA algorithm, the two parameters in the bat algorithm: the attenuation coefficient of the volume α and the enhancement coefficient of the search frequency have a great influence on the performance of the algorithm. How to effectively balance the optimization accuracy and convergence speed of the algorithm, the key is to set the value of parameter alpha and gamma reasonably. The simulation process can obtain the appropriate parameter alpha and gamma values by repeatedly adjusting the values of the parameters α and γ.
The parallel processing has a significant role in the optimization algorithm in executing simultaneously for the complex computation. The improvement of the metaheuristic algorithm by applying the parallel scheme has proven that it provides accurate results and convergence faster than the original approaches [30, 31]. In the mentioned parallel scheme, several subpopulations are created by dividing the population of the original algorithm to build a parallel structure. The sub-warms could be evolved separately over iterations. The attributes among swarms could be exchanged in communication strategies by several actions, e.g., replacing, moving, immigrating, or copying randomly. For example, the best agents are selected for the next generation processing based on fitness values. The poor agents in weak areas within the solution space are replaced with the promising agents in a region. A promising area is figured out for exploring in the searching space. The parallelized BA can be described as detail following steps of the procedure as shown in Fig. 2.

Description of the steps of the parallelized BA.
Some strategies are introduced for communicating agents, e.g., the pairing agents swapping, the best in neighboring. The best agents among all groups would migrate to other groups to replace the worst bats of these groups and update them over the period running time. The best one in a group would replace some more inferior agents to its surrounding groups in the period of running time. A pair of the groups in neighbor would be swapped the most excellent agent for the worst agents and reverse.
The parallelized BA is hybridized with the mutation scheme that is present in this section. The objective function of the TSP is modeled and encoded the hybridized BA solutions for minimizing the cost of traveling roads of the traveling salesman. Begin with the formula of the objective function is presented as follows.
Specific objective function
As mentioned, the traveling salesman problem (TSP) has applied for many related issues to transportation and manufactories, such as planning, scheduling, sequencing, and vehicle routing applications. They have originated solutions from a kind of TSP. The presented TSP is an integer scheme that tries to find out a salesman’s final shortest closed tour from among n cities. The objective function of the TSP problem is to minimize the cost of traveling tours. The formula of the objective function is expressed as follows.
The current locations in optimization processing of the BA algorithm are called the solutions that will be able to exploit for improving search areas that called the promising region. The exploring strategies of parallel BA are as large as possible to be a majority of the search space that is called the exploration mechanism. If the algorithm has an exploration mechanism is dominant in the early steps of the algorithm, it will cause the optima results as dropping final local. The optimal locals could be happed for the algorithm to deal with optimization applications in highly non-linear problems. The algorithm should not facilitate losses exploration that it traps in local optimums.
The early convergence in this phenomenon continually causes the performance of optimizing performance. In a converging population, all the agent solutions have very similar locations. A similarity control mechanism can quantify such similarity. How to balance between exploring and exploiting tools in the algorithm is to escape the local trap optimum. For example, when the convergence is determined, some new bats (solutions) can be added to the population to avoid early convergence. The mutation and parallel are one of the promising ways to enhance mechanism diversity of balancing search mechanisms in metaheuristic algorithms. To enlarge its utility and use it to solve TSP, some changing must be implemented to avoid the trap of local optima.
Summary of the main scheme is given as follows. Applied the proposed hybrid BA for TSP can be described as detail following steps of the procedure.
Facing these mentioned situations in the BA algorithm, a hybridizing the parallel BA solutions with a mutation method is proposed to apply for dealing with local optima. The mutation can make a solution changed in such a way as to alter the agents’ message [32]. That agent is among its neighborhoods carries the exchangeable notes. A mutation agent here swaps two elements in solution changed that is forwarded to the global best.
Figure 3 shows an example of a mutation way of the graph. Suppose there are two routes. These two routes are with n nodes, X = [x1, x2, x3, …, x n ] and Y = [y1, y2, y3, …, y n ] respectively.

An example of a mutation way of the graph.
Comparing them in the same local path from 1 to n, if there are I and j positions satisfied [x i , xi+1, …, xi+l] =] y j , yj+1, …, yi+l, ] if i = n then i + 1 =1, the same of the two routes is defined as a two dimensional matrix.
Suppose a route has n cities, X = [x1, x2, x3, …, x i , xi+1, …, xi+l, …, x n ] i > 1 and i + l ≤ n then we say X′ = [x1, x2, x3, … , xi+l, xi+l-1, …, x i , …, x n ] i > 1 and i + l ≤ n is a L length path.
At first, setting values for parameters of the algorithms are as follows: the population size is set nPop to 500, the maximum iteration is set ItMax to 1000, the loudness and the rate of pulse emission of bat are set A, r, the maximum and minimum of population frequency Q max and Q min respectively.
The algorithm was tested on a set of several Euclidean distance problems, as shown in Table 1, with sizes ranging from 50 to 300 cities. Its name and quantity describe each instance, e.g., in Table 1. The cost of the best solution, Q max = 1, Qmin= 0, α= 0.9, γ= 0.9, step = 0.1 V (i), A (i) and r0 (i) are randomly generated from [15], city number respectively. Table 1 shows the comparisons of solutions of the proposed scheme of hybridized parallel Bat algorithms (HPBA) and the best-known solutions.
Comparisons of obtained solutions of the proposed scheme with the best-known solutions
Comparisons of obtained solutions of the proposed scheme with the best-known solutions
BKS is short for Best Known Solution from the TSPLIB [33]. Q (as in Equation (12) is short for quality that is quality of the produced solutions is given in terms of the relative deviation from BKS.
Observed results from Table 1, it can be seen that HPBA-TSP could find out the about almost instances, approximately 82.152% the best-known solution.
Figure 5 shows the comparison of the performance of the proposed HPBA with the previous work hybrid bat algorithm (HBA) for an instance of TSP-EIL51.

The implementing steps of the hybrid parallel BA (HPBA) for the TSP.

Comparison of the performance of the proposed HPBA with the previous work HBA for an instance EIL51.
Figure 6 depicts the comparison of the proposed HPBA with the HBA for an instance of TSP-EIL51, TSP-EIL76, TSP-BERLIN52, and TSP-RAT99 in terms of the error rate of the optimizations.

Comparison of the proposed HPBA with the previous work HBA for an instance of TSP-EIL51, TSP-EIL76, TSP-BERLIN52, and TSP-RAT99 in terms of the error rate of the optimizations.
Observed results from Figs. 5 and 6 it can be seen that the proposed HPBA-TSP provides better performance and fewer errors then the HBA in comparison.
Figures 7 to 11 display the results of the HPBA for optimization TSP instances as the best tour outputs.

The obtained best route of TSP problem with 40 cities by optimizing hybridized parallel Bat algorithm (HPBA).

The obtained best route of TSP problem with 50 cities by optimizing hybridized parallel Bat algorithm (HPBA).

The obtained best route of TSP problem with 80 cities by optimizing hybridized parallel Bat algorithm (HPBA).

The obtained best route of TSP problem with 100 cities by optimizing hybridized parallel Bat algorithm (HPBA).

The obtained best route of TSP problem with 200 cities by optimizing hybridized parallel Bat algorithm (HPBA).
In this paper, a new hybridizing parallel Bats Algorithm (PBA) and mutation method in graph theory (named (HPBA) was proposed for the combinatorial problem of traveling salesman (TSP) to prevent the trap of local optima. A new local-search for TSP based on hybridizing PBA with a mutation was used to enhance the diverse population and avoid falling local optima in the combinatorial problems. A graph theory mutation method is used to embed for hybridizing BA with exploiting similarities among individuals. The proposed method was evaluated in the TSP with series instances of the benchmark from TSPLIB to test its performance. The compared experimental result with the best-known solutions (BKS) in the literature shows that the proposed approach offers competitive results.
In future work, the further expansion of the PBA and HPBA scheme will apply to improve the performance of the prediction of wind power [34]. We will also use the improved algorithm to different kinds of WSN problems, e.g., the hierarchical Wireless Sensor Networks (WSN) [35], the authenticated key exchange protocol in WSN [36].
