Generating integral solutions to a system of linear inequalities
I was wondering whether there was a straightforward way in Sage to generate all integral solutions of a system of linear inequalities. I have talked to Nicolas Thiéry here at FPSAC/Sage days 103, and he showed me the interface to PALP, but said I should ask here.
I have programmed such a solver myself for the sage-drg
package:
https://github.com/jaanos/sage-drg/bl...
It is a solution generator (as opposed to a function returning all solutions) which uses Sage's integer linear programming facilities. It also supports adding conditions on-the-fly and making a copy of the generator.
I was thinking that it would be a nice addition to Sage (Mathematica has FindInstance
, which does something similar) - unless something like this already exists. Of course, the interface should be made more user-friendly. I would also like to know if there is a better way of doing such a thing.