TEST_MIN
Test problems for minimization
TEST_MIN
is a C library which
defines problems involving the minimization
of a scalar function of a scalar argument.
TEST_MIN can be useful for testing algorithms that
attempt to minimize a scalar function of a scalar argument.
Each problem has an index number, and there are a corresponding
set of routines, with names beginning with the index number, to:
-
evaluate f(x);
-
evaluate f'(x);
-
evaluate f"(x);
-
return the title of the problem;
-
return a starting point;
-
return a starting search interval;
-
return the exact solution;
There is also a "generic" problem interface, whose routines all
begin with "P00". This allows the user to call all possible
problems in a single simple loop, by passing the desired index
number through the generic interface.
The functions can be invoked by an index number, and include:
-
f(x) = ( x - 2 )^2 + 1;
a PNG image;
-
f(x) = x^2 + exp ( -x );
a PNG image;
-
f(x) = x^4 + 2x^2 + x + 3;
a PNG image;
-
f(x) = exp ( x ) + 0.01 / x;
a PNG image;
-
f(x) = exp ( x ) - 2 * x + 0.01 / x - 0.000001 / x^2;
a PNG image;
-
f(x) = 2 - x;
a PNG image;
-
f(x) = ( x + sin ( x ) ) * exp ( -x^2 );
a PNG image;
-
f(x) = 3 * x^2 + 1 + ( log ( ( x - pi )^2 ) ) / pi^4;
a PNG image;
-
f(x) = x^2 - 10 sin ( x^2 - 3x + 2);
a PNG image;
-
f(x) = cos(x)+5*cos(1.6*x)-2*cos(2*x)+5*cos(4.5*x)+7*cos(9*x);
a PNG image;
-
f(x) = 1+|3x-1|;
a PNG image;
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
TEST_MIN is available in
a C version and
a C++ version and
a FORTRAN90 version and
a MATLAB version and
a Python version.
Related Data and Programs:
BRENT,
a C library which
contains Richard Brent's routines for finding the zero, local minimizer,
or global minimizer of a scalar function of a scalar argument, without
the use of derivative information.
Reference:
-
Isabel Beichl, Dianne O'Leary, Francis Sullivan,
Monte Carlo Minimization and Counting: One, Two, Too Many,
Computing in Science and Engineering,
Volume 9, Number 1, January/February 2007.
-
Richard Brent,
Algorithms for Minimization without Derivatives,
Dover, 2002,
ISBN: 0-486-41998-3,
LC: QA402.5.B74.
-
David Kahaner, Cleve Moler, Steven Nash,
Numerical Methods and Software,
Prentice Hall, 1989,
ISBN: 0-13-627258-4,
LC: TA345.K34.
-
Arnold Krommer, Christoph Ueberhuber,
Numerical Integration on Advanced Computer Systems,
Springer, 1994,
ISBN: 3540584102,
LC: QA299.3.K76.
-
Dianne O'Leary,
Scientific Computing with Case Studies,
SIAM, 2008,
ISBN13: 978-0-898716-66-5,
LC: QA401.O44.
-
LE Scales,
Introduction to Non-Linear Optimization,
Springer, 1985,
ISBN: 0-387-91252-5,
LC: QA402.5.S33.
Source Code:
Examples and Tests:
List of Routines:
-
P00_F evaluates the function for any problem.
-
P00_F1 evaluates the first derivative for any problem.
-
P00_F1_DIF approximates the first derivative via finite differences.
-
P00_F2 evaluates the second derivative for any problem.
-
P00_F2_DIF approximates the second derivative via finite differences.
-
P00_FMIN seeks a minimizer of a scalar function of a scalar variable.
-
P00_INTERVAL returns a bracketing interval for any problem.
-
P00_PROBLEM_NUM returns the number of problems available.
-
P00_SOL returns the solution for any problem.
-
P00_START returns a starting point for optimization for any problem.
-
P00_TITLE returns a title for any problem.
-
P01_F evaluates the objective function for problem 1.
-
P01_F1 evaluates the first derivative for problem 1.
-
P01_F2 evaluates the second derivative for problem 1.
-
P01_INTERVAL returns a starting interval for optimization for problem 1.
-
P01_SOL returns the solution for problem 1.
-
P01_START returns a starting point for optimization for problem 1.
-
P01_TITLE returns a title for problem 1.
-
P02_F evaluates the objective function for problem 2.
-
P02_F1 evaluates the first derivative for problem 2.
-
P02_F2 evaluates the second derivative for problem 2.
-
P02_INTERVAL returns a starting interval for optimization for problem 2.
-
P02_SOL returns the solution for problem 2.
-
P02_START returns a starting point for optimization for problem 2.
-
P02_TITLE returns a title for problem 2.
-
P03_F evaluates the objective function for problem 3.
-
P03_F1 evaluates the first derivative for problem 3.
-
P03_F2 evaluates the second derivative for problem 3.
-
P03_INTERVAL returns a starting interval for optimization for problem 3.
-
P03_SOL returns the solution for problem 3.
-
P03_START returns a starting point for optimization for problem 3.
-
P03_TITLE returns a title for problem 3.
-
P04_F evaluates the objective function for problem 4.
-
P04_F1 evaluates the first derivative for problem 4.
-
P04_F2 evaluates the second derivative for problem 4.
-
P04_INTERVAL returns a starting interval for optimization for problem 4.
-
P04_SOL returns the solution for problem 4.
-
P04_START returns a starting point for optimization for problem 4.
-
P04_TITLE returns a title for problem 4.
-
P05_F evaluates the objective function for problem 5.
-
P05_F1 evaluates the first derivative for problem 5.
-
P05_F2 evaluates the second derivative for problem 5.
-
P05_INTERVAL returns a starting interval for optimization for problem 5.
-
P05_SOL returns the solution for problem 5.
-
P05_START returns a starting point for optimization for problem 5.
-
P05_TITLE returns a title for problem 5.
-
P06_F evaluates the objective function for problem 6.
-
P06_F1 evaluates the first derivative for problem 6.
-
P06_F2 evaluates the second derivative for problem 6.
-
P06_INTERVAL returns a starting interval for optimization for problem 6.
-
P06_SOL returns the solution for problem 6.
-
P06_START returns a starting point for optimization for problem 6.
-
P06_TITLE returns a title for problem 6.
-
P07_F evaluates the objective function for problem 7.
-
P07_F1 evaluates the first derivative for problem 7.
-
P07_F2 evaluates the second derivative for problem 7.
-
P07_INTERVAL returns a starting interval for optimization for problem 7.
-
P07_SOL returns the solution for problem 7.
-
P07_START returns a starting point for optimization for problem 7.
-
P07_TITLE returns a title for problem 7.
-
P08_F evaluates the objective function for problem 8.
-
P08_F1 evaluates the first derivative for problem 8.
-
P08_F2 evaluates the second derivative for problem 8.
-
P08_INTERVAL returns a starting interval for optimization for problem 8.
-
P08_SOL returns the solution for problem 8.
-
P08_START returns a starting point for optimization for problem 8.
-
P08_TITLE returns a title for problem 8.
-
P09_F evaluates the objective function for problem 9.
-
P09_F1 evaluates the first derivative for problem 9.
-
P09_F2 evaluates the second derivative for problem 9.
-
P09_INTERVAL returns a starting interval for optimization for problem 9.
-
P09_SOL returns the solution for problem 9.
-
P09_START returns a starting point for optimization for problem 9.
-
P09_TITLE returns a title for problem 9.
-
P10_F evaluates the objective function for problem 10.
-
P10_F1 evaluates the first derivative for problem 10.
-
P10_F2 evaluates the second derivative for problem 10.
-
P10_INTERVAL returns a starting interval for optimization for problem 10.
-
P10_SOL returns the solution for problem 10.
-
P10_START returns a starting point for optimization for problem 10.
-
P10_TITLE returns a title for problem 10.
-
P11_F evaluates the objective function for problem 11.
-
P11_F1 evaluates the first derivative for problem 11.
-
P11_F2 evaluates the second derivative for problem 11.
-
P11_INTERVAL returns a starting interval for optimization for problem 11.
-
P11_SOL returns the solution for problem 11.
-
P11_START returns a starting point for optimization for problem 11.
-
P11_TITLE returns a title for problem 11.
-
R8_ABS returns the absolute value of an R8.
-
R8_EPSILON returns the R8 roundoff unit.
-
R8_SIGN returns the sign of an R8.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
You can go up one level to
the C source codes.
Last revised on 03 February 2012.