1 Introduction

The Traveling Salesman Problem (TSP) is probably the most studied problem in combinatorial optimization. Biggs, Lloyd and Wilson (1976) trace back the academic attention received by the TSP to the nineteenth century. Since then, the problem has been extensively studied and there is a vast literature dealing with solving algorithms (Laporte 1992; Reinelt 1994; Raman and Gill 2017) and applications (Lenstra and Kan 1975; Junger et al. 1995). There have also been several formulations for the problem (Langevin et al. 1990; Orman and Williams 2007; Öncan et al. 2009).

The classic definition of the TSP can be stated as follows: Find the shortest route (tour) for a salesman starting from a given city, visiting each of a specified group of cities, and then returning to the original point of departure (Dantzig et al. 1954). The conceptualization of the problem can be generalized to minimize the duration or the total cost of the tour.

From the Graph Theory approach, the TSP can be stated as the problem of finding the least cost Hamiltonian circuit of a given complete graph KN≡G(N, A), where N = {1,…,n} is the set of nodes, and A = {(i,j): i,j \(\in \) N, i ≠ j} the set of arcs (Miller et al. 1960). Usually, the cost of each arc is defined by the cost (or distance) matrix C = {cij}. Depending on the relationship between cij and cji, the problem is defined as Asymmetric TSP (C ≠ CT) or Symmetric TSP (C = CT).

Several formulations have been proposed to solve the ATSP (Langevin Padberg and Sung 1991; Orman and Williams 1990; 2007). Öncan et al. (2009) provide a thorough analysis of the ATSP formulations, including how they relate to each other. To introduce our work and define the base model formulation, we summarize the main formulations, their basics, and distinctive approaches, and refer to this study for an in-depth analysis.

The work of Dantzig et al. (1954) is considered pioneer in the field. The DFJ formulation uses binary variables to formulate and solve the TSP. The authors propose what is called a natural formulation, in the sense that it does not include any additional variable other than xij to signify if the arc from i to j is selected for the tour or not. One essential aspect of TSP formulations is how to ensure that the solution is a single tour and not a set of independent subtours. To this purpose, in the DFJ formulation it is necessary to add a set of constraints that cannot be considered before starting the calculations without a sub-tour identification algorithm. Furthermore, the set of constraints grows exponentially with the number of cities of the TSP, O(2n), and, in practice, it is solved with delayed column generation methods.

To overcome these limitations, an alternative to the natural formulation is given by the so-called compact formulations. The basis for this set of formulations is provided by Miller et al. (1960). These authors propose the addition of instrumental variables that determine the order in which the cities are visited (their formulation is even more generic for they allow to visit all the cities in several tours, i.e., Vehicle Routing Problem (VRP); as it is the usual in TSP literature, in the remainder of the paper we will consider their model for the particular case of setting to one the number of tours (Öncan et al. 2009)). Thus, the MTZ formulation allows setting the subtour elimination constraints before solving the problem. Among the family of compact formulations, this approach is called a compact node-ordering formulation. The number of subtour elimination constraints compared to the DFJ formulation, is significantly reduced, O(n2), although they lead to a weak linear programming (LP) relaxation. Desrochers and Laporte (1991) further develop the MTZ formulation and improve the performance of the subtour elimination constraints.

Some other relevant compact formulations have been proposed. Gavish and Graves (1978) develop two compact arc-ordering or flow-based formulations with the intention to propose a formulation more adaptable to other transportation scheduling problems. They still use the same number of integer variables as MTZ, but they change the constraints set to include flow variables. Fox et al. (1980) provide another set of time-dependent TSP formulations. They reduce the number of linear constraints from O(n2) to O(n) after including a set of time periods. Gouveia and Pires (2001) propose a compact precedence-based formulation, called the disaggregated MTZ model. They include a new variable that represents if a node is visited in the path between two other nodes.

As aforementioned, when the cost (distance) from one city i to another city j is the same if the arc is reversed (cij=cji, \( \forall _{{i,j}} \)), the resulting particular case of ATSP is called a Symmetric TSP (STSP). It is the case of the Euclidean TSPs in which the nodes represent points, and the costs are the corresponding Euclidean distances (symmetric by nature). The formulations for the ATSP are directly applicable to the STSP if the costs cij and cji are considered as if they were different, i.e., with two arcs of the same cost linking each pair of nodes. Nevertheless, for the natural formulation it is possible to achieve a more efficient STSP formulation if the two arcs connecting each pair of nodes are substituted by one single arc (Padberg and Sung 1991). In this case, the set of arcs will be E = {{i,j}: i,j \(\in \) N, i < j}. Each arc will have a cost (or distance) c{ij} associated as well as a decision binary variable x{ij} similar to the ATSP formulation. The set of subtour elimination constraints is reduced in the STSP formulation compared to the ATSP formulation, hence the performance improvement, yet it remains exponential with the number of cities, making it necessary to include a subtour identification algorithm. For the MTZ and other compact formulations, “symmetrization” by means of considering one single arc linking each pair of nodes is not possible (Padberg and Sung 1991).

In this paper, we explore a geometric transformation of the Euclidean TSP that might open new possibilities of solving the TSP. The extensive literature on the problem has led to very efficient solving procedures. Nevertheless, the problem is known to be NP-Complete (Papadimitriou 1977), and therefore, for problems with a large number of cities, the computation time becomes critical (Applegate et al. 2006; Dubois-Lacoste et al. 2015). On the other hand, there are numerous optimization problems that are variants and extensions of the TSP (Reinelt 1994; Anbuudayasankar et al. 2014). New approaches to the TSP can then be of great interest to be explored since they might foster applications in different problem variants.

