Open mkoeppe opened 1 year ago
After scanning the files, I had the following doubts, could you please clear them whenever you have the time, thanks!
MixedIntegerLinearProgram
: https://github.com/sagemath/sage/blob/c00e6c204b2d0e1fe1314ec497cdab0b03dd92e3/src/sage/numerical/mip.pxd#L11-L26 I couldn't see where a solver was required to define the class.SageObject
class, I checked if that requires a solver and couldn't find anything. Seems like SageObject just ensures that the object doesn't break existing Sage code and follows all required basic standards with some basic functions.GenericBackend
class, the instances of solve there were: https://github.com/sagemath/sage/blob/c00e6c204b2d0e1fe1314ec497cdab0b03dd92e3/src/sage/numerical/backends/generic_backend.pxd#L27 , https://github.com/sagemath/sage/blob/c00e6c204b2d0e1fe1314ec497cdab0b03dd92e3/src/sage/numerical/backends/generic_backend.pxd#L48 and https://github.com/sagemath/sage/blob/c00e6c204b2d0e1fe1314ec497cdab0b03dd92e3/src/sage/numerical/backends/generic_backend.pxd#L60 where an object was created from the class and a solver is required. Yet I couldn't pinpoint were we set it as a requirement in the class definition.GenericBackend
to not require the solver and use that to create the MixedIntegerLinearProgram
similar to matrix_sdp_backend
as you mentioned? In that case what additional methods does the class require.I might not make sense at a few places, I hope you excuse that, and I'd be grateful for the corrections.
Thanks for your time!
Backends are implemented by subclassing GenericBackend
. For example, see https://github.com/sagemath/sage/blob/develop/src/sage/numerical/backends/scip_backend.pyx
Is there an existing issue for this?
Problem Description
A
MixedIntegerLinearProgram
is a good way to set up a linear inequality system, sort of as a lazy H-polyhedron. But this depends on a solver -- so it can only be used withbase_ring=QQ
.Proposed Solution
To generalize this, we should create a new module
sage.numerical.backends.matrix_backend
, a dummy solver that only stores the data (in Sage matrices and vectors) and can handle arbitrary base rings. (This is similar to the existing.matrix_sdp_backend
.)Alternatives Considered
Lazy polyhedra.
Additional Information
No response