The following example shows that LINPROG may return incorrect Lagrange multipliers (it can be shown that the outputs "x" and "lambda" do not satisfy the optimality conditions because "lambda" is wrong).
clear;f=[-1039.75;-914.25;-1304;-4540;-7460;-297;-2000;-300;-1200;-8];A=[0 0 1 0 0 1 0 1 0 0;0 0 0 1 1 0 1 0 1 0;-2190 -3650... 14016 23360 35040 0 0 0 0 0;91.25 91.25 2100 1600 2800 0 0 0 0 1];b=[1;1;0;3000];lb=zeros(10,1);ub=[inf;inf;inf;inf;inf;inf;inf;inf;inf;inf];[x,fval,exitflag,output,lambda]=linprog(f,A,b,[],[],lb,ub);
I find that the Langrange multipliers returned within "lambda" violate the optimality conditions, and are therefore wrong.
Best Answer