andes.core.block.GainLimiter#
- class andes.core.block.GainLimiter(u, K, R, lower, upper, no_lower=False, no_upper=False, sign_lower=1, sign_upper=1, allow_adjust=True, name=None, tex_name=None, info=None)[source]#
Gain followed by a limiter and another gain.
Exports the limited output y, unlimited output x, and HardLimiter lim.
┌─────┐ upper ┌─────┐ │ │ /¯¯¯¯¯ │ │ u -> │ K │ -> x / -> │ R │ -> y │ │ _____/ │ │ └─────┘ lower └─────┘- Parameters:
- ustr, BaseVar
Input variable, or an equation string for constructing an anonymous variable
- Kstr, BaseParam, BaseService
Initial gain for u before limiter
- Rstr, BaseParam, BaseService
Post limiter gain
- __init__(u, K, R, lower, upper, no_lower=False, no_upper=False, sign_lower=1, sign_upper=1, allow_adjust=True, name=None, tex_name=None, info=None)[source]#
Methods
define()TODO: write docstring
enforce_tex_name(fields)Enforce tex_name is not None
export()Method for exporting instances defined in this class in a dictionary.
f_numeric(**kwargs)Function call to update differential equation values.
g_numeric(**kwargs)Function call to update algebraic equation values.
j_numeric(**kwargs)Per-iteration numerical Jacobian update.
j_reset()Helper function to clear the lists holding the numerical Jacobians.
j_setup()One-time Jacobian sparsity pattern and constant value setup.
Attributes
class_nameReturn the class name.