public class AlgorithmGAPGen extends GeneticAlgorithm
AlgorithmGAPGen is the genetic algorithm and programming (GAP) 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 |
---|
AlgorithmGAPGen(GeneticIndividual initialIndividual,
int pPopSize,
int pGenerations,
double PM,
double AMP,
double PMIG,
double pGACrossoverProb,
double pGAMutationProb,
double pLOptProb,
int NOL,
int IOL,
Randomize r,
int pGACrossoverID,
int pGPCrossoverID,
int pGAMutationID,
int pGPMutationID)
Class constructor with the following parameters:
|
Modifier and Type | Method and Description |
---|---|
GeneticIndividual |
evolve(int MAXITER)
this method is intended for evolving the generational GAP algorithm for the given number of
iterations with an generational GAP algorithm.
|
public AlgorithmGAPGen(GeneticIndividual initialIndividual, int pPopSize, int pGenerations, double PM, double AMP, double PMIG, double pGACrossoverProb, double pGAMutationProb, double pLOptProb, int NOL, int IOL, Randomize r, int pGACrossoverID, int pGPCrossoverID, int pGAMutationID, int pGPMutationID)
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 sizepGenerations
- an int with the number of generationsPM
- a double with the mutation probabilityAMP
- a double with the mutation amplitudePMIG
- a double with the migration probabilitypGACrossoverProb
- a double with the genetic algorithm crossover operation probabilitypGAMutationProb
- a double with the genetic algorithm mutation operation 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
objectpGACrossoverID
- the genetic algorithm crossover operation used attending the the current GenotypepGPCrossoverID
- the genetic algorithm crossover operation used attending the the current GenotypepGAMutationID
- the genetic algorithm crossover operation used attending the the current GenotypepGPMutationID
- 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 generational GAP algorithm for the given number of iterations with an generational GAP 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.