//  ZDT6.java
//
//  Author:
//       Antonio J. Nebro <antonio@lcc.uma.es>
//       Juan J. Durillo <durillo@lcc.uma.es>
//
//  Copyright (c) 2011 Antonio J. Nebro, Juan J. Durillo
//




//




// 



package org.uma.jmetal.problem.multiobjective.zdt;

import org.uma.jmetal.solution.DoubleSolution;

/**
 * Class representing problem ZDT6
 */
@SuppressWarnings("serial")
public class ZDT6 extends ZDT1 {

  /** Constructor. Creates a default instance of problem ZDT6 (10 decision variables) */
  public ZDT6()  {
    this(10);
  }

  /**
   * Creates a instance of problem ZDT6
   *
   * @param numberOfVariables Number of variables
   */
  public ZDT6(Integer numberOfVariables) {
    super(numberOfVariables) ;
    setName("ZDT6");
  }

  /**
   * Returns the value of the ZDT6 function G.
   *
   * @param solution Solution
   */
  protected double evalG(DoubleSolution solution) {
    double g = 0.0;
    for (int var = 1; var < solution.getNumberOfVariables(); var++) {
      g += solution.getVariableValue(var);
    }
    g = g / (solution.getNumberOfVariables() - 1);
    g = Math.pow(g, 0.25);
    g = 9.0 * g;
    g = 1.0 + g;
    return g;
  }

  /**
   * Returns the value of the ZDT6 function H.
   *
   * @param f First argument of the function H.
   * @param g Second argument of the function H.
   */
  protected double evalH(double f, double g) {
    return 1.0 - Math.pow((f / g), 2.0);
  }
}

@@ -335,16 +335,239 @@
 em ZDT6%0A
+ * Difined in%0A * E. Zitzler, K. Deb, and L. Thiele, %22Comparison of Multiobjective%0A * Evolutionary Algorithms: Empirical Results,%22 Evolutionary Computation,%0A * vol. 8, no. 2, pp. 173-195, 2000, doi: 10.1162/106365600568202.%0A
  */%0A@Sup
@@ -950,32 +950,464 @@
 e(%22ZDT6%22);%0A  %7D%0A%0A
+  /** Evaluate() method */%0A  public void evaluate(DoubleSolution solution) %7B%0A    double%5B%5D f = new double%5BgetNumberOfObjectives()%5D;%0A%0A    double x1;%0A    x1 = solution.getVariableValue(0);%0A    f%5B0%5D = 1 - Math.exp(-4 * x1) * Math.pow(Math.sin(6 * Math.PI * x1), 6);%0A    double g = this.evalG(solution);%0A    double h = this.evalH(f%5B0%5D, g);%0A    f%5B1%5D = h * g;%0A%0A    solution.setObjective(0, f%5B0%5D);%0A    solution.setObjective(1, f%5B1%5D);%0A  %7D%0A%0A%0A
   /**%0A   * Retur

Fix the calculation of f1(x) in ZDT6