Since the Euclidean TSP can be directly analyzed from a Euclidean geometric perspective, with the nodes representing points in the map and the tours being polygons, the interest of approaching the problem based on a geometric analysis has drawn the attention of researchers. One of the main geometric characteristics of the TSP is the fact that the optimal solution is a non-intersecting polygon (Lawler et al. 1991). Besides the analysis of geometric properties of the optimal solution, many works focus on the proposal of geometric-based heuristic algorithms (Lawler et al. 1991; Reinelt 1994). Some of them, like the largest angle heuristic (Norback and Love 1977) among many others (Asani et al. 2020), are based on the convex hull, which is the minimum convex polygon that encompasses a set of nodes. As computational geometry gained practical importance (Edelsbrunner 1987), there have been proposals based on techniques and concepts from this field aimed at solving the TSP. In particular, some of the methods are based on the application of Voronoi diagrams and Delaunay triangulations (Edelsbrunner 2014; Reinelt 1994).

However, mathematical properties of the TSP and the optimal solution remain open to research. Despite the great attention given to the TSP and its numerous applications and extensions, to the best of our knowledge there has not been a previous attempt of a geometric transformation of the tour polygon, so the problem can be formulated in terms of angles instead of distances. The main contribution of this paper is the proposal of such a geometric transformation of Euclidean Travelling Salesman Problem tours that leads to a modified formulation and new heuristic approaches, as well as to the characterization of intrinsic geometric properties of the solution. Experimentation with a set of problems shows that the proposed geometric transformation might lead to performance improvement in certain problems. The proposed approach opens the way to explore new solving strategies for this abundantly studied and applied problem.

In Sect. 2, we recall the compact node-ordering formulation from Miller et al. (1960). In Sect. 3, the proposed geometric transformation with the definition of equivalent polygonal chains and the equivalent cyclic polygon for every TSP tour is presented, leading to a modified formulation of the problem and new heuristic procedures that are presented in Sect. 4. In Sect. 5, we present the results yielded by the experimentation using a set of cases taken from TSPLIB (Reinelt 1991), which shows the potential practical interest of the proposed transformation. Finally, we summarize the main conclusions in Sect. 6.

2 TSP base model formulation

As aforementioned, in our work we focus on the geometric transformation of the Euclidean TSP tours and, thus, we deal with the Symmetric TSP. Based on this transformation, we define a modification of the objective function and explore the interest of adding some constraints. With the purpose of isolating the effect of the transformation and the addition of constraints, we want to compare our proposal directly solving a linear programming model that does not involve subtour elimination algorithms. For that reason, we do not take the symmetric DFJ as the base model formulation for the comparison. Among the compact formulations, we select as the base model formulation (Model A) the classic MTZ adapted to the TSP, which is widely known and sets the basis for this group of formulations.

Let us use the classical TSP formulation on a graph G = (N, E), such that N is the set of nodes (cities) N = {1, 2, …, n}, and E = {(i, j)| i, j ϵ N, i ≠ j} is the set of links.Footnote 1 We use a distance parameter dij for each (i, j) ϵ E, as the distance between nodes i and j. We define a binary variable xij, which equals 1 if the edge {i, j} is part of the tour, and 0 otherwise.

Indices:

\(i,j \in N\):

Nodes.

Parameters:

\(d_{ij}\):

Distance from node i to node j.

\(n = |N|\):

Total number of nodes.

Variables:

\(x_{ij} \in \left\{ {0,1} \right\},\forall \left( {i,j} \right) \in E\):

1 if we go from node i to node j, 0 otherwise.

\(u_{i} \ge 0,\forall i \in N\):

Auxiliary variables that determine the relative order in which node i belonging to the solution is visited.

Model A:

$$ \min \, z{ = }\sum\nolimits_{i, \, j} {d_{i \, j} \cdot x_{i \, j} } $$
(1)

such that

$$ \sum\nolimits_{i} {x_{i \, j} } { = 1 }\quad \quad \forall j $$
(2)
$$ \sum\nolimits_{j} {x_{i \, j} } = 1\quad \quad \forall i $$
(3)
$$ u_{i} - u_{j} + 1 \le \left( {n - 1} \right)\left( {1 - x_{i \, j} } \right)\quad \quad \forall i,j = 2,...,n, \, i \ne j $$
(4)

Objective function (1) minimizes the total length of the tour. Constraints (2) and (3) guarantee that each node is visited only once. The set of constraints (4) prevents the presence of subtours in the solution while determining the sequence of the tour through the values of the auxiliary variables: if a link from node i to node j is in the solution (xij = 1), then uj has to be greater than ui (for i,j > 1, i.e., taking i = 1 as the starting city of the tour). Constraints (4) constitute the grounds of the compact formulation.

Throughout the document, we will use the same definitions of indices, parameters, and variables of this section, whereas the different variants will concern the objective function and the set of constraints (which we will refer to as models, with Model A being the base model formulation).

3 Proposed tour geometric transformation and modified TSP formulation

The core of our proposal is the definition of a geometric transformation of any given feasible TSP tour. It is based on the construction of what we name “Equivalent Inscribed Polygonal Chain” (EIPC) and “Equivalent Cyclic Polygon” (ECP), which are described in detail in Sects. 3.1 and 3.2 respectively.

