Skip to content

Commit d6d21df

Browse files
committed
export AbstractSolver/solve!, add docstring
1 parent 86d710a commit d6d21df

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/SolverCore.jl

+1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ using NLPModels
88

99
include("logger.jl")
1010
include("stats.jl")
11+
include("solver.jl")
1112

1213
end

src/solver.jl

+19
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
1+
export AbstractSolver, solve!
2+
13
"Abstract type from which JSO solvers derive."
24
abstract type AbstractSolver end
35

6+
"""
7+
solve!(solver, model; kwargs...)
8+
solve!(solver, model, stats; kwargs...)
9+
10+
Apply `solver` to `model`.
11+
12+
# Arguments
13+
14+
- `solver::AbstractSolver`: solver structure to hold all storage necessary for a solve
15+
- `model::AbstractNLPModel`: the model solved, see `NLPModels.jl`
16+
- `stats::GenericExecutionStats`: stats structure to hold solution information.
17+
18+
The first invocation allocates and returns a new `GenericExecutionStats`.
19+
The second one fills out a preallocated stats structure and allows for efficient re-solves.
20+
21+
The `kwargs` are passed to the solver.
22+
"""
423
function solve!(solver::AbstractSolver, model::AbstractNLPModel; kwargs...)
524
stats = GenericExecutionStats(:unknown, model)
625
solve!(solver, model, stats; kwargs...)

0 commit comments

Comments
 (0)