Hostname: page-component-74656f9884-skzmx Total loading time: 0 Render date: 2026-11-06T06:48:11.671Z Has data issue: false hasContentIssue false

Enhanced Filtering Algorithms for the Euclidean Traveling Salesperson Problem and Its Variants In Constraint Logic Programming

Published online by Cambridge University Press:  02 October 2026

ALESSANDRO BERTAGNON
Affiliation:
Department of Environmental and Prevention Sciences, University of Ferrara, Italy (e-mail: alessandro.bertagnon@unife.it)
MARCO GAVANELLI
Affiliation:
Department of Engineering, University of Ferrara, Italy (e-mail: marco.gavanelli@unife.it)
Rights & Permissions [Opens in a new window]

Abstract

The Traveling Salesperson Problem (TSP) is one of the best-known problems in computer science and arises in many engineering applications, such as smart vehicles and intelligent transportation systems. In the “Euclidean” case, each node is defined by its coordinates in the plane and distances are computed using the Euclidean metric. In the Constraint Programming (CP) literature, the Euclidean TSP is typically addressed by computing the full distance matrix and treating it as a general case; however this approach ignores the geometric information carried by the points’ coordinates. In this work, we propose new filtering algorithms, implemented in Constraint Logic Programming (CLP), that exploit such geometric information to achieve stronger constraint propagation than existing approaches. Moreover, we show how this methodology can be extended to other Euclidean variants of the TSP, including the Euclidean Generalized Traveling Salesperson Problem (EGTSP), which is relevant in practical routing and logistics applications. Experimental results demonstrate the computational advantages of the proposed approach.

Information

Type
Original Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2026. Published by Cambridge University Press
Figure 0

Fig. 1. A self-crossing circuit. Theorem 4.1 suggests that instead of taking PiPj¯$\overline {{P}_i {P}_j}$ and PkPl¯$\overline {{P}_k {P}_l}$, a shorter tour chooses the dotted edges PiPk¯$\overline {{P}_i {P}_k}$ and PjPl¯$\overline {{P}_j {P}_l}$.

Figure 1

Algorithm 1: nocrossing propagatorAlgorithm 1: long description.

Figure 2

Fig. 2. An arrow from Px${P}_x$ to Py${P}_y$ means that y∈Dom( Nextx)$y \in {Dom({\text{ Next}}_x)}$. Dashed lines are plotted to show the angles.

Figure 3

Fig. 3. The condition in theorem 4.4 is not sufficient: αt<α_$\alpha _t \lt \underline {\alpha }$ but PjPt¯$\overline {{P}_j {P}_t}$ does not cross all segments exiting from Pi${P}_i$.

Figure 4

Fig. 4. Fig. 4 long description.An arrow from Px${P}_x$ to Py${P}_y$ means that y∈Dom( Nextx)$y \in {Dom({\text{ Next}}_x)}$. Dashed lines are plotted to show the angles.

Figure 5

Fig. 5. The successor of a convex hull vertex cannot be another vertex on the boundary of the convex hull except for the one that immediately follows it.

Figure 6

Algorithm 2: clockwise_angle_propagator

Figure 7

Fig. 6. In order to visit nodes in a clockwise order, the angle between the incoming edge and the outgoing edge of a convex hull vertex cannot be positive (it must be between −π$-\pi$ and 0).

Figure 8

Algorithm 3: hull_path_propagator

Figure 9

Fig. 7. Each path originating from a convex hull vertex cannot reach any convex hull vertex except for the one immediately following it. Implementation is inspired by the circuit constraint but performs more powerful pruning.

Figure 10

Fig. 8. Fig. 8 long description.From Theorem 4.7: the path ps−e${{p}}_{s-e}$ is the current assignment. Polygon Q$Q$ is delimited by ps−e${{p}}_{s-e}$ and the (dashed) segment PePs¯$\overline {{P}_e {P}_s}$. I$I$ contains the points strictly inside Q$Q$ plus Ps${P}_s$ and Pe${P}_e$; H(I)${\mathcal H}(I)$ (grey in the picture) is its convex hull. Polygon R$R$ is delimited by ps−e${{p}}_{s-e}$ and the dotted segments.

Figure 11

Fig. 9. From Definition5.1Pk${P}_k$ is not a neighbor of Hi${H}_i$ because the segment HiPk¯$\overline {{H}_i {P}_k}$ intersects the convex hull H(P∖C(Hi))${\mathcal H}({\mathcal {P}} \setminus {C (H_i)})$.

Figure 12

Fig. 10. Fig. 10 long description.From Theorem 5.2Pb′${P}_{b^{'}}$ cannot have Pg′${P}_{g^{'}}$ as successor in any optimal EGTSP if ΦPg∩ΦPg′=∅$\Phi _{{P}_g} \cap \Phi _{{P}_g}^{'} = \emptyset$.

Figure 13

Algorithm 4: hull_set_propagator

Figure 14

Table 1. Comparing filtering algorithms on structured instances with time limit 1800s. For each instance we report total solving time and number of explored nodes to reach the optimal solution and prove its optimalityTable 1 long description.

Figure 15

Fig. 11. Fig. 11 long description.Comparing solving time 11a, 11b and search nodes 11c, 11d of HK-RMC and GEO+HK-RMC models on randomly-generated Euclidean TSP instances belonging to the uniform class when LC_FIRST MAX_COST search strategy is used. The solving time limit was set to 1800 s. Each data point in these figures corresponds to an instance. We removed instances where both models ran into timeout.

Figure 16

Fig. 12. Fig. 12 long description.Comparing solving time 12a, 12b and search nodes 12c, 12d of HK-RMC and GEO+HK-RMC models on randomly-generated Euclidean TSP instances belonging to the uniform class when MAX-REGRET search strategy is used. The solving time limit was set to 1800 s. Each data point in these figures corresponds to an instance. We removed instances where both models ran into timeout.

Figure 17

Table 2. Number of uniform instances that were not solved within the timeout during experiments, grouped by size (shown as node ranges). The experiments compared the HK-RMC and GEO+HK-RMC constraint models, with the MAX-REGRET and LC_FIRST MAX_COST search strategiesTable 2 long description.

Figure 18

Fig. 13. Fig. 13 long description.Comparing solving time and search nodes of HK-RMC and GEO+HK-RMC models on randomly-generated Euclidean TSP instances belonging to the clustered class varying the number of clusters (shown by the different colors). Figure 13a and 13b show the results obtained using the LC_FIRST MAX_COST search strategy while Figure 13c and 13d show the results obtained using the MAX-REGRET search strategy. The solving time limit was set to 1800 s. We removed instances where both models ran into timeout.

Figure 19

Table 3. Number of clustered instances that reached the timeout limit of 1800 s during the experiments, grouped by different numbers of clusters and sizes (shown as node ranges). The experiments compared the HK-RMC and GEO+HK-RMC algorithms, with the MAX-REGRET and LC_FIRST MAX_COST search strategiesTable 3 long description.

Figure 20

Fig. 14. Fig. 14 long description.Comparing number of solved instances by ECLP and GEO models on Euclidean GTSP instances generated using different approaches to partition points into clusters. The solving time limit was set to 1800 s. We removed instances where both models ran into timeout.