3.1 Equivalent inscribed polygonal chain

Given a Euclidean TSP tour of n cities defined by the sequence order in which they are visited {p1, p2, …, pn}, we define a geometric transformation such that a sequence of vertices \(\{{v}_{1}, {v}_{2}, \dots , {v}_{n}, {v}_{1}^{^{\prime}}\}\) is inscribed in a circle of a given radius such that each link pk-1-pk (k = 2, …, n) of the TSP tour has an equivalent edge \(\overline{{v }_{k-1}{v}_{k}}\) of the same length, with the returning link pn-p1 equivalent to the last edge \(\overline{{v }_{n}{v}_{1}^{^{\prime}}}\). We note that in general there will be two vertices (\({v}_{1}, {v}_{1}^{^{\prime}}\)) corresponding to the same city p1. This transformation defines an inscribed polygonal chain (polyline) (Levcopoulos et al. 2002). The radio of the circumscribing circle, or circumcircle, is denoted as Rc.

To construct the equivalent inscribed polygonal chain (EIPC), we start positioning \({v}_{1}\) in any point of the circumcircle of radius Rc. Then, we define another circle with center in \({v}_{1}\) and radius equal to the length of link p1-p2, and find the intersection with the circumcircle. Since there will be two intersection points, we select \({v}_{2}\) in the circumcircle as the first intersection clockwise from \({v}_{1}\). We proceed the same way following the sequence of the remaining cities, until finding \({v}_{1}^{^{\prime}}\) as the clockwise circumcircle intersection of the circle centered in \({v}_{n}\) and radius the length pn-p1.

If we define a Cartesian coordinate system (x, y), placing the center of the circumcircle in the origin and \({v}_{1}\) in the vertical axis (0, Rc) (or other specific point \(\left({x}_{1},{y}_{1}\right) | {x}_{1}^{2}+{y}_{1}^{2}={R}_{c}^{2}\)), the vertices \({v}_{k}\) of the inscribed polygonal chain will verify the following (there will be two possible intersections for each vertex as abovementioned):

$$ \begin{gathered} \left. {\begin{array}{*{20}c} {x_{k}^{2} + y_{k}^{2} = R_{c}^{2} } \\ {\left( {x_{k} - x_{k - 1} } \right)^{2} + \left( {y_{k} - y_{k - 1} } \right)^{2} = d_{k - 1,k}^{2} } \\ \end{array} } \right\}\, \forall k \hfill \\ {\text{and}} \hfill \\ \left. {\begin{array}{*{20}c} {x_{{1^{\prime}}}^{2} + y_{{1^{\prime}}}^{2} = R_{c}^{2} } \\ {\left( {x_{{1^{\prime}}} - x_{n} } \right)^{2} + \left( {y_{{1^{\prime}}} - y_{n} } \right)^{2} = d_{{n,1^{\prime}}}^{2} } \\ \end{array} } \right\} \hfill \\ \end{gathered} $$
(5)

Figure 1 shows an example of an 8-city TSP tour defined by the sequence 1–2-8–3-7–4-5–6 (middle of the figure) and two EIPCs. Depending on the length of the radius, the summation of all the central angles defined by the chain edges will be higher than 2π (left) or lower than 2π (right). In the first case (left), non-consecutive edges of the chain will intersect (self-intersecting polygonal chain (Levcopoulos et al. 2002)).

Fig. 1
figure 1

Example of two possible geometric transformations of a TSP tour and the resulting equivalent inscribed polygonal chains (EIPC)

3.2 Equivalent cyclic polygon

In the example of Fig. 1, if we progressively decrease the radius of the right chain or increase the radius of the left chain, by continuity (Macnab 1981), there will be a radius in which \({v}_{1}^{{\prime}}\) will converge to \({v}_{1}\). The polygonal chain will then close, resulting in what we call Equivalent Cyclic Polygon (ECP) of a TSP tour. In this section, we provide a formal definition of the ECP, a detailed algorithm for its construction as well as for the calculation of the radius of the circumcircle.

The definition of the ECP of a TSP tour is a particularization of a more general concept from geometry. Panina and Khimshiashvilib (2012) define a polygonal linkage as “a set of positive numbers L = (l1, l2, …, ln) ∈ \({\mathbb{R}}_{+}^{n}\), which can be realized as the lengths of edges of a closed polygonal line. A d-dimensional configuration of a polygonal linkage is a set of points p1, p2, …, pn, pi ∈ \({\mathbb{R}}^{d}\), satisfying the conditions |pi pi+1| =  li, | pn p1| =  ln, where | · | denotes the Euclidean distance between two points. Physically, a polygonal linkage is interpreted as a set of cyclically joined rigid rods of length li. At the locations of joints (hinges), free bending and, thereby, self-intersections and self-overlaps of edges are allowed.”

Among the set of possible configurations of a polygonal linkage, called the moduli space, we focus on cyclic polygons, i.e., polygons in which all vertices are on a circle. Pinelis (2005), extending and complementing the work of Macnab (1981), proves the existence and isometric uniqueness of a convex cyclic polygon with edges that follow a given sequence of lengths (in which none is larger than the sum of the others). In the case of the proposed geometric transformation of a TSP tour, the proof of Pinelis (2005) assures the existence and uniqueness the ECP, since a tour defines a sequence of lengths. We define the ECP as follows.

