When does intlinprog give wrong solutions?
Show older comments
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.
Accepted Answer
More Answers (0)
Categories
Find more on Solver Outputs and Iterative Display in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!