Skip to content

Commit 926af66

Browse files
Merge pull request #765 from SciML/Vaibhavdixit02-patch-1
Update `solve(::OptimizationProblem)` docstring
2 parents 121f4fc + 2e04e16 commit 926af66

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/solve.jl

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,11 @@ solve(prob::OptimizationProblem, alg::AbstractOptimizationAlgorithm, args...; kw
1818
The arguments to `solve` are common across all of the optimizers.
1919
These common arguments are:
2020
21-
- `maxiters` (the maximum number of iterations)
22-
- `maxtime` (the maximum of time the optimization runs for)
23-
- `abstol` (absolute tolerance in changes of the objective value)
24-
- `reltol` (relative tolerance in changes of the objective value)
25-
- `callback` (a callback function)
26-
27-
If the chosen global optimizer employs a local optimization method,
28-
a similar set of common local optimizer arguments exists.
29-
The common local optimizer arguments are:
30-
31-
- `local_method` (optimizer used for local optimization in global method)
32-
- `local_maxiters` (the maximum number of iterations)
33-
- `local_maxtime` (the maximum of time the optimization runs for)
34-
- `local_abstol` (absolute tolerance in changes of the objective value)
35-
- `local_reltol` (relative tolerance in changes of the objective value)
36-
- `local_options` (NamedTuple of keyword arguments for local optimizer)
21+
- `maxiters`: the maximum number of iterations
22+
- `maxtime`: the maximum amount of time (typically in seconds) the optimization runs for
23+
- `abstol`: absolute tolerance in changes of the objective value
24+
- `reltol`: relative tolerance in changes of the objective value
25+
- `callback`: a callback function
3726
3827
Some optimizer algorithms have special keyword arguments documented in the
3928
solver portion of the documentation and their respective documentation.
@@ -89,6 +78,17 @@ callback = function (state, l, pred; doplot = false) #callback function to obser
8978
return false
9079
end
9180
```
81+
82+
If the chosen method is a global optimizer that employs a local optimization
83+
method, a similar set of common local optimizer arguments exists. Look at `MLSL` or `AUGLAG`
84+
from NLopt for an example. The common local optimizer arguments are:
85+
86+
- `local_method`: optimizer used for local optimization in global method
87+
- `local_maxiters`: the maximum number of iterations
88+
- `local_maxtime`: the maximum amount of time (in seconds) the optimization runs for
89+
- `local_abstol`: absolute tolerance in changes of the objective value
90+
- `local_reltol`: relative tolerance in changes of the objective value
91+
- `local_options`: `NamedTuple` of keyword arguments for local optimizer
9292
"""
9393
function solve(prob::OptimizationProblem, alg, args...;
9494
kwargs...)::AbstractOptimizationSolution

0 commit comments

Comments
 (0)