A Branch-And-Bound Algorithm for the Traveling Salesman Problem with Difficult Neighborhoods
Abstract
The Traveling Salesman Problem with Neighborhoods (TSPN) generalizes the classical Traveling Salesman Problem (TSP) by requiring a tour to visit a set of polygonal regions rather than fixed points, a natural goal that arises in various applications. While the geometric TSP allows arbitrarily close approximation and provably optimal solutions for benchmark instances of significant size, the TSPN is considerably more challenging, both in theory (due to APX-hardness) and practice, for which only benchmark instances up to 16 regions have been solved to optimality.
Here we present a branch-and-bound algorithm that combines a spectrum of geometry-based filters (for reducing the number of considered sequences) with Second-Order Cone Programs (SOCP) (for computing optimal tours for a given permutation of neighborhoods). This allows us to solve larger polygonal TSPN instances than before to within an optimality tolerance of 0.1%; moreover, while previous work (both in theory and practice) relied on relatively benign neighborhoods, we can handle non-convex, non-simple neighborhoods of different sizes. In experiments on benchmark instances with up to polygons each, our method achieves a optimality rate within , with the remaining two instances solved within . For larger instances of size , our method still allows solving of instances to optimality within , leaving only of the instances with optimality gaps above , with the maximum being .
Keywords and phrases:
Geometric optimization, geometric covering, TSP with neighborhoods, exact algorithms, algorithm engineeringCopyright and License:
2012 ACM Subject Classification:
Theory of computation Computational geometry ; Theory of computation Discrete optimization ; General and reference Experimentationarchived at
swh:1:dir:798ae47a3445f53c64575fac631a25a1921a137b
Acknowledgements:
We thank Barak Ugav for his contributions to an earlier version of the branch-and-bound implementation for the CE-TSP, on which parts of the current code are based.Funding:
Supported by the German Research Foundation (Deutsche Forschungsgemeinschaft, DFG) as part of project Computational Geometry: Solving Hard Optimization Problems (CG:SHOP) – 444569951.Editors:
Hee-Kap Ahn, Michael Hoffmann, and Amir NayyeriSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
The Traveling Salesman Problem (TSP) asks for the shortest route that visits a given set of points. Central to many applications, it has also become the prototype of a provably difficult, NP-hard optimization problem. A natural geometric generalization of the TSP is the Traveling Salesman Problem with Neighborhoods (TSPN), which asks for a shortest roundtrip that visits each of a given family of regions in the plane; see Figure 1 for an example. This reflects scenarios in which the locations to be visited are not point-sized, but subject to some flexibiliy. Moreover, the TSPN combines the search for optimal touring with aspects of set cover: among others, discrete variants of both the Lawn Mowing Problem (LMP) and the Art Gallery Problem (AGP) can be seen as special cases of the TSPN.
Even though both the TSP and the TSPN are NP-hard (making them comparable in theoretical complexity), it can be argued that the TSPN is considerably more challenging. This is clearly reflected in theory: While the geometric TSP allows polynomial-time approximation schemes (Arora [6], Mitchell [38]), APX-hardness of the TSPN was established by de Berg et al. [14]. Moreover, a wide range of sophisticated approximation algorithms rely on assumptions on the shape of the neighborhoods, such as special shapes (e.g., line segments or disks), congruency, convexity, or fatness; see Related Work for further details.
A similar gap can be observed on the practical side. The discrete nature of the TSP allows employing a large toolbox of advanced methods from combinatorial optimization and integer programming, enabling provably optimal solutions for point sets of considerable size (such as the -city instance solved by [3, 12]). On the other hand, the TSPN requires considerable additional effort: even for a given order in which the neighborhoods must be visited, computing a shortest tour is non-trivial. As a consequence, the state of the art until now are provably optimal solutions for benchmark instances up to just 16 regions [29]; see Figure 2 (Left) for an example instance. While hardware and solvers have improved significantly since its publication 13 years ago, solving the problem as a MIQCP with Gurobi on modern hardware did not significantly change the results (see Section 4.6 for details).
Another key difference between discrete TSP in a graph and continuous TSPN in geometry arises from accuracy and error bounds: For a given graph with integer edge weights, verifying that a given bound is met is straightforward; however, in a geometric setting with algebraic complications arising from Euclidean distances and floating-point arithmetic, that is far from clear. The well-known TSPLIB instances [41] use distances rounded to the nearest integers, while even LP solvers such as CPLEX [33] and Gurobi [31] operate with an optimality tolerance: The final result is within a given small tolerance of the provable optimum.
Contributions.
We present a branch-and-bound algorithm that combines the search for an optimal order for a given set of neighborhoods with Second-Order Cone Programs (SOCP) for computing the best tour for any given sequence of neighborhoods. This significantly expands the range of instances that can be solved to within an optimality tolerance of 0.1%; note that even the default tolerance of Gurobi is already 0.1‰. Across 490 diverse benchmark instances with up to polygons each, are solved to optimality within a time limit of , with the remaining two instances solved within . For larger instances of size , our method still allows solving of instances within , leaving only of the instances with optimality gaps above , with the maximum being . Note that , while and . What is more, we achieve this for non-convex neighborhoods of different sizes, including neighborhoods with holes and even disconnected regions. See Figure 2 for a comparison with the previous state of the art. We also evaluate the impact of various algorithmic design choices, along with geometry-based filters, providing perspectives for even larger instances.
Related Work.
A special case of TSPN is the Close-Enough TSP (CE-TSP), where each neighborhood is a circle, which is also related to the Lawn Mowing Problem [4, 5, 26, 27]. Branch-and-bound algorithms have been studied for CE-TSP [19, 13] (possibly with obstacles [15]); however, the TSPN allows arbitrary (including non-convex) neighborhoods, making it more general. A common approach to such problems is to discretize neighborhoods into representative points and solve a Generalized TSP (GTSP) [36], e.g. by a heuristic [32, 42] or an exact method [9, 16]. Advancements in machine learning have also led to unsupervised learning methods for CE-TSP [25, 24]. Many heuristics and approximation algorithms for the TSPN rely on assumptions (e.g., fatness [39, 23], disjoint neighborhoods [14], or comparable region diameters [21]) to manage its APX-hardness. Recently, Antoniadis et al. [2] developed an FPTAS for minimum-perimeter convex polygon intersecting a set of convex objects. Specialized approaches address specific settings such as aerial vehicle routing [34], and hybrid methods combine meta-heuristics with TSP solvers [45]. Non-convex Mixed Integer Nonlinear Programming (MINLP) formulations have been proposed for TSPN, including symmetric and asymmetric variants [29], with algorithmic improvements to reduce solution times. However, computational tests were limited to smaller or convex neighborhoods. Other work derives approximations and bounds for the metric TSPN using the MST with Neighborhoods [11].
Preliminaries.
We are given a set of polygons in the plane. Polygons may be non-convex and may contain holes. A tour is a closed curve in the plane that intersects each polygon at least once. Without loss of generality, we may assume that an optimal tour is a polygonal cycle visiting one hitting point for each polygon , connected by straight-line segments. We represent a tour by the ordered sequence of its hitting points, , where is a permutation of and for all . The length of is the sum of the Euclidean distances between consecutive hitting points, including the distance between the last and the first hitting point. Overall, the goal is to find a feasible tour of minimum total length. By triangle inequality, optimal tours cannot self-intersect, so this is a simple polygon of minimum perimeter that intersects all .
2 Preprocessing
Preprocessing is a crucial step in most practical optimization algorithms, as it can significantly reduce the search space and improve algorithmic efficiency. See the literature on MIP presolve [1] and SAT preprocessing [7] for more details on the extensive use of preprocessing in combinatorial optimization. We also investigated and implemented several preprocessing techniques for TSPN instances that either eliminate polygons entirely when any tour that visits the remaining polygons will necessarily cover them, simplify polygons by cutting off unnecessary parts or replacing them with simpler shapes, or add annotations that guide the branch-and-bound algorithm. We first describe basic geometric simplification rules in Section 2.1 and then discuss order annotations in Section 2.2.
2.1 Basic Simplification
We iteratively apply the following three simplification rules until no further reduction is possible. In practice, these rules eliminate nearly all holes and many large polygons.
Theorem 1 (Superset elimination).
Let be a set of polygons in a TSPN instance. If a polygon is fully contained in another polygon (see Figure 3), then can be safely removed without affecting the optimal tour.
Proof.
Any tour that visits necessarily intersects , since completely contains .
Theorem 2 (Hole removal).
Let be a set of polygons for a TSPN instance. Suppose a polygon contains a hole , and there exists a polygon lying entirely outside (see Figure 4). Then the hole can be removed from without affecting the optimal tour.
Proof.
Any tour visiting must pass through , since lies outside the hole. If the tour enters the hole , it already intersects on the way to or from . Thus coverage of guarantees coverage of , and the hole does not impose any additional constraint.
Theorem 3 (Pocket removal).
Let be a convex closed curve containing an optimal TSPN tour for an instance , e.g., the convex hull of . Suppose that a polygon contains a path with both endpoints on , fully lying inside . This path, together with the arc of between its endpoints, forms a closed curve that encloses a region (the pocket). If at least one polygon of lies fully outside the enclosed area, then the enclosed region may be added to , i.e., the pocket can be removed, without affecting the optimal tour. Furthermore, if also the enclosed region fully contains a polygon from , then itself can be safely removed.
Proof.
A tour entering the enclosed region must cross the enclosing path. As the tour must also visit polygons outside the enclosed region, it must cross this path again when leaving. Each crossing intersects , so is inevitably covered. If the enclosed region also contains polygons from , the tour must enter and leave the region, crossing the path at least twice. Thus, removing the pocket preserves feasibility, and becomes redundant.
Note that the second case of Theorem 3 is automatically handled by Theorem 1 once the pocket has been removed from the polygon, because the enclosed polygon will be fully contained in the modified polygon. If is not the convex hull, we may first intersect all polygons with . This ensures that pockets adjacent to are also removed consistently and that the simplification rules behave exactly as in the convex-hull case.
2.2 Order Annotations
Our algorithm suffers from a large branching factor, as it considers every possible ordering of input polygons. Fortunately, geometric properties of optimal tours let us prune many insertion choices, in particular for polygons that intersect the boundary of a tour-enclosing hull , such as the convex hull of all polygons . A key property is that an optimal tour must respect the order of the polygons along this hull. Although this is intuitive, complications arise when polygons overlap, because the order is then only partially defined. Let be a cyclic order on a subset of indices. The relation is satisfied if either index is not in or polygons are not pairwise disjoint, or if in the cyclic order of , index lies between indices and following the fixed orientation of .
Definition 4.
Let be a cyclic order on a subset of indices, then is defined as
Theorem 5.
Let be a simple closed convex curve that contains an optimal TSPN tour for a given instance. Let and be the set of polygons intersecting , and for each polygon fix the reference points which define a cyclic order on that corresponds to the order of the reference points along . Then there exists an optimal tour with visiting order such that, for every the order of their hitting points coincides with the order along , i.e. .
Proof.
Let be an optimal tour contained in a simple closed convex curve . Both and are counterclockwise oriented. For each we fix a reference point which is used to define the order on . As is feasible it must visit all polygons; for all we choose the hitting point minimizing the geodesic distance in to . Let be a shortest path in from to and denote its reversal. By convexity of , meets only at ; by minimality, meets only at ; and since , it can intersect only if , see Figure 6.
Let be an injection with that defines an ordered subsequence (induced by ) corresponding to pairwise disjoint polygons, i.e., and . We write for the arc of , and for the subpath of between two points following ’s and ’s orientation respectively. For each we define the closed curve between and (indices should be seen modulo ) as which bounds a simply connected region . Thus, each region boundary is explicitly composed of: (i) the arc of , (ii) the two shortest paths , and (iii) the corresponding subpath of . These regions are interior-disjoint and tile exactly the annular portion between and , see Figure 7. Each shortest path with has two incident regions, one on each side which means that the regions form a cycle around .
Tracing along the subpaths implies that is a concatenation of hitting points that respect for any valid injection which implies that holds for all triples of pairwise disjoint polygons in . Degenerate contacts between and (or degenerate ) can be removed by an infinitesimal perturbation preserving optimality and incidences. Hence, for any , there exists an optimal tour for which every triple with must satisfy .
During preprocessing, we annotate each polygon intersecting the convex hull with its position in the cyclic order , together with the indices of all polygons that overlap with . This information enables us to select a maximal subset of pairwise disjoint polygons , which induces a total order that any optimal tour can respect.
3 Branch-and-Bound Algorithm
Our branch-and-bound algorithm (Algorithm 1) explores the space of polygon orderings by incrementally building sequences: starting from a small initial subsequence that is guaranteed to be extendable to an optimal solution (Section 3.2), it repeatedly selects a polygon not yet in the sequence and creates a child node for each possible insertion position, forming a search tree (Section 3.3). For each candidate sequence, a Second-Order Cone Program (SOCP) computes the optimal tour for that ordering (Section 3.1). If this tour visits all polygons, it is a feasible solution (see Figure 8); otherwise, the SOCP provides a lower bound on any tour extending this partial sequence – if it exceeds the best known solution, no completion can improve upon it and the entire subtree is pruned. This builds on the framework of Coutinho et al. [13] for the CE-TSP, which we improve and extend to handle the TSPN.
Throughout the search, the algorithm keeps track of the incumbent (best known feasible) solution and the node with the lowest lower bound, which together define the current optimality gap. As the search tree can grow large, the order in which nodes are evaluated can have significant impact on performance: finding good feasible solutions early strengthens pruning, while evaluating nodes with low lower bounds tightens the optimality gap. A search strategy balances these objectives (Section 3.4). Search is terminated if this gap is smaller than a desired threshold, or if all nodes are explored.
3.1 Touring a Sequence of Polygons
By Dror et al. [20], the Touring Polygons Problem (TPP) that asks for the shortest tour visiting a given sequence of polygons can be solved in polynomial time for convex polygons when the visitation order and a start and end point are fixed. The runtime of the algorithm was later improved by Tan and Jiang [43] to for convex regions with a total number of vertices. If the start and end points are not fixed, we can still solve it in polynomial time using a Second-Order Cone Program (SOCP), similar to Coutinho et al. [13].
Theorem 6.
Let be convex polygons. Then the shortest tour visiting these polygons in order can be computed in polynomial time.
Proof.
A convex polygon can be represented by linear constraints . We formulate the problem as a Second-Order Cone Program (SOCP), which can be solved in polynomial time via interior-point methods [8]. For each , introduce a point constrained by , ensuring . For readability, all indices are assumed modulo .
To encode the total tour length, let be the distance between and . We introduce auxiliary variables subject to and impose second-order cone constraints .
All constraints are linear or second-order cone constraints, so the formulation is an SOCP of polynomial size. Therefore, the shortest tour can be computed in polynomial time.
As we ultimately aim to solve TSPN instances with non-convex polygons (and potentially holes if preprocessing does not eliminate them), we must extend the SOCP approach. Dror et al. [20] showed that the problem becomes NP-hard for non-convex polygons, so no polynomial-time algorithm can be expected in general. We propose two strategies, both based on convex decompositions, which partition a non-convex polygon into convex components, see Figure 9.
The first approach is to replace the SOCP by a Mixed-Integer SOCP (MISOCP). For a non-convex polygon , let be its convex decomposition. Introduce a binary variable for each convex piece and enforce Let be the linear constraints defining . To ensure , impose the implications These implications can be modeled using indicator constraints (when supported) or with Big- formulations, where can be bounded using the polygon’s bounding box. Both indicator and Big- constraints tend to produce weak relaxations for the MISOCP solver, which provides limited guidance to its internal branch-and-bound. To improve the relaxation, one may additionally include the convex-hull constraints of , which are redundant but can strengthen the continuous relaxation.
The second approach retains the efficient SOCP formulation and incorporates convex decomposition only through branching. Instead of encoding the convex components by binary variables, the branch-and-bound tree explicitly chooses which convex part of a non-convex polygon the tour must hit. This extends the branching decision from the visitation order to the choice of the convex component, while avoiding indicator and Big- constraints entirely. As a result, this approach avoids the weak relaxations that appear in the MISOCP formulation, although it may increase the size of the search tree.
For polygons without holes, a minimum convex decomposition can be computed in polynomial time [30, 10]. For polygons with holes, a decomposition is always possible, for example by triangulation, but finding a minimal decomposition is NP-hard [37]. In practice, our preprocessing eliminates all holes from the benchmark instances, so the NP-hard minimal decomposition is not needed. The theoretical caveat remains for degenerate instances where hole removal cannot apply, e.g., when every other polygon lies inside the hole.
Finally, any non-convex polygon can either weaken the relaxation in the MISOCP approach or introduce substantial branching overhead. However, in optimal tours we often observe that visitation points of spanning polygons, meaning those not implicitly covered by connections between other polygons, tend to lie on extreme points, that is, on the convex hull of the polygon. This motivates a lazy strategy in which every polygon is initially replaced by its convex hull, making all polygons appear convex in the relaxation. Only when a computed visitation point lies outside the true polygon do we enforce its full non-convex geometry.
3.2 Root Node
The root node’s initial polygon sequence must be extendable to an optimal solution. Any sequence of up to three polygons trivially satisfies this condition. We evaluate four strategies: Random selects three polygons at random. Longest Edge (LE) selects the two polygons with largest pairwise distance. Longest Edge+Farthest Polygon (LEFP) extends LE by adding the polygon farthest from both. Convex Hull (CHR) selects polygons based on their convex hull positions.
Using the observations from Section 2.2, we can construct larger initial sequences: for any set of pairwise disjoint polygons intersecting the convex hull, defines a total order that an optimal solution can respect. Finding a cardinality-maximal set of such polygons is an instance of the NP-hard maximum independent set problem, but optimality is not required here; a greedy heuristic yields a sufficiently large set in practice. This preserves completeness while often producing significantly stronger initial relaxations. Although it is possible to construct artificial instances where this strategy produces arbitrarily weak relaxations, for example by placing polygons on the convex hull that protrude far inward and thereby induce an initial tour of negligible length, such instances appear to be rare in practice. Figure 10 illustrates three of the strategies, including an example where CHR performs poorly.
3.3 Branching
When the (partial) tour in a node does not cover all polygons, we branch by selecting a missing polygon and creating a new branch for each possible insertion position. In our implementation, we select the polygon that lies farthest from the current tour, see Figure 11.
We consider three modeling strategies for handling non-convex polygons. Eager indicator-based modeling (EIM) models non-convex polygons explicitly using indicator variables in a MISOCP formulation. Because convex hulls often contain the extremal points that serve as optimal hitting points, we propose a lazy strategy that initially replaces each polygon by its convex hull and only models it as non-convex when necessary. Both of the following strategies employ this lazy approach. Indicator-based modeling (IM) uses the same indicator-variable formulation as EIM but only introduces it when the convex hull replacement is insufficient. Decomposition branching (DB) avoids indicator variables entirely by decomposing the polygon into convex parts and creating one branch per part, see Figure 12.
3.4 Search Strategies
We implement four strategies to select the next node for exploration during the search.
Best First Search (BFS) selects the node with the smallest lower bound, improving the global bound quickly. However, incomplete sequences tend to have shorter estimated lengths, so BFS often prioritizes them over full coverage. Depth First Search (DFS) continues exploring the most promising child, quickly reaching feasible solutions. Good incumbents strengthen pruning, though DFS largely ignores lower bounds. DFS+BFS behaves like DFS, but reorders the queue by lower bounds whenever a node is pruned or a new solution is found, combining rapid incumbent improvements with lower-bound tightening.
4 Empirical evaluation
Our algorithm is implemented in C++ and uses Gurobi 12.0 [31] to solve the SOCP and MISOCP formulations. Geometry operations rely on Boost.Geometry 1.83 [28] and CGAL 6.0.1 [44] with exact predicates and constructions. We compiled using g++ 13.3 and ran all experiments on an AMD Ryzen 7900 workstation with of DDR5-5200 RAM under Ubuntu 24.04. We use the term optimality gap to refer to the relative difference between the best known upper bound and the global lower bound, i.e., . The optimality tolerance is the maximum allowed optimality gap after which the algorithm can terminate.
4.1 Research questions
Our experimental evaluation aims to answer the following questions.
- Q1
-
How does the choice of root node sequence affect runtime across instance types?
- Q2
-
Which search strategy (DFS, BFS, or a combined DFS+BFS) offers the best trade-off between time-to-solution and bound improvement?
- Q3
-
For non-convex polygons, does decomposition branching outperform indicator-based modeling in practice with respect to runtime and relaxation quality?
- Q4
-
How does relaxing the optimality tolerance affect the performance and how does our approach scale with increasing instance sizes?
4.2 Experiment design
To answer our questions, we collected and generated a large set of instances, consisting of instances from the following instance classes. In all cases, the coordinates of points in the instances are either integers or double precision floating-point numbers.
- random
-
We generated random instances with random polygons with roughly concave points and between and edges. Polygons may overlap and may have holes. This resulted in random instances.
- tessellation
-
Instances derived from well-known publicly available benchmark instance sets. To obtain polygonal regions, we applied a Voronoi tessellation to point sets from various sources. These include point sets previously used in the CG:SHOP challenges [18, 17], TSPLIB instances [41], and point sets from the Salzburg Database of Polygonal Inputs [22]. In total we generated instances with polygons.
- OSM
-
Instances derived from Open Street Map (OSM) data [40]. Our dataset covers building footprints from major cities. We used a quadtree-like subdivision to achieve desired sizes of and then randomly sampled two instances from each city in our collection. This resulted in a total of instances.
All instances were preprocessed with the techniques from Section 2, resulting in (out of ) altered instances with no holes. This took on average, with a maximum of . The resulting instances show reduced complexity. In particular, the number of convex pieces (i.e., the number of convex components in an optimal convex decomposition) decreased by an average of per instance. Example instances and their optimal solutions can be found in Figure 13. Unless stated otherwise, all experiments use the full set of instances.
4.3 RQ1: Root node selection
The choice of the root node sequence can significantly influence the search performance. A larger root sequence yields a tighter initial lower bound and fixes the relative order of more polygons. However, it may include polygons that would otherwise be implicitly covered by the tour (see Figure 8), unnecessarily enlarging the explicit sequence and increasing both the branching factor and the SOCP size at every node. We compared four strategies for selecting the root node sequence with a time limit of and optimality tolerance. CHR selects polygons based on the convex hull order, LE selects two polygons that are farthest apart, LEFP extends LE by adding a third polygon that maximizes the distance to the first two, and Random selects a random sequence, see Section 3.2 for details. Figure 14 shows the number of instances and the optimality gaps after . Overall, using a CHR and LEFP strategy appear to be best across our benchmarks with solutions within tolerance found in and of the instances, respectively. LEFP was more robust for instances that contain many intersections (such as our random instances), while CHR performed best on average for the OSM and tessellation instances which have many polygons on their convex hull. LE performed reasonably well but suffers from bad initial lower bounds. Random root selection is not recommended due to high variance and inferior median performance.
4.4 RQ2: Search strategy
The choice of search strategy affects how quickly solutions are found and how fast the global lower bound improves. We compared the three strategies from Section 3.4 – DFS, BFS, and combined DFS+BFS – with a time limit of for optimality tolerances of and . The outcomes are shown in Figure 15. We observe that for optimality tolerance, DFS and DFS+BFS have similar performance with about of the instances solved to optimality, while DFS+BFS is the winner for smaller tolerances with about of the instances solved to optimality. DFS achieves the fastest time-to-first-solution in most instances, while BFS improves the global lower bound more quickly. The combined DFS+BFS provides a good trade-off, particularly when slightly relaxed optimality tolerances are acceptable (it often terminates quickly for moderate gaps). For the remainder of our experiments, we use the DFS+BFS strategy as it provides the best overall performance.
4.5 RQ3: Decomposition branching
We evaluate the performance of the three modeling strategies for non-convex polygons introduced in Section 3.3. IM represents non-convex regions using indicator variables, which can result in long solve times at individual nodes. In contrast, DB avoids indicator variables but increases the size of the search tree, potentially leading to more branching. In both DB and IM, each polygon is initially replaced by its convex hull and only treated as non-convex when necessary. EIM does not employ this lazy strategy and models all non-convex polygons explicitly from the outset. We compared all approaches with a time limit of and an optimality tolerance of , excluding the purely convex instances ( instances remaining). The results are shown in Figure 16. DB and IM exhibit very similar performance. While DB is slightly faster on some instances, it solves fewer instances to within optimality within the time limit ( for DB vs. for IM). In contrast, EIM performs substantially worse, solving only of instances within the time limit. Overall, these results support the use of the lazy initialization strategy for non-convex polygons. Because DB and IM perform similarly but DB avoids the need for indicator variables, we adopt decomposition branching as our default approach for the remainder of the experiments.
4.6 RQ4: Scalability with optimality tolerance
Relaxing the optimality tolerance is often acceptable in practical applications and can significantly reduce computation time in exact optimization. Gentilini et al. [29] reported optimal solutions for up to convex regions which impose less complexity than our general polygonal regions. We evaluated the performance of both the CHR and LEFP root node strategies with DFS+BFS search for optimality tolerances of , , , , and with a time limit of . This instance set comprises instances with sizes ranging from to polygons of varying complexity. The number of solved instances after a given time is shown in Figure 17. We observe negligible differences between and , whereas tolerating , or often yields large savings in solve time and increases the number of instances solved. For tolerance, runs using the CHR root node strategy yielded the best results with of all instances solved to optimality in less than . The instances not solved to optimality had either or polygons. More precisely, for , only out of instances were not solved to optimality within the time limit, with a maximum optimality gap of . Both instances can however be solved to the desired tolerance within and , respectively. The remaining unsolved instances of size all had gaps within . A subsequent run with a time limit of solved additional instances to optimality, leaving instances unsolved with a maximum gap of . This amounts to a total of of all instances solved to optimality within . Relaxing the requirements for an optimal solution to allows the LEFP strategy to solve all instances within less than .
Comparison to previous work.
Prior to our geometric branch-and-bound approach, TSPN was commonly modeled as a MINLP and solved using general-purpose MINLP solvers. In these formulations, subtour elimination constraints are typically enforced through a cutting-plane framework where a relaxation of the problem is solved, subtours are detected for example via max-flow separation, and violated constraints are added as they are identified.
A representative example of this line of work is the method of Gentilini et al. [29]. Their approach integrates COUENNE, Ipopt, and CPLEX, and incorporates TSPN-specific strengthening techniques within COUENNE. Nevertheless, the method remains fundamentally based on the classical MINLP formulation and therefore inherits its high-dimensional spatial branching behavior. Empirical results reported in their study indicate practical tractability primarily for relatively small instances, typically with within a few percent optimality gap, but on older hardware and with less efficient solvers than those available today.111We note that a similar MIQCP-based approach was implemented by the authors in preliminary experiments which did not yield competitive results and can be found along with the source code.
Our approach differs both conceptually and algorithmically. Instead of branching in the high-dimensional MINLP formulation, we perform branch-and-bound directly in the underlying planar geometry. Node relaxations are solved as SOCPs, allowing the algorithm to exploit the polynomial-time solvability of convex subproblems. This design shifts the computational effort from generic nonlinear spatial branching toward geometry-aware decisions.
4.7 Threats to Validity
All solutions were validated, and a set of unit tests ensured correctness of core components. Results were checked for consistency between objective values and lower bounds across different runs. Feasibility of the resulting tours was independently verified after the optimization. However, as with any empirical evaluation, there are threats to validity. Implementation bugs may affect results, though we took care to minimize this risk through testing and validation. The choice of Gurobi as the underlying SOCP solver may influence performance; different solvers could yield varying results. Due to the nature of these solvers, all computations were performed using floating-point arithmetic, which may introduce numerical inaccuracies. Finally, the selected instance sets, while diverse, may not cover all possible scenarios encountered in practice.
5 Conclusion and Future Work
We presented significant practical progress for the TSPN with arbitrary neighborhoods of differing sizes, not only picking the best out of permutations, but also computing the best tour for a given order of regions; even for convex regions with vertices and given start and end point, the fastest known algorithm for this task requires a time of [43].
At this point, we are able to solve all instances in our benchmark set of size up to to within of optimality within reasonable time, and of the larger instances of size , with small optimality gap for the remaining ones. With our current techniques, this size appears to be the threshold between manageable and intractable instances without resorting to runtimes in the order of hours.
This raises the question of how to extend this range by employing more advanced geometric ideas. We are optimistic that further progress is possible, e.g., by using enhanced pruning strategies and additional cuts during the branch-and-bound, making use of further theoretical insights into the structure of locally optimal trajectories.
References
- [1] Tobias Achterberg, Robert E Bixby, Zonghao Gu, Edward Rothberg, and Dieter Weninger. Presolve reductions in mixed integer programming. INFORMS Journal on Computing, 32(2):473–506, 2020. doi:10.1287/IJOC.2018.0857.
- [2] Antonios Antoniadis, Mark de Berg, Sándor Kisfaludi-Bak, and Antonis Skarlatos. Computing smallest convex intersecting polygons. Journal of Computational Geometry, 16(1):167–202, 2025. doi:10.20382/jocg.v16i1a6.
- [3] David L. Applegate, Robert E. Bixby, Vasek Chvátal, William J. Cook, Daniel G. Espinoza, Marcos Goycoolea, and Keld Helsgaun. Certification of an optimal TSP tour through 85,900 cities. Oper. Res. Lett., 37(1):11–15, 2009. doi:10.1016/J.ORL.2008.09.006.
- [4] Esther M. Arkin, Sándor P. Fekete, and Joseph S. B. Mitchell. The lawnmower problem. In Canadian Conference on Computational Geometry (CCCG), pages 461–466, 1993. URL: https://cglab.ca/˜cccg/proceedings/1993/Paper79.pdf.
- [5] Esther M. Arkin, Sándor P. Fekete, and Joseph S. B. Mitchell. Approximation algorithms for lawn mowing and milling. Computational Geometry, 17:25–50, 2000. doi:10.1016/S0925-7721(00)00015-8.
- [6] Sanjeev Arora. Polynomial time approximation schemes for euclidean traveling salesman and other geometric problems. J. ACM, 45(5):753–782, 1998. doi:10.1145/290179.290180.
- [7] Armin Biere, Matti Järvisalo, and Benjamin Kiesl. Preprocessing in SAT solving. In Handbook of Satisfiability, pages 391–435. IOS Press, 2021. doi:10.3233/FAIA200992.
- [8] S.P. Boyd and L. Vandenberghe. Convex Optimization, Pt. 1. Berichte über verteilte Messsysteme. Cambridge University Press, 2004. URL: https://books.google.de/books?id=mYm0bLd3fcoC.
- [9] Francesco Carrabs, Carmine Cerrone, Raffaele Cerulli, and Manlio Gaudioso. A novel discretization scheme for the Close Enough Traveling Salesman Problem. Comput. Oper. Res., 78:163–171, 2017. doi:10.1016/J.COR.2016.09.003.
- [10] Bernard Chazelle and David P. Dobkin. Optimal convex decompositions. In Godfried T. Toussaint, editor, Computational Geometry, volume 2 of Machine Intelligence and Pattern Recognition, pages 63–133. North-Holland, 1985. doi:10.1016/B978-0-444-87806-9.50009-8.
- [11] Andrew Clark. A submodular optimization approach to the metric Traveling Salesman Problem with neighborhoods. In IEEE Conference on Decision and Control, CDC, pages 3383–3390, 2019. doi:10.1109/CDC40024.2019.9030031.
- [12] William J Cook, David L Applegate, Robert E Bixby, and Vasek Chvatal. The Traveling Salesman Problem: A computational study. Princeton University Press, 2011.
- [13] Walton Pereira Coutinho, Roberto Quirino do Nascimento, Artur Alves Pessoa, and Anand Subramanian. A branch-and-bound algorithm for the Close-Enough Traveling Salesman Problem. INFORMS J. Comput., 28(4):752–765, 2016. doi:10.1287/IJOC.2016.0711.
- [14] Mark de Berg, Joachim Gudmundsson, Matthew J. Katz, Christos Levcopoulos, Mark H. Overmars, and A. Frank van der Stappen. TSP with neighborhoods of varying size. J. Algorithms, 57(1):22–36, 2005. doi:10.1016/J.JALGOR.2005.01.010.
- [15] Jindřiška Deckerová, Kristýna Kučerová, and Jan Faigl. On improvement heuristic to solutions of the close enough traveling salesman problem in environments with obstacles. In 2023 European Conference on Mobile Robots (ECMR), pages 1–6, 2023. doi:10.1109/ECMR59166.2023.10256328.
- [16] Jindřiška Deckerová, Petr Váňa, and Jan Faigl. Combinatorial lower bounds for the generalized traveling salesman problem with neighborhoods. Expert Systems with Applications, 258:125185, 2024. doi:10.1016/j.eswa.2024.125185.
- [17] Erik D Demaine, Sándor P Fekete, Phillip Keldenich, Dominik Krupke, and Joseph S. B. Mitchell. Computing convex partitions for point sets in the plane: The CG:SHOP Challenge 2020. arXiv preprint arXiv:2004.04207, 2020. arXiv:2004.04207.
- [18] Erik D Demaine, Sándor P. Fekete, Phillip Keldenich, Dominik Krupke, and Joseph S. B. Mitchell. Area-optimal simple polygonalizations: The CG Challenge 2019. ACM Journal on Experimental Algorithms, 27(2):1–12, 2022.
- [19] Andrea Di Placido, Claudia Archetti, Carmine Cerrone, and Bruce Golden. The generalized Close Enough Traveling Salesman Problem. European Journal of Operational Research, 310(3):974–991, 2023. doi:10.1016/j.ejor.2023.04.010.
- [20] Moshe Dror, Alon Efrat, Anna Lubiw, and Joseph S. B. Mitchell. Touring a sequence of polygons. In Symposium on Theory of Computing (STOC), pages 473–482, 2003. doi:10.1145/780542.780612.
- [21] Adrian Dumitrescu and Joseph SB Mitchell. Approximation algorithms for TSP with neighborhoods in the plane. Journal of Algorithms, 48(1):135–159, 2003. doi:10.1016/S0196-6774(03)00047-6.
- [22] Günther Eder, Martin Held, Steinþór Jasonarson, Philipp Mayer, and Peter Palfrader. Salzburg database of polygonal data: Polygons and their generators. Data in Brief, 31:105984, 2020. doi:10.1016/j.dib.2020.105984.
- [23] Khaled M. Elbassioni, Aleksei V. Fishkin, and René Sitters. On approximating the TSP with intersecting neighborhoods. In International Symposium on Algorithms and Computation (ISAAC), pages 213–222, 2006. doi:10.1007/11940128_23.
- [24] Jan Faigl. Gsoa: Growing self-organizing array – unsupervised learning for the close-enough traveling salesman problem and other routing problems. Neurocomputing, 312:120–134, 2018. doi:10.1016/j.neucom.2018.05.079.
- [25] Jan Faigl and Libor Přeučil. Self-organizing map for the multi-goal path planning with polygonal goals. In Timo Honkela, Włodzisław Duch, Mark Girolami, and Samuel Kaski, editors, International Conference on Artificial Neural Networks and Machine Learning (ICANN), pages 85–92, 2011.
- [26] Sándor P. Fekete, Dominik Krupke, Michael Perk, Christian Rieck, and Christian Scheffer. A closer cut: Computing near-optimal tours for the Lawn Mowing Problem. In Symposium on Algorithm Engineering and Experiments (ALENEX), pages 1–14, 2023. doi:10.1137/1.9781611977561.
- [27] Sándor P. Fekete, Dominik Krupke, Michael Perk, Christian Rieck, and Christian Scheffer. The Lawn Mowing Problem: From algebra to algorithms. In European Symposium on Algorithms (ESA), pages 45:1–45:18, 2023. doi:10.4230/LIPIcs.ESA.2023.45.
- [28] Barend Gehrels, Bruno Lalande, Mateusz Loskot, Adam Wulkiewicz, Menelaos Karavelas, and Fisikopoulos. Vissarion. Boost geometry 1.83, 2024. URL: https://www.boost.org/.
- [29] Iacopo Gentilini, François Margot, and Kenji Shimada. The Travelling Salesman Problem with neighbourhoods: MINLP solution. Optimization Methods Software, 28(2):364–378, 2013. doi:10.1080/10556788.2011.648932.
- [30] Daniel H Greene. The decomposition of polygons into convex parts. Computational Geometry, 1:235–259, 1983.
- [31] Gurobi Optimization LLC. Gurobi Optimizer 12.0. https://www.gurobi.com/, 2025.
- [32] Keld Helsgaun. Solving the equality generalized Traveling Salesman Problem using the Lin–Kernighan–Helsgaun algorithm. Mathematical Programming Computation, 7(3):269–287, September 2015. doi:10.1007/s12532-015-0080-8.
- [33] IBM. IBM ILOG CPLEX Optimization Studio. https://www.ibm.com/products/ilog-cplex-optimization-studio, 2025.
- [34] Dae-Sung Jang, Hyeok-Joo Chae, and Han-Lim Choi. Optimal control-based uav path planning with dynamically-constrained tsp with neighborhoods. In International Conference on Control, Automation and Systems (ICCAS), pages 373–378, 2017.
- [35] Rouven Kniep, Dominik Krupke, and Michael Perk. tubs-alg/TSPN-SoCG-2026. Software, swhId: swh:1:dir:798ae47a3445f53c64575fac631a25a1921a137b (visited on 2026-05-15). URL: https://github.com/tubs-alg/TSPN-SoCG-2026, doi:10.4230/artifacts.26083.
- [36] Gilbert Laporte, Ardavan Asef-Vaziri, and Chelliah Sriskandarajah. Some applications of the generalized Travelling Salesman Problem. Journal of the Operational Research Society, 47(12):1461–1467, 1996. doi:10.1057/jors.1996.190.
- [37] Andrzej Lingas. The power of non-rectilinear holes. In International Colloquium on Automata, Languages and Programming (ISAAC), pages 369–383, 1982. doi:10.1007/BFB0012784.
- [38] Joseph S. B. Mitchell. Guillotine subdivisions approximate polygonal subdivisions: A simple polynomial-time approximation scheme for geometric TSP, k-MST, and related problems. SIAM J. Comput., 28(4):1298–1309, 1999. doi:10.1137/S0097539796309764.
- [39] Joseph S. B. Mitchell. A PTAS for TSP with neighborhoods among fat regions in the plane. In Symposium on Discrete Algorithms (SODA), pages 11–18, 2007. URL: http://dl.acm.org/citation.cfm?id=1283383.1283385.
- [40] OpenStreetMap contributors. Planet dump retrieved from https://planet.osm.org . https://www.openstreetmap.org, 2017.
- [41] G. Reinelt. TSPLIB–a Traveling Salesman Problem library. ORSA Journal of Computing, 3(4):376–384, 1991. doi:10.1287/IJOC.3.4.376.
- [42] Stephen L. Smith and Frank Imeson. Glns: An effective large neighborhood search heuristic for the generalized Traveling Salesman Problem. Computers & Operations Research, 87:1–19, 2017. doi:10.1016/j.cor.2017.05.010.
- [43] Xuehou Tan and Bo Jiang. Efficient algorithms for touring a sequence of convex polygons and related problems. In Theory and Applications of Models of Computation (TAMC), volume 10185, pages 614–627, 2017. doi:10.1007/978-3-319-55911-7_44.
- [44] The CGAL Project. CGAL 6.0. https://www.cgal.org, 2025.
- [45] Bo Yuan and Tiantian Zhang. Towards solving TSPN with arbitrary neighborhoods: A hybrid solution. In Artificial Life and Computational Intelligence (ACALCI), pages 204–215, 2017. doi:10.1007/978-3-319-51691-2_18.
