TL;DR
This paper explores parallelizing the Iterated Local Search (ILS) metaheuristic to tackle the Traveling Salesman Problem (TSP) using OpenMP. By distributing search iterations across multiple CPU cores, the authors achieved a significant speedup of approximately 7.4x, making the algorithm much more viable for large-scale, real-world applications, albeit with a manageable trade-off in solution accuracy.
What Problem Does This Paper Address?
The Traveling Salesman Problem (TSP) is a classic "NP-hard" puzzle in combinatorial optimization: given a list of cities and the distances between them, what is the shortest possible route that visits each city exactly once and returns to the origin?
While it sounds simple, the number of possible routes grows factorially with the number of cities, making it impossible to solve perfectly for large sets using brute force. Real-world industries—like circuit board drilling, logistics, and robotics—rely on "metaheuristics" to find "good enough" solutions quickly. However, as problem sizes grow, even these clever algorithms can become painfully slow on a single processor. The authors address this bottleneck by implementing a multi-core parallel version of the Iterated Local Search (ILS) algorithm.
Methods
The researchers implemented two versions of the ILS algorithm in C++:
- Sequential ILS: This version starts with an initial solution and enters a loop. In each iteration, it applies a Local Search (finding the best solution in the immediate "neighborhood") and then applies a slight modification (perturbation) to "jump" out of local optima and explore new areas of the search space.
- Parallel ILS (The Novelty): Using OpenMP, the authors parallelized the main loop. Instead of one processor running $N$ iterations, they divided the work among 12 threads. Each thread independently executes a fraction of the total iterations ($N_{iterations} / N_{threads}$). To prevent "race conditions" (where multiple threads try to update the same data simultaneously), they used a critical section to select the final minimum-cost tour from all the threads' results.
Datasets
The study utilized the TSPLib library, a standard benchmark repository for the Traveling Salesman Problem. They tested seven specific instances of varying complexity:
- Small/Medium: d198, a280, lin318.
- Large: pcb442, rat783, pcb1173, fl1577 (where the number represents the number of cities/vertices).
These benchmarks are widely used in the research community, allowing for direct comparison with other optimization techniques.
Key Insights and Ideas
- The Speed-Accuracy Trade-off: The most striking insight is the inherent trade-off in this parallelization strategy. By splitting iterations across threads, the algorithm explores many different "starting points" simultaneously. While this is much faster, the parallel version had an average accuracy of 89.05% compared to the sequential version's 96.05%. This suggests that a single long search path might find deeper optimizations than many shorter, parallel paths.
- Scalability for Real-World Use: Despite the slight dip in accuracy, the massive reduction in execution time is a "win" for practical applications. For the largest instance (
fl1577), the sequential version took nearly 12 hours, while the parallel version finished in about 1.6 hours. - Efficiency Bottlenecks: The parallel solution achieved an efficiency of roughly 60%. This indicates that while the speedup is great, there is still "overhead" (likely from thread management or the critical section) that prevents the algorithm from achieving a perfect 1:1 speedup relative to the number of cores.
Key Results
The experiments were conducted on an AMD Ryzen 5 5600GT (6 cores, 12 threads).
- Speedup: The parallel version achieved a consistent speedup of approximately 7.4x across all tested instances.
- Execution Time: For the
pcb1173instance, the time dropped from 16,760 seconds (sequential) to 2,183 seconds (parallel). - Accuracy: The sequential version maintained high accuracy (avg. 96.05%), while the parallel version stayed within a respectable range (avg. 89.05%) relative to the known optimal solutions in TSPLib.
Limitations and Future Work
The authors acknowledge that while the speedup is impressive, the loss of accuracy in the parallel version is a hurdle. To address this, they suggest several future directions:
- Hybridization: Combining ILS with other algorithms or using specialized hardware like GPGPUs and FPGAs to further accelerate the search.
- Smarter Initialization: Using machine learning or more advanced heuristics to generate better starting solutions, which could help the parallel threads find high-quality routes faster.
- Guided Local Search: Implementing techniques that "learn" from previous iterations to guide the local search more effectively, potentially closing the accuracy gap between the sequential and parallel versions.
Summary updated