I changed the eaSimple as recommended (replaces the fitness). I made an error in the 'map', according to searches, I converted to list() and so the error was solved. After that, the execution happens only until the first generation individuals, returning in values (0.5004301075268818, 3) the fitness and sum correctly. And another 'type' error appeared:
File "C:\Users\andreia\AppData\Local\Programs\Python\Python36\lib\site-packages\deap\algorithms.py", line 175, in eaSimple
fitnesses, sum_comonents_by_ind = zip*(list(toolbox.map(toolbox.evaluate, invalid_ind)))
TypeError: can't multiply sequence by non-int of type 'type'
Also, I'm still wondering how to receive these values in main(). I have to use the value of hof[0] to plot a graph. I can only see the reception of the 'pop' population and the 'log'...
something like :
number_component = hof[0].sum_comonents_by_ind ?