File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1575,7 +1575,7 @@ cdef class Variable(Expr):
15751575 -------
15761576 bool
15771577 """
1578- return SCIPvarIsImpliedIntegral (self .scip_var)
1578+ return SCIPvarIsNonImpliedIntegral (self .scip_var)
15791579
15801580 def getImplType (self ):
15811581 """
Original file line number Diff line number Diff line change @@ -63,5 +63,17 @@ def test_vtype():
6363 m .chgVarType (x , 'I' )
6464 assert x .vtype () == "INTEGER"
6565
66- m .chgVarType (y , 'M' )
67- assert y .vtype () == "IMPLINT"
66+ m .chgVarType (y , 'C' )
67+ assert y .vtype () == "CONTINUOUS"
68+
69+ is_int = lambda x : x .isIntegral () == True
70+ is_implint = lambda x : x .isImpliedIntegral () == True
71+ is_nonimplint = lambda x : x .isNonImpliedIntegral () == True
72+ is_bin = lambda x : x .isBinary () == True
73+
74+ assert not is_int (y ) and not is_implint (y ) and not is_nonimplint (y ) and not is_bin (y )
75+ assert is_int (x ) and not is_implint (x ) and not is_nonimplint (x ) and not is_bin (x )
76+ assert is_int (z ) and not is_implint (z ) and not is_nonimplint (z ) and is_bin (z )
77+ assert w .vtype () == "CONTINUOUS" and is_int (w ) and is_implint (w ) and is_nonimplint (w ) and not is_bin (w )
78+
79+ assert w .getImplType () == 1
You can’t perform that action at this time.
0 commit comments