Optimization.jl
Optimization.jl copied to clipboard
Uniform solution type
In the SciML interfaces, all problems and solutions live in SciMLBase (as of... yesterday 😄).
They satisfy the solution interface too:
https://github.com/SciML/SciMLBase.jl/blob/master/src/solutions/solution_interface.jl
I think we should get this return type into there, and make it follow the results of the other solutions, namely:
- The return array is named
u
: that would be theminimizer
here. To be non-breaking it could be good to alias.minimizer
to.u
with agetproperty
overload. - We can have a special
.minimum
- It should have overloads to the
build_solution
function - It can have
.original
for keeping the original output struct of the other optimizers - It should be an
AbstractNoTimeSolution
? - It might want special overloads to printing and such, but follow the same general flow.
- It should interpret things into the standard retcodes.
- Matching the ODE solver, stuff like
iterations
might make sense in a.stats
OptimizationStatistics
.
So I think a lot of https://github.com/SciML/GalacticOptim.jl/blob/master/src/solve.jl#L2-L28 should be copied over to be the basis of this change, but just a few tweaks to bring it in line with the more general AbstractSolution
interface.
Thanks for the concrete list! I especially like the idea with .original
because there are quite a few interesting details in the original output (in some cases).