lagrange multipliers for a linear programming prob in R -


for lp matlab gives lambdas (lagrange multipliers) output lp problem. can see more here: http://se.mathworks.com/help/optim/ug/linprog.html?refresh=true after have solved lp in r, there (a realtively easy) way lambdas of problem somehow?

in matlab:

f = [-5; -4; -6]; =  [1 -1  1       3  2  4       3  2  0]; b = [20; 42; 30]; lb = zeros(3,1); [x,fval,exitflag,output,lambda] = linprog(f,a,b,[],[],lb); 

in r:

f = c(-5, -4, -6) =  matrix(c(1, -1,  1, 3,  2,  4, 3,  2,  0), nrow=3, byrow=t) b = c(20, 42, 30) const.dir = c("<=", "<=", "<=") solvelp(f,b,a,maximum=f,const.dir, lpsolve=t) 

but how labmda values in r in matlab?


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -