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
804 stars 159 forks source link

Fix for perturbation in Monotonic Basin Hopping (Issue #505) #510

Closed mlooz closed 2 years ago

mlooz commented 2 years ago

Creating a function-local copy of the perturbation vector in Monotonic Basin Hopping instead of marking m_perturb as volatile.

bluescarni commented 2 years ago

@darioizzo want to take a look?

darioizzo commented 2 years ago

Seems a valid solution ... allocating memory inside the evolve may have some consequences in nieche applications, but overall removing a mutable data member seems a step ahead.