Given a Euclidean TSP tour of n cities defined by the sequence order in which they are visited {p1, p2, …, pn}, it is possible to construct an inscribed n-polygon with vertices in sequence {v1, v2, …, vn} such that each link pk-1-pk (k = 2, …, n) of the TSP tour has an equivalent polygon edge \(\overline{{v }_{k-1}{v}_{k}}\) of the same length, with the returning link pn-p1 equivalent to the last edge \(\overline{{v }_{n}{v}_{1}}\). The circumcircle of the ECP is called the mass circle, with radius Rm called the mass radius.

Figure 2 represents the ECP of the example of Fig. 1 and illustrates the basic relationship between Rm, the length of each edge, and the central angle that it delimits. Let us consider the link from node i to node j belonging to a tour. Then the relation of Eq. (7) (i = 1 and j = 2 in Fig. 2), is verified for αij ≤ π.

$$ \frac{{d_{i \, j} }}{2} = R_{m} \sin \left( {\frac{{\alpha_{i \, j} }}{2}} \right), \, \alpha_{i \, j} = 2 \cdot \arcsin \left( {\frac{{d_{i \, j} }}{{2 \cdot R_{m} }}} \right), \, \forall \left( {i,j} \right) \in E|x_{i \, j} { = 1} $$
(6)
Fig. 2
figure 2

Example of a TSP tour (left) and its ECP (right)

Summation of all the central angles of the ECP will equal 2π (Eq. 7). Thus, given a TSP tour and the set of distances of the links {dij, xij = 1} such that all the central angles verify αij ≤ π with \({d}_{max}={max}_{ij}({d}_{ij}), {x}_{ij}=1\), we can calculate Rm by solving the transcendental Eq. (7) either with the aid of mathematical software or through an iterated procedure.

$$ \sum\limits_{i, j} {\arcsin } \left( {\frac{{d_{i \, j} }}{{2R_{m} }}} \right) = \pi, \, R_{m} \ge \frac{{d_{\max } }}{2}{ , }\,\forall \left( {i,j} \right) \in E|x_{i \, j} { = 1 } $$
(7)

To gain insights into the existence and uniqueness of the ECP, and in an equivalent approach to Pinelis (2005), we define the function F1 in Eq. (8), such that Eq. (7) can be expressed as F1(Rm) = 0.

$$ F_{1} (R_{c} ) = \sum\limits_{i \, j} {\arcsin } \left( {\frac{{d_{i \, j} }}{{2R_{c} }}} \right) - \pi, \, R_{c} \ge \frac{{d_{\max } }}{2}{ , }\,\forall \left( {i,j} \right) \in E|x_{i \, j} { = 1 } $$
(8)

F1 is continuous, differentiable, and strictly decreasing in the interval [dmax/2, ∞). Besides, F1 converges asymptotically to –π as Rc tends to infinity. Then, if a = F1(dmax/2) ≥ 0, there will be a unique value of Rm|F1(Rm) = 0. Figure 3 shows the representation of F1(Rc) for the example of Fig. 2.

Fig. 3
figure 3

Plot of function F1(Rc) for the cities of Fig. 2 example

If the tour has the particularity of having a very large link, it might happen that Eq. (7) cannot be satisfied even for the minimum possible mass radius Rm = dmax/2. In this case, the EIPC does not close even for the minimum Rm, for which the corresponding edge with maximum length would be the diameter of the circumcircle. The central angle of the longest edge would equal π, whereas the sum of the rest of the central angles would be less than π. From Eq. (8) this case would then verify that a < 0, implying F1 < 0 in all its domain. Conceptually, the fact that a < 0 means that, for the ECP to be closed, all of its vertices have to belong to a semicircle. This can be stated as the central angle of the longest link being larger than π. Figure 4 illustrates this fact through a very simple example (obtained by enlarging link 1–2 in the example of Fig. 2).

Fig. 4
figure 4

Example of a TSP tour (left) and its ECP (right) for the case a < 0

For most of the TSP tours a ≥ 0 and the construction of the ECP is identical to the procedure described in the former subsection for the construction of the EIPC. Yet, the possibility of a < 0 requires introducing a modification as follows. For the longest link, the vertex must be determined by taking the counterclockwise intersection. Thus, the central angle will be \(2\pi -2\cdot arcsin\left(\frac{d\mathrm{max}}{2{R}_{m}}\right)\). Subtracting the central angle from the summation and adding the counterclockwise angle (divided by 2) in Eq. (7) yields the condition that must verify Rm (Eq. 9).

$$ \begin{gathered} \left[ {\sum\limits_{i \, j} {\arcsin } \left( {\frac{{d_{i, j} }}{{2R_{m} }}} \right) - \arcsin \left( {\frac{{d_{\max } }}{{2R_{m} }}} \right)} \right]{ + }\left[ {\pi - \arcsin \left( {\frac{{d_{\max } }}{{2R_{m} }}} \right)} \right]{ = }\,\pi \, \hfill \\ \sum\limits_{i,j} {\arcsin } \left( {\frac{{d_{i \, j} }}{{2R_{m} }}} \right) - 2 \cdot \arcsin \left( {\frac{{d_{\max } }}{{2R_{m} }}} \right) = 0, \, R_{m} \ge \frac{{d_{\max } }}{2}{ , }\,\forall \left( {i,j} \right) \in E|x_{i \, j} { = 1 } \hfill \\ \end{gathered} $$
(9)

