PaGMO
1.1.5
|
Inver-Over Algorithm (IO) More...
#include <inverover.h>
Public Types | |
enum | initialization_type { random = 0, nn = 1 } |
Public Member Functions | |
inverover (int gen=10000, double ri=0.05, initialization_type ini_type=random) | |
Constructor. More... | |
base_ptr | clone () const |
Clone method. | |
void | evolve (population &) const |
Evolve implementation. More... | |
std::string | get_name () const |
Algorithm name. | |
Public Member Functions inherited from pagmo::algorithm::base | |
base () | |
Default constructor. More... | |
virtual | ~base () |
Trivial destructor. More... | |
std::string | human_readable () const |
Return human readable representation of the algorithm. More... | |
void | set_screen_output (const bool p) |
Setter-Getter for protected m_screen_output data. More... | |
bool | get_screen_output () const |
Gets screen output. More... | |
void | reset_rngs (const unsigned int) const |
Resets the seed of the internal rngs using a user-provided seed. More... | |
Protected Member Functions | |
std::string | human_readable_extra () const |
Extra human readable algorithm info. More... | |
Friends | |
class | boost::serialization::access |
Additional Inherited Members | |
Protected Attributes inherited from pagmo::algorithm::base | |
bool | m_screen_output |
Indicates to the derived class whether to print stuff on screen. | |
rng_double | m_drng |
Random number generator for double-precision floating point values. | |
rng_uint32 | m_urng |
Random number generator for unsigned integer values. | |
unsigned int | m_fevals |
A counter for the number of function evaluations. | |
Inver-Over Algorithm (IO)
The Inver-Over algorithm is a state-of-the-art genetic algorithm for the Travelling Salesman Problem. It was designed by G. Tao and Z. Michalewicz in 1998.
Note: The algorithm was sightly changed (choice of the next city in a series of inverisons) since with this choice better performance (tour length, computational time) was observed.
Note2: The value for the population size is advised to be no smaller than 20. To not have premature convergence, values around 100 are observed to work well.
Note3: The inversion sequence for cases where city1 is later in the tour than city2 is chosen as in the original paper (city1 -> city2). Some papers invert the complementary part of the tour (city2 -> city1).
Definition at line 55 of file inverover.h.
pagmo::algorithm::inverover::inverover | ( | int | gen = 10000 , |
double | ri = 0.05 , |
||
initialization_type | ini_type = random |
||
) |
Constructor.
Allows to specify in detail all the parameters of the algorithm.
[in] | gen | Number of generations to evolve. |
[in] | ri | Probability of performing a random invert (mutation probability) |
Definition at line 49 of file inverover.cpp.
|
virtual |
Evolve implementation.
Runs the Inverover algorithm for the number of generations specified in the constructor.
[in,out] | pop | input/output pagmo::population to be evolved. |
Implements pagmo::algorithm::base.
Definition at line 74 of file inverover.cpp.
|
protectedvirtual |
Extra human readable algorithm info.
Reimplemented from pagmo::algorithm::base.
Definition at line 291 of file inverover.cpp.