JuliaSmoothOptimizers / JuliaSmoothOptimizers/SolverTools.jl

How to handle NaNs?

Open
#124 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
24
Forks
18
PR merge metrics
No merged PRs in 30d

Description

Example:
```julia
julia> model = CUTEstModel("BENNETT5LS")
Minimization problem BENNETT5LS
nvar = 3, ncon = 0 (0 linear)

julia> x = model.meta.x0
3-element Array{Float64,1}:
-2000.0
50.0
0.8

julia> g = grad(model, x)
3-element Array{Float64,1}:
37.195399822788076
1518.022256935859
-478331.78119128384

julia> x1 = x - g
3-element Array{Float64,1}:
-2037.195399822788
-1468.022256935859
478332.5811912838

julia> obj(model, x1)
NaN
```
Solvers should be able to trap NaNs and return an appropriate status.

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.