JuliaNLSolvers / NLsolve.jl

Julia solvers for systems of nonlinear equations and mixed complementarity problems

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fixedpoint doesn't work with autodiff

amrods opened this issue · comments

Both of these throw an error:

fixedpoint(x -> 0.5*(2/x + x), [1.0]; autodiff=:true)
ERROR: TypeError: in keyword argument autodiff, expected Symbol, got a value of type Bool

fixedpoint(x -> 0.5*(2/x + x), [1.0]; autodiff=true)
ERROR: TypeError: in keyword argument autodiff, expected Symbol, got a value of type Bool

I think what happens is that fixedpoint calls nlsolve, but the latter takes autodiff=:forward as an option, rather than autodiff=:true as the documentation states. Specifically, this sentence in the Fixed Points section needs to be fixed:

  • Autodifferentiation is supported; e.g. fixedpoint(f!, init_x; method = :newton, autodiff = :true).