linprog crashes Matlab R2017b
Show older comments
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);
Answers (1)
Kavya Vuriti
on 2 Apr 2020
0 votes
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!!
Categories
Find more on Solver Outputs and Iterative Display in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!