Force linprog to use simplex method
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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?
0 commentaires
Réponses (1)
Matt J
le 1 Juin 2014
Modifié(e) : Matt J
le 1 Juin 2014
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.
0 commentaires
Voir également
Catégories
En savoir plus sur Solver Outputs and Iterative Display dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!