andes.core.discrete.HardLimiter#
- class andes.core.discrete.HardLimiter(u, lower, upper, enable=True, name: str = None, tex_name: str = None, info: str = None, min_iter: int = 2, err_tol: float = 0.01, allow_adjust: bool = True, no_lower=False, no_upper=False, sign_lower=1, sign_upper=1, equal=True, no_warn=False, zu=0.0, zl=0.0, zi=1.0)[source]#
Hard limiter for algebraic or differential variable. This class is an alias of Limiter.
- __init__(u, lower, upper, enable=True, name: str = None, tex_name: str = None, info: str = None, min_iter: int = 2, err_tol: float = 0.01, allow_adjust: bool = True, no_lower=False, no_upper=False, sign_lower=1, sign_upper=1, equal=True, no_warn=False, zu=0.0, zl=0.0, zi=1.0)#
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([allow_adjust, adjust_lower, ...])Check the input variable and set flags.
do_adjust_lower(val, lower[, allow_adjust, ...])Adjust the lower limit.
do_adjust_upper(val, upper[, allow_adjust, ...])Adjust the upper limit.
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 the discrete flags specified in self.export_flags.
save_unconstrained()Save the input variable's unconstrained value (call after init pass 1).
Attributes
class_name