linprog crashes Matlab R2017b

조회 수: 10 (최근 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 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