Optimization.jl icon indicating copy to clipboard operation
Optimization.jl copied to clipboard

Consolidate time limit options

Open jlperla opened this issue 3 years ago • 2 comments

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.

jlperla avatar Dec 23 '20 18:12 jlperla

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.

ChrisRackauckas avatar Dec 23 '20 18:12 ChrisRackauckas

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 or print_level or whatever you want to all it: This is a common one, and something we could just do our best on. For example, if print_level > 0 then set show_trace = true for Optim... use it directly as the verbosity in NLopt, and in knitro it is called outlev.
  • tolerance or more likely ftol and xtol 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.

jlperla avatar Dec 27 '20 14:12 jlperla