esa / pygmo2

A Python platform to perform parallel computations of optimisation tasks (global and local) via the asynchronous generalized island model.
https://esa.github.io/pygmo2/
Mozilla Public License 2.0
422 stars 57 forks source link

moead and nsga2 cannot work #90

Closed Jcee52 closed 2 years ago

Jcee52 commented 2 years ago

I failed to run moead by using the code from the tutorial (website: https://esa.github.io/pygmo2/tutorials/moo_moead.html, showing below).

1 from pygmo import * 2 udp = dtlz(prob_id = 1) 3 pop = population(prob = udp, size = 105) 4 algo = algorithm(moead(gen = 100)) 5 for i in range(10): 6 pop = algo.evolve(pop) 7 print(udp.p_distance(pop))

I find that line 6 cannot work normally. when I debug to line 6, the procedure finished immediately without any error and evolution process. The nsga2 cannot run normally as well. How can I fix this problem?