A Two-Way Parallel Slime Mold Algorithm by Flow and Distance for the Travelling Salesman Problem

Featured Application: The design of this article can be applied to Travelling Salesman Problem and related problems. Abstract: In order to solve the problem of poor local optimization of the Slime Mold Algorithm (SMA) in the Travelling Salesman Problem (TSP), a Two-way Parallel Slime Mold Algorithm by Flow and Distance (TPSMA) is proposed in this paper. Firstly, the ﬂow between each path point is calculated by the “critical pipeline and critical culture” model of SMA; then, according to the two indexes of ﬂow and distance, the set of path points to be selected is obtained; ﬁnally, the optimization principle with a ﬂow index is improved with two indexes of ﬂow and distance and added random strategy. Hence, a two-way parallel optimization method is realized and the local optimal problem is solved e ﬀ ectively. Through the simulation of Traveling Salesman Problem Library (TSPLIB) on ulysses16, city31, eil51, gr96, and bier127, the results of TPSMA were improved by 24.56, 36.10, 41.88, 49.83, and 52.93%, respectively, compared to SMA. Furthermore, the number of path points is more and the optimization ability of TPSMA is better. At the same time, TPSMA is closer to the current optimal result than other algorithms by multiple sets of tests, and its time complexity is obviously better than others. Therefore, the superiority of TPSMA is adequately proven.


