Skip to content

Commit

Permalink
Docs: adjust callback function explanation (#1113)
Browse files Browse the repository at this point in the history
* Docs: adjust callback function explanation

* Update docs/src/user/config.md

---------

Co-authored-by: Patrick Kofod Mogensen <[email protected]>
  • Loading branch information
tuncbkose and pkofod authored Oct 29, 2024
1 parent 577fbde commit 1473f37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/user/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ In addition to the solver, you can alter the behavior of the Optim package by us
* `show_warnings`: Should warnings due to NaNs or Inf be shown? Defaults to `true`.
* `trace_simplex`: Include the full simplex in the trace for `NelderMead`. Defaults to `false`.
* `show_every`: Trace output is printed every `show_every`th iteration.
* `callback`: A function to be called during tracing. A return value of `true` stops the `optimize` call. The callback function is called every `show_every`th iteration. If `store_trace` is false, the argument to the callback is of the type [`OptimizationState`](https://github.com/JuliaNLSolvers/Optim.jl/blob/a1035134ca1f3ebe855f1cde034e32683178225a/src/types.jl#L155), describing the state of the current iteration. If `store_trace` is true, the argument is a list of all the states from the first iteration to the current.
* `callback`: A function to be called during tracing. The return value should be a boolean, where `true` will stop the `optimize` call early. The callback function is called every `show_every`th iteration. If `store_trace` is false, the argument to the callback is of the type [`OptimizationState`](https://github.com/JuliaNLSolvers/Optim.jl/blob/a1035134ca1f3ebe855f1cde034e32683178225a/src/types.jl#L155), describing the state of the current iteration. If `store_trace` is true, the argument is a list of all the states from the first iteration to the current.
* `time_limit`: A soft upper limit on the total run time. Defaults to `NaN` (unlimited).

Box constrained optimization has additional keywords to alter the behavior of the outer solver:
Expand Down

0 comments on commit 1473f37

Please sign in to comment.