MsxReactionSystem#
module wntr.msx.model
- class MsxReactionSystem[source]#
Bases:
ReactionSystemBase
Registry for all the variables registered in the multi-species reactions model.
This object can be used like a mapping.
- __init__()[source]#
Constructor for the reaction system.
Make sure you call this method from your concrete subclass
__init__
method:super().__init__()
- add_variable(variable)[source]#
Add a variable object to the registry.
The appropriate group is determined by querying the object’s var_type attribute.
- Parameters:
variable (Constant | HydraulicVariable | MathFunction | Parameter | Species | Term) – Variable to add.
- Raises:
TypeError – If variable is not an MsxVariable
KeyExistsError – If variable has a name that is already used in the registry