C++ Implementation of Hill-climbing and Simulated Annealing applied to Travelling Salesman Problems

Introduction Following from a previous post, I have extended the ability of the program to implement an algorithm based on Simulated Annealing and hill-climbing and applied it to some standard test problems. Once you get to grips with the terminology and background of this algorithm, it’s implementation is mercifully simple. The algorithm can be tweaked …

Continue reading ‘C++ Implementation of Hill-climbing and Simulated Annealing applied to Travelling Salesman Problems’ »

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

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 …

Continue reading ‘C++ Implementation of 2-opt to the “Att48” Travelling Salesman Problem’ »

Number System Conversions in C++

A posting which I will probably update from time to time that summarizes the conversion functions I encounter in C++. Hope others will find this useful too. 32-bit IEEE 754 floating point value to binary string 32-bit IEEE 754 binary string to floating point value Binary string to hexadecimal value Binary string to hexadecimal string …

Continue reading ‘Number System Conversions in C++’ »