andes.core.discrete.Average#

class andes.core.discrete.Average(u, mode='step', delay=0, name=None, tex_name=None, info=None)[source]#

Compute the average value of a BaseVar over a period of time or a number of simulation steps.

Average is based on the memory implemented in the Delay class. The same modes as in Delay are supported.

The output of the Average class is named <INSTANCE_NAME>_v, where <INSTANCE_NAME> is the instance name of Average.

__init__(u, mode='step', delay=0, name=None, tex_name=None, info=None)#

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(dae_t, *args, **kwargs)

This function is called in l_update_var before 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