In Sage 5.3, I get the following: sage: p = MixedIntegerLinearProgram() sage: x = p.new_variable(integer=True) sage: c = x[0]-x[1] sage: p.add_constraint(10 <= c) sage: p.show() Maximization: Constraints: Variables: x_0 is an integer variable (min=0.0, max=+oo) x_1 is an integer variable (min=0.0, max=+oo)
Thus, the constraint was not added to p. If I however do sage: p.add_constraint(c >= 10) sage: p.show() Maximization: Constraints: R0: - x_0 + x_1 <= -10.0 Variables: x_0 is an integer variable (min=0.0, max=+oo) x_1 is an integer variable (min=0.0, max=+oo) then things are fine. According to the doc, this seems to be a bug. Unfortunately, this behavior produces wrong results. It took me some time to isolate the problem! Bugs which just produce error messages are much friendlier ... -- Peter Mueller -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support?hl=en.
