StoGO is a global optimization algorithm that works by systematically dividing the search space—which must be bound-constrained—into smaller hyper-rectangles via a branch-and-bound technique, and searching them using a gradient-based local-search algorithm (a BFGS variant), optionally including some randomness.
stogo(
x0,
fn,
gr = NULL,
lower = NULL,
upper = NULL,
maxeval = 10000,
xtol_rel = 1e-06,
randomized = FALSE,
nl.info = FALSE,
...
)
initial point for searching the optimum.
objective function that is to be minimized.
optional gradient of the objective function.
lower and upper bound constraints.
maximum number of function evaluations.
stopping criterion for relative change reached.
logical; shall a randomizing variant be used?
logical; shall the original NLopt info be shown.
additional arguments passed to the function.
List with components:
the optimal solution found so far.
the function value corresponding to par
.
number of (outer) iterations, see maxeval
.
integer code indicating successful completion (> 0) or a possible error number (< 0).
character string produced by NLopt and giving additional information.
Only bounds-constrained problems are supported by this algorithm.
S. Zertchaninov and K. Madsen, “A C++ Programme for Global Optimization,” IMM-REP-1998-04, Department of Mathematical Modelling, Technical University of Denmark.
## Rosenbrock Banana objective function
rbf <- function(x) {(1 - x[1]) ^ 2 + 100 * (x[2] - x[1] ^ 2) ^ 2}
x0 <- c(-1.2, 1)
lb <- c(-3, -3)
ub <- c(3, 3)
## The function as written above has a minimum of 0 at (1, 1)
stogo(x0 = x0, fn = rbf, lower = lb, upper = ub)
#> $par
#> [1] -1.2 1.0
#>
#> $value
#> [1] Inf
#>
#> $iter
#> [1] 0
#>
#> $convergence
#> [1] -2
#>
#> $message
#> [1] "NLOPT_INVALID_ARGS: Invalid arguments (e.g. lower bounds are bigger than upper bounds, an unknown algorithm was specified, etcetera)."
#>