linprog crashes Matlab R2017b

2 ビュー (過去 30 日間)
Eric Trudel
Eric Trudel 2019 年 12 月 5 日
回答済み: Kavya Vuriti 2020 年 4 月 2 日
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 Center および File ExchangeSolver 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