search for: inequb

Displaying 1 result from an estimated 1 matches for "inequb".

Did you mean: ineqb
2011 Dec 12
0
Rsolnp package: warning messages
...eturn(c(sum_pterm,sum_x)) } # the right hand side for the constraint eqB=c(1,budget) # the inequality function inequal1=function(x){ all3=sum(mat%*%x) p_b=mat[1:BR,]%*%x/all3 return(as.vector(p_b)) } #the lower limit for inequalities ineqLB=rep(0.00001,BR) #the upper limit for the inequalities ineqUB=rep(1.00001,BR) # the lower and upper bounds for the variables LB=rep(0,CELL) UB=rep(1,CELL) #the seed for variables cells0=rep(.3,9) #solving the problem sol=solnp(cells0,fun=obj,eqfun=equal1,eqB=eqB,ineqfun =inequal1,ineqLB=ineqLB,ineqUB=ineqUB,LB=LB,UB=UB,control=list(outer.iter=400)) cell...