Posts

Showing posts with the label 2-opt

C++ Implementation of 2-opt to the "Att48" Travelling Salesman Problem

Image
Introduction Some initial results from experimenting with the 2-opt heuristic and applying it to a standard traveling salesman test problem. C# / WPF equivalent implementation can be found here: https://www.technical-recipes.com/2017/applying-the-2-opt-algorithm-to-travelling-salesman-problems-in-c-wpf/ A summary of the 2-opt heuristic is given here: http://en.wikipedia.org/wiki/2-opt A nearest neighbour search algorithm is included in the implementation. A comparison is made of the kind of results we get from the 2-opt algorithms, with and without improving the initial tour using the nearest neighbour algorithm.