From d7a8a131349ef866c9c1da829710f3ae16ffb2a9 Mon Sep 17 00:00:00 2001 From: metab0t Date: Fri, 20 Oct 2023 20:39:39 +0800 Subject: [PATCH] Add new status code --- src/MOI_wrapper/MOI_wrapper.jl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/MOI_wrapper/MOI_wrapper.jl b/src/MOI_wrapper/MOI_wrapper.jl index 8961c0b..ad8243b 100644 --- a/src/MOI_wrapper/MOI_wrapper.jl +++ b/src/MOI_wrapper/MOI_wrapper.jl @@ -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) @@ -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