> 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 :-/
If this system is indeed the one you want to solve, the best way
should be as David indicated to bruteforce it on a grid. Use Cython if
possible :-)
Nathann
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org