Hello Julia community
I’m having trouble with the convergence of NLsolve when solving a large system of linear equations (the transition between steady states in a heterogeneous-agent model in economics). Even in its simpler form (coarse grids, not many periods), the solver can’t seem to get past e-03/e-04 and I need at least e-07. I tried using AD but given I have many storage variables that have to be defined as arrays of DualNumbers, the speed decreased quite a bit and the precision didn’t change much. I used all the three method available in NLSolve and the accuracy was pretty much the same (though speed varied a lot, anderson being the fastest by far).
Matlab can solve the model reasonably fast using the standard fsolve with the Levenberg-Marquardt method, and I was wondering if there’s any reasonably straightforward way to use this for solving a nonlinear system in Julia. Alternatively, do you know any other solver that could be a better fit than NLsolve given my needs? I googled but didn’t find much besides JuMP (using the standard constant objective function trick), and given its solvers are installed independently I don’t wanna spend much time going through its setup if it’s not gonna be that good, so I rather ask you first.
TL;DR: I can’t get NLsolve to converge, are there good alternatives for solving large non-linear systems? (ideally suited for heterogeneous-agent economics models)
Thanks a lot in advance!