Skip to content

Commit 6e12c8a

Browse files
authored
Follow-up to #623 to use an actually unbounded model (#624)
The previous example is only unbounded because of a bug in Gurobi
1 parent d86822c commit 6e12c8a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/MOI/MOI_wrapper.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,12 +1608,12 @@ function test_multiple_solutions_when_dual_infeasible()
16081608
x, _ = MOI.add_constrained_variable(model, MOI.Interval(0.0, 1.0))
16091609
y = MOI.add_variable(model)
16101610
MOI.set(model, MOI.ObjectiveSense(), MOI.MIN_SENSE)
1611-
f = 0.25 * y * y - 1.0 * x * y - 1.0 * y + 1.0
1611+
f = 1.0 * x * y - 1.0 * y * y
16121612
MOI.set(model, MOI.ObjectiveFunction{typeof(f)}(), f)
16131613
MOI.optimize!(model)
16141614
@test MOI.get(model, MOI.TerminationStatus()) == MOI.DUAL_INFEASIBLE
1615-
for i in MOI.get(model, MOI.ResultCount())
1616-
@test MOI.get(model, MOI.PrimalStatus()) == MOI.FEASIBLE_POINT
1615+
for i in 1:MOI.get(model, MOI.ResultCount())
1616+
@test MOI.get(model, MOI.PrimalStatus(i)) == MOI.FEASIBLE_POINT
16171617
end
16181618
return
16191619
end

0 commit comments

Comments
 (0)