inst/benchmarks/ex4.R

ex4<-function(x){
	F = x[2]^2 + x[3]^2 + 2.0*x[1]^2 + x[4]^2 - 5.0*x[2] - 5.0*x[3] - 21.0*x[1] + 7.0*x[4];
	g<-rep(0,3);
	g[1] = x[2]^2 + x[3]^2 + x[1]^2 + x[4]^2 + x[2] - x[3] + x[1] - x[4];
	g[2] = x[2]^2 + 2.0*x[3]^2 + x[1]^2 + 2.0*x[4]^2 - x[2] - x[4];
	g[3] = 2.0*x[2]^2 + x[3]^2 + x[1]^2 + 2.0*x[2] - x[3] - x[4];
	return(list(F=F, g=g));
}

Try the MEIGOR package in your browser

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

MEIGOR documentation built on Nov. 8, 2020, 7:46 p.m.