Skip to content

Conversation

andyfaff
Copy link
Contributor

@andyfaff andyfaff commented Oct 28, 2020

Addresses a subset of the issues in #11403, see here for why this PR is necessary.

@andyfaff
Copy link
Contributor Author

It would be preferable if SLSQP Fortran code didn't exceed the bounds at all.

@andyfaff andyfaff added backport-candidate This fix should be ported by a maintainer to previous SciPy versions. scipy.optimize labels Oct 28, 2020
@andyfaff andyfaff modified the milestones: 1.5.3, 1.6.0 Oct 28, 2020
@andyfaff andyfaff requested a review from mdhaber October 28, 2020 06:42
@andyfaff
Copy link
Contributor Author

@lukasheinrich, @kratsg can you try out this proposed fix for #11403 and see how it goes on your issues?

@andyfaff
Copy link
Contributor Author

One possibility is that we issue no warning and just clip by default.

@andyfaff
Copy link
Contributor Author

Last commit also applies bounds to the numerical differentiation of the jacobian, as mentioned in @davidpasquale comments in #12949.

Copy link
Member

@larsoner larsoner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor DRY / explicit suggestions here, again +1 to merge without them if necessary

@andyfaff
Copy link
Contributor Author

andyfaff commented Nov 3, 2020

@larsoner I made the suggested changes and rebased. Everything you reviewed is now in the first commit, the changes I made are in the second.

@larsoner
Copy link
Member

larsoner commented Nov 3, 2020

Travis is just unhappy about some linting errors that I guess we can safely ignore. Thanks @andyfaff !

@Bezerragrasi
Copy link

Any new on this issue?
I am having the follow warming when I use the SLSQP minimization

RuntimeWarning: Values in x were outside bounds during a minimize step, clipping to bounds
  warnings.warn("Values in x were outside bounds during a "

all issues I read in the matter are from older versions of scipy, I am using scipy=1.7.3 and numpy=1.21.2. How can I maintain the minimization steps within the bounds? And any idea in why is this happening?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants