ABLE 2.0.0 07/02/2003 10:25:01

com.ibm.able.examples.genetic
Class TstGeneticFunction2

java.lang.Object
  |
  +--com.ibm.able.beans.AbleGeneticObject
        |
        +--com.ibm.able.examples.genetic.TstGeneticFunction2
All Implemented Interfaces:
java.io.Serializable

public class TstGeneticFunction2
extends AbleGeneticObject

This class implements the F6 function described in the first chapter of The Handbook of Genetic Algorithms (Davis) It uses a traditional binary string representation

See Also:
Serialized Form

Field Summary
static double factor
           
protected static long serialVersionUID
          Serialized version identifier in form YYYYMMDDVerRelModxx
 
Fields inherited from class com.ibm.able.beans.AbleGeneticObject
chromosome, chromosomeLength, chromosomeType, crossoverRate, evaluationAgent, fitness, fitnessComputed, member, mutationRate, normalizedFitness, searchAgent, vocabulary
 
Constructor Summary
TstGeneticFunction2()
           
 
Method Summary
 double computeFitness()
          just add up the number of ones in the chromosome
static java.lang.String Copyright()
          Determine the copyright of this class.
protected  double f6(double x, double y)
           
 double getFitness()
          return the fitness value for this member Note: use computeFitness() to do the computation
 
Methods inherited from class com.ibm.able.beans.AbleGeneticObject
binaryToInteger, generateRandomChromosome, getBean, getChromosome, getChromosomeLength, getChromosomeType, getCrossoverRate, getMutationRate, getNormalizedFitness, getOperatorFitness, getRandomChromosome, getVocabulary, initBean, initEvaluationAgent, mutate, mutateChromosome, onePointCrossover, onePointCrossoverAndMutate, registerOperators, removeBean, setChromosome, setCrossoverRate, setEvaluationAgent, setMutationRate, setNormalizedFitness, toString, twoPointCrossover, uniformCrossover
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

protected static final long serialVersionUID
Serialized version identifier in form YYYYMMDDVerRelModxx

factor

public static final double factor
Constructor Detail

TstGeneticFunction2

public TstGeneticFunction2()
Method Detail

getFitness

public double getFitness()
Description copied from class: AbleGeneticObject
return the fitness value for this member Note: use computeFitness() to do the computation
Overrides:
getFitness in class AbleGeneticObject

computeFitness

public double computeFitness()
just add up the number of ones in the chromosome
Overrides:
computeFitness in class AbleGeneticObject
Following copied from class: com.ibm.able.beans.AbleGeneticObject
Returns:
the fitness value for this population member

f6

protected double f6(double x,
                    double y)

Copyright

public static java.lang.String Copyright()
Determine the copyright of this class.
Returns:
A String containing this class's copyright statement.


ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003