File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -185,17 +185,18 @@ end
185
185
function test_intersection_reformulation ()
186
186
model = GDPModel ()
187
187
@variable (model, y[1 : 2 ], Logical)
188
- @constraint (model, ∧ ( y[1 ], y[2 ]) := true )
188
+ @constraint (model, y[1 ] ∧ ¬ y[2 ] := true )
189
189
reformulate_model (model, DummyReformulation ())
190
190
ref_cons = DP. _reformulation_constraints (model)
191
191
@test all (is_valid .(model, ref_cons))
192
192
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
195
196
bvars = DP. _indicator_to_binary (model)
196
197
funcs = [ref_con_objs[1 ]. func, ref_con_objs[2 ]. func]
197
198
@test 1 bvars[y[1 ]] in funcs
198
- @test 1 bvars[y[2 ]] in funcs
199
+ @test - 1 bvars[y[2 ]] in funcs
199
200
end
200
201
201
202
function test_implication_reformulation ()
You can’t perform that action at this time.
0 commit comments