# \donttest{
#-------------------------------------------------------------------
#------------------------- archissur -------------------------------
#-------------------------------------------------------------------
# 20-points DoE, and the corresponding response
d <- 2
nb_PX <- 20
x <- matrix(c(0.205293785978832, 0.0159983370750337,
0.684774733109666, 0.125251417595962,
0.787208786290006, 0.700475706055049,
0.480507717105934, 0.359730889653793,
0.543665267336735, 0.565974761807069,
0.303412043992361, 0.471502352650857,
0.839505250127309, 0.504914690245002,
0.573294917143728, 0.784444726564573,
0.291681289223421, 0.255053812451938,
0.87233450888786, 0.947168337730927,
0.648262257638515, 0.973264712407035,
0.421877310273815, 0.0686662506387988,
0.190976166753807, 0.810964668176754,
0.918527262507395, 0.161973686467513,
0.0188128700859558, 0.43522031347403,
0.99902788789426, 0.655561821513544,
0.741113863862512, 0.321050086076934,
0.112003007565305, 0.616551317575545,
0.383511473487687, 0.886611679106771,
0.0749211435982952, 0.205805968972305),
byrow = TRUE, ncol = d)
require(DiceKriging)
cst_function <- function(z){
fx <- apply(z, 1, branin)
f <- ifelse(fx < 14, 0, 1)
return(f)}
## constraint function
s <- cst_function(x)
# archissur parameters
design.init <- x
cst.init <- s
n.ite <- 2
n_update <- 5
lower <- rep(0,d)
upper <- rep(1,d)
### GPC model options
gpc.options <- list()
gpc.options$noise.var <- 1e-6
gpc.options$multistart <- 1
res <- archissur(design.init = design.init, cst.init = cst.init,
cst_function = cst_function, lower = lower, upper = upper,
n.ite = n.ite, n_update = n_update, gpc.options = gpc.options)
unlink('model_gp.Rds')
# }
Run the code above in your browser using DataLab