3 Nelder-Mead minimization method
5 Postby andrejv ยป Tue Jun 16, 2009 7:03 am
6 This package contains the Nelder-Mead minimization method.
8 The method was written in lisp by Mario S. Mommer (http://prxq.wordpress.com/2006/11/05/grid-restrained-nelder-mead/) and is available under the MIT license.
10 This package requires Maxima version 5.18.2.
12 (%i1) load("nelder_mead/nelder_mead.mac")$
13 (%i2) nelder_mead(if x<0 then -x else x^2, [x], [4]);
14 (%o2) [x = 9.536387892694628e-11]
15 (%i3) f(x) := if x<0 then -x else x^2$
16 (%i4) nelder_mead(f, [x], [4]);
17 (%o4) [x = 9.536387892694628e-11]
18 (%i5) nelder_mead(f(x), [x], [4]);
19 (%o5) [x = 9.536387892694628e-11]
20 (%i6) nelder_mead(x^4+y^4-2*x*y-4*x-3*y, [x,y], [2,2]);
21 (%o6) [x = 1.157212489168102, y = 1.099342680267472]