code: @Override
    public void evaluate(DoubleSolution solution) {
      int numberOfVariables = getNumberOfVariables() ;
  
      double[] f = new double[getNumberOfObjectives()];
      double[] x = new double[numberOfVariables] ;
  
      for (int i = 0; i < numberOfVariables; i++) {
        x[i] = solution.getVariableValue(i) ;
      }
                   
      f[0] = 0.5 * (x[0]*x[0] + x[1]*x[1]) + Math.sin(x[0]*x[0] + x[1]*x[1]) ;
  
      // Second function
      double value1 = 3.0 * x[0] - 2.0 * x[1] + 4.0 ;
      double value2 = x[0] - x[1] + 1.0 ;
      f[1] = (value1 * value1)/8.0 + (value2 * value2)/27.0 + 15.0 ;
  
      // Third function
      f[2] = 1.0 / (x[0]*x[0] + x[1]*x[1]+1) - 1.1 *
            Math.exp(-(x[0]*x[0])-(x[1]*x[1])) ;
  
          
      for (int i = 0; i < getNumberOfObjectives(); i++)
        solution.setObjective(i,f[i]);        
    }
docs: Evaluate() method