Introduction
The Travelling Salesman Problem (TSP) [1,2] is a classical problem in Non-Deterministic Polynomial problems, and has important practical significance in road network planning, workshop dispatch, and so on. With the development of the heuristic bionic algorithms and their good effect on solving problems, TSP has been solved by various intelligent algorithms such as Genetic Algorithm (GA) [3,4], Particle Swarm Optimization (PSO) [5,6], Ant Colony Optimization (ACO) [7,8], the classic heuristic Lin-Kernighan [9,10] and Lin-Kernighan-Helsgaun Solver (LKH) [11,12], etc. PSO is simple, but its effect is not good. The effect of GA is general and the algorithm is complex. ACO has a good effect, but its convergence speed is slow. For Lin-Kernighan, its complexity increases exponentially with the increase in the number of path points, so it takes too long to obtain results. LKH is an improved algorithm on the basis of Lin-Kernighan. Although the optimization method is the best so far in TSP, the time complexity is still too large to optimize quickly. In 2000, Japanese scientist Nakagaki [14,[24][25][26] discovered that the slime mold can walk through the maze. The researchers placed the slime molds in a maze and dropped food at the entrance and exit of the maze in a petri dish. After a period of time, slime molds formed a feeding route. It was obtained as the solution to solve a complex maze problem. In 2007, Tero [27,28] came up with the model of "pipeline culture," which mainly used Poisson Theorem and Kirchhoff's Laws to realize the pipeline mechanism of flow and conductivity. This model can be equivalent to the foraging behavior of slime molds. Afterwards, Gunji et al. [29,30] applied the model to the description of networks in a cellular model. In China, Southwest University has studied the Slime Mold Algorithm combined with the pheromones of the Ant Colony Optimization to solve the classic TSP and multi-object TSP [31][32][33][34]. Compared with other algorithms, SMA has high-efficiency optimization ability, especially in solving the complex path problem, which includes a large number of points and complex distribution [35][36][37]. The way of SMA has made a new method to solve TSP. At the same time, the convergence of SMA is fast, due to fewer iterations. However, SMA has been researched more recently than the others, and there is still a lot of room to investigate and improve [1,2,27,28,33,34]. In summary, the bottlenecks besides its advantages in TSP are as follows: • Due to the high similarity of some flow values, SMA cannot make a suitable choice. If points are selected only by flow, the ability will have a great limitation of global optimization. • SMA has no randomness and the selected points and the points to be selected have strong correlations. Therefore, SMA has low flexibility and weak robustness.
The Two-way Parallel Slime Mold Algorithm (TPSMA) by flow and distance for TSP is proposed in this paper. TPSMA involves two indicators of flow and distance for path selection and adds random factors. TPSMA will improve the quality of SMA for solving TSP and achieve the following advantages: • The selection rule combines two indicators of flow and distance, which makes SMA not only rely on the flow. It can better improve global optimization ability and prevent the algorithm from falling into local optimum.

•
The proposed TPSMA adds random factors to increase the diversity of path choices and improve the robustness of the algorithm. In 2000, Japanese scientist Nakagaki [14,[24][25][26] discovered that the slime mold can walk through the maze. The researchers placed the slime molds in a maze and dropped food at the entrance and exit of the maze in a petri dish. After a period of time, slime molds formed a feeding route. It was obtained as the solution to solve a complex maze problem. In 2007, Tero [27,28] came up with the model of "pipeline culture," which mainly used Poisson Theorem and Kirchhoff's Laws to realize the pipeline mechanism of flow and conductivity. This model can be equivalent to the foraging behavior of slime molds. Afterwards, Gunji et al. [29,30] applied the model to the description of networks in a cellular model. In China, Southwest University has studied the Slime Mold Algorithm combined with the pheromones of the Ant Colony Optimization to solve the classic TSP and multi-object TSP [31][32][33][34]. Compared with other algorithms, SMA has high-efficiency optimization ability, especially in solving the complex path problem, which includes a large number of points and complex distribution [35][36][37]. The way of SMA has made a new method to solve TSP. At the same time, the convergence of SMA is fast, due to fewer iterations. However, SMA has been researched more recently than the others, and there is still a lot of room to investigate and improve [1,2,27,28,33,34]. In summary, the bottlenecks besides its advantages in TSP are as follows:

•
Due to the high similarity of some flow values, SMA cannot make a suitable choice. If points are selected only by flow, the ability will have a great limitation of global optimization. • SMA has no randomness and the selected points and the points to be selected have strong correlations. Therefore, SMA has low flexibility and weak robustness.
The Two-way Parallel Slime Mold Algorithm (TPSMA) by flow and distance for TSP is proposed in this paper. TPSMA involves two indicators of flow and distance for path selection and adds random factors. TPSMA will improve the quality of SMA for solving TSP and achieve the following advantages:

•
The selection rule combines two indicators of flow and distance, which makes SMA not only rely on the flow. It can better improve global optimization ability and prevent the algorithm from falling into local optimum.

•
The proposed TPSMA adds random factors to increase the diversity of path choices and improve the robustness of the algorithm. The structure of the rest of the article is: the second part describes the basic principle of SMA; the third part describes the design of TPSMA, including a specific, improved strategy; the fourth part, simulation and analysis; the fifth part, conclusions.

Slime Mold Algorithm
According to the foraging behavior of slime mold, the basic idea of SMA is: the slime molds expand to every direction and stretch themselves to cover the surroundings. Then, the slime mold will shrink back to the direction without food or far away from food, and they will continue to expand in the direction of food. That is, if they feel that the food is abundant, they will continue to expand; if they feel that the food is scarce, they will shrink and return. After a period of time, the slime molds will form a path, like a pipeline, and find the shortest route.
The "pipeline culture" model can be abstracted by slime mold foraging. The basic principle of SMA is [20][21][22][31][32][33][34]: firstly, pipeline paths are built in all directions and form a network between the food sources by imitating foraging behavior of slime mold; then, based on the length of each path, the width of pipeline, and the obstacles on path, foraging paths can be obtained; thirdly, under the effect of iteration, the stable distribution of flow will be formed through a period of dynamic transformation; finally, a path is generated from the start position to the end that has the food. The schematic diagram of SMA is shown in Figure 2. According to the slime mold algorithm in solving TSP, we obtain the "pipeline culture" model [2,[31][32][33][34][35][36][37], and the specific algorithm is as follows: Appl. Sci. 2020, 10, x FOR PEER REVIEW 3 of 20 The structure of the rest of the article is: the second part describes the basic principle of SMA; the third part describes the design of TPSMA, including a specific, improved strategy; the fourth part, simulation and analysis; the fifth part, conclusions.

Slime Mold Algorithm
According to the foraging behavior of slime mold, the basic idea of SMA is: the slime molds expand to every direction and stretch themselves to cover the surroundings. Then, the slime mold will shrink back to the direction without food or far away from food, and they will continue to expand in the direction of food. That is, if they feel that the food is abundant, they will continue to expand; if they feel that the food is scarce, they will shrink and return. After a period of time, the slime molds will form a path, like a pipeline, and find the shortest route.
The "pipeline culture" model can be abstracted by slime mold foraging. The basic principle of SMA is [20][21][22][31][32][33][34]: firstly, pipeline paths are built in all directions and form a network between the food sources by imitating foraging behavior of slime mold; then, based on the length of each path, the width of pipeline, and the obstacles on path, foraging paths can be obtained; thirdly, under the effect of iteration, the stable distribution of flow will be formed through a period of dynamic transformation; finally, a path is generated from the start position to the end that has the food. The schematic diagram of SMA is shown in Figure 2. According to the slime mold algorithm in solving TSP, we obtain the "pipeline culture" model [2,[31][32][33][34][35][36][37], and the specific algorithm is as follows: (1) Variables initialize.
(2) Calculate the distance between each path point by distance formula. The distance between each path point is calculated by: where i x , j x represent the abscissa of i and j , and i y , j y represent the ordinate of i and j . ij L is defined as the distance between i and j , also called the pipeline length of i to j .
(3) Each path point can be regarded as a node in the pipeline network, and we will select two path points as the entrance point and the exit point, respectively. Then, the pressure value of each path point is calculated according to Kirchhoff's Laws. The formula is expressed as:  (1) Variables initialize.
(2) Calculate the distance between each path point by distance formula. The distance between each path point is calculated by: where x i , x j represent the abscissa of i and j, and y i , y j represent the ordinate of i and j. L ij is defined as the distance between i and j, also called the pipeline length of i to j.
(3) Each path point can be regarded as a node in the pipeline network, and we will select two path points as the entrance point and the exit point, respectively. Then, the pressure value of each path point is calculated according to Kirchhoff's Laws. The formula is expressed as: where D ij represents the conductivity of pipeline between i and j. P i and P j are the pressure of point i and j. The solution of conductivity needs to set a point pressure as the reference, and then calculate the rest of pressure of each point. For example, setting p 2 = 0 as the reference point of pressure.
(4) Q ij is defined as the flow value between i and j. Q ij needs to combine the relationship among the difference of pressure P i − P j , conductivity D ij , and distance L ij . The relation's formula that calculates the flow of each path pipeline is: (5) D ij is the conductivity between i and j. The pipeline conductivity is required to be updated constantly. The calculation's formula is as follows: The iterative formula after deformation is: (6) According to above process of (3) to (5), we complete the next cycle repeatedly until getting to the iteration termination condition. The stable value D ij and Q ij will be obtained by carrying out iteration, and the iterative condition of termination is defined as: (7) According to the final flow values, the next selected point is determined, and the path will be obtained by selecting the point of largest flow, from the starting point, one by one. After completing the selection of one point, the selected point P next will become the current point i in the next point selection process. The point i is recorded into L best by Equation (8), and the path result L best is finally obtained by SMA. The concrete formula is shown as: where Q inext represents the pipeline flow with the largest value from the current point i to the other points. At the same time, it is the flow of next path point selected. L best is the path result by SMA.

Two-Way Parallel Slime Mold Algorithm by Flow and Distance
Due to the short development time, the research depth of SMA is insufficient and many details of the model have to be explored. As far as the "pipeline cultivation" model of SMA, the path point selection is only based on the flow value, and there is only one path to be obtained, so it makes the optimization results limited. Moreover, SMA cannot jump out of the local optimum, especially in the complex situation of points. Therefore, TPSMA is designed by using two-way parallel optimization on flow and distance in this paper. As shown in Figure 3, it uses two reference indicators of flow and distance to search for next point, instead of the original principle, which is selecting the next point only by flow. At the same time, a random factor is added when points are selected by the flow and distance, to increase the diversity of result. random factor is added to achieve the selection of the next point when we select the points in point set. Finally, the optimized result of TPSMA will be obtained by iterating. According to the principle of TPSMA on flow and distance, the algorithm is applied to the solution of TSP. As illustrated in Figure 4, the specific steps are as follows: (1) Variables initialize.
(2) According to the Formulae (1)-(3), the distance ij L and the flow ij Q are calculated.
(3) According to (2), we are going to complete the updating of conductivity and flow by Formula (5) and (3). Then, the final flow values are obtained by iterating until the condition (6) of termination is satisfied.
(4) According to the two indexes of flow and distance, the point is selected in a two-way parallel method, and the specific contents are as follows: And the optional point is: (ii) LQ e is defined as the difference between Qibest L and Qibetter L . If the distance of the path with the largest flow is too long or similar to others, the point in QL P will be selected as the next point by random factors. Otherwise, Qibest P , which is obtained by the maximum flow, is going to be chosen as the next point. The improved rule, which is a two-way parallel selective method of flow and distance, is formulated by next P , as expressed in (11) and (12): The schematic diagram of TPSMA is illustrated in Figure 3. Firstly, the flow value between points is obtained by using the "pipeline culture" model of SMA. Secondly, the path point can be selected by the flow and distance, according to the newly designed rule. The distance difference needs to be calculated between the path with the largest flow and the path with the second largest flow. If the distance difference is large, and the distance with the largest flow is shorter, the point with the largest flow will be selected as the next point. Otherwise, we need to form a point set that includes the shortest path point, the shorter path point, and the path point with the larger flow. Then, a random factor is added to achieve the selection of the next point when we select the points in point set. Finally, the optimized result of TPSMA will be obtained by iterating.
According to the principle of TPSMA on flow and distance, the algorithm is applied to the solution of TSP. As illustrated in Figure 4, the specific steps are as follows: (1) Variables initialize.
(2) According to the Formulae (1)-(3), the distance L ij and the flow Q ij are calculated.
(3) According to (2), we are going to complete the updating of conductivity and flow by Formula (5) and (3). Then, the final flow values are obtained by iterating until the condition (6) of termination is satisfied.
(4) According to the two indexes of flow and distance, the point is selected in a two-way parallel method, and the specific contents are as follows: (i) We select the Q ibest of the largest flow value and the Q ibetter of the second largest flow value from the points to be selected and define the point of P Qibest and P Qibetter . At the same time, the shortest distance L ibest and the second shortest distance L ibetter are respectively found out and defined the point of P Libest and P Libetter . As follows, P Qibetter , P Libest and P Libetter are taken and formed a set P QL . P Qibest is defined as the other choice of next point. The formula of point set is: And the optional point is: (ii) e LQ is defined as the difference between L Qibest and L Qibetter . If the distance of the path with the largest flow is too long or similar to others, the point in P QL will be selected as the next point by random factors. Otherwise, P Qibest , which is obtained by the maximum flow, is going to be chosen as the next point. The improved rule, which is a two-way parallel selective method of flow and distance, is formulated by P next , as expressed in (11) and (12): where L Qibest is the distance of the path with the maximum flow, L Qibetter is the distance of the path with the second largest flow, P next represents the next path point to be selected, Rand P QL represents a random value in P QL , which is the set of selected points, and ε is the determining parameter of distance difference. By adjusting the value of ε, which is usually a negative, an appropriate cut-off point will be obtained. represents a random value in QL P , which is the set of selected points, and ε is the determining parameter of distance difference. By adjusting the value of ε , which is usually a negative, an appropriate cut-off point will be obtained.
(5) According to (4), a circulation will be completed when all the points are selected and the optimization result has been obtained. Then, the iterations are carried out until getting the termination condition. ength L , which is the set including all the paths, is obtained. Finally, the formula that can get the optimal path best L in ength L is obtained by: According to the above-mentioned steps, TPSMA is summarized as Table 1: (5) According to (4), a circulation will be completed when all the points are selected and the optimization result has been obtained. Then, the iterations are carried out until getting the termination condition. L ength , which is the set including all the paths, is obtained. Finally, the formula that can get the optimal path L best in L ength is obtained by: According to the above-mentioned steps, TPSMA is summarized as Table 1: Table 1. The steps of TPSMA.

A Two-Way Parallel Slime Mold Algorithm by Distance and Flow
input: TSP path points output: TSP shortest path (a) Initialization process Step 1 Initialize variables and parameters (b) Calculate the distance and flow Step 2 Get the distance L i j according to Formula (1) Step 3 Get the flow Q i j by the Formulas (2) and (3)

of Kirchhoff's Laws
Step 4 Update the conductivity by Formula (5) Step 5 Return to Step 3 to cycle until iterative condition is terminated and obtain the stable flow value Q i j (c) The point selection by a two-way parallel method Step 6 Select the points P Libest , P Libetter , P Qibest and L Qibetter , and gain two sets of points according to the Formula (9) and (10) Step 7 Obtain the value e LQ by subtracting L Qibest from L Qibetter . Then, complete the selection of point in turn by using the two-way parallel Formula (11) and (12) Step 8 Return to Step 6 to finish the iterations until the iterative condition is satisfied, then get all the paths L ength (d) Obtain the result Step 9 Obtain and output the optimal path L best by the Formula (13)

Simulation and Analysis of Results
Traveling Salesman Problem Library (TSPLIB) is a library of sample instances for the TSP from various sources. Each set is a two-dimensional array containing horizontal and vertical coordinates of some cities, which is used as a test of intelligent algorithms. By using TSPLIB data to test and simulate in MATLAB, the experimental results were compared and analyzed to verify the effectiveness of TPSMA.

Result of Simulation
We selected four datasets of TSP in TSPLIB; ulysses16, city31, eil51, gr96, and bier127. Of these, city31 is the data set of longitude and latitude coordinates of the locations of 31 cities in China. Multiple sets of data are selected to ensure the reliability of the conclusions. At the same time, the number of the four groups of datasets is 16, 31, 51, 96, and 127, separately and increasing in order. It increases the difficulty of optimization and fully verifies the performance of the algorithm.

Analysis of Selection Processing
Taking ulysses16 data as an example, the optimization ability of TPSMA is verified by analyzing the optimization process. Figure 5 and Table 2 are simulations and partially obtained paths under ulysses16 data. In the Tables, red represents the current point and optimal result, green represents the selected point by SMA and TPSMA, and blue represents the remaining points in the set of candidate points by TPSMA. Figure 10 shows the flow and distance values from path point 12 to the remaining path points, and their ranking of each point.
When the current point is 12, it can be found in Figure 10 that the points of the largest flow, the second largest flow, the shortest distance, and the second shortest distance in the remaining candidate points are 15, 16, 8, and 11, respectively. In Table 2, point 15 with the maximum flow is selected by SMA, and the path 5 is the optimization result of SMA with a path length of 103.174. There are four candidate points, 15, 16, 8, and 11, which are obtained by TPSMA. Moreover, the path 1 to path 4 in Table 2 can be realized by adding random factors, and path 1 is the optimal result of TPAMA with a path length of 77.8372.

Analysis of Selection Processing
Taking ulysses16 data as an example, the optimization ability of TPSMA is verified by analyzing the optimization process. Figure 5 and Table 2 are simulations and partially obtained paths under ulysses16 data. In the Tables, red represents the current point and optimal result, green represents the selected point by SMA and TPSMA, and blue represents the remaining points in the set of candidate points by TPSMA. Figure 10 shows the flow and distance values from path point 12 to the remaining path points, and their ranking of each point. When the current point is point 3, it can be obtained in Figure 11 that the candidate points are 1, 2, and 7. Path 1 to path 5 in Table 3 can be obtained by random factors, and path 1 is the final result of TPSMA in this paper. Point 1 is selected after point 3 and the path length is 77.8372 in path 1. Furthermore, Table 3 shows that the next point of point 3 in path 2 is point 1 and the next choice of   When the current point is 12, it can be found in Figure 10 that the points of the largest flow, the second largest flow, the shortest distance, and the second shortest distance in the remaining candidate points are 15, 16, 8, and 11, respectively. In Table 2, point 15 with the maximum flow is selected by SMA, and the path 5 is the optimization result of SMA with a path length of 103.174. There are four candidate points, 15, 16, 8, and 11, which are obtained by TPSMA. Moreover, the path 1 to path 4 in Table 2 can be realized by adding random factors, and path 1 is the optimal result of TPAMA with a path length of 77.8372.

No. Path Optimization Results (Points Order)
When the current point is point 3, it can be obtained in Figure 11 that the candidate points are 1, 2, and 7. Path 1 to path 5 in Table 3 can be obtained by random factors, and path 1 is the final result of TPSMA in this paper. Point 1 is selected after point 3 and the path length is 77.8372 in path 1. Furthermore, Table 3 shows that the next point of point 3 in path 2 is point 1 and the next choice of point 12 is point 11. The choices of two points is the same as the result of TPSMA in path 2. In contrast, only the next point of point 3 is the same as path 1 in path 3 and the next point of point 3 and point 12 in path 4 and path 5 is different from path 1. What is more, the results show that the path lengths of path 1, path 2, and path 3 are better than path 4 and path 5. From Table 3, it can be analyzed that the more points that selected by distance and flow, the better the result will be obtained. The above results show that TPSMA of two parameters with flow and distance is superior to SMA.

Analysis of Diversity
Under the data of ulysses16, as shown in Figure 12, SMA only gets path 1. However, the optimization process of TPSMA obtains the path 1 and path 2, which is the same as the length result of SMA. At the same time, in Figure 12, TPSMA gets two groups of paths 5 to 6 and paths 7 to 9. The path lengths of each group are the same but the paths have different orders of points. Similarly, TPSMA will produce a variety of cases due to the addition of random factors. Therefore, the diversity and comprehensiveness of the optimization results are increased.

Analysis of Diversity
Under the data of ulysses16, as shown in Figure 12, SMA only gets path 1. However, the optimization process of TPSMA obtains the path 1 and path 2, which is the same as the length result of SMA. At the same time, in Figure 12, TPSMA gets two groups of paths 5 to 6 and paths 7 to 9. The path lengths of each group are the same but the paths have different orders of points. Similarly, TPSMA will produce a variety of cases due to the addition of random factors. Therefore, the diversity and comprehensiveness of the optimization results are increased.

Analysis of Optimization Ability in Different Numbers of Points
Based on four sets of data from ulysses16, city31, eil51, gr96, and bier127, the simulation diagrams are shown in Figures 5-9, and the results of data are shown in Table 4. Based on the analysis of the data, it can be obtained that: Firstly, under the four sets of data, compared with SMA, the optimization ability of TPSMA is improved by 24.56, 36.10, 41.88, 49.83, and 52.93%, respectively. Therefore, the result of TPSMA is obviously better than SMA in Figure 13a.
Secondly, as per the experimental results also shown in Figure 13b, the improved percentages of TPSMA are gradually increased with the increasing number of points. It can be seen that TPSMA designed in this paper is more powerful in solving TSP with large points and complex distribution. Thus, the experimental results fully verify the rationality and superiority of TPSMA.

Analysis of Optimization Ability in Different Numbers of Points
Based on four sets of data from ulysses16, city31, eil51, gr96, and bier127, the simulation diagrams are shown in Figures 5-9, and the results of data are shown in Table 4. Based on the analysis of the data, it can be obtained that: Firstly, under the four sets of data, compared with SMA, the optimization ability of TPSMA is improved by 24.56, 36.10, 41.88, 49.83, and 52.93%, respectively. Therefore, the result of TPSMA is obviously better than SMA in Figure 13a

Comparision with Other Algorithms
Based on some sets that have large points in TSPLIB, we can obtain the following by experiment. Table 5 is the results of each heuristic and bionic algorithm under different data sets. From the experimental results in Figure 14, the TPSMA results are obviously better than GA and PSO, and similar to ACO. Since the initial pheromone distribution of ACO is unpredictable, the reasonable distribution of pheromones needs to be gradually formed by iteration. Therefore, the convergence speed is very slow. Although TPSMA optimization results were slightly worse than ACO, TPSMA optimization speed was significantly better than ACO. Compared with the current best optimization result, which is from LKH, the result of TPSMA is not as good as LKH; however, it is closer to the optimal result than other algorithms. Moreover, LKH is in virtue of the 5-opt principle which is based on the -opt λ algorithm. The more task points there are, the more iteration time it will cost, and the convergence performance will be poor. We can get the degree of difficulty about algorithm principle and the algorithm time complexity in Table 5. It can be seen that the TPSMA algorithm is simple in principle and easy to analyze. At the same time, the algorithm time complexity of TPSMA ( 3 N ) is less 1/N times than that of ACO ( 4 N ), and less 2 1/N times than that of LKH ( 5 N ). TPSMA has fast convergence speed and short optimization time due to low algorithm time complexity, especially in large data points.  Secondly, as per the experimental results also shown in Figure 13b, the improved percentages of TPSMA are gradually increased with the increasing number of points. It can be seen that TPSMA designed in this paper is more powerful in solving TSP with large points and complex distribution. Thus, the experimental results fully verify the rationality and superiority of TPSMA.

Comparision with Other Algorithms
Based on some sets that have large points in TSPLIB, we can obtain the following by experiment. Table 5 is the results of each heuristic and bionic algorithm under different data sets. From the experimental results in Figure 14, the TPSMA results are obviously better than GA and PSO, and similar to ACO. Since the initial pheromone distribution of ACO is unpredictable, the reasonable distribution of pheromones needs to be gradually formed by iteration. Therefore, the convergence speed is very slow. Although TPSMA optimization results were slightly worse than ACO, TPSMA optimization speed was significantly better than ACO. Compared with the current best optimization result, which is from LKH, the result of TPSMA is not as good as LKH; however, it is closer to the optimal result than other algorithms. Moreover, LKH is in virtue of the 5 − opt principle which is based on the λ − opt algorithm. The more task points there are, the more iteration time it will cost, and the convergence performance will be poor.  According to the above analysis, it can be concluded from Figure 15 that TPSMA has good searching ability by a unique way, and fast optimization speed by low time complexity. At the same time, TPSMA is simple in theory and easy to research, therefore it is better to study than the others. Furthermore, the research time of TPSMA is short and the algorithm is not mature enough-there are many performances and potential to be developed due to its unique optimization method and effectiveness. We can get the degree of difficulty about algorithm principle and the algorithm time complexity in Table 5. It can be seen that the TPSMA algorithm is simple in principle and easy to analyze. At the same time, the algorithm time complexity of TPSMA (N 3 ) is less 1/N times than that of ACO (N 4 ), and less 1/N 2 times than that of LKH (N 5 ). TPSMA has fast convergence speed and short optimization time due to low algorithm time complexity, especially in large data points.
According to the above analysis, it can be concluded from Figure 15 that TPSMA has good searching ability by a unique way, and fast optimization speed by low time complexity. At the same time, TPSMA is simple in theory and easy to research, therefore it is better to study than the others. Furthermore, the research time of TPSMA is short and the algorithm is not mature enough-there are many performances and potential to be developed due to its unique optimization method and effectiveness.

Summary
In this paper, the two-way parallel selection principle of distance and flow is adopted by TPSMA, and random factor is added to improve optimization ability and diversity. Through the experimental results of TSPLIB data, the path length that is obtained by TPSMA is obviously reduced. What is more, the optimization ability is gradually enhanced with the increase in the number of path points. At the same time, TPSMA can get all the paths that meet the requirements to realize the diversity of path results. The above results prove the feasibility and superiority of TPSMA in solving TSP.

Summary
In this paper, the two-way parallel selection principle of distance and flow is adopted by TPSMA, and random factor is added to improve optimization ability and diversity. Through the experimental results of TSPLIB data, the path length that is obtained by TPSMA is obviously reduced. What is more, the optimization ability is gradually enhanced with the increase in the number of path points. At the same time, TPSMA can get all the paths that meet the requirements to realize the diversity of path results. The above results prove the feasibility and superiority of TPSMA in solving TSP.
The proposed method will show partial reversal paths and diagonal paths in the searching process, which could have an impact on the search results. Follow-up research can start with the direction of flow, to research and improve the algorithm performance.