-
Notifications
You must be signed in to change notification settings - Fork 601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nloptr SLSQP returning successful flag despite constraints being unmet #368
Comments
Previously, it could stop on ftol or xtol termination criteria, even if some constraints are still blatantly violated. This fixes stevengj#368.
I have also encountered this issue in the past, and it looks like others had that too: Below are some links about this issue in the Python implementation (which is based on the same fortran code): I have not tried to understand the python fix, however I have been using a simple fix which seems to do the trick, altough it's probably far from optimal (pull request #465). Alternatively to
I wonder if following is better
In the latter, it waits until a new feasible solution that meets the contraint before deciding on the ftol/xtol termination criteria. 2f81804 from an old pull request is also vaguely related to this. |
Previously, it could stop on ftol or xtol termination criteria, even if some constraints are still blatantly violated. This fixes #368.
Hello,
I'm having an issue where nlopt is returning a successful exit flag, but only 1 of my 6 constraints are met. I am running many optimizations at once and using the exit flags as automatic checks, so this is causing me some significant issues. I've attached a file with the code I'm running.
I'm using nloptr version 1.2.2.2, algorithm "NLOPT_LD_SLSQP".
iteration: 16
x = ( 1.000000, 1.000000, 1.552908, 1.855128 )
f(x) = -1.907547
h(x) = ( 15.437643, 5.305731 )
g(x) = ( -2.609576, 0.328356, 0.500000, 3.871769 )
nloptr flag issue.zip
The text was updated successfully, but these errors were encountered: