Optimization.jl
Optimization.jl copied to clipboard
Consolidate time limit options
Switching between Optim and BBO it is a pain to manually change between time_limit
and MaxTime
for the solve options. Not everything should be made consistent, but that (and the showtrace/etc.) should.
Yes, that is definitely an option we should consolidate. I just did a big docs overhaul today and noticed that we have only consolidated 3 arguments so far, so we need to do a bit more. Time limit is a good one.
OK, after sketching out a knitro one that I am hacking together, I propose a few additions if you are in the middle of this stuff:
-
verbosity
orprint_level
or whatever you want to all it: This is a common one, and something we could just do our best on. For example, ifprint_level > 0
then setshow_trace = true
for Optim... use it directly as theverbosity
in NLopt, and in knitro it is calledoutlev
. -
tolerance
or more likelyftol
andxtol
separately. Now this is a trickier one since tolerances don't always apply to optimization methods in the same way (or even, in the same library, the orders of magnitude are different). But it is still a complete hassle to go through and figure out which settings to flip for each optimizer... we could do our best on that one, even if they need to change the values when they swap optimizers. But they do that anyways so this would just make it easier.
Finally, when the sense
in #8 is implemented, lets not forget about a few common ones: least_squares
sense, which could be a good way for us to add least squares options for many of these optimizers, and constant
which is the way people just want to use the optimizer to solve a feasibility problem.