public class AlgorithmGAPNiches extends GeneticAlgorithm
AlgorithmGAPNiches is the genetic algorithm and programming (GAP) algorithm when
the steady with niches options are chosen, that is, the Steady and the Niches
parameters of the given method are marked.
This class is an specification of GeneticAlgorithm
.
Constructor and Description |
---|
AlgorithmGAPNiches(GeneticIndividual initialIndividual,
int pPopSize,
int pTourSize,
double PM,
double AMP,
double PMG,
double pGACrossoverProb,
double pGAMutationProb,
int pGenerations,
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 algorithm for a given number of iterations
with an steady with niches GAP algorithm.
|
public AlgorithmGAPNiches(GeneticIndividual initialIndividual, int pPopSize, int pTourSize, double PM, double AMP, double PMG, double pGACrossoverProb, double pGAMutationProb, int pGenerations, 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 sizepTourSize
- an int with the number of individuals that must be chosen for the tournamentPM
- a double with the mutation probabilityAMP
- a double with the mutation amplitudePMG
- a double with the migration probabilitypGACrossoverProb
- a double with the genetic algorithm crossover operation probabilitypGAMutationProb
- a double with the genetic algorithm mutation operation probabilitypGenerations
- an int with the number of iterations to be carried outpLOptProb
- 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 algorithm for a given number of iterations with an steady with niches GAP algorithm. The basic steps for each iteration are: firstly computes the number of different families in the island, then the tournament and the genetic operations are carried out, the offsprings are evaluated and assigned to a niche.
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.