linprog: Interior point algorithm gives wrong results

I test the "linprog" linear programming function on a NetLib .mat file. I found that only the dual-simplex alg gives me the correct answer. The other two algo options yield incorrect results. Here is my code:
load adlittle.mat % downloaded from NetLib
disp('>> dual-simplex');
options = optimoptions('linprog','Algorithm','dual-simplex');
[x fval, exitflag, output, lambda] = linprog(c,[],[], A,b, lo, hi,options);
disp(sprintf('Algorithm: dual-simplex ; fval = %e\n', fval));
disp('>> interior-point-legacy');
options = optimoptions('linprog','Algorithm','interior-point-legacy');
[x fval, exitflag, output, lambda] = linprog(c,[],[], A,b, lo, hi,options);
disp(sprintf('Algorithm: interior-point-legacy ; fval = %e\n', fval));
disp('>> interior-point');
options = optimoptions('linprog','Algorithm','interior-point');
[x fval, exitflag, output, lambda] = linprog(c,[],[], A,b, lo, hi,options);
disp(sprintf('Algorithm: interior-point ; fval = %e\n', fval));
Only the dual-simplex option givesfval = 2.254950e+05 which is correct. the other two interior-point algos either give wrong answer or no answer.
May I know how to correctly set up linprog for the interior point algo?
H.C. Lui

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

产品

版本

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by