R/hartman3.R

Defines functions hartman3

Documented in hartman3

hartman3 <- function(x){ 
	x1 <- x[1]   
	x2 <- x[2]
	x3 <- x[3] 
	a <- matrix(c(3.0,0.1,3.0,0.1,10.0,10.0,10.0,10.0,30.0,35.0,30.0,35.0),3,4,byrow=TRUE)
	p <- matrix(c(0.3689,0.4699,0.1091,0.03815,0.117,0.4387,0.8732,0.5743,0.2673,0.747,0.5547,0.8828),3,4,byrow=TRUE)
	c <- c(1.0,1.2,3.0,3.2)
	d <- matrix(0,1,4)
	for (i in seq(1,4)){
 		d[i] <- sum(a[,i]*(x - p[,i])^2)
	}
	f <- -sum(c*exp(-d))
	return(f)
}

Try the DiceKriging package in your browser

Any scripts or data that you put into this service are public.

DiceKriging documentation built on Feb. 24, 2021, 1:07 a.m.