[SciPy-dev] Status: optimize.fmin_slsqp

Leon Adams skorpio11@gmail....
Tue May 5 23:21:45 CDT 2009


Thanks for the response and thanks for the work on slsqp as well

Leon

On Tue, May 5, 2009 at 11:33 AM, <josef.pktd@gmail.com> wrote:

> On Tue, May 5, 2009 at 8:06 AM, Rob Falck <robfalck@gmail.com> wrote:
> > The argument you're interested in is eqcons, which is a list of functions
> > whose value should be zero in a successfully optimized problem.
> >
> > See the fmin_slsqp test script at
> > http://projects.scipy.org/scipy/attachment/ticket/570/slsqp_test.py
> >
> > In particular, your case will be something like this
> >
> > x = fmin_slsqp(testfunc,[-1.0,1.0], args = (-1.0,), eqcons = [lambda x,
> y:
> > x[0]-x[1] ], iprint = 2, full_output = 1)
> >
> > In your case, eqcons will be:
> > [lambda x, y: x[0]+x[1]+x[2]-1, lambda x, y: x[3]+x[4]+x[5]-1 ]
> >
> > Alternatively, you can write a Python function that returns those two
> values
> > in a sequence as pass it to fmin_slsqp as  f_eqcons.
> >
>
> Thanks for the pointer. This hasn't made it's way into the docs and
> help file yet.
>
> Josef
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>



-- 
Leon Adams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20090506/bbf609c7/attachment.html 


More information about the Scipy-dev mailing list