Approximate a solution to 2D Euclidean TSP using the Lin-Kernighan heuristic.
The heuristic
:: Config | Configuration. |
-> (a -> R2) | Gives the rectangular coordinates of each point; see below. |
-> [a] | List of points to visit. |
-> IO [a] | Produces points permuted in tour order. |
Approximate a solution to the two-dimensional Euclidean Traveling Salesperson Problem, using the Lin-Kernighan heuristic.
Invokes Concorde's linkern
executable as an external process.
Note: linkern
uses Euclidean distance rounded to the nearest integer.
You may need to scale up coordinates in the function passed to
.
tsp
Configuration
Configuration for
.
tsp
Config | |
|