DISCRETE HEAT TRANSFER SEARCH FOR SOLVING TRAVELLING SALESMAN PROBLEM

. Within the academic circle the Traveling Salesman Problem (TSP), this is one of the most major NP-hard problems that have been a primary topic of discussion for years. Developing eﬃcient algorithms to solve TSP have been the goal of many individuals, and so this has been addressed eﬃciently in this article. Here, a discrete heat transfer search (DHTS) is proposed to solve TSP. DHTS uses three distinct phases to update the city tours namely, conduction, convection, and radiation. Each phase performs a certain function as the conduction phase is a replica of the 2-Opt local search technique, the convection phase exchanges the random city with the ﬁnest city tour, and the radiation phase exchanges the random city among two separate city tours without compromising the basics of HTS algorithm. Bench test problems taken from TSPLIB successfully test the algorithm and demonstrate the fact that the pro- posed algorithm can attain results near the optimal values, and do so within an acceptable duration.

1. Introduction. The renowned NP-hard problem, the traveling salesman problem (TSP) compromises in basic terms of a set of cities and the distance between each pair of the cities. For scholars, the overall challenge is to determine which of the routes is not only the shortest in length, but also returns to the origin city after visiting each city exactly once. The entire course including the different cities is labelled as the Hamiltonian circuit (HC) while the shortest Hamiltonian circuit in length is known as the optimal Hamiltonian circuit (OHC) for Euclidean TSP. In the 20 th century, [49] proved the TSP to be NP-complete. Intriguingly, due to its theoretical and practical values [37], TSP has been analyzed extensively in scientific fields of diverse types including computer science, combinatorial mathematics, and graph theory. Despite the extensive research done, there has to be developed polynomial algorithms that operate on all cases of the problem, and not only when NP = P [2]. Though the TSP has complications and is challenging, scholars utilize it as a platform to test an algorithms competence. Looking through the various developed methods to solve TSP, one can observe that these methods can be split into two disjoint categories, exact methods (which assure a final, optimal result) and approximation algorithms. Several researchers would rather use exact methods such as the branch and bound method [23], the dynamic programming method [1] (DM), and the integer programming method [5]. Unfortunately, there exists a limiting factor for these methods, for example, and they only have the ability to solve TSPs < 1000 cities [17]. In fact, there exists a pattern in which the scale becomes larger, the performance decreases and the time required for solving the problems increases at an exponential rate (though if utilizing potent Turing machines, one can still find the OHC within a satisfactory duration). Hence for larger scale problems, approximate algorithms provide finer results. What is even more interesting is that approximation algorithms themselves are also divided into two categories; local search algorithms and heuristic optimization methods. The first type makes use of a problem' s individual attributes to determine its local optimal solution, while the second type strives to find solutions near the optimum. In the literature, some of the mentioned local search algorithms include 2-Opt [6], the LKH [14], Inver over [12], LK [25], and 3-Opt [24]. The artificial immune algorithm (AIS) [16], the ant colony algorithm [20] (ACO), the simulated annealing algorithm(SA) [22], the genetic algorithm (GA) [40], particle swarm optimization (PSO) [21], and the artificial neural networks (ANN) [26], [15], [13] are common examples of developed heuristic methods. The primary reason as to why methods such as ones abovementioned are utilized is that they do not rely on the problem itself, which enables the methods to exhibit potent global search capabilities. As can be seen, each type has separate qualities that aid in solving TSP. As such, various scholars have synthesized the two types into one, thus, developing a new, hybrid algorithm which contains both types of qualities making it more effective in solving TSP. In the literature, systematic procedures produced by mixing the genetic operators and LK [30], combining the genetic algorithm with a 2-Opt [39], combining the ant colony algorithm and mutation strategy [47], proposing the discrete glow worm swarm algorithm (DGSO) [50], proposing an improved and complete 2-Opt (Complete2-Opt,C2OPT) [10], proposing the honey bee mating algorithm [28], proposing the discrete cuckoo search algorithm(DCS) [33], and the hybrid genetic algorithm which contains two optimization strategies (O(n) and O(n 3 )) [46] are examples of what scholars have developed to optimize Euclidean TSP. Results attained by utilizing hybrid methods such as the improved genetic algorithm show that one can reach a satisfactory solution in fewer runs. This is also proven as the author reports the fact that by using the hybrid GA, they attained finer results than when using GA with 2-opt or the classical GA.
One of the new metaheuristic algorithms inspired by the natural law of thermodynamics and heat transfer, called Heat Transfer Search (HTS) algorithm [35] was developed to solve continuous constrained optimization problems. HTS is a population-based algorithm and attracts many researchers to solve various optimization and engineering design problems such as structural optimization [43], sizing optimization of truss structures [7], and multi-objective engineering design problems [42].
As seen from the above researches it can be noted that still TSP problems are not addressed completely and efficient method is required to solve TSP effectively. Many real-life applications can be modelled as discrete complex problems like TSP, and this has motivated us to develop a discrete version of HTS in order to deal with such problems. To add to the collection of efficient methods that can solve TSP in a comparable, if not better fashion, a discrete heat transfer search (DHTS) is proposed within this paper. This method contains three separate phases through which the HC can be updated. The proposed method is developed in such as way that it takes care of the local and global search for the optimum solution. To validate its ability, a benchmark problem (from TSPLIB) is used to judge the algorithm, and the results acquired infer that the proposed algorithm can attain the nearest OHC.
The rest of the paper is structured as follows. Section 2 explains the TSP, Section3 introduces the basic HTS, Section 4 proposes/explains the DHTS, while results are presented and discussed in Section 5, and Section 6 gives the conclusions and future work.
2. The traveling salesman problem. The traveling salesman problem (TSP) is a paradox in the way that it seems effortless to understand, but challenging to solve. For that reason, it is one of the most cited NP-hard combinatorial optimization problems. Graph theory describes this problem as a weighted graph (WG) where variables are defined as follows, is the edge which links the two distinct vertices v i and v j , and d : E → R + ( weight function) where d is usually a factor such as cost or distance. d is vital in determining whether TSP is symmetrical (which according to a report [14] has been proven to be more challenging) or not. If d ij = d ji , then it is symmetric, if not it is asymmetric. The reason for the report concluded the fact regarding the challenging nature is that when testing, it was found that within a specific time frame only 7397 cities of symmetrical TSP were resolved vs. 500,000 cities.
It is found that given a weighted graph of a symmetrical TSP, including the vertices, there are a total of (m-1)!/2 HCs. The OHC is selected based on which HC is smallest in length. As stated in a previous section, if one is to discover the shortest Hamilton circuit (OHC) of a TSP in which the vertices are visited once, then they achieved the overall goal. HC = (v 1 , v 2 , . . . , v m , v 1 ) if the circuit includes m vertices. From there, one can calculate the minimal f(HC) by adding the sum of the entire Euclidean distances and the d between each city from same path Hamiltonian circuit. The computational model of symmetrical TSP is illustrated below in equation 1.
d is the Euclidean distance, between any two cities with coordinates (x 1 , y 1 ) and (x 2 , y 2 ) , and can be calculated using the following equation.

