-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maxtime and compilation #190
Comments
What would you expect to happen? I don't think NLopt can tell whether the time is because of a long-running function, or because of compilation. It can only terminate once |
That's fair; if Julia had the ability to track non-compilation elapsed time, NLopt.jl could detect this condition and try again. |
No, the maxtime is actually based on a feature from the NLopt C library — it is just wall-clock time. Mainly, I find it useful for global optimization (where there aren't good stopping criteria), e.g. "give me the best possible result in 3 hours". But usually in this situation the |
I understand it's used by NLopt C library, but the Julia library could handle the exceptional condition specific to Julia. I've used |
Did you consider doing this? Or run NLopt twice? Once with a time limit of |
Sure I could. That's just annoying 😆 |
You could also just use |
I'm setting
maxtime
to avoid an occasional infinite cycle on some inputs, but it triggers during the first execution due to compilation of the objective function.The text was updated successfully, but these errors were encountered: