forked from johannesgerer/jburkardt-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compass_search.html
286 lines (248 loc) · 7.77 KB
/
compass_search.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
<html>
<head>
<title>
COMPASS_SEARCH - The Compass Search Optimization Algorithm
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
COMPASS_SEARCH <br> The Compass Search Optimization Algorithm
</h1>
<hr>
<p>
<b>COMPASS_SEARCH</b>
is a C++ library which
seeks the minimizer of a scalar function of several variables
using compass search, a direct search algorithm that does not use derivatives.
</p>
<p>
The algorithm, which goes back to Fermi and Metropolis, is easy to describe.
The algorithm begins with a starting point X, and a step size DELTA.
</p>
<p>
For each dimension I, the algorithm considers perturbing X(I) by adding
or subtracting DELTA.
</p>
<p>
If a perturbation is found which decreases the function, this becomes the
new X. Otherwise DELTA is halved.
</p>
<p>
The iteration halts when DELTA reaches a minimal value.
</p>
<p>
The algorithm is not guaranteed to find a global minimum. It can, for
instance, easily be attracted to a local minimum. Moreover, the algorithm
can diverge if, for instance, the function decreases as the argument goes
to infinity.
</p>
<h3 align = "center">
Licensing:
</h3>
<p>
The computer code and data files described and made available on this web page
are distributed under
<a href = "../../txt/gnu_lgpl.txt">the GNU LGPL license.</a>
</p>
<h3 align = "center">
Languages:
</h3>
<p>
<b>COMPASS_SEARCH</b> is available in
<a href = "../../c_src/compass_search/compass_search.html">a C version</a> and
<a href = "../../cpp_src/compass_search/compass_search.html">a C++ version</a> and
<a href = "../../f77_src/compass_search/compass_search.html">a FORTRAN77 version</a> and
<a href = "../../f_src/compass_search/compass_search.html">a FORTRAN90 version</a> and
<a href = "../../m_src/compass_search/compass_search.html">a MATLAB version</a>.
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../cpp_src/asa047/asa047.html">
ASA047</a>,
a C++ library which
minimizes a scalar function of several variables using the Nelder-Mead algorithm.
</p>
<p>
<a href = "../../m_src/entrust/entrust.html">
ENTRUST</a>,
a MATLAB program which
minimizes a scalar function of several variables using trust-region methods.
</p>
<p>
<a href = "../../m_src/nelder_mead/nelder_mead.html">
NELDER_MEAD</a>,
a MATLAB program which
minimizes a scalar function of several variables using the Nelder-Mead algorithm.
</p>
<p>
<a href = "../../f_src/praxis/praxis.html">
PRAXIS</a>,
a FORTRAN90 library which
implements the principal axis method of Richard Brent for minimization of
a function without the use of derivatives.
</p>
<p>
<a href = "../../cpp_src/test_opt/test_opt.html">
TEST_OPT</a>,
a C++ library which
defines test problems
requiring the minimization of a scalar function of several variables.
</p>
<p>
<a href = "../../cpp_src/toms178/toms178.html">
TOMS178</a>,
a C++ library which
optimizes a scalar functional of multiple variables using the Hooke-Jeeves method.
</p>
<h3 align = "center">
Author:
</h3>
<p>
John Burkardt
</p>
<h3 align = "center">
Reference:
</h3>
<p>
<ol>
<li>
Evelyn Beale,<br>
On an Iterative Method for Finding a Local Minimum of a Function
of More than One Variable,<br>
Technical Report 25, <br>
Statistical Techniques Research Group,<br>
Princeton University, 1958.
</li>
<li>
Richard Brent,<br>
Algorithms for Minimization without Derivatives,<br>
Dover, 2002,<br>
ISBN: 0-486-41998-3,<br>
LC: QA402.5.B74.
</li>
<li>
Charles Broyden,<br>
A class of methods for solving nonlinear simultaneous equations,<br>
Mathematics of Computation,<br>
Volume 19, 1965, pages 577-593.
</li>
<li>
David Himmelblau,<br>
Applied Nonlinear Programming,<br>
McGraw Hill, 1972,<br>
ISBN13: 978-0070289215,<br>
LC: T57.8.H55.
</li>
<li>
Tamara Kolda, Robert Michael Lewis, Virginia Torczon,<br>
Optimization by Direct Search: New Perspectives on Some Classical and Modern Methods,<br>
SIAM Review,<br>
Volume 45, Number 3, 2003, pages 385-482.
</li>
<li>
Ken McKinnon,<br>
Convergence of the Nelder-Mead simplex method to a nonstationary point,<br>
SIAM Journal on Optimization,<br>
Volume 9, Number 1, 1998, pages 148-158.
</li>
<li>
Zbigniew Michalewicz,<br>
Genetic Algorithms + Data Structures = Evolution Programs,<br>
Third Edition,<br>
Springer, 1996,<br>
ISBN: 3-540-60676-9,<br>
LC: QA76.618.M53.
</li>
<li>
Jorge More, Burton Garbow, Kenneth Hillstrom,<br>
Testing unconstrained optimization software,<br>
ACM Transactions on Mathematical Software,<br>
Volume 7, Number 1, March 1981, pages 17-41.
</li>
<li>
Michael Powell,<br>
An Iterative Method for Finding Stationary Values of a Function
of Several Variables,<br>
Computer Journal,<br>
Volume 5, 1962, pages 147-151.
</li>
<li>
Howard Rosenbrock,<br>
An Automatic Method for Finding the Greatest or Least Value of a Function,<br>
Computer Journal,<br>
Volume 3, 1960, pages 175-184.
</li>
</ol>
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "compass_search.cpp">compass_search.cpp</a>, the source code.
</li>
<li>
<a href = "compass_search.hpp">compass_search.hpp</a>, the include file.
</li>
<li>
<a href = "compass_search.sh">compass_search.sh</a>,
BASH commands to compile the source code.
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<ul>
<li>
<a href = "compass_search_prb.cpp">compass_search_prb.cpp</a>,
a sample calling program.
</li>
<li>
<a href = "compass_search_prb.sh">compass_search_prb.sh</a>,
BASH commands to compile and run the sample program.
</li>
<li>
<a href = "compass_search_prb_output.txt">compass_search_prb_output.txt</a>,
the output file.
</li>
</ul>
</p>
<h3 align = "center">
List of Routines:
</h3>
<p>
<ul>
<li>
<b>COMPASS_SEARCH</b> carries out a direct search minimization algorithm.
</li>
<li>
<b>R8_ABS</b> returns the absolute value of an R8.
</li>
<li>
<b>R8VEC_COPY</b> copies an R8VEC.
</li>
<li>
<b>R8VEC_PRINT</b> prints an R8VEC.
</li>
<li>
<b>TIMESTAMP</b> prints the current YMDHMS date as a time stamp.
</li>
</ul>
</p>
<p>
You can go up one level to <a href = "../cpp_src.html">
the C++ source codes</a>.
</p>
<hr>
<i>
Last revised on 05 January 2012.
</i>
<!-- John Burkardt -->
</body>
<!-- Initial HTML skeleton created by HTMLINDEX. -->
</html>