HydraulicVariable#

module wntr.msx.elements

class HydraulicVariable[source]#

Bases: ReservedName

Reserved name for hydraulic variables

The user should not need to create any variables using this class, they are created automatically by the MsxModel object during initialization.

Parameters:
  • name (str) – Name of the variable (predefined by MSX)

  • units – Units for hydraulic variable, by default None

  • note (str | dict | wntr.epanet.util.ENcomment) – Supplementary information regarding this variable, by default None


__init__(name, units=None, *, 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:
  • name (str) – Name/symbol for the variable. Must be a valid MSX variable name

  • note ((str | dict | ENcomment), optional keyword) – Supplementary information regarding this variable, by default None (see-also NoteType)

Raises:
to_dict()#

Represent the object as a dictionary

name: str#

Name/ID of this variable, must be a valid EPANET/MSX ID

note: str | dict | ENcomment#

Optional note regarding the variable (see NoteType)

units: str#

Hydraulic variable’s units

property var_type: VariableType#

Type of variable, RESERVED.