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 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