Hi there,
I am using DEAP to perform NSGA-3 for scheduling. The individuals are an array of the form:
ind_1=[ind_sub_part1, ind_sub_part2], where ind_sub_part1=[1,2,3,4,5,2,...] (ie a list by itself)
and ind_sub_part2=[2,3,4,5,6,...,...] (ie a list by itself.
However I get the following error while I am performing VarAnd procedure:
del offspring[i - 1].fitness.values, offspring[i].fitness.values
AttributeError: 'list' object has no attribute 'fitness'
The pop is initialized as follows:
creator.create("FitnessMin",base.Fitness,weights=(-1.0,-1.0))
creator.create("Individual", list,fitness=creator.FitnessMin)
creator.create("Individual", list,fitness=creator.FitnessMin)
toolbox=base.Toolbox() #initiating the toolbox.
ref_points=tools.uniform_reference_points(nobj,p)
ind_size=1
toolbox.register("individual",generate_individuals , creator.Individual)
toolbox.register("individual", tools.initIterate, creator.Individual,generate_individuals)
toolbox.register("population", tools.initRepeat, list, toolbox.individual)
toolbox.register("evaluate", decode_op1) #This is the fitness function
toolbox.register("mate", crossover) #Registering the function for mating
toolbox.register("mutate",mutation) #Registering the function for mutation
toolbox.register("select",select_nsga3, ref_points=ref_points) #Registering the function for selection
pop=toolbox.population(n=mu) #Creating a parent population, which is based on the individual defined in 'population' and 'individual'
Each individual is initialized through a generate_individuals function.
which is defined with the header def generate_individuals ()
Any suggestions on how to overcome this error will be great.