def dtlz7(ind, n_objs):
 gval = (1 + ((9.0 / len(ind[(n_objs - 1):])) * sum([a for a in ind[(n_objs - 1):]])))
 fit = [ind for ind in ind[:(n_objs - 1)]]
 fit.append(((1 + gval) * (n_objs - sum([((a / (1.0 + gval)) * (1 + sin(((3 * pi) * a)))) for a in ind[:(n_objs - 1)]]))))
 return fit

def dtlz7 ( ind , n_objs ) : gval = ( 1 + ( ( 9.0 / len ( ind [ ( n_objs - 1 ) : ] ) ) * sum ( [ a for a in ind [ ( n_objs - 1 ) : ] ] ) ) ) fit = [ ind for ind in ind [ : ( n_objs - 1 ) ] ] fit . append ( ( ( 1 + gval ) * ( n_objs - sum ( [ ( ( a / ( 1.0 + gval ) ) * ( 1 + sin ( ( ( 3 * pi ) * a ) ) ) ) for a in ind [ : ( n_objs - 1 ) ] ] ) ) ) ) return fit
dtlz7 multiobjective function .