Ejemplo n.º 1
0
 /**
  * @return fitness value of this chromosome determined via the registered fitness function
  * @author Klaus Meffert
  * @since 2.4
  */
 protected double calcFitnessValue() {
   if (getConfiguration() != null) {
     FitnessFunction normalFitnessFunction = getConfiguration().getFitnessFunction();
     if (normalFitnessFunction != null) {
       // Grab the "normal" fitness function and ask it to calculate our
       // fitness value.
       // --------------------------------------------------------------
       m_fitnessValue = normalFitnessFunction.getFitnessValue(this);
     }
   }
   return m_fitnessValue;
 }
Ejemplo n.º 2
0
 public void calculateFitness() {
   fitness = fitnessFunction.calculateFitness(bits);
 }