This finds all points on a
grid with coordinates that are coprime:
Find the shortest tour using "OrZweig"
method, the default for 2D real inputs:
Finding shortest tour using "OrOpt"
method, the default for non-2D or nonreal inputs:
algorithm performs exchanges of edge endpoints for improvement:
(Convex hull, Cheapest insertion and Angle selection) intended for points in n
algorithm moves from one point to the nearest unvisited neighbor:
is a variant of the "Greedy"
algorithm with a known upper bound:
uses simulated annealing to minimize the tour length:
This finds the shortest tour through 100 points, with a penalty added to cross a "river":
This plots the tour, and the "river" in red :
This defines a sparse distance matrix among six points and find the shortest tour:
This plot the shortest tour in red, as well as the distance on each edge: