[SciPy-Dev] feature proposal for scipy.optimize.differential_evolution

Andrew Nelson andyfaff at gmail.com
Wed Sep 16 17:58:00 EDT 2020


On Thu, 17 Sep 2020 at 03:09, frank.home at sbcglobal.net <
frank.home at sbcglobal.net> wrote:

> In using scipy.optimize.differential_evolution, we found that it is useful
> to modify the behavior for problems where solutions of the equations being
> optimized are not feasible in some of the space being explored. Rather than
> having the code throw exceptions and then abort, we use the approach of
> returning np.inf for the objective function in infeasible regions. We are
> interested in turning this approach into a feature
> of scipy.optimize.differential_evolution and submitting a pull request, and
> would like to know if people think this would be a useful contribution.
>
> Our approach would be to add a boolean parameter
> to scipy.optimize.differential_evolution for selecting whether to handle
> lack of ability to find a solution in the above manner. The default for the
> parameter would be to not do this, i.e.
> run scipy.optimize.differential_evolution as it now works.
>
>
As the code currently exists the user's objective `func` is allowed to
return `np.inf` if it finds itself within a region that is infeasible,
differential_evolution doesn't throw exceptions or abort if `func` does
that. One can also mark regions as infeasible with constraint functions.

So it's not clear to me what feature is missing. Do you have a
demonstration?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20200917/8c51214c/attachment-0001.html>


More information about the SciPy-Dev mailing list