esa / pagmo2

A C++ platform to perform parallel computations of optimisation tasks (global and local) via the asynchronous generalized island model.
https://esa.github.io/pagmo2/
GNU General Public License v3.0
823 stars 161 forks source link

[BUG] redundant code in moead.cpp #528

Closed leonwittemund closed 1 year ago

leonwittemund commented 1 year ago

The report is more an improvement rather than a bug. In moead.cpp the lines 246-248 are redundant to 249.

Screenshot 2022-12-23 113205

Both statements update the ideal point by computing the minimum of the old fitness and the new fitness values. So you should decide for one solution.

If both statements were not redundant, it would be nice to explain why they are necessary.

bluescarni commented 1 year ago

Thanks for spotting this @leonwittemund .

I talked to @darioizzo (the original author of the code) and he agrees this was probably an oversight. I'll push him to open a PR when he comes back from vacations :)

leonwittemund commented 1 year ago

No problem @bluescarni. Thank you for your answer ;).

I am closing this issue because I think it will be fixed soon.