Travelling salesman problems#

namespace problems

Implementations of some benchmark functions that can be used to test the genetic algorithms. There are some benchmark problems implemented for every encoding type, and the real-encoded problems can also be used for the binary-encoded GAs.

All of the problems are implemented for maximization.

class TSP#

#include <problems/travelling_salesman.hpp>
class TSP : public gapp::problems::BenchmarkFunction<PermutationGene>#

The base class used for the travelling salesman benchmark functions. The last node is fixed to be the last node of the city list supplied in the ctor. The travelling salesman problems are modified for maximization, so they will always return negative distance values.

Subclassed by gapp::problems::TSP124, gapp::problems::TSP152, gapp::problems::TSP226, gapp::problems::TSP299, gapp::problems::TSP439, gapp::problems::TSP52, gapp::problems::TSP76

class TSP52#

#include <problems/travelling_salesman.hpp>
class TSP52 : public gapp::problems::TSP#

Travelling salesman problem with 52 nodes (Berlin52) for the PermutationGA. The problem is modified for maximization, so it always returns negative distances.

Public Functions

inline TSP52()#

Default constructor.

class TSP76#

#include <problems/travelling_salesman.hpp>
class TSP76 : public gapp::problems::TSP#

Travelling salesman problem with 76 nodes (Padberg/Rinaldi’s 76 city problem) for the PermutationGA. The problem is modified for maximization, so it always returns negative distances.

Public Functions

inline TSP76()#

Default constructor.

class TSP124#

#include <problems/travelling_salesman.hpp>
class TSP124 : public gapp::problems::TSP#

Travelling salesman problem with 124 nodes (Padberg/Rinaldi’s 124 city problem) for the PermutationGA. The problem is modified for maximization, so it always returns negative distances.

Public Functions

inline TSP124()#

Default constructor.

class TSP152#

#include <problems/travelling_salesman.hpp>
class TSP152 : public gapp::problems::TSP#

Travelling salesman problem with 152 nodes (Padberg/Rinaldi’s 152 city problem) for the PermutationGA. The problem is modified for maximization, so it always returns negative distances.

Public Functions

inline TSP152()#

Default constructor.

class TSP226#

#include <problems/travelling_salesman.hpp>
class TSP226 : public gapp::problems::TSP#

Travelling salesman problem with 226 nodes (Padberg/Rinaldi’s 226 city problem) for the PermutationGA. The problem is modified for maximization, so it always returns negative distances.

Public Functions

inline TSP226()#

Default constructor.

class TSP299#

#include <problems/travelling_salesman.hpp>
class TSP299 : public gapp::problems::TSP#

Travelling salesman problem with 299 nodes (Padberg/Rinaldi’s 299 city problem) for the PermutationGA. The problem is modified for maximization, so it always returns negative distances.

Public Functions

inline TSP299()#

Default constructor.

class TSP439#

#include <problems/travelling_salesman.hpp>
class TSP439 : public gapp::problems::TSP#

Travelling salesman problem with 439 nodes (Padberg/Rinaldi’s 439 city problem) for the PermutationGA. The problem is modified for maximization, so it always returns negative distances.

Public Functions

inline TSP439()#

Default constructor.