andes.core.discrete.Delay#
- class andes.core.discrete.Delay(u, mode='step', delay=0, name=None, tex_name=None, info=None)[source]#
The delay class.
Delay allows to impose a predefined and fixed "delay" (in either steps or seconds) for an input variable. The amount of delay must be a scalar and has to be given when instantiating the Delay class when defining the model.
Delay implements an internal memorize to store past variable values.
The default delay mode is step but can be set to time. In the time mode, the value at the
current time - delaywill be interpolated based on the two nearest times and values.Delay can be applied to a state or an algebraic variable. The exported variable is named
<INSTANCE_NAME>_v, where <INSTANCE_NAME> is the name of the Delay instance.Methods
check_eq(**kwargs)This function is called in
l_check_eqafter 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(dae_t, *args, **kwargs)This function is called in
l_update_varbefore evaluating equations.get_limit_report()Return a list of dicts describing variables clamped at limits.
get_names()Available symbols from this class
get_tex_names()Return tex_names of exported flags.
get_values()list2array(n)Allocate memory for storage arrays.
save_unconstrained()Save the input variable's unconstrained value (call after init pass 1).
Attributes
class_name