We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fc900c commit d52eb54Copy full SHA for d52eb54
tests/test_cons.py
@@ -180,11 +180,12 @@ def test_cons_indicator():
180
assert c1.getConshdlrName() == "indicator"
181
182
def test_cons_indicator_with_matrix_binvar():
183
+ # test matrix variable binvar #1043
184
m = Model()
185
186
x = m.addVar(vtype="B")
- binvar = m.addMatrixVar(1, vtype="B")
187
- # binvar is a matrix variable to fix #1043
+ # test binvar with (1, 1, 1) shape of matrix variable
188
+ binvar = m.addMatrixVar(((1, 1, 1)), vtype="B")
189
m.addConsIndicator(x >= 1, binvar, activeone=True)
190
m.addConsIndicator(x <= 0, binvar, activeone=False)
191
0 commit comments