Skip to content

Commit

Permalink
Fix get for MOI.TimeLimitSec
Browse files Browse the repository at this point in the history
  • Loading branch information
odow authored Sep 14, 2023
1 parent 9cbaba6 commit 4455932
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,8 @@ function MOI.set(optimizer::Optimizer{T}, attr::MOI.TimeLimitSec, ::Nothing) whe
MOI.set(optimizer, MOI.RawOptimizerAttribute("time_limit"), zero(T))
end
function MOI.get(optimizer::Optimizer, ::MOI.TimeLimitSec)
return MOI.get(optimizer, MOI.RawOptimizerAttribute("time_limit"))
limit = MOI.get(optimizer, MOI.RawOptimizerAttribute("time_limit"))
return iszero(limit) ? nothing : limit
end

"""
Expand Down

0 comments on commit 4455932

Please sign in to comment.