linprog crashes Matlab R2017b

3 次查看(过去 30 天)
Eric Trudel
Eric Trudel 2019-12-5
Hello,
I am running an optimization routine on Matlab R2017b using a custom SLP algorithm. At some point when passing a sub problem to linprog; it will cause MATALB to crash and exit. I have tried the problem on future versions (Matlab online only - R2019b) and no crashes occured. Is this a bug or is there somthing wrong with my linear program? The reproducible code is below;
Any insight would be greatly appreciated.
Thanks
%linrog crash?
A2 = [ 1 1 1 0 0 0 1 0 0;
1 2 0 1 0 0 0 0 0;
-1 0 0 0 1 0 0 1 0;
0 -1 0 0 0 1 0 0 1];
c= [0;
0;
0;
0;
0;
0;
1;
1;
1];
b = [ -0.1895;
-0.0000;
-0.8296;
-0.9965];
sL2 = [-0.1866 -0.1866 -0.1866 -0.1866 -0.1866 -0.1866 0 0 0];
sU2 = [0.1866 0.1866 0.1866 0.1866 0.1866 0.1866 Inf Inf Inf];
s0 = [ 0;
0;
0;
0;
0;
0;
0.1895;
0.8296;
0.9965];
lpoptions = optimoptions(@linprog,'Display','iter','algorithm','dual-simplex');
[sn,fval,flagn,~,lambda] = linprog(c,[],[],A2,-b,sL2,sU2,s0,lpoptions);

回答(1 个)

Kavya Vuriti
Kavya Vuriti 2020-4-2
Hi,
This crash might be because the "linprog" function is using the default 'dual-simplex' algorithm.Try switching to the 'interior-point' algorithm.
Hope this helps!!

类别

Help CenterFile Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by