Skip to content

Commit 65b9ca3

Browse files
authored
[Utilities] fix backwards compat of ConflictCount in MockOptimizer (#2800)
1 parent 3ab602a commit 65b9ca3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Utilities/mockoptimizer.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,12 @@ function MOI.set(
319319
::MOI.ConflictStatus,
320320
value::MOI.ConflictStatusCode,
321321
)
322+
if value == MOI.CONFLICT_FOUND && mock.conflict_count == 0
323+
# A backwards compatible change for JuMP, which set MOI.ConflictStatus
324+
# in its tests without setting MOI.ConflictCount (because the test was
325+
# writte prior to the introduction of MOI.ConflictCount).
326+
mock.conflict_count = 1
327+
end
322328
mock.conflict_status = value
323329
return
324330
end

0 commit comments

Comments
 (0)