protected double evalG ( DoubleSolution solution ) { double g = 0.0 ; for ( int i = 1 ; i < solution . getNumberOfVariables ( ) ; i ++ ) { g += solution . getVariableValue ( i ) ; } double constant = 9.0 / ( solution . getNumberOfVariables ( ) - 1 ) ; return constant * g + 1.0 ; }
Returns the value of the ZDT1 function G .