0

I'm having some trouble getting my head around why LPSOLVE can't find a solution to this.

min:;
 x = 1000 ;
5000 - 1 x + 500 y = 0;

From inspection, we can see that x = 1000, and y = -8.

LPSOLVE states that the model is infeasible.

However, when inverting the sign of y, ie:

min:;

     x = 1000 ;
    5000 - 1 x - 500 y = 0;

LPSOLVE correctly calculates x = 1000, y = 8.

Or, as one would expect, if substituting 1000 in for x,

min:;

 x = 1000 ;
5000 - 1000 + 500 y = 0;

also solves correctly, y = -8.

Can anyone shed any light on why the original snippet cannot solve?

Thanks

Pete
  • 1
  • 1

1 Answers1

0

I found a solution. I'm not sure why it requires this (maybe someone can elaborate) but adding constraints gives the correct result:

x >= -Inf;
y >= -Inf;
Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
Pete
  • 1
  • 1