On 05/03/2010 12:59 PM, Nathann Cohen wrote:
I'm sure of the best way. You could just write your own
little function that checks the conditions for each
(i,j) in a big rectangle. Also, you might be able to use Sage's
MixedIntegerLinearProgram functionality.
And here is how :
p = MixedIntegerLinearProgram()
x = p.new_variable()
p.add_constraint(2*x[1] + 9 * x[2]>= 0)
p.add_constraint(-5*p[1] -7 * x[2]>= -5)
p.add_constraint(3*p[1] -2 * p[2]>= -6)
p.set_objective(None)
p.set_integer(x)
p.solve()
p.get_values(x)
{1: 0.0, 2: 0.0}
But there is no way for the moment to compute *all* the solutions to
your system, though :-/
I think you could with the optional qepcad spkg. Unfortunately, this
seems broken for me at the moment (I have a readline error when
installing it.)
Type qepcad? in Sage for details.
Carl Witty was working on a native Sage implementation of the algorithm
(Cylindrical Algebraic Decomposition), and had it working for simple
cases and was apparently a month or two from being done. Unfortunately,
it seems that Carl has disappeared for a while, and we don't have his
unfinished code.
Thanks,
Jason
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org