jmetalsp-problem/src/main/java/org/uma/jmetalsp/problem/df/DF1.java
private double evalG(DoubleSolution solution,int limitInf,int limitSup) {

        double g = 0.0;
        for (int i = limitInf; i < limitSup; i++) {
            g += Math.pow(solution.getVariableValue(i), 2.0);
        }
        for (int i = limitSup; i < solution.getNumberOfVariables(); i++) {
            g += Math.pow((solution.getVariableValue(i) +1.0), 2.0);
        }
        g = g + 1.0;
        return g;
    }
/**
     * Returns the value of the FDA2 function G.
     *
     * @param solution Solution
     */
Returns the value of the FDA2 function G.
@param solution Solution
Returns the value of the FDA2 function G . @param solution Solution
private double evalG(DoubleSolution solution,int limitInf,int limitSup) {
        double g = 0.0;
        for (int i = limitInf; i < limitSup; i++) {
            g += Math.pow(solution.getVariableValue(i), 2.0);
        }
        for (int i = limitSup; i < solution.getNumberOfVariables(); i++) {
            g += Math.pow((solution.getVariableValue(i) +1.0), 2.0);
        }
        g = g + 1.0;
        return g;
    }
private double evalG ( DoubleSolution solution , int limitInf , int limitSup ) { double g = 0.0 ; for ( int i = limitInf ; i < limitSup ; i ++ ) { g += Math . pow ( solution . getVariableValue ( i ) , 2.0 ) ; } for ( int i = limitSup ; i < solution . getNumberOfVariables ( ) ; i ++ ) { g += Math . pow ( ( solution . getVariableValue ( i ) + 1.0 ) , 2.0 ) ; } g = g + 1.0 ; return g ; }
Returns the value of the FDA2 function G.
 @param solution Solution
Returns the value of the FDA2 function G . @param solution Solution