andes.core.discrete.LessThan#
- class andes.core.discrete.LessThan(u, bound, equal=False, enable=True, name=None, tex_name=None, info: str = None, cache: bool = False, z0=0, z1=1)[source]#
Less than (<) comparison function that tests if
u < bound.Exports two flags: z1 and z0. For elements satisfying the less-than condition, the corresponding z1 = 1. z0 is the element-wise negation of z1.
Notes
The default z0 and z1, if not enabled, can be set through the constructor. By default, the model will not adjust the limit.
- __init__(u, bound, equal=False, enable=True, name=None, tex_name=None, info: str = None, cache: bool = False, z0=0, z1=1)[source]#
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(*args, **kwargs)If enabled, set flags based on inputs.
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