linprog gives wrong solution?
Mostrar comentarios más antiguos
Hi
I am trying to solve a simple linear programming problem in matlab:
500x + 400y -> min
x + y >= 90
0.02x + 0.05y <= 2.7
3x + 5y <= 360
According to the manual this should solve the problem:
f = [500, 400];
A = [-1 -1; 0.02 0.05 3 5];
b = [-90 0.03*90 4*90]';
[x, fval, info] = linprog(f, A, b)
I received the answer:
x=[60 30];
fval = 4.20e4;
info=1
On the other hand, the vertices of the area of acceptable solutions and the value of the function are as follows:
xy=[60 30; 90 18; 45 45]
f = 1e4*[4.2000 5.2200 4.0500]
It looks like the actual minimum is 4.05e4. What am I doing wrong? How to interpret this result?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Solver Outputs and Iterative Display en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!