Skip to content

Commit

Permalink
Update documentation of solve!
Browse files Browse the repository at this point in the history
  • Loading branch information
tmigot committed Apr 5, 2024
1 parent 14064ea commit 18a32f9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/method.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 18a32f9

Please sign in to comment.