This repository was archived by the owner on Jan 30, 2023. It is now read-only.
File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -331,7 +331,7 @@ cdef class MixedIntegerLinearProgram(SageObject):
331
331
332
332
def __init__ (self , solver = None , maximization = True ,
333
333
constraint_generation = False , check_redundant = False ,
334
- names = tuple ()):
334
+ names = tuple (), base_ring = None ):
335
335
r """
336
336
Constructor for the ``MixedIntegerLinearProgram`` class.
337
337
@@ -431,7 +431,8 @@ cdef class MixedIntegerLinearProgram(SageObject):
431
431
self. _first_variable_names = list( names)
432
432
from sage. numerical. backends. generic_backend import get_solver
433
433
self. _backend = get_solver( solver=solver,
434
- constraint_generation=constraint_generation)
434
+ constraint_generation=constraint_generation,
435
+ base_ring=base_ring)
435
436
if not maximization:
436
437
self. _backend. set_sense( -1)
437
438
@@ -597,6 +598,13 @@ cdef class MixedIntegerLinearProgram(SageObject):
597
598
sage: p = MixedIntegerLinearProgram( solver='ppl')
598
599
sage: p. base_ring( )
599
600
Rational Field
601
+ sage: p = MixedIntegerLinearProgram( solver='InteractiveLP')
602
+ sage: p. base_ring( )
603
+ Algebraic Real Field
604
+ sage: d = polytopes. dodecahedron( )
605
+ sage: p = MixedIntegerLinearProgram( base_ring=d. base_ring( ))
606
+ sage: p. base_ring( )
607
+ Number Field in sqrt5 with defining polynomial x^ 2 - 5
600
608
"""
601
609
return self. _backend. base_ring( )
602
610
You can’t perform that action at this time.
0 commit comments