@@ -240,6 +240,36 @@ function test_range_and_bound()
240240 return
241241end
242242
243+ function test_range_and_bound_2 ()
244+ model = Model ()
245+ @variable (model, 10 <= x <= 11 )
246+ @variable (model, 1 <= y <= 11 )
247+ @variable (model, 1 <= z <= 0 )
248+ @constraint (model, c, x + y + z <= 1 )
249+ @objective (model, Max, x + y)
250+ solver = MOCS. Optimizer ()
251+ MOI. set (solver, MOCS. InfeasibleModel (), JuMP. backend (model))
252+ MOI. compute_conflict! (solver)
253+ data = solver. results
254+ @test length (data) == 1
255+ @test _isequal_unordered (
256+ data[]. constraints,
257+ [JuMP. index (LowerBoundRef (z)), JuMP. index (UpperBoundRef (z))],
258+ )
259+ @test MOI. get (solver, MOCS. StopIfInfeasibleBounds ()) == true
260+ MOI. set (solver, MOCS. StopIfInfeasibleBounds (), false )
261+ @test MOI. get (solver, MOCS. StopIfInfeasibleBounds ()) == false
262+ MOI. compute_conflict! (solver)
263+ data = solver. results
264+ # the result is only one conflic again because the range fail cant be computed
265+ @test length (data) == 1
266+ @test _isequal_unordered (
267+ data[1 ]. constraints,
268+ [JuMP. index (LowerBoundRef (z)), JuMP. index (UpperBoundRef (z))],
269+ )
270+ return
271+ end
272+
243273function test_range_neg ()
244274 model = Model ()
245275 @variable (model, 10 <= x <= 11 )
0 commit comments