optimize: Combine Global and Local
Created by: btracey
Following some offline discussions with @vladimir-ch , I think optimize.Global
and optimize.Local
should be combined into a single call, optimize.Minimize
. The two function calls use a largely overlapping code and interface at the moment. The two major differences are that 1) Local is only serial 2) Local takes in an initial location while global does not. The second is easily adjusted by adding a field to Settings, and saying that all 0s is the initial location by default. The first will add a bit of overhead to calls to local, but I think this cost will be made up for by making the optimize package easier to use (a single function rather than two, a single Method
interface rather than two, etc.), making there be less code overall, and I suspect there will be significant improvement in the legibility of Local methods that comes along.