ExpressionType#

module wntr.msx.base

class ExpressionType[source]#

Bases: Enum

Type of reaction expression

The following types are defined, and aliases of just the first character are also defined.

Enum Members

EQUIL

Equilibrium expressions where equation is being equated to zero

RATE

Rate expression where the equation expresses the rate of change of the given species with respect to time as a function of the other species in the model

FORMULA

Formula expression where the concentration of the named species is a simple function of the remaining species

Class Methods

get

Get the proper enum based on the name or value of the argument.


classmethod get(value, *, prefix='', abbrev=True, allow_none=True)#

Get the proper enum based on the name or value of the argument.

See add_get() for details on how this function works.

Parameters:
  • value (Union[str, int, Enum]) – the value to be checked, if it is an Enum, then the name will be used

  • prefix (str, optional) – a prefix to strip from the beginning of value, default blank or set by decorator

  • abbrev (bool, optional) – whether to try a single-letter version of value, default False or set by decorator

  • allow_none (bool, optional) – passing None will return None, otherwise will raise TypeError, default True or set by decorator

Returns:

the enum member that corresponds to the name or value passed in

Return type:

Enum

Raises:
E = 1#
EQUIL = 1#

Equilibrium expressions where equation is being equated to zero

F = 3#
FORMULA = 3#

Formula expression where the concentration of the named species is a simple function of the remaining species

R = 2#
RATE = 2#

Rate expression where the equation expresses the rate of change of the given species with respect to time as a function of the other species in the model