POONAM SAVSANI AND MOHAMED A. TAWHID
Later in the work, one can see the ability of the proposed method when solving a symmetrical benchmark retrieved from TSPLIB.
3. Basic heat transfer search algorithm. The HTS algorithm, proposed in [35], operates by following and understanding the thermal equilibrium of systems. This equilibrium is achieved as a result of applying the natural law of thermos dynamics to systems. The law states "A system will always try to be in equilibrium with its surroundings", meaning that for thermos dynamically imbalanced systems, they will attempt to achieve thermal equilibrium by initiating heat transfers between themselves and their environment. The three kinds of heat transfer, namely, conduction, convection, and radiation, play a key role in achieving thermal equilibrium. The HTS algorithm utilizes the conduction phase, the convection phase, and the radiation phase to attain an equilibrium state. In the HTS algorithm, all three forms of heat transfer have equal probability to transfer the heat. As a result, during the course of optimization, the form of heat transfer determined randomly for each generation.
Like other methods which aim to solve TSP, the HTS algorithm is a populationbased technique, which begins solving by first initiating a randomly generated population. In the system variables are defined as n is the number of molecules/photons (i.e. population size) and m is equal to the temperature level (i.e., design variables). In the following phase, the population is updated for each of the generations (g) by utilizing one of the randomly chosen form of heat transfer. It is important to note that the updated solution obtained by the HTS algorithm is accepted only if it is a finer functional value. If the solution attained is identical to an existing value, they are substituted by a random existing solution. This method of replacing solutions ensures that the fittest solution can be attained by performing the difference between the current solution and either of the best solutions, another random solution, or the mean value of solutions from the population. A detailed description of the three phases used in the HTS algorithm is explained below. In the conduction phase, heat transfer occurs as a result of the conduction between the molecules of the system. The more energetic molecules transfer their heat to the less energetic molecules until a state of thermal equilibrium is reached. Not only has that, but conduction, which follows Fourier's law of heat conduction, also occurred between a system and its surroundings when they are in physical contact. This phase, which follows Newton' s law of cooling, occurs between a system and an adjacent fluid. Heat transfer occurs as a result of the convection between the system and the adjacent fluid in motion, which means that the system's temperature (the mean temperature) interacts with the adjacent fluids temperature (the surroundings) to achieve a state of thermal equilibrium. Here, the best solution is the surrounding. The radiation phase is unique in that the heat transfer occurs as a result of the radiation emitted in the form of electromagnetic waves/photons due to temperature level. This means that the system interacts with either the surrounding temperature (surrounding= best solution) or within the system itself (other solution) to establish thermal equilibrium. One must know that anybody above the temperature of absolute zero emits some form of radiation. Stefan-Boltzmann states that the maximum rate of the radiation heat transfer depends on the level of the absolute temperature level. The HTS is explained in detail below in Algorithm-1.
0in / * update the population in the radiation phase / * 21. k ∈ [1, n] = j / * Select any random population/ * 30. f T j < f (T j ) ↔ T j = T j / * greedy selection/ * 31. else / * update the population in the convection phase / * 32. if g ≤ gmax COF → ∀i : It can be observed that the basic HTS is designed to solve continuous problems. So, effective modifications are required in the basic version of HTS so that it can solve discrete optimization problems. The next section highlights the development of discrete version of HTS.

