optimNLOPTR | R Documentation |
#' This is a wrapper that employs the nloptr
function from the package of the same name.
The nloptr
function itself is an interface to the nlopt
library, which contains a wide selection
of different optimization algorithms.
optimNLOPTR(x = NULL, fun, lower, upper, control = list(), ...)
x |
optional matrix of points to be included in the evaluation (only first row will be used) |
fun |
objective function, which receives a matrix x and returns observations y |
lower |
boundary of the search space |
upper |
boundary of the search space |
control |
named list, with the options for
|
... |
passed to Note that the arguments
|
list, with elements
x
archive of evaluated solutions
y
archive of observations
xbest
best solution
ybest
best observation
count
number of evaluations of fun
message
success message
##simple example: res <- optimNLOPTR(,fun = funSphere,lower = c(-10,-20),upper=c(20,8)) res ##with an inequality constraint: contr <- list() #control list ##specify constraint contr$eval_g_ineq <- function(x) 1+x[1]-x[2] res <- optimNLOPTR(,fun=funSphere,lower=c(-10,-20),upper=c(20,8),control=contr) res
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.