I have a problem that have multi variable and multi objective, but I'm not sure how to deal with it. The objective is like
def objfunc(individual):
f1 = 101 * reduce(lambda x,y:x*y, individual[0])
f2 = ((np.repeat(q.reshape(55,1), 3, axis=1) * mu) * (np.repeat(dis.reshape(55,1), 3, axis=1)/[v1, v2, v3])).sum()
return f1, f2
and I define the individual and population as
def uniform(low, up):
return [[random.randint(low, up)], [random.uniform(0, 1)]]
toolbox.register("attr_float", uniform, BOUND_LOW, BOUND_UP)
toolbox.register("individual", tools.initIterate, creator.Individual, toolbox.attr_float)
toolbox.register("population", tools.initRepeat, list, toolbox.individual)
But this seems not work, any ideas?