genopt(fun, population, lower = -Inf, upper = Inf, scale = dcontrol["eps"], add.args = NULL, control = genopt.control(...), ...)
If a matrix, then the rows correspond to the parameters and the columns are different parameter vectors.
If a list, then it should have a component named "population" and
optionally a component named "objective" -- in particular, it can
be the result of a call to genopt
.
If the "objective" component exists, then it is assumed to be the
function values of the population and the function will not be
evaluated on the members of the population.
fun
.
genopt.control
containing
control parameters for the optimization.
genopt.control
if the control
argument
is not given explicitly.
genopt
with the following components:summary
method for class genopt
which
shows the call, a summary of the set of objectives found, and the
best solution (set of parameters).
genopt.control
, summary.genopt
.
# two parameters, population size 5 go1 <- genopt(function(x, other) sum(x, other), population=matrix(rexp(10), nrow=2, ncol=5), lower=0, add.arg=list(other=3), trace=FALSE) summary(go1) go2 <- genopt(function(x, other) sum(x, other), population=go1, lower=0, add.arg=list(other=3), trace=FALSE)