Title: | Derivative-Free Optimization in R using C++ |
---|---|
Description: | Perform derivative-free optimization algorithms in R using C++. A wrapper interface is provided to call C function of the 'bobyqa' implementation (See <https://github.com/emmt/Algorithms/tree/master/bobyqa>). |
Authors: | Sam Watson [aut], Yi Pan [aut, cre], Éric Thiébaut [aut], Mike Powell [aut] |
Maintainer: | Yi Pan <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.2.2 |
Built: | 2024-09-22 03:30:10 UTC |
Source: | https://github.com/cran/rminqa |
Minimize Rosenbrock function using bobyqa and expect a normal exit from bobyqa.
bobyqa_rosen_x1()
bobyqa_rosen_x1()
No return value, called for side effects.
fr <- function(x) { ## Rosenbrock Banana function x1 <- x[1] x2 <- x[2] 100 * (x2 - x1 * x1)^2 + (1 - x1)^2 } (x1 <- minqa::bobyqa(c(1, 2), fr, lower = c(0, 0), upper = c(4, 4))) ## => optimum at c(1, 1) with fval = 0 str(x1) # see that the error code and msg are returned ## corresponding C++ implementation: bobyqa_rosen_x1()
fr <- function(x) { ## Rosenbrock Banana function x1 <- x[1] x2 <- x[2] 100 * (x2 - x1 * x1)^2 + (1 - x1)^2 } (x1 <- minqa::bobyqa(c(1, 2), fr, lower = c(0, 0), upper = c(4, 4))) ## => optimum at c(1, 1) with fval = 0 str(x1) # see that the error code and msg are returned ## corresponding C++ implementation: bobyqa_rosen_x1()
Minimize Rosenbrock function using bobyqa and expect a normal exit from bobyqa.
bobyqa_rosen_x1e()
bobyqa_rosen_x1e()
No return value, called for side effects.
fr <- function(x) { ## Rosenbrock Banana function x1 <- x[1] x2 <- x[2] 100 * (x2 - x1 * x1)^2 + (1 - x1)^2 } # check the error exits # too many iterations x1e <- minqa::bobyqa(c(1, 2), fr, lower = c(0, 0), upper = c(4, 4), control = list(maxfun=50)) str(x1e) ## corresponding C++ implementation: bobyqa_rosen_x1e()
fr <- function(x) { ## Rosenbrock Banana function x1 <- x[1] x2 <- x[2] 100 * (x2 - x1 * x1)^2 + (1 - x1)^2 } # check the error exits # too many iterations x1e <- minqa::bobyqa(c(1, 2), fr, lower = c(0, 0), upper = c(4, 4), control = list(maxfun=50)) str(x1e) ## corresponding C++ implementation: bobyqa_rosen_x1e()
Perform derivative-free optimization algorithms in R using C++. A wrapper interface is provided to call C function of the bobyqa implementation.
Yi Pan, Samuel Watson