[SciPy-Dev] SciPy-Dev Digest, Vol 203, Issue 6

Andrew Nelson andyfaff at gmail.com
Fri Sep 25 22:45:26 EDT 2020


The documentation does say that if "If callback returns *True*, then the
minimization is halted (any polishing is still carried out)", so the
documentation already indicates0 that the user can control when the
minimisation halts. However, it's not mentioned in the documentation that
the objective function is allowed to return `np.inf` if the solution is
impossible.
When constraints are employed the solver will attempt to reduce the
magnitude of the constraint violation. It's worth reading the Lampinen
paper (Lampinen, J., A constraint handling approach for the differential
evolution algorithm. Proceedings of the 2002 Congress on Evolutionary
Computation. CEC’02 (Cat. No. 02TH8600). Vol. 2. IEEE, 2002.) to see how
that's applied.

> We did learn to turn those warnings into errors and catch them with
try-except blocks, and then return np.inf if the exceptions happened. Even
that might be useful for some people to see described in documentation :)

Hmm, that's a reasonably simple programming approach to take, and I don't
think it would aid the documentation because its clarity would be degraded.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20200926/5cae0e17/attachment.html>


More information about the SciPy-Dev mailing list