This repository was archived by the owner on Jan 30, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +25
-2
lines changed Expand file tree Collapse file tree 1 file changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -2871,9 +2871,21 @@ cdef class MIPVariable(Element):
28712871 4
28722872 sage: p. get_min( v[0 ])
28732873 4. 0
2874+
2875+ TESTS:
2876+
2877+ Test that :trac:`20462` is fixed::
2878+
2879+ sage: p. <x,y> = MixedIntegerLinearProgram( )
2880+ sage: x[0 ], y[0 ]
2881+ ( x_0, x_1)
2882+ sage: x. set_min( 42)
2883+ sage: p. get_min( y[0 ]) is None
2884+ True
2885+
28742886 """
28752887 self ._lower_bound = min
2876- for v in self ._p._variables :
2888+ for v in self ._dict.values() :
28772889 self ._p.set_min(v,min )
28782890
28792891 def set_max (self , max ):
@@ -2896,9 +2908,20 @@ cdef class MIPVariable(Element):
28962908 4
28972909 sage: p. get_max( v[0 ])
28982910 4. 0
2911+
2912+ TESTS:
2913+
2914+ Test that :trac:`20462` is fixed::
2915+
2916+ sage: p. <x,y> = MixedIntegerLinearProgram( )
2917+ sage: x[0 ], y[0 ]
2918+ ( x_0, x_1)
2919+ sage: x. set_max( 42)
2920+ sage: p. get_max( y[0 ]) is None
2921+ True
28992922 """
29002923 self ._upper_bound = max
2901- for v in self ._p._variables :
2924+ for v in self ._dict.values() :
29022925 self ._p.set_max(v,max )
29032926
29042927 def _repr_ (self ):
You can’t perform that action at this time.
0 commit comments