Discrete.check_iter_err#

Discrete.check_iter_err(niter=None, err=None)[source]#

Check if the minimum iteration or maximum error is reached so that this discrete block should be enabled.

Only when both niter and err are given, (niter < min_iter) , and (err > err_tol) it will return False.

This logic will start checking the discrete states if called from an external solver that does not feed niter or err at each step.

Returns:
bool

True if it should be enabled, False otherwise