[SciPy-dev] f2py vector valued functions and optimize.fmin_slsqp

Rob Falck robfalck@gmail....
Sat May 16 10:32:29 CDT 2009

SLSQP is intended to optimize scalar valued functions.  If your function is
vector valued you need to wrap it in a way such that a single scalar value
(your performance index) is returned.

On Sat, May 16, 2009 at 2:07 AM, Leon Adams <skorpio11@gmail.com> wrote:

> Hi...
> I am experiencing some difficulties arriving at a soln for my optimization
> problem.
> Background:
> My problem is cast as a minimizer problem but is very computer intense
> (lots of loops).
> My design soln was to wrap the looping parts in FORTRAN using f2py, use
> python as a steering program
> and optimize.fmin_slsqp as the optimizer.  Everything seems to work well
> for scalar valued functions but not for vector valued functions involving
> arrays.
> Anytime an array is involved SLSQP returns with a success exit status [0]
> without updating the input vector. That is no change is being made to the
> input parameters.
> My question is: is it possible to wrap a vector valued fortran function and
> still use SLSQP?
> Thanks in advance
> --
> Leon Adams
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev

- Rob Falck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20090516/27d8c8e1/attachment.html 

More information about the Scipy-dev mailing list