[SciPy-user] Usage of fmin_tnc and fmin_l_bfgs_b

Nils Wagner nwagner at iam.uni-stuttgart.de
Fri Sep 15 02:30:38 CDT 2006

Hi all,

I would like to solve a constrained optimization problem with scipy.
As far as I understand it there exists two possible functions for my
problem in scipy - fmin_tnc and fmin_l_bfgs_b.

The problem is given by

min f(x)

subjected to

\theta_1 \le theta \le theta_2


 r_1 \le r \le r_2

where x is a vector \in \mathds{R}^{2n+1}.

theta is the last entry in x.

r = \| x[:2*n] \| = linalg.norm(x[:2*n])

How do I specify the bounds for my problem ? I mean
it's easy to define the bounds for the l a s t parameter (\theta) but
I am at a loss how to formulate
the bounds for x[0],...,x[2n-1] s e p a r a t e l y.

    bounds  -- a list of (min, max) pairs for each element in x, defining
               the bounds on that parameter. Use None for one of min or max
               when there is no bound in that direction

Any hint would be appreciated.


More information about the SciPy-user mailing list