From 18a32f955c85a8ce996baa39157f247cc48d25bc Mon Sep 17 00:00:00 2001 From: tmigot Date: Fri, 5 Apr 2024 13:52:04 +0200 Subject: [PATCH] Update documentation of `solve!` --- src/method.jl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/method.jl b/src/method.jl index 8281ba5..7797fba 100644 --- a/src/method.jl +++ b/src/method.jl @@ -75,6 +75,10 @@ For advanced usage, first define a `PercivalSolver` to preallocate the memory us solver = PercivalSolver(nlp) solve!(solver, nlp) + stats = GenericExecutionStats(nlp) + solver = PercivalSolver(nlp) + solve!(solver, nlp, stats) + # Arguments - `nlp::AbstractNLPModel{T, V}` is the model to solve, see `NLPModels.jl`. @@ -132,10 +136,11 @@ stats = percival(nlp) "Execution stats: first-order stationary" ``` ```jldoctest -using Percival, ADNLPModels +using Percival, ADNLPModels, SolverCore nlp = ADNLPModel(x -> sum(x.^2), ones(3), x -> [x[1]], zeros(1), zeros(1)) +stats = GenericExecutionStats(nlp) solver = PercivalSolver(nlp) -stats = solve!(solver, nlp) +stats = solve!(solver, nlp, stats) # output