MathFunction#
module wntr.msx.elements
- class MathFunction[source]#
Bases:
ReservedName
Reserved name for math functions
- Parameters:
name (str) – Function name
func – Callable function
note (str | dict | wntr.epanet.util.ENcomment) – Supplementary information regarding this variable, by default None
- __init__(name, func, *, note=None)[source]#
Variable ABC init method.
Make sure you call this method from your concrete subclass
__init__
method:super().__init__(name, note=note)
- Parameters:
- Raises:
KeyExistsError – Name is already taken
ValueError – Name is a reserved word
- to_dict()#
Represent the object as a dictionary
- func: callable#
A callable function or SymPy function
- property var_type: VariableType#
Type of variable,
RESERVED
.