Skip to content

Commit d52eb54

Browse files
committed
test binvar with (1, 1, 1) matrix
1 parent 8fc900c commit d52eb54

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/test_cons.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,12 @@ def test_cons_indicator():
180180
assert c1.getConshdlrName() == "indicator"
181181

182182
def test_cons_indicator_with_matrix_binvar():
183+
# test matrix variable binvar #1043
183184
m = Model()
184185

185186
x = m.addVar(vtype="B")
186-
binvar = m.addMatrixVar(1, vtype="B")
187-
# binvar is a matrix variable to fix #1043
187+
# test binvar with (1, 1, 1) shape of matrix variable
188+
binvar = m.addMatrixVar(((1, 1, 1)), vtype="B")
188189
m.addConsIndicator(x >= 1, binvar, activeone=True)
189190
m.addConsIndicator(x <= 0, binvar, activeone=False)
190191

0 commit comments

Comments
 (0)