def zdt4(individual):
 g = ((1 + (10 * (len(individual) - 1))) + sum((((xi ** 2) - (10 * cos(((4 * pi) * xi)))) for xi in individual[1:])))
 f1 = individual[0]
 f2 = (g * (1 - sqrt((f1 / g))))
 return (f1, f2)

def zdt4 ( individual ) : g = ( ( 1 + ( 10 * ( len ( individual ) - 1 ) ) ) + sum ( ( ( ( xi ** 2 ) - ( 10 * cos ( ( ( 4 * pi ) * xi ) ) ) ) for xi in individual [ 1 : ] ) ) ) f1 = individual [ 0 ] f2 = ( g * ( 1 - sqrt ( ( f1 / g ) ) ) ) return ( f1 , f2 )
zdt4 multiobjective function .