Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

shubert

Shubert-Piyavskii Method


Description

Shubert-Piyavskii Univariate Function Maximization

Usage

shubert(f, a, b, L, crit = 1e-04, nmax = 1000)

Arguments

f

function to be optimized.

a, b

search between a and b for a maximum.

L

a Lipschitz constant for the function.

crit

critical value

nmax

maximum number of steps.

Details

The Shubert-Piyavskii method, often called the Sawtooth Method, finds the global maximum of a univariate function on a known interval. It is guaranteed to find the global maximum on the interval under certain conditions:

The function f is Lipschitz-continuous, that is there is a constant L such that

|f(x) - f(y)| ≤ L |x - y|

for all x, y in [a, b].

The process is stopped when the improvement in the last step is smaller than the input argument crit.

Value

Returns a list with the following components:

xopt

the x-coordinate of the minimum found.

fopt

the function value at the minimum.

nopt

number of steps.

References

Y. K. Yeo. Chemical Engineering Computation with MATLAB. CRC Press, 2017.

See Also

Examples

# Determine the global minimum of sin(1.2*x)+sin(3.5*x) in [-3, 8].
f <- function(x) sin(1.2*x) + sin(3.5*x)
shubert(function(x) -f(x), -3, 8, 5, 1e-04, 1000)
## $xopt
## [1] 3.216231     # 3.216209
## $fopt
## [1] 1.623964
## $nopt
## [1] 481

pracma

Practical Numerical Math Functions

v2.3.3
GPL (>= 3)
Authors
Hans W. Borchers [aut, cre]
Initial release
2021-01-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.