MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

bug in LinearProgramming?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg95238] bug in LinearProgramming?
  • From: Veit Elser <ve10 at cornell.edu>
  • Date: Sun, 11 Jan 2009 06:40:42 -0500 (EST)

Here is a simple linear programming problem:

c = {1, 1};
m = {{1, 0}, {1, -2}, {-1, 1}};
b = {{1, 0}, {0, 1}, {0, 1}};
lu = {{0, 1}, {0, 1}};
d = {Reals, Reals};

sol = LinearProgramming[c, m, b, lu, d]

Mathematica 6 returns:

LinearProgramming::"lpsnf" :  "No solution can be found that  
satisfies the constraints."

which is obviously correct. But if I change the domain of the second  
variable,

d = {Reals, Integers};

then Mathematica gives the solution

sol = {1., 1}. The problem is that

m.sol = {1., -1., 0.}

violates the bound vector b (second component should be greater than 0).
Is there a bug, or am I getting the syntax wrong?

Veit Elser


  • Prev by Date: How to Display An Array of Vertex Colored Graphs
  • Next by Date: passing initial point to LinearProgramming
  • Previous by thread: How to Display An Array of Vertex Colored Graphs
  • Next by thread: passing initial point to LinearProgramming