ReactionSystemBase#
module wntr.msx.base
- class ReactionSystemBase[source]#
Bases:
ABC
Abstract class for reaction systems, which contains variables and reaction expressions.
This class contains the functions necessary to perform dictionary-style addressing of variables by their name. It does not allow dictionary-style addressing of reactions.
This is an abstract class with some concrete attributes and methods. Parameters and methods documented here must be defined by a subclass except for the following:
Concrete attributes
The
__init__()
method defines the following attributes concretely. Thus, a subclass should callsuper().__init__()
orsuper().__init__(filename)
._vars
Variables registry, which is mapped to dictionary functions on the reaction system object
_rxns
Reactions dictionary
Concrete methods
The following special methods are concretely provided to directly access items in the
_vars
attribute.__contains__
__eq__
Return self==value.
__ne__
Return self!=value.
__getitem__
__iter__
__len__