[SciPy-user] [OpenOpt] lb issue

dmitrey dmitrey.kroshko@scipy....
Sat Jun 28 10:11:43 CDT 2008


Hi Emanuele,
some solvers (ALGENCAN, scipy_lbfgsb) don't have to obtain objFunc(x) 
out of the lb-ub region (for box-bound problems), but some other, 
including current ralg implementation, do. Mb I could try to enhance 
ralg handling of the problems of the type during this gsoc, but it 
requires sufficient amount of time and I'm currently busy with other 
chapters from my gsoc shedule.
Regards, D.

Emanuele Olivetti wrote:
> Dear all and dear Dmitrey,
>
> I experience problems when setting lower bounds (lb) to
> a non-linear problem. I have a simple bound for x: being
> bigger than zero.
>
> Here follows a simple example that shows the issue: even though
> I set "lb=N.zeros(dimensions)", the "ralg" solver tries to compute
> f() when x<0. Why?
> ----
> import numpy as N
> from scikits.openopt import NLP
>
> size = 100
> dimensions = 2
> data = N.random.rand(size,dimensions)-0.5
>
> def f(x):
>     global data
>     if (x<0).sum()>0:
>         print "WARNING! Lower bound exceeded, x =",x
>         pass
>     return N.dot(data**2,x.T)
>
> x0 = N.ones(dimensions)
> p = NLP(f,x0,lb=N.zeros(dimensions),ftol=1.0e-3)
> p.solve("ralg")
> print p.ff,p.xf
> ----
>
> I'm wondering if I've understood correctly how to use
> p.lb. Any explanation will be very appreciated.
>
> Emanuele
>
>
> P.S.: OpenOpt updated from SVN, NumPy v1.0.3 and SciPy v0.5.2
> provided by Ubuntu Gutsy 7.10.
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
>
>
>   



More information about the SciPy-user mailing list