Analogously to the case a ≥ 0, the function F2 of Eq. (10) is defined, and Eq. (9) can be expressed as F2(Rm) = 0. We note that for Rc = (dmax/2), the second term of F2 equals π (arcsin(dmax/2Rc) = arcsin(1) = π/2) and hence F1 and F2 have the same expression. Therefore, a = F1(dmax/2) = F2(dmax/2).

$$ F_{2} (R_{c} ) = \sum\limits_{i \, j} {\arcsin } \left( {\frac{{d_{i \, j} }}{{2R_{c} }}} \right) - 2 \cdot \arcsin \left( {\frac{{d_{\max } }}{{2R_{c} }}} \right), \, R_{c} \ge \frac{{d_{\max } }}{2}{, }\,\forall \left( {i,j} \right) \in E|x_{i,j} { = 1 } $$
(10)

F2 is differentiable in the interval [dmax, ∞) and converges asymptotically to 0+ as Rc tends to infinity. A detailed analysis of the function, its first derivative and curvature, shows that \({F}_{2}^{{\prime}}\) tends to infinity as Rc tends to dmax/2 (F2 has vertical slope for Rc = dmax/2), and has a unique zero which corresponds to a F2 maximum. If a < 0, F2 will have different signs in the extremes of the domain, asymptotic convergence to 0+, and there will be a unique value of Rm | F2(Rm) = 0 (see Pinelis (2005) for an equivalent thorough proof). Figure 5 shows the representation of F2(Rc) for the example of Fig. 4.

Fig. 5
figure 5

Plot of function F2(Rc) for the cities of Fig. 4 example in which a < 0

We can then define the following procedure to construct the ECP of a TSP tour, based on the EIPC construction as described in Sect. 3.1:

  • Step 1 Define the sequence of cities such that the link p1-p2 is the longest.

  • Step 2 Compute a = F1(dmax/2).

  • Step 3 Find Rm.

    • If a ≥ 0. Find Rm | F1(Rm) = 0.

    • If a < 0. Find Rm | F2(Rm) = 0.

  • Step 4 Construct the ECP.

    • If a ≥ 0. Proceed as described in the construction of the EIPC.

    • If a < 0. Proceed as described in the construction of the EIPC, but with the following modification: select \({v}_{2}\) in the circumcircle as the first intersection counterclockwise from \({v}_{1}\).

We can gain some insights on the ECP and the TSP with many nodes, analyzing the case in which the distances between the cities of the tour are of equal length d. The ECP in this case will be a regular polygon. Let us consider a parameter γ > 1, that will represent the relation between the length of the mass circle and the length of the ECP of an n-city TSP as defined by Eq. (11). As the number of number of cities of the problem grows, the length of the tour will be closer to the length of the mass circle (i.e., γ → 1).

$$ 2\pi R_{m} = \gamma \cdot n \cdot d \, \to \, \gamma = \frac{{2\pi R_{m} }}{n \cdot d} $$
(11)

The definition of the parameter γ can be generalized, so it can be applicable to any TSP tour as the inverse relation of the length of the tour and the length of its mass circle. In general, for a TSP with many equally distributed nodes, γ will be close to 1. A value of γ significantly higher than 1 will indicate the presence of large links in the TSP tour. Thus, γ can be used as one parameter that characterizes the topology of a TSP tour (Eq. 12) and, moreover, to characterize the TSP as follows. The optimal TSP tour allows us to construct its corresponding ECP*, with mass radius Rm*. Thus, if the parameter γ is calculated for the optimal tour, it will then be a characterizing parameter of the TSP.

$$ \gamma^{*} = \frac{{2\pi R_{m}^{*} }}{{\sum\nolimits_{i \, j} {d_{i \, j} x_{i \, j} } }}{ , }\,\forall \left( {i,j} \right) \in E|x_{i \, j} { = 1 } $$
(12)

4 ECP-based TSP formulation and heuristics

The geometric transformation of the TSP tours leads to a modified formulation of the problem. As the circumradius of a tour EIPC tends to infinity, the length of each edge converges to the corresponding arc of the circumcircle. For a large enough circumradius, the longer the tour, the greater the total central angle in its EIPC. Therefore, the objective function of the TSP (Eq. 1) can be substituted by the sum of EIPC half central angles for a circumference of a large enough circumradius (\({R}_{c}^{L}\)), yielding an equivalent formulation (13). If we express the circumradius as a factor times the minimum possible radius to include any link of the TSP, it is verified that: \({R}_{c}^{L}=q\cdot {d}_{max}/2 , q\gg 1.\)

Instead of the standard approach of minimizing the sum of costs or distances (1), the objective function can be formulated as a minimization of the sum of the half central angles of a transformed tour (13). Taking the same indices, parameters, variables, and constraints (Eqs. 24) of the formulation of Miller et al. (1960) included in Sect. 2, we can define the new ECP-based TSP (ECPTSP) formulation as follows.

$$ \min \, z = \sum\limits_{i, \, j} {x_{i \, j} \arcsin } \left( {\frac{{d_{i \, j} }}{{2R_{c}^{L} }}} \right) $$
(13)

such that

$$ \sum\limits_{i} {x_{i \, j} } { = 1 }\quad \quad \forall j\quad(2) $$
$$ \sum\limits_{j} {x_{i \, j} } = 1\quad \quad \forall i \quad(3)$$
$$ u_{i} - u_{j} + 1 \le \left( {n - 1} \right)\left( {1 - x_{i \, j} } \right)\quad \quad \forall i,j = 2,...,n, \, i \ne j \quad(4)$$

