We provide an improved algorithm called “a neighborhood expansion tabu search algorithm based on genetic factors” (NETS) to solve traveling salesman problem. The algorithm keeps the traditional tabu algorithm’s neighborhood, ensure the algorithm’s strong climbing ability and go to the local optimization. At the same time, introduce the genetic algorithm’s genetic factor (crossover factor and variation factor) to develop new search space for bounded domain. It can avoid the defects of the alternate search. The results show that this optimization algorithm has improved a lot in the target of “target value”, “convergence” and compared with traditional tabu algorithm and genetic algorithm.
Traveling salesman problem (TSP) is one of the most classic problems in traffic path optimization. It is a minimum path cost of road planning problem when a single traveler start from a point, through all the requirements points only once, finally return to the origin.
TSP has a lot of applications in reality, such as computer networking, electronic maps, traffic induction, electrical wiring, VLSI layout, ATM packet-switched networks [
Tabu search [
Tabu search algorithm only search in a designated adjacent neighborhood space. Speed, therefore, is a big advantage, but it is easily trapped into local optimization. So it is an important step to master the neighborhood space for obtaining the target. Moreover, the traditional scatter search strategy of tabu search will jump to the sub-optimal solution’s search space when current optimal solution keep certain search times, which waste a lot of time and reduce the scatter search ability. Tabu search has only one initial solution in the search process. So it has a strong dependence to the initial solution. A good initial solution might result a good convergence, a poor initial solution may be bad conversely. Below shows the pseudo code of tabu search:
Genetic algorithm [
Genetic algorithm, belong to group search, is easy to parallel processing. And heuristic search is not exhaustive blindly, but enhance the global search ability. But the probability of crossover and mutation operator in genetic algorithm is small, it lead to the limitation of search space and weakness of climbing ability. When the number of groups growing, the target effect worse and worse, time consuming longer and longer. All these can’t satisfy the demand of reality. Below shows the pseudo code of genetic algorithm:
The application scope is restricted although GA and TS have their own successful application in the reality [
NETS will conduct an optimization of standard neighborhood (i.e., a mountain climbing) first, only the selected neighborhood will carry out crossover and mutation. It can guide the extended neighborhood toward an optimum solution. Then NETS will conduct another optimization of final neighborhood (including optimized and extended neighborhood). Where there is a climbing, there is a search. It’s a decentralized strategy that recorded the optimal value and improved efficiency. Below shows the pseudo code of process of NETS optimization neighborhood:
We introduce the crossover and mutation factors of GA to extend the neighborhood. And Partially Mapped Crossover (PMC) [
When exchange the mapping area between A and B, we can get:
Obviously, there are same node in A’ and B’, for example, 3 has appeared two times in A’, At this point, we can exchange A’ and B’s node outside the mapping area according to the location of the mapping area node, we can get:
In addition to crossover, 3 methods are used to variation: 2-opt operation, shift operation and exchange operation [
1) 2-opt operation
Select a node as a starting point, then find another nearest node and reverse the nodes between the two points. Shown in
2) shift operation
Find a star point and a length, extract these nodes, and then put the segment after the rest nearest node. As shown below, the node is 3 and the length is 3, node 4 is the rest nearest node, the extracted segment is put after node 4.
3) exchange operation
Select one node, exchange the position of two segments before and after the node. As shown below, select node 9, change the two segments before and after node 9.
The neighborhood got great extension when introduce the crossover and mutation operator. NETS has strong dispersion and improve the efficiency of the decentralized search.
The algorithm described in this paper was coded in Matlab2012b, and all experiments were run on Windows 7 operating system with 6GB memory and Intel Core (TM) i3 CPU M380.
The experimental data of this paper is come from standard symmetric TSP test problem sets of TSPLIB (Reinelt, 1991) (available at http://www.iwr.uni-heidelberg.de/groups/comopt/software/TSPLIB95/tsp/). The data scale is 14, 16, 22, 29, 48 and 52. We compared the traditional TS, GA and NETS in target value, convergence and time consuming.
There is no exact solution for that TSP belongs to NP problem. We carry out 20 times experiments for each algorithm. The results are shown in
Experimental results show that when the number of nodes is small, the best target value of NETS is the same as traditional TS and GA, but the average of NETS is better than TS and GA even if the difference is less than 1%. With the increase of the number of nodes, the target value of NETS is superior to TS and GA significantly. Especially, when the data sets reach to 48 and 52, it regards as failure for GA because the target value deviates too much from our expectations. And the average value of NETS is increased by 6% and 8.6% than TS respectively. Thus, NETS has a great improvement in the target value of the solution compared with TS and GA.
The search process of NETS, TS and GA is almost the same in data set “Burma14”. Thus, we’ll display the search process of the optimal solution in one graph of remaining six sets of data with different algorithms (GA is valid only in the four set of data).
We can find from the
Data sets | NETS | TS | GA | |||
---|---|---|---|---|---|---|
Best | Avg | Best | Avg | Best | Avg | |
Burma14 | 30.87 | 30.87 | 30.87 | 30.87 | 30.87 | 30.87 |
Ulysses16 | 73.98 | 73.98 | 73.98 | 73.98 | 73.98 | 73.98 |
Ulysses22 | 75.3 | 76.28 | 75.3 | 77.38 | 75.3 | 76.46 |
Bays29 | 9076 | 9172 | 9349.45 | 9491.2 | 9926.4 | 10065.3 |
Dantzig42 | 686.88 | 720.56 | 743.7 | 802.55 | 805.1 | 886.6 |
Att48 | 33523 | 35159 | 37034 | 38481.6 | - | - |
Berlin52 | 7544 | 8032 | 8429.23 | 8701.27 | - | - |
60 iterations. When the number of nodes is greater than 30, convergence of the 3 algorithms are all slow down. NETS and GA are close to their optimal target values after 100 iterations, but TS needs 160 iterations and is easy to fall into local optimum. However, the target value of the GA has deviated from the other two algorithms, which is obviously invalid. In conclusion, the convergence speed of NETS is improved greatly compared with the traditional TS and GA.
NETS need to expand the neighborhood, so there are two selecting process. The first time is to optimize the basic neighborhood. The second time is to optimize the preferred neighborhood after introduce crossover and mutation factors. Thus, the NETS add iteration operation of optimization, crossover and mutation. When the number of node is small, the time consuming is almost the same, but when the number of the nodes increases, NETS will consume time more 20% than TS. This is the next part need to optimize.
In this paper, we design an improving algorithm called “neighborhood expansion tabu search algorithm based on genetic factors” to solve the TSP problem. NETS keep the strong search ability of TS, which guide to a quick and accurate search speed. Then it expends the neighborhood of the initial solution by introducing genetic operators of GA, which make the scattered search and focus search simultaneously. NETS reduce the probability of local optimal search and improve the convergence speed greatly. Compared with the standard TS and GA, with the increase of the number of nodes, the target value of NETS is more superior. And the convergence rate of NETS is faster than other algorithms at the same node. Since the research involved only distance but with no fuel, congestion, so we’ll take more factors into the consideration to achieve maximum benefit with minimal cost next step.
This research was supported by the Scientific Research Common Program of Beijing Municipal Commission of Education under Grant KM201310011009, the National Natural Science Foundation of China under Grant 71201004, the Key Program of Beijing Social Science Foundation under Grant 14JGA013, and the Improvement Program of Postgraduate Scientifical Capability of Beijing Technology and Business University.
Dan Wang,Haitao Xiong,Deying Fang, (2016) A Neighborhood Expansion Tabu Search Algorithm Based On Genetic Factors. Open Journal of Social Sciences,04,303-308. doi: 10.4236/jss.2016.43037