SciML / Optimization.jl

Mathematical Optimization in Julia. Local, global, gradient-based and derivative-free. Linear, Quadratic, Convex, Mixed-Integer, and Nonlinear Optimization in one simple, fast, and differentiable interface.
https://docs.sciml.ai/Optimization/stable/
MIT License
704 stars 77 forks source link

The help to solve does not explain the result. #587

Open knuds opened 11 months ago

knuds commented 11 months ago

When you type ?Optimization.solve you get a good overview of the arguments to solve.

But the result of solve: res=Optimization.solve(...) Is not explained !! I have seen res.u and res.minimizer used! But what is the difference ? Is there any other useful properties of res the users should know about ?

Vaibhavdixit02 commented 11 months ago

You'd have to do ?Optimization.OptimizationSolution which is probably not ideal, but there's no other way to do that, maybe the solve docstring can include it. Meanwhile you can look at the documentation https://docs.sciml.ai/Optimization/stable/API/optimization_solution/

knuds commented 11 months ago

I think the doc should say where to find info about the return type. The signature in the document are CommonSolve.solve(prob::ProblemType,alg::SolverType; kwargs...)::SolutionType But if I lookup ?SolutionType, ?CommonSolve.SolutionType or ?Optimization.SolutionType I get errors.

ChrisRackauckas commented 11 months ago

That is a good point. Indeed we should in the documentation of solve say what the expected return type is.