The proposed modified formulation opens the way to define a new family of heuristics for the TSP, through the specification of different values for the circumradius and the addition of EPC geometric constraints. In the following subsections, we propose three heuristics based on the geometric transformation that are modified formulations of the MTZ base model formulation (Sect. 2).

4.1 Model B—heuristic mass radius (ECPTSP_hmR)

The first heuristic strategy consists in reducing the radius of the ECPTSP formulation objective function (Eq.  13), so the formulation helps to guide the algorithm by avoiding large links (both explicitly and implicitly) while aligning with the objective of the minimum distance. This is done by solving the TSP with a fast heuristic and taking the mass radius of the ECP of the heuristic solution (\({R}_{m}^{H})\) as the radius for the objective function. For the experimentation of Sect. 5, we use the nearest neighbor heuristic —starting from an arbitrary city, iteratively select the city that is closest to the last city included in the tour—, which is simple and fast, although it is known to yield low quality solutions with large returning links (Rosenkrantz et al. 1977). In fact, for all cases of the experimentation (Sect. 5) it is verified that \({R}_{m}^{H}=q\cdot {d}_{max}/2 , q>1.\)

To complete the modified formulation, it is also necessary to add the set of constraints (15) that express the impossibility for an edge to surpass the diameter of the mass circle, assuring the range of validity of the arcsine functions in the objective function.

Model B:

$$ \min \, z{ = }\sum\limits_{i, \, j} {x_{i \, j} \arcsin } \left( {\frac{{d_{i \, j} }}{{2R_{m}^{H} }}} \right) $$
(14)

Such that.

$$ \sum\limits_{i} {x_{i \, j} } { = 1}\quad \quad \forall j \quad(2)$$
$$ \sum\limits_{j} {x_{i \, j} } = 1\quad \;\;\forall i\quad(3) $$
$$ u_{i} - u_{j} + 1 \le \left( {n - 1} \right)\left( {1 - x_{i \, j} } \right)\quad \forall i,j = 2,...,n, \, i \ne j \,\quad(4) $$
$$ d_{i \, j} x_{i \, j} \le 2R_{m}^{H} \, \forall i,j $$
(15)

We underline the elimination of links that derives from Eq. (15) and its practical application to reduce the computation time for large problems. On the contrary, if the topology of the problem is such that the optimal solution includes large links, ECPTSP_hmR formulation might not provide quality solutions, particularly if a better heuristic is employed. In general, as we develop in the remainder of the paper, there is a trade-off between properly accelerating the search and leaving aside good solutions.

4.2 Model C—summation of arcs constraint (ECPTSP_summarcs)

The ECPTSP formulation also opens the possibility of adding a constraint that might improve the calculations for complex problems. The idea behind the additional cut lies in the fact that, in general, for problems of large size, tours in which the total central angle of the circumcircle of the heuristic mass radius exceeds 2π are likely to be low quality solutions. The ECPTSP_summarcs formulation (Model C) results from the addition of constraint (16) to the ECPTSP_hmR formulation.

Model C:

$$ \min \, z{ = }\sum\limits_{i, \, j} {x_{i \, j} \arcsin } \left( {\frac{{d_{i \, j} }}{{2R_{m}^{H} }}} \right) $$
(14)

such that

$$ \sum\limits_{i} {x_{i \, j} } { = 1 }\quad \quad \forall j\quad(2) $$
$$ \sum\limits_{j} {x_{i \, j} } = 1\quad \quad \forall i\quad(3) $$
$$ u_{i} - u_{j} + 1 \le \left( {n - 1} \right)\left( {1 - x_{i \, j} } \right)\quad \quad \forall i,j = 2,...,n, \, i \ne j\quad(4) $$
$$ d_{i \, j} x_{i \, j} \le 2R_{m}^{H} \, \quad \quad \forall i,j $$
(15)
$$ \sum\limits_{i, \, j} {x_{i \, j} \arcsin } \left( {\frac{{d_{i \, j} }}{{2R_{m}^{H} }}} \right) \le \pi $$
(16)

4.3 Model D—Small Circumradius (ECPTSP_scR)

The next step in the trade-off between reduction of the search space and not eliminating good solutions is explored by drastically reducing the radius of the ECPTSP objective function. Instead of using a large RcL in the objective function (13), we can use what we call a small circumradius RcS that is smaller than half the maximum distance \({R}_{c}^{S}=q\cdot {d}_{max}/2 , q<1.\) The formulation is completed by adding a set of constraints equivalent to (15).

Model D:

$$ \min \, z{ = }\sum\limits_{i, \, j} {x_{i \, j} \arcsin } \left( {\frac{{d_{i \, j} }}{{2R_{c}^{S} }}} \right) $$
(17)

such that

$$ \sum\limits_{i} {x_{i \, j} } { = 1 }\quad \quad \forall j \quad(2)$$
$$ \sum\limits_{j} {x_{i \, j} } = 1\quad \quad \forall i \quad(3)$$
$$ u_{i} - u_{j} + 1 \le \left( {n - 1} \right)\left( {1 - x_{i \, j} } \right)\quad \forall i,j = 2,...,n, \, i \ne j \quad(4)$$
$$ d_{i \, j} x_{i \, j} \le 2R_{c}^{S} \, \quad \quad \forall i,j $$
(18)