Discrete heat transfer search (DHTS) algorithm.
Since the DHTS algorithm is built upon the same concept as the HTS it also has three phases of heat transfer which are also used to improve the HC of the TSP. This section briefly explains the three various phases of DHTS.

Conduction phase:
One of the differing points between the HTS and DHTS is that in the proposed method, each Hamilton circuit is taken as the number of molecules of an object (population). The current molecule is denoted as HC j where j = 1, 2, . . . , n; and HC k is a molecule chosen randomly where j = k; k ∈ (1, 2, . . . , n) . In the case that HC j < HC k then HC k will receive energy from HC j and update itself to attain equilibrium. If it is the opposite, then HC j is the one receiving some energy and update itself. This phase modifies the temperature of the molecules depending on the temperature of neighborhood molecules. Usually, the neighborhood search is utilized for continuous improvement of the solution. Within the DHTS, the conduction factor (CDF) represents the number of edges which are exchanged until no further improvement occurs in the HC. In the proposed systematic procedure, to improve the temperature of the molecules, the CDF-opt local search mechanism is utilized. Equations 3 and 4 showcase the mathematical formulation of the updated molecule.
DHTS conduction phase is explained as given in Algorithm-2. The convection phase: Like the basic HTS, the surroundings in the convection phase is considered to be the best solution. As such, the temperature of the molecules also interacts with the adjacent fluid temperature (the surrounding) to attempt to attain thermal equilibrium. In the proposed procedure, the convection factor (COF) signifies the number of cities saved from the current molecules (HC k ) from the sub-tour, from when this last one crosses with the surrounding ( HC j . Since the surrounding = best solution, when HC k > HC j , the current molecule receives energy from the surroundings and heats up by adopting a number of cities from the surrounding HC j . The Convection phase is explained in Algorithm-3.

Algorithm-3: Convection phase of DHTS
1. m=number of molecules/cities 2. Assume convection factor (COF) 3. for k=1:m 4. Choose molecules HC k , HC j k = j, j = 1 5. for i = COF:m-1 11. HC k (i + 1) = HC j (p + 1) 12. end if 13. end for 14. end for 4.3. The radiation phase: The third phase within the DHTS operates in the same fashion as that of the standard HTS. Since the occurring heat transfer is a result of the radiation emitted (form of electromagnetic waves or photons) due to temperature, the system colludes with either the surrounding temperature (best solution) or within the system itself (another solution) to reach thermal equilibrium. Within this phase, the radiation factor (ROF) operates in a manner similar to COF. The current molecule (HC k ) colludes with HC j , which may either be the surroundings or another molecule within the system. In the case that HC k > HC j than current molecule will receive energy and adopt city of HC j , if not, then HC k will not adopt a city from HC j . The radiation phase within the proposed within is explained in Algorithm-4. 10. else / * update the population in the convection phase / * 11. Convection algorithm 12. end if 13. end for 14. endwhile To check the effectiveness of the proposed method, it is required to test it on benchmark traveling salesman problems. The detailed results and discussion are given in the next section.

5.
Results and discussion. Since the question of ability is a deciding factor on a method's efficiency, the DHTS is tested using 41 experimental cases of symmetrical TSP found in the TSPLIB library. Percentage error is reduced by running each case 20 times independently. MATLAB R2014a is utilized to code DHTS since it is a well-known program. For the test cases, population sizes between 15 and 200 generation are considered and the conduction factor is presumed to be 2. To ensure the existence of a two-edge exchange of HC the convection factor and radiation factor are also presumed to be 2. Down below, Table-1 showcases the numerical results obtained using the DHTS algorithm (bold numbers=test cases that DHTS reaches OHC). These results are obtained by calculating Euclidean distances between all vertices. The names of the individual symmetric TSP (ended by the number of cities in the problem) are in column one, the best result obtained using DHTS is shown in column 2, column 3 presents the average solution obtained over 20 runs, the fourth column indicates the standard deviation of acquired solutions over 20 runs, the 5 th and 6 th column present the percentage best solution length found over the 20 separate runs (PDbest% ) and the percentage average solution length found over 20 runs (PDavg% ), and the last column showcases the best known found in the TSPLIB.
To determine the percentage deviation of a solution to the optimal solution the following formula is used: P Dsolution% = solutionlength−optimalsolutionlength optimalsolutionlength ×100 (5) In observance, one can determine that Table-1 illustrates the fact that the DHTS attains OHC for 24 TSP cases and gives near OHC for the remaining. These results also infer that the proposed procedure is capable of solving TSPs of various scales. To provide a visual presentation of the results, a bar graph is created (Figure-1) to show the differences between the acquired best solution with the optimum known. The bar graphs also uncover the fact that for problems less than 300 cities, the DHTS is capable of finding the optimum solutions successfully, while for anything larger it can still reach solutions near the optimal. Using the average value of the best solutions attained in the 20 runs, one can judge its ability in solving problems. This is only possible because the DHTS is a heuristic approach to TSP problems. The differences between the obtained mean and the known is illustrated in Figure-2 where it is observed that as the number of cities increases, the DHTS has the ability in solving decreases. The percentage deviation for the best and the mean solutions are presented in Figure-3, which also infers that the larger the number of cities, the lower the performance of the DHTS (though that does not change the fact that the DHTS can still reach near global solutions for the various TSP problems).
As it is extremely important to ensure quality, the results of the DHTS are compared with the results obtained using some of the other well-known state-of 274 POONAM SAVSANI AND MOHAMED A. TAWHID the art algorithms such as various versions of the ACO like ACO with; multiple ant clans (ACOMAC) and ACOMAC with the closest neighborhood, simulated annealing, 2-opt, hybrid ACO, Taguchi method, and at the end, ACO with ABC. Not to mention the ACO. But the algorithm is also contrasted with other methods such as hybrid PSO, hybrid GA, GA with ACO, RABNET, water flow algorithm, and IVRS. The average value of the solutions attained is shown in Table-2 from which one can infer that the proposed method exceeds the compared methods in all, but for 6 problems (even then, for those 6 they are only slightly inferior).
Below in Table-4, the comparison between DIWO [51] and DHTS is illustrated. DIWO [51] presents the results procured from the various TSP instances(51-1002 cities) in term of a % PD average. The table also demonstrates the fact that the DHTS exhibits a superior performance in contrast to the DIWO. Figure-4 is a graphical representation of the comparison between the DHTS and DIWO [51].  [34], GCGA with local search [48], Massutti and Castro's method [29], GSA ant-colony system with PSO [3], HGA [46] , ACE [9] and improved BA [31] 6. Conclusions and future work. To conclude, this work modifies the existing heat transfer search (HTS) algorithm to incorporate discrete variables thus turning it into an employable method to solve travelling salesman problems. The excellent performance of the discrete HTS (DHTS) is validated through the testing of the method on 41 different benchmark problems retrieved from the TSP library in which the proposed algorithm yields the optimal HCs for 24 of the 41 instances and gives near optimal HCs for the remaining tests. Additionally, besides using various benchmark problems, the ability of DHTS in solving TSP is compared with other states of art algorithms which are derived from methods such as the particle swarm optimization, the genetic algorithm, artificial bee colony optimization, ant colony optimization, and other methods within that platform. The various comparisons successfully illustrate the fact that the ability of DHTS?in solving TSP is comparable if not better with other states of the art methods.
As future work, the authors plan to enhance our proposed algorithm to solve other combinatorial optimization problems such as vehicle routing [44], scheduling and mixed-integer programming problems. Moreover, we intend to generalize this work to solve some kinds of TSP problems such as asymmetric [4], spherical [33] and generalized TSP [41].   Figure-4: The Graphical representation of the comparisons between the proposed DHTS and DIWO [51].