Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit c8fa4b0

Browse files
author
Matthias Koeppe
committed
InteractiveLPBackend: Change default base_ring to QQ
1 parent d84b5bd commit c8fa4b0

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

src/sage/numerical/backends/generic_backend.pyx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ def default_mip_solver(solver = None):
11691169
11701170
- ``InteractiveLPProblem`` (``solver="InteractiveLP"``). A didactical
11711171
implementation of the revised simplex method in Sage. It works over
1172-
any exact ordered field, the default is ``AA``.
1172+
any exact ordered field, the default is ``QQ``.
11731173
11741174
``solver`` should then be equal to one of ``"GLPK"``,
11751175
``"Coin"``, ``"CPLEX"``, ``"CVXOPT"``, ``"Gurobi"``, ``"PPL"`, or
@@ -1294,7 +1294,7 @@ cpdef GenericBackend get_solver(constraint_generation = False, solver = None, ba
12941294
12951295
- ``InteractiveLPProblem`` (``solver="InteractiveLP"``). A didactical
12961296
implementation of the revised simplex method in Sage. It works over
1297-
any exact ordered field, the default is ``AA``.
1297+
any exact ordered field, the default is ``QQ``.
12981298
12991299
``solver`` should then be equal to one of ``"GLPK"``, ``"Coin"``,
13001300
``"CPLEX"``, ``"CVXOPT"``,``"Gurobi"``, ``"PPL"``, ``"InteractiveLP"``,

src/sage/numerical/backends/interactivelp_backend.pyx

+4-4
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ cdef class InteractiveLPBackend:
6666
"""
6767

6868
if base_ring is None:
69-
from sage.rings.all import AA
70-
base_ring = AA
69+
from sage.rings.all import QQ
70+
base_ring = QQ
7171

7272
self.lp = InteractiveLPProblem([], [], [], base_ring=base_ring)
7373
self.set_verbosity(0)
@@ -92,7 +92,7 @@ cdef class InteractiveLPBackend:
9292
sage: from sage.numerical.backends.generic_backend import get_solver
9393
sage: p = get_solver(solver = "InteractiveLP")
9494
sage: p.base_ring()
95-
Algebraic Real Field
95+
Rational Field
9696
"""
9797
return self.lp.base_ring()
9898

@@ -308,7 +308,7 @@ cdef class InteractiveLPBackend:
308308
sage: from sage.numerical.backends.generic_backend import get_solver
309309
sage: p = get_solver(solver = "InteractiveLP")
310310
sage: p._AbcxCVPRd()
311-
([], (), (), (), (), (), 'max', Algebraic Real Field, 0)
311+
([], (), (), (), (), (), 'max', Rational Field, 0)
312312
"""
313313
A, b, c, x = self.lp.Abcx()
314314
constraint_types = self.lp.constraint_types()

src/sage/numerical/mip.pyx

+2-1
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,8 @@ cdef class MixedIntegerLinearProgram(SageObject):
598598
sage: p = MixedIntegerLinearProgram(solver='ppl')
599599
sage: p.base_ring()
600600
Rational Field
601-
sage: p = MixedIntegerLinearProgram(solver='InteractiveLP')
601+
sage: from sage.rings.all import AA
602+
sage: p = MixedIntegerLinearProgram(solver='InteractiveLP', base_ring=AA)
602603
sage: p.base_ring()
603604
Algebraic Real Field
604605
sage: d = polytopes.dodecahedron()

0 commit comments

Comments
 (0)