#include <MemeticAlgorithm.h>
Public Types | |
enum | MA_STRATEGY |
Different strategy to select individuals undergoing local search. More... | |
Public Member Functions | |
MemeticAlgorithm () | |
Default constructor. | |
MemeticAlgorithm (GlobalSearch< T > *globalSearch, LocalSearch *localSearch=NULL) | |
Constructor. | |
void | evolve (unsigned int nGenerations=1) |
Evolving algorithm. | |
int | nGenerations () |
Number of generations elapsed. | |
bool | done () |
Check if stopping criteria are satisfied. | |
Public Attributes | |
GlobalSearch< T > * | gs |
Global search method. | |
LocalSearch * | ls |
Local search method. | |
int | tLS |
Maximum number of evaluations allocated for each individual learning. | |
double | pLS |
Percentage of the population should undergo individual learning. | |
MA_STRATEGY | maStrategy |
Strategy to select individuals undergoing individual learning. | |
unsigned int | maxEvaluations |
(Stopping criteria) Maximum number of evaluations allowed. | |
unsigned int | maxGenerations |
(Stopping criteria) Maximum number of generations allowed. | |
Protected Member Functions | |
vector< int > | getLSIndividuals () |
Generate the set of individuals undergoing local search, based on the setting of maStrategy. | |
virtual void | initialize () |
Initialization. |
<File comment goes here!!>
Copyright (c) 2008 by <Quang Huy / NTU>
T | Type T can be bool (binary problems), int (combinatorial problems) or real (continuous problems). |
enum MemeticAlgorithm::MA_STRATEGY |
Different strategy to select individuals undergoing local search.
Best: individuals with best fitnesses are selected. Stratified: individuals are selected so as to maintain highest diversity. Random: individuals are selected randomly.
MemeticAlgorithm< T >::MemeticAlgorithm | ( | GlobalSearch< T > * | globalSearch, | |
LocalSearch * | localSearch = NULL | |||
) | [inline] |
Constructor.
globalSearch | Global search method of type GlobalSearch. | |
localSearch | Local search method of type LocalSearch. |
void MemeticAlgorithm< T >::evolve | ( | unsigned int | nGenerations = 1 |
) | [inline] |
Evolving algorithm.
nGenerations | Number of generation to evolve. |
Reimplemented in MAMetaLamarckian< T >.
bool MemeticAlgorithm< T >::done | ( | ) | [inline] |
Check if stopping criteria are satisfied.
vector< int > MemeticAlgorithm< T >::getLSIndividuals | ( | ) | [inline, protected] |
Generate the set of individuals undergoing local search, based on the setting of maStrategy.
GlobalSearch<T>* MemeticAlgorithm< T >::gs |
LocalSearch* MemeticAlgorithm< T >::ls |
MA_STRATEGY MemeticAlgorithm< T >::maStrategy |