JGAP

examples.multiobjective
Class MultiObjectiveFitnessFunction

java.lang.Object
  extended by org.jgap.BulkFitnessFunction
      extended by examples.multiobjective.MultiObjectiveFitnessFunction
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, ICloneable

public class MultiObjectiveFitnessFunction
extends BulkFitnessFunction

Sample fitness function for the multiobjective problem.

Since:
2.6
See Also:
Serialized Form

Field Summary
static int MAX_BOUND
           
static double MAX_X
           
static double MIN_X
           
 
Constructor Summary
MultiObjectiveFitnessFunction()
           
 
Method Summary
 java.lang.Object clone()
          Override in your implementation if necessary.
 void evaluate(Population a_subject)
          Determine the fitness of the given Chromosome instance.
static double formula(int a_index, double a_x)
           
static java.util.Vector<java.lang.Double> getVector(IChromosome a_chrom)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_BOUND

public static final int MAX_BOUND
See Also:
Constant Field Values

MIN_X

public static final double MIN_X
See Also:
Constant Field Values

MAX_X

public static final double MAX_X
See Also:
Constant Field Values
Constructor Detail

MultiObjectiveFitnessFunction

public MultiObjectiveFitnessFunction()
Method Detail

evaluate

public void evaluate(Population a_subject)
Determine the fitness of the given Chromosome instance. The higher the returned value, the fitter the instance. This method should always return the same fitness value for two equivalent Chromosome instances.

Specified by:
evaluate in class BulkFitnessFunction
Parameters:
a_subject - the population of chromosomes to evaluate
Since:
2.6

getVector

public static java.util.Vector<java.lang.Double> getVector(IChromosome a_chrom)
Parameters:
a_chrom - the chromosome for which to obtain the result it represents
Returns:
vector of data for output

formula

public static double formula(int a_index,
                             double a_x)

clone

public java.lang.Object clone()
Description copied from class: BulkFitnessFunction
Override in your implementation if necessary.

Specified by:
clone in interface ICloneable
Overrides:
clone in class BulkFitnessFunction
Returns:
deep clone of the current instance
Since:
3.2

JGAP