Arguments
iteration
The iteration to consider -- in most cases, this will be the
current iteration during a simulation run, however, the check can also be
applied to a model output retroactively, and the iteration specified
manually.
current_energy
The current energy level within the network
memory.matrix
A matrix of iteration, energy and node states (in
columns, in that order), across all previous iterations (in rows).
stability_criterion
Criterion for stability. Changes below this value
are no longer considered significant, and ten iterations without significant changes
to the energy level in succession will trigger the convergence check.
output
Either 'qualitative'
(default), in which case the check
returns a boolean value representing whether it has passed or not, or
'quantitative'
, in which case the number of checked trials for which
the convergence criterion was met is returned. This last option is of most
value for debugging convergence.