# andes.core.var.Algeb#

class andes.core.var.Algeb(name: = None, tex_name: = None, info: = None, unit: = None, v_str: = None, v_iter: = None, e_str: = None, discrete: = None, v_setter: = False, e_setter: = False, v_str_add: = False, addressable: = True, export: = True, diag_eps: = 0.0, deps: = None, is_output: = False)[source]#

Algebraic variable class, an alias of `andes.core.var.BaseVar`.

Note that residual equations corresponding to algebraic variables are given in an implicit form.

Examples

When an algebraic variable `y` and the equation `y = x + z` shall be defined, use

```e_str = 'x + z - y'
```

because it expresses the equation `x + z - y = 0`. It is a common mistake to use `e_str = 'x + z'`, which will result in a singular Jacobian matrix because `d(x + z) / d(y)` is zero.

Attributes:
e_codestr

Equation code string, equals string literal `g`

v_codestr

Variable code string, equals string literal `y`

__init__(name: = None, tex_name: = None, info: = None, unit: = None, v_str: = None, v_iter: = None, e_str: = None, discrete: = None, v_setter: = False, e_setter: = False, v_str_add: = False, addressable: = True, export: = True, diag_eps: = 0.0, deps: = None, is_output: = False)#

Methods

 Reset the internal numpy arrays and flags. `set_address`(addr[, contiguous]) Set the address of internal variables. `set_arrays`(dae[, inplace, alloc]) Set the equation and values arrays.

Attributes