[SciPy-User] Constrained optimization

Ted To rainexpected@theo...
Wed Aug 22 15:53:14 CDT 2012


Hi,

The documentation for the constrained optimization routines seems pretty
sparse and the googling I did revealed nothing in the way of examples of
usage.  I defined a function W(q) where q is a vector of length 2.
Using fmin obviously fails (too many iterations) but works in the sense
that it doesn't outright fail with an error.  Using one of the
constrained optimizers, fmin_l_bfgs_b for example, completely chokes
with the Traceback output at http://pastebin.com/t8tU8YBm.  The commands
leading to this are:

x0=[.1,.1]
fmin_l_bfgs_b(W,x0,bounds=[(0,1),(0,1)])

so that the intention is to bound q[0] and q[1] between 0 and 1.

Any help with this would be much appreciated.

Cheers,
Ted


More information about the SciPy-User mailing list