To have the possibility of achieving the optimal value, RcS can be reduced as long as no arc of the optimal solution is unable to satisfy constraints (18). Lowering RcS might also lead to avoiding the optimum yet yielding a feasible solution. The challenging issue is how to set the value of RcS low enough to significantly reduce the number of edges while not making it hard to find a feasible quality solution. It is immediate to determine that it should never be smaller than half the minimum distance from a node to the others, since, if it is not, any link including that node will not satisfy Eq. (18) (it will not fit into the circumcircle). Finding a suitable value for RcS is an issue that arises from the proposed ECPTSP-scR formulation and is subject to research. Noteworthy, due to the reduced value of RcS, the objective function value for most tours will likely exceed 2π (as in Fig. 1 left). For the experimentation of Sect. 5, we take RcS as the longest among the minimum distances from each node to the others \({R}_{c}^{S}={max}_{j}({min}_{i}{d}_{ij})\), which, for all the cases selected for experimentation verify \({R}_{c}^{S}=q\cdot {d}_{max}/2, q<1\).

5 Experimentation

Aiming to assess the practical interest of the proposed geometric transformation as well as the different heuristic formulations presented in the former section, we compare the following 4 formulations of the TSP:

  • Model A. Classical formulation of Miller et al. (1960) (TSP base model formulation as defined in Sect. 2).

  • Model B. ECPTSP_hmR formulation, computing RmH with the nearest neighbor heuristic tour (Rosenkrantz et al. 1977).

  • Model C. ECPTSP_summarcs formulation with the same RmH of Model B.

  • Model D. ECPTSP_scR formulation, with RcS calculated as the longest among the minimum distances from each node to the others.

5.1 Experimental settings

To perform the above comparison, from TSPLIB (Reinelt 1991) we select the 40 TSPs in the Euclidean plane and symmetric (Symmetric EUC_2D type) with a maximum of 400 nodes. Due to the nature of the proposed geometric transformation, it is necessary to compute float Euclidean distances when solving the TSPs. We note that this is not the standard stablished for the TSPLIB instances, in which distances are rounded to integer values. In order to have a comparison benchmark, for each TSPLIB instance, the floating Euclidean distance of the known optimal tour has been calculated, even though for some cases those tours are not optimal.

The experimentation has been performed using a computer with Intel(R) Core (TM) i3-8100 CPU @ 3.60 GHz. We formulate all models in Python 2.7, using the Pyomo package to code the formulation (Hart et al. 2017), the Gurobi 9.1 solver (Gurobi 2021a) to find a solution, and the R programming language to plot the nodes and results (R Core Team 2020). For all runs, a time limit of 10,000 s and a Gurobi optimality MIPGap (Relative MIP optimality gap, Gurobi 2021b) of 0.01% was set for each run. MIPGap provides a relative maximum distance to the optimal value. It is the MIP primal–dual relative gap, calculated as the absolute difference between the incumbent objective function value (primal upper bound) and the incumbent dual objective function value (lower bound) of a Mixed Integer Programming (MIP) problem, relative to the incumbent primal objective value (Gurobi 2021b).

5.2 Results

Table 1 shows the results divided in three groups. Table 1a includes the results for those instances in which all formulations consumed the time limit without achieving the MIPGap (time = 10,000 s for all runs). Table 1b includes the results in which at least one formulation achieved the MIPGap without reaching the time limit and at least one consumed the time limit (therefore it specifies the computation time). Finally, Table 1c includes those cases in which all formulations reached the MIPGap of 0.01%.

Table 1 TSPLIB experimentation results

The gap (%) column represents the absolute percentage relative deviation of the solution yielded by each model with respect to the optimal TSPLIB tours in terms of distance. Since in general the benchmark tours are not optimal when taking floating distances, gaps become negative in some cases, meaning the solution found is better than the optimal tour with integer distances. Additionally, the table shows the value of the objective function for each formulation: the length of the best solution for the formulation A and the angle of the respective best solutions in radians for the ECPTSP based formulations B, C, and D. In models (B) and (C), the distance of the objective function to π provides an indicator of the improvement with respect to the heuristic taken to calculate RmH. Results are complemented with the value of a parameter θ that characterizes the degree of dispersion of the nodes that define each instance. The details of its calculation and implications will be discussed in Sect. 4.3.

Table 2 presents the characterization of each TSP based on the parameters discussed throughout the paper: the optimal length, optimal mass radius, parameter γ, upper bound radius used, radius of the convex hull, small radius, and half the maximum distance.

Table 2 Instance characterization: parameters and coefficients

5.3 Discussion and influence of the topology of the problem

In this section, we present a general comparison of the experimentation. Then, we explain a selected parameter to classify the dispersion of nodes, and finally, we use it to group the sets of nodes and plot them to draw some experimentation conclusions.

In Table 3, we compare the results obtained from the forty TSPLIB selected cases for the four formulations. For each formulation, the table shows in how many cases it performs better than each one of the other formulations, alone or tied with another formulation. Formulations (B) and (D) yield better results than (A) in the majority of cases, whereas (C) and (A) are even. Model (D) shows the best performance overall, with 23 cases yielding the best solution, yet the drastic arc elimination strategy leads to infeasibility twice, and in other 4 cases (D) is not able to provide a solution before reaching the time limit. It is therefore a promising approach, but further research concerning the value of is RcS needed. It is worth highlighting that the compact formulation (A) only achieved the best results in 8 out of the 40 cases.

Table 3 Comparison of results between formulations

