Hello everyone, I would like to maximize the following function fqp with linear constraits and the codes are as following: a= c(0.2,0.3,0.4) vcov=matrix(c(1,2,3,4,5,6,7,8,9),3,3) fqp <- function(b) {t(b)%*%a-0.5*((t(b)%*%vcov)%*%b)} constrOptim(c(b1,b2,b3), fqp,NULL,ui=?, ci=?, control=list(fnscale=-1)) The linear constrait is like abs(b1)+ abs(b2)+abs(b3) <= 1.5. How can I set "ui" and "ci"? Could anyone give me some advice?Many thanks. -- View this message in context: http://www.nabble.com/linearly-constrained-Optimization-tp14837266p14837266.html Sent from the R help mailing list archive at Nabble.com.