[SciPy-user] how to use SciPy. optimize. cobyla?

Gilles Rochefort gilles.rochefort@gmail....
Mon Jan 5 07:47:17 CST 2009


Hello,

Not sure to fully understand what you want to do ?

Assuming you want to minimize a function Fm with bounds constaints - maybe
fmin_tnc or fmin_l_bfgs_b is better choice, depending on the
nature of function (continuity, differentiable, etc. ) .



2009/1/5 zhang chi <zhangchipr@gmail.com>

> hi
>     I have a function Fm(x1,x2) that can't be expressed in math mode, but
> can be written using program.  And x1 $\in$ [1,100]; x2 $\in$ [ 0.2,0.8].
> So  could I use Cobyla like the following:
>
>  def Fm(x1,x2):
>        ..........
>        return value
>
> x0 = [50,0.5]
> cons = [1:100;0.2:0.8]
> min = fmin_coblya(Fm, x0, cons, args=(), consargs=None, rhobeg=1.0, rhoend=1e-4,iprint=1, maxfun=1000)
>
> thank you very much.
>
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20090105/cc122bb4/attachment.html 


More information about the SciPy-user mailing list