Please note that I am not very familiar with R and I am trying to solve the following optimization (minimization). Any inputs would be greatly appreciated. The issue seems to be with the initial values; am unsure how to pick valid initial values. Though it seems to satisfy the criteria given in the documentation.
thetaImp = 5*(10^-5);
eps1 = -0.23;
eps2 = 0.31;
minFunc <- function(x) {
x1 <- x[1];
x2 <- x[2];
-1*(max(thetaImp*x1+eps1,0)*(x1) + max(thetaImp*x2+eps2,0)*(x1+x2))
}
ui = rbind(c(1,1), c(1,0), c(0,1));
ci = c(10000,0,0);
initValues = c(5000,5000);
constrOptim(initValues, minFunc, NULL, ui, ci);
ui %*% initValues - ci
Please note that this is also posted on the statistics website with the full description of the problem. The above is only a sample.
