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

zhang chi zhangchipr@gmail....
Sun Jan 4 21:01:52 CST 2009


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20090105/aa7ccc65/attachment.html 


More information about the SciPy-user mailing list