Skip to content

Commit ee5319d

Browse files
committed
EPyT: Add missing EPANET 2.3 constants
1 parent 9269347 commit ee5319d

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

epanet_plus/epanet_toolkit.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ class EpanetConstants:
1414
"""
1515
EPANET and EPANET-MSX constants.
1616
"""
17+
EN_TRUE = 1
18+
EN_FALSE = 0
19+
1720
EN_MAXID = 31
1821
EN_MAXMSG = 255
1922
EN_ELEVATION = 0 # Elevation
@@ -43,7 +46,12 @@ class EpanetConstants:
4346
EN_TANKVOLUME = 24 # Current computed tank volume (read only)
4447
EN_MAXVOLUME = 25 # Tank maximum volume (read only)
4548
EN_CANOVERFLOW = 26 # Tank can overflow (= 1) or not (= 0)
46-
EN_DEMANDDEFICIT = 27
49+
EN_DEMANDDEFICIT = 27 # Amount that full demand is reduced under PDA (read only)
50+
EN_NODE_INCONTROL = 28 # `EN_TRUE` (= 1) if the node appears in any control, `EN_FALSE` (= 0) if not
51+
EN_EMITTERFLOW = 29 # Current emitter flow (read only)
52+
EN_LEAKAGEFLOW = 30 # Current leakage flow (read only)
53+
EN_DEMANDFLOW = 31 # Current consumer demand delivered (read only)
54+
EN_FULLDEMAND = 32 # Current consumer demand requested (read only)
4755

4856
EN_DIAMETER = 0 # Pipe/valve diameter
4957
EN_LENGTH = 1 # Pipe length
@@ -67,7 +75,14 @@ class EpanetConstants:
6775
EN_PUMP_HCURVE = 19 # Pump head v. flow curve index
6876
EN_PUMP_ECURVE = 20 # Pump efficiency v. flow curve index
6977
EN_PUMP_ECOST = 21 # Pump average energy price
70-
EN_PUMP_EPAT = 22
78+
EN_PUMP_EPAT = 22 # Pump energy price time pattern index
79+
EN_LINK_INCONTROL = 23 # Is present in any simple or rule-based control (= 1) or not (= 0)
80+
EN_GPV_CURVE = 24 # GPV head loss v. flow curve index
81+
EN_PCV_CURVE = 25 # PCV characteristic curve index
82+
EN_LEAK_AREA = 26 # Pipe leak area (sq mm per 100 length units)
83+
EN_LEAK_EXPAN = 27 # Leak expansion rate (sq mm per unit of pressure head)
84+
EN_LINK_LEAKAGE = 28 # Current leakage rate (read only)
85+
EN_VALVE_TYPE = 29 # Type of valve (see @ref EN_LinkType)
7186

7287
EN_DURATION = 0 # Total simulation duration
7388
EN_HYDSTEP = 1 # Hydraulic time step

0 commit comments

Comments
 (0)