To verify the best performance of IDINFO, the algorithm parameters need to be determined. We discuss the method of parameter selection to prove the feasibility and effectiveness of the algorithm. In addition, we examine the performance of IDINF on datasets with different characteristics, estimating the ability of IDINFO with different measures of the number of cities, city distribution, and distance metrics.
4.1.1. Parameters Analysis
To demonstrate the effectiveness of the IDINFO, 18 classical examples from the TSP standard library [
39] are selected in the experiments with the number of cities varying from 14 to 76. Meanwhile, we analyze the impact of two important parameters, i.e., the number of vectors and the number of iterations, on the performance of DINFO and the IDINFO and evaluate the algorithm’s stability based on the standard deviation (Std). Using the typical eil51 dataset as an example, the experimental results are averaged over 10 runs.
Table 1 and
Figure 2 present the effect of different population sizes (10–200) on the stability of DINFO and IDINFO under a fixed maximum iteration count of 1000. The experimental results show that when the population size is small (e.g., 10 and 50), the optimization performance is poor, and the results fluctuate significantly. The standard deviations for DINFO and IDINFO are 1.634/1.455 (population size = 10) and 1.353/1.212 (population size = 50), indicating unstable convergence. As the population size increases, the optimization performance improves, and fluctuations decrease. When the population size reaches 100 or more, the standard deviation stabilizes at 0.951 for DINFO and 0.889 for IDINFO.
Similarly,
Table 2 and
Figure 3 illustrate the effect of different iteration counts (100–2000) on optimization performance when the population size is fixed at 100. The results indicate that with fewer iterations (e.g., 100 and 500), the optimization performance is poor, and the standard deviation is high (DINFO: 1.844 and 1.379; IDINFO: 1.532 and 1.221), showing that the algorithm has not yet converged. As the number of iterations increases, the optimization results improve, and the standard deviation gradually decreases. When the iteration count reaches 1000 or more, the standard deviations for DINFO and IDINFO stabilize at 0.958 and 0.832, respectively, indicating convergence.
Overall, setting the number of vectors to ≥100 and the iteration count to ≥1000 effectively ensures both optimization performance and result stability. Therefore, we adopt this parameter configuration in subsequent experiments to balance performance and computational cost.
We introduce the threshold-based 2-opt and 3-opt local search algorithms to the IDINFO. The size of the threshold affects the search capability of the IDINFO.
To confirm the threshold properly, we adjust its value and analyze IDINFO’s optimization effectiveness and convergence time. In the tests, both 2-opt and 3-opt share the same threshold setting. In this testing, thresholds of the 2-opt and 3-opt local search algorithms are set the same. We summarize the average results from 10 runs to evaluate the effect of the threshold on the average route length (Average Solution) and convergence time (Convergence Time), as shown in
Figure 4. The blue line represents the Average Solution, while the red line represents the Convergence Time. From
Figure 4, it is observed that as the threshold increases, the route length gradually improves and reaches 433.06 at a threshold of 20, indicating that increasing the threshold enhances search quality. However, when the threshold further increases to 30 and 40, the improvement becomes negligible (432.56 and 432.38, respectively), suggesting that an excessively high threshold does not significantly enhance performance. On the other hand, the convergence time increases significantly with a higher threshold. It grows from 23.62 s at a threshold of 5 to 29.21 s, 36.98 s, 60.47 s, and 84.77 s at thresholds of 10, 20, 30, and 40, respectively. Particularly, when the threshold exceeds 20, the computational cost rises sharply while the optimization gain saturates.
Considering both optimization performance and computational cost, we set the threshold for 2-opt and 3-opt local search to 20 in subsequent experiments to balance search efficiency and computational overhead.
4.1.2. Performance Estimation for the IDINFO
In this section, we first select 18 small-scale datasets (with fewer than 100 cities) and 11 medium-scale datasets (with 100 to 200 cities) from the TSPLIB to validate indicators such as solution accuracy and speed. As a classic dataset, TSPLIB is widely recognized as a benchmark for TSP research and provides a basis for horizontal comparison of algorithm performance. The instances in TSPLIB not only vary in scale but also cover various city distribution patterns, such as uniform and clustered distributions. For example, the rat99 and eil76 datasets exhibit typical uniform distributions, while d198 and pr439 exhibit typical clustered distributions. Additionally, there are irregularly distributed datasets (such as stt70) and grid-based distributions (such as ts225).
Using 18 distinct data sets, we test the DINFO and IDINFO through 30 repeated operations. The minimum value obtained from this process is regarded as the optimal solution for DINFO and IDINFO.
Table 3 documents the optimal solution (
Best), the average solution (
Average) (the mean of 30 experiments), and their respective deviation rates from the TSPLIB public optimal solution (
Opt). Here, the deviation rate of the optimal solution (
Best_DR) is calculated based on Equation (17).
Table 3 highlights results that reach the TSPLIB public optimal solution, with such results being bolded. The variation process of the deviation ratio of the solution with the problem size is shown in
Figure 5a, while
Figure 5b demonstrates the variation of convergence time on TSP instances.
In
Table 3, DINFO reaches the optimal in five small instances, i.e., burma14, ulysses16, gr17, gr21, and ulysses22, which indicates that DINFO is effective in solving small TSP instances. In
Figure 5a, we can find that the problem size scales up, and the deviation rate of the best solution of DINFO considerably increases, from 0.80% to 36.94%. Meanwhile, the deviation rate of the average solution is more obvious, from 0.28% to 46.61%, which indicates the susceptibility of DINFO to fall into local optima, thereby decreasing the accuracy of the solutions after the scale becomes larger. Similarly, the convergence time of DINFO is almost multiplied with the instance scale increasing, as shown in
Figure 5b. In comparison, IDINFO achieved optimal solutions across all instances (see
Table 3). The
Average_DR of IDINFO on the first 10 instances is 0, indicating that it can accurately find the optimal solution in scenarios with no more than 31 city nodes. The average solution serves as a measure of the algorithm’s stability.
Table 3 and
Figure 5 reveal that all the average solution deviation rates of IDINFO are less than 1.65%, which is significantly smaller than DINFO. Although the introduction of 2-opt and 3-opt local search operations has relatively high time complexity, the performance of IDINFO consumes time level is still very low, as shown in
Figure 5b. The convergence time of IDINFO is substantially shortened compared with DINFO. In most instances, we can obtain results within 60 s using IDINFO (see
Figure 5b).
We also examine the capabilities of the IDINFO algorithm in solving larger-scale TSPs by selecting 12 instances from the TSPLIB library. The number of cities in these instances ranges from 76 to 200. The experimental results of 30 test statistics are presented in
Table 4.
Based on the results shown in
Table 4, we find that although IDINFO can only obtain approximate solutions for middle-scale instances, the deviation from the publicly optimal solutions is very small, with most deviation of best solutions less than 0.5% and most deviation of average solutions not exceeding 2%. Additionally, the convergence time of IDINFO increases with the increase in instance size, but the rise is not significant and acceptable (see
Table 3).
In addition to the Euclidean distance metric, Manhattan Distance is also an important measure for evaluating the performance of TSP solvers. Unlike Euclidean distance, Manhattan Distance is calculated based on a city grid structure, making it suitable for real-world road systems with a grid-like layout, such as urban traffic networks. The formula for Manhattan Distance is |x1 − x2| + |y1 − y2|, meaning the distance between cities 1 and 2 is the sum of the absolute differences between their x and y coordinates. This metric, compared to Euclidean distance, better reflects traffic constraints unique to certain areas, especially in applications such as city traffic simulation and warehouse delivery.
To evaluate the performance of IDINFO under the Manhattan distance metric, we followed the approach in reference [
40] and generated city datasets with scales 20, 50, 100, 200, and 500 using random coordinates. For each scale, we generate 30 datasets and test the performance of DINFO and IDINFO over multiple iterations, recording the optimal solution, average solution, and convergence time. The results are shown in
Table 5.
In small- to medium-sized datasets (e.g., TSP20 and TSP50), IDINFO accurately solves the optimal solution. In larger datasets (e.g., TSP200 and TSP500), IDINFO provides significantly better optimal solutions compared to DINFO. For example, in the TSP200 case, the optimal solution for IDINFO is 14.43, while for DINFO it is 58.91. The average solutions of IDINFO show higher stability in most datasets, especially for larger problems, where the gap between the average and optimal solutions is small. For example, in TSP500, IDINFO’s average solution is 24.60, significantly lower than DINFO’s 204.90, indicating that IDINFO provides more stable and better solutions.
Additionally, IDINFO consistently outperforms DINFO in convergence time, especially for smaller instances. In TSP20, IDINFO’s convergence time is 5.37 s, while DINFO takes 20.15 s, showcasing a clear advantage for IDINFO. However, in TSP500, IDINFO’s convergence time (513.02 s) is slightly longer than DINFO’s (510.44 s), suggesting that IDINFO may still face computational cost issues for large-scale problems, warranting further optimization.
Overall, our results indicate that under different city distributions and distance metrics, the IDINFO algorithm performs well in solving small- to medium-scale TSPs (with up to 200 cities) and has the potential to solve larger-scale optimization problems.