[SciPy-User] fmin_slsqp constraint violation with 0 exit code
Mike Timonin
gblive at gmail.com
Tue Nov 19 13:38:40 EST 2013
Hi!
I am getting rather weird results from fmin_slsqp and would be grateful for
any help in debugging it.
Basically, I run the following piece of code
sol = fmin_slsqp(objfunc,x0, fprime=fprime, f_eqcons=f_eqcons,
f_ieqcons=f_ineqcons_w, fprime_eqcons = fprime_eqcons,fprime_ieqcons =
fprime_ineqcons_w, iprint=0,full_output=1,acc=1e-7,iter=600)
print sol
if sol[3] == 0:
print f_eqcons(sol[0]),f_ineqcons_w(sol[0])
and ocassionally get results such as
(array([ 1. , 27.22012122, 31.52718928, 41.00537142,
40.6788792 , -142.11913408, 4.68757296]), -1.0000000020906914, 206, 0,
'Optimization terminated successfully.')
[-0.] [ -0. -25.22012122 -29.52718928 -39.00537142
-38.6788792 144.11913408 -2.68757296 27.22012122 31.52718928
41.00537142 40.6788792 -142.11913408 4.68757296]
According to the documentation, f_ineqcons_w(sol[0]) output should be all
non-negative. However, as can be seen, it contains negative values.
How can this be investigated further? Am I hitting some known bug here?
Thanks!
Mikhail Timonin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20131119/ff657ac2/attachment.html>
More information about the SciPy-User
mailing list