Skip to content

Conversation

blegat
Copy link
Member

@blegat blegat commented Dec 20, 2023

I looked at how to fix oxfordcontrol/COSMO.jl#185 and it starts being too hacky.
The time limit can be tweaked with two attributes, RawOptimizerAttribute("time_limit") or MOI.TimeLimitSec. Both attribute actually modify the same thing so they are kept in sync. Asking for get to return nothing is maybe a bit too much:

MOI.set(model, RawOptimizerAttribute("time_limit"), 0.0)
MOI.get(model MOI.TimeLimitSec()) # what should this return ?
MOI.set(model, MOI.TimeLimitSec(), nothing)
MOI.get(model MOI.TimeLimitSec()) # returns `nothing`
MOI.set(model, RawOptimizerAttribute("time_limit"), 0.0)
MOI.get(model MOI.TimeLimitSec()) # what should this return ?
MOI.set(model, RawOptimizerAttribute("time_limit"), 1.0)
MOI.get(model MOI.TimeLimitSec()) # what should this return ?

@odow
Copy link
Member

odow commented Dec 20, 2023

I'm okay with this. I've already added it to #2180.

@odow odow merged commit 61baf23 into master Dec 20, 2023
@odow odow deleted the bl/time_limit_sec branch December 20, 2023 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants