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
442 stars 56 forks source link

feature request: setter for migration database #3

Closed CoolRunning closed 4 years ago

CoolRunning commented 4 years ago

Currently, the migration database can only be read

archi.get_migrants_db()

however migrants can not be manipulated (besides implicitly by evolution). This creates some undesirable side-effects: i.e. resetting an island population while migrants are still in the database will bump the new random population quickly to the old fitness level.

Consequently, it would be useful to have a way to manipulate the migrant database directly. Additionally, other convenient functions would be to "flush" (trigger a migration manually) and "erase" (reset the complete database, removing all migrants).

bluescarni commented 4 years ago

25 adds a setter for the migration database.

bluescarni commented 4 years ago

25 has been merged. It implements explicit setting of the migrants db via a new set_migrants_db() method of the archipelago class.

I will close this report for the time being, we can discuss further evolution of the feature in a new issue report if needed.