Hi,

I've written a simple LPSolve test program. But it seems to fail to give me the correct answer that satisfy the constraints. Here is the code:

with(Optimization):


cnsts := {x1 + x2 + x3 + x4 + x5 >= 1, x1+x2+x3+x11+x6 >= 1, x7+x9+x10+x4+x5 >=1, x7+x9+x10+x4+x5 >= 1, x7+x9+x10+x11+x6 >=1, x8 + x9 + x10+x4+x5 >=1, x8+x9+x10+x11+x6 >=1};


obj := x1+x2+x3+x4+x5+x6+x7+x8+x9+x10+x11;     


LPSolve(obj,cnsts,assume = {nonnegative});

 

The answer I get is:
                                                  
  [1.9999999989674, [x1 = 0., x2 = 0.99999999896740222, x11 = 0., x6 = 0.,   x7 = 0., x9 = 0.99999999896740222, x10 = 0., x8 = 0., x3 = 0.,   x4 = 1.03259778874000004 *10^(-9)  , x5 = 0.]]
which doesn't staisfy the 2nd, 5th and last constraints.

Could you please try and verify this? Thanks a lot!


Please Wait...