Force linprog to use simplex method

조회 수: 11 (최근 30일)
Simo
Simo 2014년 5월 31일
편집: Matt J 2014년 6월 1일
Hi everyone,
I want linprog to use simplex method, but when I check the output I still see that it uses the default method (Interior point).
This my code:
f=[];
A=[-1 -1 -0.94
1 1 0.94
-1 -1 -0.54
1 1 0.54
-1 -0.664 -0.313
1 0.664 0.313
-1 -0.260 -0.228
1 0.260 0.228
-0.736 -0.176 -0.09
0.736 0.176 0.09
-0.401 -0.050 -0.031
0.401 0.050 0.031];
b=[-0.9
1
-0.6
0.75
-0.4
0.55
-0.2
0.35
-0.12
0.22
-0.05
0.1];
Aeq=[1 1 1];
beq=[1];
options = optimoptions('linprog','Algorithm','active-set')
[x,fval,exitflag,output,lambda]=linprog(f,A,b,Aeq,beq,[],[],[],'options')
And how can I increase the iterations?

답변 (1개)

Matt J
Matt J 2014년 6월 1일
편집: Matt J 2014년 6월 1일
Remove the quotation marks from 'options'. I don't understand why this didn't produce an error message.
options = optimoptions('linprog','Algorithm','simplex')
[x,fval,exitflag,output,lambda]=linprog(f,A,b,Aeq,beq,[],[],[],options)
I also don't understand why the fact that you have f=[] doesn't produce an error message.
And how can I increase the iterations?
Use the 'MaxIter' option.

카테고리

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