• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..02-Jul-2020-

Makefile.amH A D12-Apr-2018172 74

Makefile.inH A D12-Apr-201818 KiB608525

READMEH A D12-Apr-20184.7 KiB10880

neldermead.hH A D12-Apr-20182.2 KiB6231

nldrmd.cH A D12-Apr-201810.3 KiB307214

sbplx.cH A D12-Apr-20188.1 KiB240178

README

1This directory contains Nelder-Mead and variations thereof.
2
3Currently, I have implemented two algorithms, described below.
4
5The code in this directory is under the same MIT license as the rest
6of my code in NLopt (see ../COPYRIGHT).
7
8Steven G. Johnson
9November 2008
10
11-----------------------------------------------------------------------
12
13First, (almost) the original Nelder-Mead simplex algorithm
14(NLOPT_LN_NELDERMEAD), as described in:
15
16	J. A. Nelder and R. Mead, "A simplex method for function
17	minimization," The Computer Journal 7, p. 308-313 (1965).
18
19This method is simple and has demonstrated enduring popularity,
20despite the later discovery that it fails to converge at all for some
21functions.  Anecdotal evidence suggests that it often performs well
22even for noisy and/or discontinuous objective functions.  I would tend
23to recommend the Subplex method (below) instead, however.
24
25The main variation is that I implemented explicit support for bound
26constraints, using essentially the method described in:
27
28	J. A. Richardson and J. L. Kuester, "The complex method for
29	constrained optimization," Commun. ACM 16(8), 487-489 (1973).
30
31	implementing the method described by:
32
33	M. J. Box, "A new method of constrained optimization and a
34	comparison with other methods," Computer J. 8 (1), 42-52 (1965).
35
36Whenever a new point would lie outside the bound constraints, Box
37advocates moving it "just inside" the constraints.  I couldn't see any
38advantage to using a fixed distance inside the constraints, especially
39if the optimum is on the constraint, so instead I move the point
40exactly onto the constraint in that case.
41
42The danger with implementing bound constraints in this way (or by
43Box's method) is that you may collapse the simplex into a
44lower-dimensional subspace.  I'm not aware of a better way, however.
45In any case, this collapse of the simplex is ameliorated by
46restarting, such as when Nelder-Mead is used within the Subplex
47algorithm below.
48
49-----------------------------------------------------------------------
50
51Second, I re-implemented Tom Rowan's "Subplex" algorithm.  As Rowan
52expressed a preference that other implementations of his algorithm use
53a different name, I called my implementation "Sbplx" (NLOPT_LN_SBPLX).
54Subplex (a variant of Nelder-Mead that uses Nelder-Mead on a sequence
55of subspaces) is claimed to be much more efficient and robust than the
56original Nelder-Mead, while retaining the latter's facility with
57discontinuous objectives, and in my experience these claims seem to be
58true.  (However, I'm not aware of any proof that Subplex is globally
59convergent, and may fail for some objectives like Nelder-Mead; YMMV.)
60
61I used the description of Rowan's algorithm in his PhD thesis:
62
63     T. Rowan, "Functional Stability Analysis of Numerical Algorithms",
64     Ph.D. thesis, Department of Computer Sciences, University of Texas
65     at Austin, 1990.
66
67I would have preferred to use Rowan's original implementation, posted
68by him on Netlib:
69
70     http://www.netlib.org/opt/subplex.tgz
71
72Unfortunately, the legality of redistributing or modifying this code
73is unclear.  Rowan didn't include any license statement at all with
74the original code, which makes it technically illegal to redistribute.
75I contacted Rowan about getting a clear open-source/free-software
76license for it, and he was very agreeable, but he said he had to think
77about the specific license choice and would get back to me.
78Unfortunately, a year later I still haven't heard from him, and his
79old email address no longer seems to work, so I don't know how to
80contact him for permission.
81
82Since the algorithm is not too complicated, however, I just rewrote
83it.  There seem to be slight differences between the behavior of my
84implementation and his (probably due to different choices of initial
85subspace and other slight variations, where his paper was ambiguous),
86but the number of iterations to converge on my test problems seems to
87be quite close (within 10% for most problems).
88
89The only major difference between my implementation and Rowan's, as
90far as I can tell, is that I implemented explicit support for bound
91constraints (via the method in the Box paper as described above).
92This seems to be a big improvement in the case where the optimum lies
93against one of the constraints.
94
95-----------------------------------------------------------------------
96
97Future possibilities:
98
99	C. J. Price, I. D. Coope, and D. Byatt, "A convergent variant
100	of the Nelder-Mead algorithm," J. Optim. Theory Appl. 113 (1),
101	p. 5-19 (2002).
102
103	A. Burmen, J. Puhan, and T. Tuma, "Grid restrained Nelder-Mead
104	algorithm," Computational Optim. Appl. 34(3), 359-375 (2006).
105
106Both of these are provably convergent variations of Nelder-Mead; the
107latter authors claim that theirs is superior.
108