Skip to content

Commit 79c54c0

Browse files
committed
update test
1 parent 642e12b commit 79c54c0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/constraints/proposition.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,17 +185,18 @@ end
185185
function test_intersection_reformulation()
186186
model = GDPModel()
187187
@variable(model, y[1:2], Logical)
188-
@constraint(model, (y[1], y[2]) := true)
188+
@constraint(model, y[1] ¬y[2] := true)
189189
reformulate_model(model, DummyReformulation())
190190
ref_cons = DP._reformulation_constraints(model)
191191
@test all(is_valid.(model, ref_cons))
192192
ref_con_objs = constraint_object.(ref_cons)
193-
@test ref_con_objs[1].set ==
194-
ref_con_objs[2].set == MOI.GreaterThan(1.0)
193+
sets = [ref_con_objs[1].set, ref_con_objs[2].set]
194+
@test MOI.GreaterThan(1.0) in sets
195+
@test MOI.GreaterThan(0.0) in sets
195196
bvars = DP._indicator_to_binary(model)
196197
funcs = [ref_con_objs[1].func, ref_con_objs[2].func]
197198
@test 1bvars[y[1]] in funcs
198-
@test 1bvars[y[2]] in funcs
199+
@test -1bvars[y[2]] in funcs
199200
end
200201

201202
function test_implication_reformulation()

0 commit comments

Comments
 (0)