If you use StoppingInterface.jl in your work, please cite using the format given in CITATION.bib.
pkg> add StoppingInterface
You need to first add using Knitro, NLPModelsKnitro
before calling the function knitro
.
using ADNLPModels, JSOSolvers, Stopping, StoppingInterface
# Rosenbrock
nlp = ADNLPModel(x -> (x[1] - 1)^2 + 100 * (x[2] - x[1]^2)^2, [-1.2; 1.0])
stp = NLPStopping(nlp)
lbfgs(stp) # update and returns `stp`
stp.current_state.x # contains the solution
stp.current_state.fx # contains the optimal value
stp.current_state.gx # contains the gradient
We refer to Stopping.jl for more documentation and StoppingTutorials.jl for tutorials.
If you think you found a bug, feel free to open an issue. Focused suggestions and requests can also be opened as issues. Before opening a pull request, start an issue or a discussion on the topic, please.