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

[FEATURE] Add batch_fitness support to pg.unconstrain()ed problems #63

Open optiluca opened 3 years ago

optiluca commented 3 years ago

Is your feature request related to a problem? Please describe. I am trialling pygmo2 with a constrained optimisation problem, where each function evaluation takes a few minutes but I can write a highly parallel batch_fitness function. I've implemented a batch_fitness method in my problem, and want to use PSO to optimise it. Since PSO doesn't support constraints I run problem = pg.unconstrain(problem). Running my code then throws:

what: The batch_fitness() method has been invoked, but it is not implemented in a UDP of type '<class '__main__.RBSIdealBalProblem'> [unconstrained]'

This was already on the radar here.

bluescarni commented 3 years ago

I am going to ping @darioizzo about this one, as I did in https://github.com/esa/pagmo2/issues/283 as he is most familiar with this meta-problem.

The important part of this work needs to be done on the C++ side, then we can expose the new functionality in pygmo (which should not be an issue).