Linprogr giving 2 different solutions when changing the way to impose upper and lower bounds

1 vue (au cours des 30 derniers jours)
CT
CT le 14 Août 2019
Commenté : Torsten le 14 Août 2019
I am running a linear programming problem in Matlab using linprogr. The linear programming problem has many solutions. When I impose "manually" the upper and lower bounds on the unknowns together with the other inequality constraints I get a different result than when using the lb and ub inputs inside the linprogr function. Is it possible? Does it indicate an error in my code?
This is my specific case, with matrices of parameters here https://filebin.net/ppno4h7r4q1p3fbl. I could not attach them because too many. The upper and lower bounds consist of 0<=x_i<=1 for every i-th component of the vector of unknowns x.
1) With "manually" included upper and lower bounds.
clear
rng default
load Aeq_man
load Aineq_man
load beq_man
load bineq_man
f=zeros(size(Aeq_man,2),1);
sol_1=linprog(f,Aineq_man,bineq_man,Aeq_man,beq_man);
2) When using lb and ub inputs inside the linprogr function
rng default
load Aeq
load Aineq
load be
load bineq
load lb
load ub
sol_2=linprog(f,Aineq,bineq,Aeq,beq, lb, ub);
  3 commentaires
CT
CT le 14 Août 2019
Modifié(e) : CT le 14 Août 2019
Two different x's. The objective is just a vector of zeros.
Torsten
Torsten le 14 Août 2019
That's possible. If you specify the objective to be 0, then one feasible point x is returned - and I guess your problem has more than just one of them.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Linear Programming and Mixed-Integer Linear Programming 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!

Translated by