#include <eoVRPMutation.h>
Inheritance diagram for eoVRPMutation:

Public Member Functions | |
| eoVRPMutation () | |
| Default constructor: nothing to do here. | |
| std::string | className () const |
| Returns a string containing the name of the class. | |
| bool | operator() (eoVRP &_genotype) |
| Functor operator. | |
Private Member Functions | |
| bool | swapMutation (eoVRP &_genotype) |
| It exhanges the positions of two clients within the individual. | |
| bool | inversionMutation (eoVRP &_genotype) |
| It selects two positions in the genotype and inverts the clients between them. | |
| bool | insertionMutation (eoVRP &_genotype) |
| It selects and individual, erases it from its original position and inserts it somewhere else. | |
| bool | DisplacementMutation (eoVRP &_genotype) |
| It selects a set of clients, erases them from their original position and inserts them somewhere else. | |
These four operators should be separated in different classes and their probabilities made parameterizable.
Definition at line 52 of file eoVRPMutation.h.
| std::string eoVRPMutation::className | ( | void | ) | const [inline, virtual] |
Returns a string containing the name of the class.
Used to display statistics.
Reimplemented from eoMonOp< eoVRP >.
Definition at line 70 of file eoVRPMutation.h.
| bool eoVRPMutation::operator() | ( | eoVRP & | _genotype | ) | [inline, virtual] |
Functor operator.
Applies one of the four mutation operators available, each of them with a predefined (hard-coded) probability. These operators should be separated in different classes and their probabilities made parameterizable to do it in a more "paradisEO" way.
| _genotype | The genotype being mutated (it will be probably modified). |
Implements eoUF< eoVRP &, bool >.
Definition at line 86 of file eoVRPMutation.h.
References eoVRP::cleanRoutes(), DisplacementMutation(), insertionMutation(), inversionMutation(), swapMutation(), and eoRng::uniform().
| bool eoVRPMutation::swapMutation | ( | eoVRP & | _genotype | ) | [inline, private] |
It exhanges the positions of two clients within the individual.
Clients may or may not be in the same route.
| _genotype | The genotype being mutated (it will be probably modified). |
Definition at line 119 of file eoVRPMutation.h.
References eoRng::random().
Referenced by operator()().
| bool eoVRPMutation::inversionMutation | ( | eoVRP & | _genotype | ) | [inline, private] |
It selects two positions in the genotype and inverts the clients between them.
Clients may or may not be in the same route.
| _genotype | The genotype being mutated (it will be probably modified). |
Definition at line 142 of file eoVRPMutation.h.
References eoRng::random().
Referenced by operator()().
| bool eoVRPMutation::insertionMutation | ( | eoVRP & | _genotype | ) | [inline, private] |
It selects and individual, erases it from its original position and inserts it somewhere else.
The insertion may or may not be within the same route.
| _genotype | The genotype being mutated (it will be probably modified). |
Definition at line 170 of file eoVRPMutation.h.
References eoRng::random().
Referenced by operator()().
| bool eoVRPMutation::DisplacementMutation | ( | eoVRP & | _genotype | ) | [inline, private] |
It selects a set of clients, erases them from their original position and inserts them somewhere else.
The selected set of clients may cover different routes.
| _genotype | The genotype being mutated (it will be probably modified). |
Definition at line 199 of file eoVRPMutation.h.
References eoRng::random().
Referenced by operator()().
1.4.7