8000 No sol.stats for NLopt · Issue #625 · SciML/Optimization.jl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

No sol.stats for NLopt #625

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
QinyingChen opened this issue Nov 6, 2023 · 4 comments
Closed

No sol.stats for NLopt #625

QinyingChen opened this issue Nov 6, 2023 · 4 comments

Comments

@QinyingChen
Copy link
rosenbrock(x, p) = (p[1] - x[1])^2 + p[2] * (x[2] - x[1]^2)^2
x0 = zeros(2)
p = [1.0, 100.0]
f = OptimizationFunction(rosenbrock, Optimization.AutoForwardDiff())
prob = Optimization.OptimizationProblem(f, x0, p, lb = [-1.0, -1.0], ub = [1.0, 1.0])
sol = solve(prob, NLopt.LD_LBFGS())

This is the example from NLopt.jl tutorial page. I would expect to have sol.stats to work, for example, showing me how many iterations it takes, and so on. But it shows nothing. Any help is appreciated. Thanks.

@Vaibhavdixit02
Copy link
Member

We don't have sol.stats implemented yet unfortunately. It's on the todo list!

@Vaibhavdixit02
Copy link
Member

You have the original result from the solver package in the sol.original field, I think NLopt doesn't really give a lot of output but you could dig around in its docs to see how to obtain the information you want from that object

@Vaibhavdixit02
Copy link
Member

This is now implemented and should be accessible in sol

@QinyingChen
Copy link
Author

Thank you for the update. Appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0