-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.R
27 lines (21 loc) · 605 Bytes
/
test.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
library(devtools)
library(smoof)
load_all(".")
set.seed(1)
fn = smoof::makeHimmelblauFunction()
res = omniopt(fn, 100, 1000, var.space.niching = TRUE, frequency = 1, delta = 0.001, envir = environment())
plot(fn)
points(t(res$dec))
for (i in 1:length(res$history)) {
e = res$history[[i]]
if (is.null(e))
next
plot(fn)#, main = sprintf("Iteration %i", i))
points(t(e$dec))
Sys.sleep(0.1)
}
stop()
fn = smoof::makeZDT2Function(dimensions = 4L)
res = omniopt(fn, 100, 1000, var.space.niching = TRUE, delta = 0.001, p.cross = 0.9, envir = environment())
plot(t(res$obj))
pairs(t(res$dec))