protected void updateUtility(){
  for (  Individual individual : population) {
    double oldFitness=individual.getFitness();
    double newFitness=fitness(individual.getSolution(),idealPoint);
    double relativeDecrease=(oldFitness - newFitness) / oldFitness;
    if (relativeDecrease > 0.001) {
      individual.setUtility(1.0);
    }
 else {
      double utility=Math.min(1.0,(0.95 + 0.05 * relativeDecrease / 0.001) * individual.getUtility());
      individual.setUtility(utility);
    }
    individual.setFitness(newFitness);
  }
}

protected void updateUtility ( ) { for ( Individual individual : population ) { double oldFitness = individual . getFitness ( ) ; double newFitness = fitness ( individual . getSolution ( ) , idealPoint ) ; double relativeDecrease = ( oldFitness - newFitness ) / oldFitness ; if ( relativeDecrease > 0.001 ) { individual . setUtility ( 1.0 ) ; } else { double utility = Math . min ( 1.0 , ( 0.95 + 0.05 * relativeDecrease / 0.001 ) * individual . getUtility ( ) ) ; individual . setUtility ( utility ) ; } individual . setFitness ( newFitness ) ; } }
updates the utility of each individual .
