﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5602	Improved diagnostics to avoid nonlinear solver failures	Francesco Casella	Karim Adbdelhak	"The success of iterative nonlinear solvers depends on the quality of the initial guess values, which are given by the {{{start}}} attributes.

To this purpose, we already issue a warning if there are iteration variables which have a default zero value, which may be problematic in some cases.

It turns out, not all iteration variables are equally important. In fact, the convergence only depends on those variables that ''directly or indirectly affect the Jacobian'' of the system. In some problems (e.g. power system models) there are often large amounts of linear equations, whose variables do not affect the Jacobian - taking care of giving them good initial guesses is a complete waste of time, as it is poring over their actual initial guesses upon debugging.

I would then suggest to implement some features that will really help to pinpoint the causes of failure of nonlinear solvers much easier than it is possible now:

1. Make available a dump of the tearing variables of each nonlinear system of equations that have an influence on the values of the jacobian matrix.

2. When dumping the values of iteration variables during solver iterations ({{{LOG_NLS_V}}}), print a separate list of values of the the sets of point 1, so that it becomes much faster to scan them and to look for potentially dangerous values.

3. Suppress the warning ""Iteration variables with default zero start attribute in equation system with analytic Jacobian"" for variables not belonging to the sets of point 1, as they cannot do any harm.

Later on, these information will be integrated into the debugger, together with the SVD analysis of the Jacobian, to provide user-friendly information to pinpoint the causes of nonlinear solver failures. I need these three features to start experimenting with some ideas and to come up with a prototype of the more advanced debugger features.
"	enhancement	closed	critical	1.14.0	Backend		fixed		