In conclusion, there does not seem to be a dominant strategy although ECPTSP based formulations show good results in the majority of cases. Nevertheless, these new formulations do not perform well in some of the cases. With the purpose of identifying in which problems the proposed modified formulations have more potential, we analyze the influence of the topology of the problem.

With this aim and following the work of Dry et al. (2012), we calculate a parameter θ (R in the original) that characterizes the degree of dispersion of the nodes that define each instance. This parameter leads to a characterization of the set of nodes as clustered, random, or evenly distributed. The parameter adopted is proposed by Clark and Evans (1954) who propose using the distribution of distances from each node to its nearest neighbor as a measure of the spatial dispersion of a set of nodes. To calculate θ, the observed mean nearest neighbor distance θo is divided by the mean θe of a Poisson process probability density function that describes the nearest neighbor distance, as expressed in Eq. (19) where A indicates the area.

$$ \vartheta_{o} = \frac{1}{n}\sum\limits_{i \ne j} {\min \left\{ {d_{ij} } \right\}} \, , \, \vartheta_{e} = \frac{1}{2}\sqrt {{\raise0.7ex\hbox{$A$} \!\mathord{\left/ {\vphantom {A n}}\right.\kern-\nulldelimiterspace} \!\lower0.7ex\hbox{$n$}}} \, , \, \vartheta = \frac{{\vartheta_{o} }}{{\vartheta_{e} }} $$
(19)

The statistic θ varies between 0 and 2.149, aiming to classify the distribution of the sets of points from highly clustered to highly regular. It represents how long is the average distance to the nearest neighbor compared to a random set of nodes. The closer to 1 is θ the more randomly are the nodes distributed; if θ is close to 0, the nodes are highly clustered; if θ is high it means the average distance to the nearest neighbor is proportionally high, and then the nodes are evenly distributed.

We classify the 40 TSPLIB instances according to their θ value and, similarly to Dry et al. (2012) we define three groups, respectively, { θ  < 0.8}, {0.8 ≤  θ  ≤ 1.2}, and {1.2 <  θ}. Figures 3, 4, and 5 show the plots of the three groups ordered by their θ value. We use a graphic code to signify the performance of the ECPTSP formulations: if formulations (B, C, and D) obtain better results than formulation (A) in terms of gap solution or computing time when they provide the same gap solution, the plot rectangle edges are continuous and dots are dark green colored; dashed edges and orange dots signify that at least one ECPTSP formulation (B, C and D) obtain better results than formulation (A) or all four models have identical results, and dotted edges and red color is used when formulation (A) performs the best.

Figure 6 shows that for high values of θ, ECPTSP formulations (B, C or D) yield satisfactory results. In six of the nine instances the formulation (A) performs the worst. In the results of Table 1 we see how in cases eil51, eil101, eil76, rat195, and rat99, either gaps or computing times decrease substantially with these formulations.

Fig. 6
figure 6

Sets of nodes from TSPLIB type EUC 2D with less than 400 nodes where 1.2 < θ

In Fig. 7, there are ten sets in continuous edge (green), ten sets in dashed (orange), and only one set in dotted (red). Regarding this last case, pr76, we observe in Table 1 a similar computation time for all formulations, although (A) performs slightly better than (B, C, and D). Sets st70, rd400, kroA150, gil262, and kroA200 behave the best when using model (D), and ch130 solution improvement for models (B) and (C) is significative.

Fig. 7
figure 7

Sets of nodes from TSPLIB type EUC 2D with less than 400 nodes where 0.8 ≤ θ  ≤ 1.2

Figure 8 reveals that high clusterization has a negative impact on the performance of models (B, C, and D). The distribution of the nodes presents peculiar patterns. Only in one of the ten instances, the three ECPTSP formulations show better behavior than (A) and in four of the cases (A) yields the best results. Model (D) may be infeasible by using the selected RcS. On the other hand, if θ>1, model (D) performs better than model (A) in all cases except in ts225, where a regular pattern is identified, and in pr76, where the performance of all models results in similar.

Fig. 8
figure 8

Sets of nodes from TSPLIB type EUC 2D with less than 400 nodes where θ < 0.8

6 Conclusions

Through a geometric transformation based on polygonal linkages, we can inscribe each transformed TSP tour as an open polygonal chain in a circle of a given radius (Equivalent Inscribed Polygonal Chain, EIPC) as well as find its Equivalent Cyclic Polygon (ECP). This transformation leads to a modified formulation for the extensively studied classic Euclidean TSP in which the objective function is expressed as a summation of angles instead of distances.

The modified formulation leads in turn to the definition of a new family of heuristic models (ECPTSP formulations). Experimentation with forty cases of TSPLIB shows that using the ECPTSP formulations may help to obtain better or optimal solutions faster than compact formulations. Using ECP properties mixed with a drastic link elimination shows promising results in some cases. We also verify that a parameter based on the distribution of the nearest neighbor distances is of practical interest in TSP topology characterization. Particularly, it shows that the formulations based on the proposed tour geometric transformation perform better when the nodes are randomly or evenly distributed, whereas it tends to yield worse results in highly clustered problems.

The performance of the heuristic formulation reveals the interest of exploring ways to set the small radius parameter so that it improves the performance of the solving procedure while not incurring in infeasibility or leading to high computation times to provide a first feasible solution. The definition of the ECP opens the way for further research on TSP, exploring new properties and new heuristics. The number of formulations, and TSP extensions such as the Vehicle Routing Problem (VRP), also bring the interest of investigating the applicability of the ECP transformation to achieve efficient results in other models and variants.