public class GeneticAlgorithmGenerational extends GeneticAlgorithm
GeneticAlgorithmGenerational is the genetic algorithm (GA) algorithm when
the generational option is chosen, that is, the Steady parameter of the
given method is not marked.
This class is an specification of GeneticAlgorithm
.
Constructor and Description |
---|
GeneticAlgorithmGenerational(GeneticIndividual initialIndividual,
int pPopSize,
int nGenerations,
double PM,
double AMP,
double PMIG,
double pLOptProb,
int NOL,
int IOL,
Randomize r,
int pCrossoverID,
int pMutationID)
Class constructor with the following parameters:
|
Modifier and Type | Method and Description |
---|---|
GeneticIndividual |
evolve(int MAXITER)
this method is intended for evolving the algorithm for a given number of iterations
with an generational GA algorithm.
|
public GeneticAlgorithmGenerational(GeneticIndividual initialIndividual, int pPopSize, int nGenerations, double PM, double AMP, double PMIG, double pLOptProb, int NOL, int IOL, Randomize r, int pCrossoverID, int pMutationID)
Class constructor with the following parameters:
initialIndividual
- a GeneticIndividual
to start the search process with the desired type of individualpPopSize
- an int with the population sizenGenerations
- number of generations.PM
- a double with the mutation probabilityAMP
- a double with the mutation amplitudePMIG
- The migration probabilitypLOptProb
- a double with the local optimization method probabilityNOL
- an int with the number of iterations in the local optimization methodIOL
- an int with the local identification method identidicationr
- the Randomize
objectpCrossoverID
- the genetic algorithm crossover operation used attending the the current GenotypepMutationID
- the genetic algorithm crossover operation used attending the the current Genotypepublic GeneticIndividual evolve(int MAXITER) throws invalidCrossover, invalidMutation, invalidOptim
this method is intended for evolving the algorithm for a given number of iterations with an generational GA algorithm. The basic steps for each iteration are: the fitness normalization, the generation of the intermeadiate population with Stocastic Universal Sampling, the genetic operations to carry out and finally the evaluation of the fitness of each individual.
evolve
in class GeneticAlgorithm
MAXITER
- an integer with the number of iterations torun in the evolucionGeneticIndividual
foundinvalidCrossover
- in case of unsupported crossover.invalidMutation
- in case of unsupported mutation.invalidOptim
- in case of local optimization operations.