andes.core.discrete.Discrete#

class andes.core.discrete.Discrete(name=None, tex_name=None, info=None, no_warn=False, min_iter=2, err_tol=0.01)[source]#

Base discrete class.

Discrete classes export flag arrays (usually boolean) .

__init__(name=None, tex_name=None, info=None, no_warn=False, min_iter=2, err_tol=0.01)[source]#

Methods

check_eq(**kwargs)

This function is called in l_check_eq after updating equations.

check_iter_err([niter, err])

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

check_var(*args, **kwargs)

This function is called in l_update_var before evaluating equations.

get_names()

Available symbols from this class

get_tex_names()

Return tex_names of exported flags.

get_values()

list2array(n)

Allocate memory for the discrete flags specified in self.export_flags.

warn_init_limit()

Warn if associated variables are initialized at limits.

Attributes