Learn R Programming

pracma (version 1.7.3)

direct1d: Univariate Global Optimization

Description

Implementation of the DIRECT global optimization algorithm in the one-dimensional case.

Usage

direct1d(f, a, b, maxiter = 20, ...)

Arguments

f
function to be minimized.
a, b
end points of the interval, a.
maxiter
maximum number of iterations.
...
further parameters to be passed to the function.

Value

  • List with components xmin and fmin, the minimum found so far and its function value.

Details

The DIRECT algorithm for the one-dimensional case is directly derived from Shubert's algorithm. Instead of computing the function at the endpoints of the interval, it is computed at the midpoint. Intervals ar split in three parts, sparing one function evaluation.

References

Jones, D. R., C. D. Perttunen, and B. E. Stuckman (1993). Lipschitzian Optimization Without the Lipschitz Constant. Journal of Optimization Theory and Application, Vol. 79. No. 1, pp. 157ff.

Finkel, D., and C. Kelley (2006). Additive Scaling and the DIRECT Algorithm. Journal of Global Optimization, Vol. 36, No. 4, pp. 597--608.

See Also

findmins, dfoptim::direct

Examples

Run this code
f <- function(x) sin(10*pi*x) + 0.5*(x-0.5)^2
a <- 0; b <- 1
direct1d(f, 0, 1, maxiter = 20)
# $xmin:  0.5499493794 (error: 3.5e-6)
# $fmin: -0.9987512652
ezplot(f, a, b, 1000)

Run the code above in your browser using DataLab