Skip to content

Commit

Permalink
Add new status code
Browse files Browse the repository at this point in the history
  • Loading branch information
metab0t committed Oct 20, 2023
1 parent 3835e89 commit d7a8a13
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/MOI_wrapper/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2763,6 +2763,14 @@ const _RAW_STATUS_STRINGS = [
MOI.OBJECTIVE_LIMIT,
"User specified an objective limit (a bound on either the best objective or the best bound), and that limit has been reached.",
),
(
MOI.TIME_LIMIT,
"Optimization terminated because the work expended exceeded the value specified in the WorkLimit parameter.",
),
(
MOI.MEMORY_LIMIT,
"Optimization terminated because the total amount of allocated memory exceeded the value specified in the SoftMemLimit parameter.",
),
]

function _raw_status(model::Optimizer)
Expand All @@ -2772,7 +2780,7 @@ function _raw_status(model::Optimizer)
valueP = Ref{Cint}()
ret = GRBgetintattr(model, "Status", valueP)
_check_ret(model, ret)
@assert 1 <= valueP[] <= 15
@assert 1 <= valueP[] <= 17
return _RAW_STATUS_STRINGS[valueP[]]
end

Expand Down

0 comments on commit d7a8a13

Please sign in to comment.