Open Yuan-Ru-Lin opened 1 year ago
For unconstrained optimizer, there is a function default_options that can be extended to set default options of one's interests.
default_options
https://github.com/JuliaNLSolvers/Optim.jl/blob/1f1258c8499b57c6a551ef94057604bd58f1aa31/src/multivariate/optimize/interface.jl#L19-L27
An example is as follows.
import Optim: default_options using Optim: BFGS default_options(::BFGS) = (; extended_trace=true, callback=miunitstop)
The reason this is possible is because there are relevant handling in the most generic function:
https://github.com/JuliaNLSolvers/Optim.jl/blob/1f1258c8499b57c6a551ef94057604bd58f1aa31/src/multivariate/optimize/interface.jl#L83-L92
However, this is not true in the case of optimize that takes Fminbox as an argument:
optimize
Fminbox
https://github.com/JuliaNLSolvers/Optim.jl/blob/1f1258c8499b57c6a551ef94057604bd58f1aa31/src/multivariate/solvers/constrained/fminbox.jl#L259-L270
For unconstrained optimizer, there is a function
default_options
that can be extended to set default options of one's interests.https://github.com/JuliaNLSolvers/Optim.jl/blob/1f1258c8499b57c6a551ef94057604bd58f1aa31/src/multivariate/optimize/interface.jl#L19-L27
An example is as follows.
The reason this is possible is because there are relevant handling in the most generic function:
https://github.com/JuliaNLSolvers/Optim.jl/blob/1f1258c8499b57c6a551ef94057604bd58f1aa31/src/multivariate/optimize/interface.jl#L83-L92
However, this is not true in the case of
optimize
that takesFminbox
as an argument:https://github.com/JuliaNLSolvers/Optim.jl/blob/1f1258c8499b57c6a551ef94057604bd58f1aa31/src/multivariate/solvers/constrained/fminbox.jl#L259-L270