When does intlinprog give wrong solutions?
Ältere Kommentare anzeigen
Hello everyone, I am using intlinprog to solve integer programs and it seems like I am getting non-optimal solutions and I'm wondering why that might be. Specifically, for the problem
f = [1;1;1;1]
Aeq=[32,45,-41,22;-82,-13,33,-33;23,-21,12,-12]
beq=[214;712;331]
ub=[Inf;Inf;Inf;Inf]
lb=zeros(4,1)
intcon=[1:4]
x=intlinprog(f,intcon,[],[],Aeq,beq,lb,ub)
Matlab gives as the solution
x =
1.0e+04 *
1.3919
4.5174
6.9744
1.7340
But the solution
x=
3716
12057
18587
4582
is smaller and meets all the constraints.
Thanks for your help, Max.
2 Kommentare
Matt J
am 3 Jan. 2016
What MATLAB version are you using?
Maximilian Nohr
am 5 Jan. 2016
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Solver Outputs and Iterative Display finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!