View source: R/optimMaxMinDist.R
optimMaxMinDist | R Documentation |
One-shot optimizer: Create a design with maximum sum of distances, and evaluate. Best candidate is returned.
optimMaxMinDist(x = NULL, fun, control = list())
x |
Optional set of solution(s) as a list, which are added to the randomly generated solutions and are also evaluated with the target function. |
fun |
target function to be minimized |
control |
(list), with the options:
|
a list:
xbest
best solution found
ybest
fitness of the best solution
x
history of all evaluated solutions
y
corresponding target function values f(x)
count
number of performed target function evaluations
optimCEGO
, optimEA
, optimRS
, optim2Opt
seed=0
#distance
dF <- distancePermutationHamming
#creation
cF <- function()sample(5)
#objective function
lF <- landscapeGeneratorUNI(1:5,dF)
#start optimization
set.seed(seed)
res <- optimMaxMinDist(,lF,list(creationFunction=cF,budget=20,
vectorized=TRUE)) ##target function is "vectorized", expects list as input
res$xbest
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.