JuliaSmoothOptimizers / JuliaSmoothOptimizers/JSOSuite.jl

Select which solver to use by default according to user parameters

Open
#18 0 comments 1 reaction 0 assignees View on GitHub
user-facing
Dominant language
Julia
Stars
22
Forks
9
PR merge metrics
No merged PRs in 30d

Description

When the user doesn't know the solver but wants to have an intermediate level of control, e.g., `fminunc(f)` could mean use Nelder-Mead or use LBFGS/Newton with automatic differentiation.
We can try to set this with [Value types](https://docs.julialang.org/en/v1/manual/types/#%22Value-types%22-1)

```julia
# For instance
function fminunc(f, ::Val{:no_derivative})
fminunc(f, solver=:nelder_mead)
end

function fminunc(f, ::Val{:first_derivative})
fminunc(f, solver=:lbfgs)
end

fminunc(f, s::Symbol) = fminunc(f, Val(s))
```

cf. @RenanOD

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.