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
434 stars 57 forks source link

Expose setters for island selection and replacement policies #29

Open CoolRunning opened 4 years ago

CoolRunning commented 4 years ago

Getting list of islands would already be helpful, because as it stands now, one has to index each island directly or loop over the whole archipelago if one is interested at a specific part of it.

Useful for a migration study (given a specific topology) would be for example:

sending_islands = archi[:k]
receiving_islands = archi[k:]

for isl in sending_islands:
    isl.set_s_policy(...)

for isl in receiving_islands:
    isl.set_r_policy(...)

While those setters still don't exist and constitute probably another issue...

Originally posted by @CoolRunning in https://github.com/esa/pygmo2/issues/5#issuecomment-581437594