EN#
module wntr.epanet.util
- class EN[source]#
Bases:
IntEnum
All the
EN_
constants for the EPANET toolkit.For example,
EN_LENGTH
is accessed asEN.LENGTH
, instead. Please see the EPANET toolkit documentation for the description of these enums. Several enums are duplicated in separate classes above for clarity during programming.The enums can be broken in the following groups.
Node parameters:
ELEVATION
,BASEDEMAND
,PATTERN
,EMITTER
,INITQUAL
,SOURCEQUAL
,SOURCEPAT
,SOURCETYPE
,TANKLEVEL
,DEMAND
,HEAD
,PRESSURE
,QUALITY
,SOURCEMASS
,INITVOLUME
,MIXMODEL
,MIXZONEVOL
,TANKDIAM
,MINVOLUME
,VOLCURVE
,MINLEVEL,
,MAXLEVEL
,MIXFRACTION
,TANK_KBULK
,TANKVOLUME
,MAXVOLUME
Link parameters:
DIAMETER
,LENGTH
,ROUGHNESS
,MINORLOSS
,INITSTATUS
,INITSETTING
,KBULK
,KWALL
,FLOW
,VELOCITY
,HEADLOSS
,STATUS
,SETTING
,ENERGY
,LINKQUAL
,LINKPATTERN
Time parameters:
DURATION
,HYDSTEP
,QUALSTEP
,PATTERNSTEP
,PATTERNSTART
,REPORTSTEP
,REPORTSTART
,RULESTEP
,STATISTIC
,PERIODS
,STARTTIME
,HTIME
,HALTFLAG
,NEXTEVENT
Solver parameters:
ITERATIONS
,RELATIVEERROR
Component counts:
NODECOUNT
,TANKCOUNT
,LINKCOUNT
,PATCOUNT
,CURVECOUNT
,CONTROLCOUNT
Link types:
CVPIPE
,PIPE
,PUMP
,PRV
,PSV
,PBV
,FCV
,TCV
,GPV
Flow unit types:
CFS
,GPM
,MGD
,IMGD
,AFD
,LPS
,LPM
,MLD
,CMH
,CMD
Miscelaneous options:
TRIALS
,ACCURACY
,TOLERANCE
,EMITEXPON
,DEMANDMULT
Time statistic types:
NONE
,AVERAGE
,MINIMUM
,MAXIMUM
,RANGE
Pump behavior types:
CONST_HP
,POWER_FUNC
,CUSTOM
- __init__(*args, **kwds)#
- __new__(value)#
- as_integer_ratio()#
Return integer ratio.
Return a pair of integers, whose ratio is exactly equal to the original int and with a positive denominator.
>>> (10).as_integer_ratio() (10, 1) >>> (-10).as_integer_ratio() (-10, 1) >>> (0).as_integer_ratio() (0, 1)
- bit_count()#
Number of ones in the binary representation of the absolute value of self.
Also known as the population count.
>>> bin(13) '0b1101' >>> (13).bit_count() 3
- bit_length()#
Number of bits necessary to represent self in binary.
>>> bin(37) '0b100101' >>> (37).bit_length() 6
- conjugate()#
Returns self, the complex conjugate of any int.
- from_bytes(byteorder='big', *, signed=False)#
Return the integer represented by the given array of bytes.
- bytes
Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.
- byteorder
The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value. Default is to use ‘big’.
- signed
Indicates whether two’s complement is used to represent the integer.
- to_bytes(length=1, byteorder='big', *, signed=False)#
Return an array of bytes representing an integer.
- length
Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes. Default is length 1.
- byteorder
The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value. Default is to use ‘big’.
- signed
Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.
- ACCURACY = 1#
- AFD = 4#
- AGE = 2#
- AVERAGE = 1#
- BASEDEMAND = 1#
- CFS = 0#
- CHEM = 1#
- CMD = 9#
- CMH = 8#
- CONCEN = 0#
- CONST_HP = 0#
- CONTROLCOUNT = 5#
- CURVECOUNT = 4#
- CUSTOM = 2#
- CVPIPE = 0#
- DEMAND = 9#
- DEMANDMULT = 4#
- DIAMETER = 0#
- DURATION = 0#
- ELEVATION = 0#
- EMITEXPON = 3#
- EMITTER = 3#
- ENERGY = 13#
- FCV = 6#
- FIFO = 2#
- FLOW = 8#
- FLOWPACED = 3#
- GPM = 1#
- GPV = 8#
- HALTFLAG = 12#
- HEAD = 10#
- HEADLOSS = 10#
- HILEVEL = 1#
- HTIME = 11#
- HYDSTEP = 1#
- IMGD = 3#
- INITFLOW = 10#
- INITQUAL = 4#
- INITSETTING = 5#
- INITSTATUS = 4#
- INITVOLUME = 14#
- ITERATIONS = 0#
- JUNCTION = 0#
- KBULK = 6#
- KWALL = 7#
- LENGTH = 1#
- LIFO = 3#
- LINKCOUNT = 2#
- LINKPATTERN = 15#
- LINKQUAL = 14#
- LOWLEVEL = 0#
- LPM = 6#
- LPS = 5#
- MASS = 1#
- MAXIMUM = 3#
- MAXLEVEL = 21#
- MAXVOLUME = 25#
- MGD = 2#
- MINIMUM = 2#
- MINLEVEL = 20#
- MINORLOSS = 3#
- MINVOLUME = 18#
- MIX1 = 0#
- MIX2 = 1#
- MIXFRACTION = 22#
- MIXMODEL = 15#
- MIXZONEVOL = 16#
- MLD = 7#
- NEXTEVENT = 13#
- NODECOUNT = 0#
- NONE = 0#
- NOSAVE = 0#
- PATCOUNT = 3#
- PATTERN = 2#
- PATTERNSTART = 4#
- PATTERNSTEP = 3#
- PBV = 5#
- PERIODS = 9#
- PIPE = 1#
- POWER_FUNC = 1#
- PRESSURE = 11#
- PRV = 3#
- PSV = 4#
- PUMP = 2#
- QUALITY = 12#
- QUALSTEP = 2#
- RANGE = 4#
- RELATIVEERROR = 1#
- REPORTSTART = 6#
- REPORTSTEP = 5#
- RESERVOIR = 1#
- ROUGHNESS = 2#
- RULESTEP = 7#
- SAVE = 1#
- SETPOINT = 2#
- SETTING = 12#
- SOURCEMASS = 13#
- SOURCEPAT = 6#
- SOURCEQUAL = 5#
- SOURCETYPE = 7#
- STARTTIME = 10#
- STATISTIC = 8#
- STATUS = 11#
- TANK = 2#
- TANKCOUNT = 1#
- TANKDIAM = 17#
- TANKLEVEL = 8#
- TANKVOLUME = 24#
- TANK_KBULK = 23#
- TCV = 7#
- TIMEOFDAY = 3#
- TIMER = 2#
- TOLERANCE = 2#
- TRACE = 3#
- TRIALS = 0#
- VELOCITY = 9#
- VOLCURVE = 19#
- denominator#
the denominator of a rational number in lowest terms
- imag#
the imaginary part of a complex number
- numerator#
the numerator of a rational number in lowest terms
- real#
the real part of a complex number