epyt-flow 0.14.1__py3-none-any.whl → 0.15.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. epyt_flow/VERSION +1 -1
  2. epyt_flow/__init__.py +0 -37
  3. epyt_flow/data/benchmarks/battledim.py +2 -2
  4. epyt_flow/data/benchmarks/leakdb.py +12 -9
  5. epyt_flow/gym/scenario_control_env.py +32 -33
  6. epyt_flow/simulation/events/actuator_events.py +24 -18
  7. epyt_flow/simulation/events/leakages.py +59 -57
  8. epyt_flow/simulation/events/quality_events.py +21 -30
  9. epyt_flow/simulation/events/system_event.py +3 -3
  10. epyt_flow/simulation/scada/complex_control.py +14 -12
  11. epyt_flow/simulation/scada/custom_control.py +22 -21
  12. epyt_flow/simulation/scada/scada_data.py +108 -105
  13. epyt_flow/simulation/scada/simple_control.py +38 -31
  14. epyt_flow/simulation/scenario_simulator.py +368 -395
  15. epyt_flow/simulation/sensor_config.py +31 -32
  16. epyt_flow/topology.py +11 -10
  17. epyt_flow/uncertainty/model_uncertainty.py +146 -122
  18. epyt_flow/utils.py +66 -0
  19. epyt_flow/visualization/visualization_utils.py +4 -2
  20. {epyt_flow-0.14.1.dist-info → epyt_flow-0.15.0.dist-info}/METADATA +14 -19
  21. epyt_flow-0.15.0.dist-info/RECORD +65 -0
  22. epyt_flow/EPANET/EPANET/SRC_engines/AUTHORS +0 -60
  23. epyt_flow/EPANET/EPANET/SRC_engines/LICENSE +0 -21
  24. epyt_flow/EPANET/EPANET/SRC_engines/enumstxt.h +0 -151
  25. epyt_flow/EPANET/EPANET/SRC_engines/epanet.c +0 -5930
  26. epyt_flow/EPANET/EPANET/SRC_engines/epanet2.c +0 -961
  27. epyt_flow/EPANET/EPANET/SRC_engines/errors.dat +0 -79
  28. epyt_flow/EPANET/EPANET/SRC_engines/flowbalance.c +0 -186
  29. epyt_flow/EPANET/EPANET/SRC_engines/funcs.h +0 -219
  30. epyt_flow/EPANET/EPANET/SRC_engines/genmmd.c +0 -1000
  31. epyt_flow/EPANET/EPANET/SRC_engines/hash.c +0 -177
  32. epyt_flow/EPANET/EPANET/SRC_engines/hash.h +0 -28
  33. epyt_flow/EPANET/EPANET/SRC_engines/hydcoeffs.c +0 -1303
  34. epyt_flow/EPANET/EPANET/SRC_engines/hydraul.c +0 -1172
  35. epyt_flow/EPANET/EPANET/SRC_engines/hydsolver.c +0 -781
  36. epyt_flow/EPANET/EPANET/SRC_engines/hydstatus.c +0 -442
  37. epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2.h +0 -464
  38. epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_2.h +0 -1960
  39. epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_enums.h +0 -518
  40. epyt_flow/EPANET/EPANET/SRC_engines/inpfile.c +0 -884
  41. epyt_flow/EPANET/EPANET/SRC_engines/input1.c +0 -672
  42. epyt_flow/EPANET/EPANET/SRC_engines/input2.c +0 -735
  43. epyt_flow/EPANET/EPANET/SRC_engines/input3.c +0 -2265
  44. epyt_flow/EPANET/EPANET/SRC_engines/leakage.c +0 -527
  45. epyt_flow/EPANET/EPANET/SRC_engines/mempool.c +0 -146
  46. epyt_flow/EPANET/EPANET/SRC_engines/mempool.h +0 -24
  47. epyt_flow/EPANET/EPANET/SRC_engines/output.c +0 -853
  48. epyt_flow/EPANET/EPANET/SRC_engines/project.c +0 -1691
  49. epyt_flow/EPANET/EPANET/SRC_engines/quality.c +0 -695
  50. epyt_flow/EPANET/EPANET/SRC_engines/qualreact.c +0 -800
  51. epyt_flow/EPANET/EPANET/SRC_engines/qualroute.c +0 -696
  52. epyt_flow/EPANET/EPANET/SRC_engines/report.c +0 -1557
  53. epyt_flow/EPANET/EPANET/SRC_engines/rules.c +0 -1500
  54. epyt_flow/EPANET/EPANET/SRC_engines/smatrix.c +0 -871
  55. epyt_flow/EPANET/EPANET/SRC_engines/text.h +0 -508
  56. epyt_flow/EPANET/EPANET/SRC_engines/types.h +0 -928
  57. epyt_flow/EPANET/EPANET/SRC_engines/util/cstr_helper.c +0 -59
  58. epyt_flow/EPANET/EPANET/SRC_engines/util/cstr_helper.h +0 -38
  59. epyt_flow/EPANET/EPANET/SRC_engines/util/errormanager.c +0 -92
  60. epyt_flow/EPANET/EPANET/SRC_engines/util/errormanager.h +0 -39
  61. epyt_flow/EPANET/EPANET/SRC_engines/util/filemanager.c +0 -212
  62. epyt_flow/EPANET/EPANET/SRC_engines/util/filemanager.h +0 -81
  63. epyt_flow/EPANET/EPANET/SRC_engines/validate.c +0 -408
  64. epyt_flow/EPANET/EPANET-MSX/MSX_Updates.txt +0 -53
  65. epyt_flow/EPANET/EPANET-MSX/Src/dispersion.h +0 -27
  66. epyt_flow/EPANET/EPANET-MSX/Src/hash.c +0 -107
  67. epyt_flow/EPANET/EPANET-MSX/Src/hash.h +0 -28
  68. epyt_flow/EPANET/EPANET-MSX/Src/include/epanetmsx.h +0 -102
  69. epyt_flow/EPANET/EPANET-MSX/Src/include/epanetmsx_export.h +0 -42
  70. epyt_flow/EPANET/EPANET-MSX/Src/mathexpr.c +0 -937
  71. epyt_flow/EPANET/EPANET-MSX/Src/mathexpr.h +0 -39
  72. epyt_flow/EPANET/EPANET-MSX/Src/mempool.c +0 -204
  73. epyt_flow/EPANET/EPANET-MSX/Src/mempool.h +0 -24
  74. epyt_flow/EPANET/EPANET-MSX/Src/msxchem.c +0 -1285
  75. epyt_flow/EPANET/EPANET-MSX/Src/msxcompiler.c +0 -368
  76. epyt_flow/EPANET/EPANET-MSX/Src/msxdict.h +0 -42
  77. epyt_flow/EPANET/EPANET-MSX/Src/msxdispersion.c +0 -586
  78. epyt_flow/EPANET/EPANET-MSX/Src/msxerr.c +0 -116
  79. epyt_flow/EPANET/EPANET-MSX/Src/msxfile.c +0 -260
  80. epyt_flow/EPANET/EPANET-MSX/Src/msxfuncs.c +0 -175
  81. epyt_flow/EPANET/EPANET-MSX/Src/msxfuncs.h +0 -35
  82. epyt_flow/EPANET/EPANET-MSX/Src/msxinp.c +0 -1504
  83. epyt_flow/EPANET/EPANET-MSX/Src/msxout.c +0 -401
  84. epyt_flow/EPANET/EPANET-MSX/Src/msxproj.c +0 -791
  85. epyt_flow/EPANET/EPANET-MSX/Src/msxqual.c +0 -2010
  86. epyt_flow/EPANET/EPANET-MSX/Src/msxrpt.c +0 -400
  87. epyt_flow/EPANET/EPANET-MSX/Src/msxtank.c +0 -422
  88. epyt_flow/EPANET/EPANET-MSX/Src/msxtoolkit.c +0 -1164
  89. epyt_flow/EPANET/EPANET-MSX/Src/msxtypes.h +0 -551
  90. epyt_flow/EPANET/EPANET-MSX/Src/msxutils.c +0 -524
  91. epyt_flow/EPANET/EPANET-MSX/Src/msxutils.h +0 -56
  92. epyt_flow/EPANET/EPANET-MSX/Src/newton.c +0 -158
  93. epyt_flow/EPANET/EPANET-MSX/Src/newton.h +0 -34
  94. epyt_flow/EPANET/EPANET-MSX/Src/rk5.c +0 -287
  95. epyt_flow/EPANET/EPANET-MSX/Src/rk5.h +0 -39
  96. epyt_flow/EPANET/EPANET-MSX/Src/ros2.c +0 -293
  97. epyt_flow/EPANET/EPANET-MSX/Src/ros2.h +0 -35
  98. epyt_flow/EPANET/EPANET-MSX/Src/smatrix.c +0 -816
  99. epyt_flow/EPANET/EPANET-MSX/Src/smatrix.h +0 -29
  100. epyt_flow/EPANET/EPANET-MSX/readme.txt +0 -14
  101. epyt_flow/EPANET/compile_linux.sh +0 -4
  102. epyt_flow/EPANET/compile_macos.sh +0 -4
  103. epyt_flow/simulation/backend/__init__.py +0 -1
  104. epyt_flow/simulation/backend/my_epyt.py +0 -1101
  105. epyt_flow-0.14.1.dist-info/RECORD +0 -148
  106. {epyt_flow-0.14.1.dist-info → epyt_flow-0.15.0.dist-info}/WHEEL +0 -0
  107. {epyt_flow-0.14.1.dist-info → epyt_flow-0.15.0.dist-info}/licenses/LICENSE +0 -0
  108. {epyt_flow-0.14.1.dist-info → epyt_flow-0.15.0.dist-info}/top_level.txt +0 -0
@@ -1,518 +0,0 @@
1
- /** @file epanet2_enums.h
2
- */
3
- /*
4
- ******************************************************************************
5
- Project: OWA EPANET
6
- Version: 2.3
7
- Module: epanet2_enums.h
8
- Description: enumerations of symbolic constants used by the API functions
9
- Authors: see AUTHORS
10
- Copyright: see AUTHORS
11
- License: see LICENSE
12
- Last Updated: 04/23/2025
13
- ******************************************************************************
14
- */
15
-
16
-
17
- #ifndef EPANET2_ENUMS_H
18
- #define EPANET2_ENUMS_H
19
-
20
- // --- Define the EPANET toolkit constants
21
- /// Character array size limits
22
- /*! \enum EN_SizeLimits
23
- * Limits on the size of character arrays used to store ID names
24
- * and text messages.
25
- */
26
- typedef enum {
27
- EN_MAXID = 31, //!< Max. # characters in ID name
28
- EN_MAXMSG = 255 //!< Max. # characters in message text
29
- } EN_SizeLimits;
30
-
31
- /// Node properties
32
- /*! \enum EN_NodeProperty
33
- * These node properties are used with @ref EN_getnodevalue and @ref EN_setnodevalue.
34
- * Those marked as read only are computed values that can only be retrieved.
35
- */
36
- typedef enum {
37
- EN_ELEVATION = 0, //!< Elevation
38
- EN_BASEDEMAND = 1, //!< Primary demand baseline value
39
- EN_PATTERN = 2, //!< Primary demand time pattern index
40
- EN_EMITTER = 3, //!< Emitter flow coefficient
41
- EN_INITQUAL = 4, //!< Initial quality
42
- EN_SOURCEQUAL = 5, //!< Quality source strength
43
- EN_SOURCEPAT = 6, //!< Quality source pattern index
44
- EN_SOURCETYPE = 7, //!< Quality source type (see @ref EN_SourceType)
45
- EN_TANKLEVEL = 8, //!< Current computed tank water level (read only)
46
- EN_DEMAND = 9, //!< Current computed demand (read only)
47
- EN_HEAD = 10, //!< Current computed hydraulic head (read only)
48
- EN_PRESSURE = 11, //!< Current computed pressure (read only)
49
- EN_QUALITY = 12, //!< Current computed quality (read only)
50
- EN_SOURCEMASS = 13, //!< Current computed quality source mass inflow (read only)
51
- EN_INITVOLUME = 14, //!< Tank initial volume (read only)
52
- EN_MIXMODEL = 15, //!< Tank mixing model (see @ref EN_MixingModel)
53
- EN_MIXZONEVOL = 16, //!< Tank mixing zone volume (read only)
54
- EN_TANKDIAM = 17, //!< Tank diameter
55
- EN_MINVOLUME = 18, //!< Tank minimum volume
56
- EN_VOLCURVE = 19, //!< Tank volume curve index
57
- EN_MINLEVEL = 20, //!< Tank minimum level
58
- EN_MAXLEVEL = 21, //!< Tank maximum level
59
- EN_MIXFRACTION = 22, //!< Tank mixing fraction
60
- EN_TANK_KBULK = 23, //!< Tank bulk decay coefficient
61
- EN_TANKVOLUME = 24, //!< Current computed tank volume (read only)
62
- EN_MAXVOLUME = 25, //!< Tank maximum volume (read only)
63
- EN_CANOVERFLOW = 26, //!< `EN_TRUE` (= 1) if the Tank can overflow, `EN_FALSE` (= 0) if it cannot
64
- EN_DEMANDDEFICIT = 27,//!< Amount that full demand is reduced under PDA (read only)
65
- EN_NODE_INCONTROL = 28, //!< `EN_TRUE` (= 1) if the node appears in any control, `EN_FALSE` (= 0) if not
66
- EN_EMITTERFLOW = 29, //!< Current emitter flow (read only)
67
- EN_LEAKAGEFLOW = 30, //!< Current leakage flow (read only)
68
- EN_DEMANDFLOW = 31, //!< Current consumer demand delivered (read only)
69
- EN_FULLDEMAND = 32 //!< Current consumer demand requested (read only)
70
- } EN_NodeProperty;
71
-
72
- /// Link properties
73
- /**
74
- These link properties are used with @ref EN_getlinkvalue and @ref EN_setlinkvalue.
75
- Those marked as read only are computed values that can only be retrieved.
76
- */
77
- typedef enum {
78
- EN_DIAMETER = 0, //!< Pipe/valve diameter
79
- EN_LENGTH = 1, //!< Pipe length
80
- EN_ROUGHNESS = 2, //!< Pipe roughness coefficient
81
- EN_MINORLOSS = 3, //!< Pipe/valve minor loss coefficient
82
- EN_INITSTATUS = 4, //!< Initial status (see @ref EN_LinkStatusType)
83
- EN_INITSETTING = 5, //!< Initial pump speed or valve setting
84
- EN_KBULK = 6, //!< Bulk flow chemical reaction coefficient
85
- EN_KWALL = 7, //!< Pipe wall chemical reaction coefficient
86
- EN_FLOW = 8, //!< Current computed flow rate (read only)
87
- EN_VELOCITY = 9, //!< Current computed flow velocity (read only)
88
- EN_HEADLOSS = 10, //!< Current computed head loss (read only)
89
- EN_STATUS = 11, //!< Current link status (see @ref EN_LinkStatusType)
90
- EN_SETTING = 12, //!< Current link setting
91
- EN_ENERGY = 13, //!< Current computed pump energy usage (read only)
92
- EN_LINKQUAL = 14, //!< Current computed link quality (read only)
93
- EN_LINKPATTERN = 15, //!< Pump speed time pattern index
94
- EN_PUMP_STATE = 16, //!< Current computed pump state (read only) (see @ref EN_PumpStateType)
95
- EN_PUMP_EFFIC = 17, //!< Current computed pump efficiency (read only)
96
- EN_PUMP_POWER = 18, //!< Pump constant power rating
97
- EN_PUMP_HCURVE = 19, //!< Pump head v. flow curve index
98
- EN_PUMP_ECURVE = 20, //!< Pump efficiency v. flow curve index
99
- EN_PUMP_ECOST = 21, //!< Pump average energy price
100
- EN_PUMP_EPAT = 22, //!< Pump energy price time pattern index
101
- EN_LINK_INCONTROL = 23, //!< Is present in any simple or rule-based control (= 1) or not (= 0)
102
- EN_GPV_CURVE = 24, //!< GPV head loss v. flow curve index
103
- EN_PCV_CURVE = 25, //!< PCV characteristic curve index
104
- EN_LEAK_AREA = 26, //!< Pipe leak area (sq mm per 100 length units)
105
- EN_LEAK_EXPAN = 27, //!< Leak expansion rate (sq mm per unit of pressure head)
106
- EN_LINK_LEAKAGE = 28, //!< Current leakage rate (read only)
107
- EN_VALVE_TYPE = 29 //!< Type of valve (see @ref EN_LinkType)
108
- } EN_LinkProperty;
109
-
110
- /// Time parameters
111
- /**
112
- These time-related options are used with @ref EN_gettimeparam and@ref EN_settimeparam.
113
- All times are expressed in seconds The parameters marked as read only are
114
- computed values that can only be retrieved.
115
- */
116
- typedef enum {
117
- EN_DURATION = 0, //!< Total simulation duration
118
- EN_HYDSTEP = 1, //!< Hydraulic time step
119
- EN_QUALSTEP = 2, //!< Water quality time step
120
- EN_PATTERNSTEP = 3, //!< Time pattern period
121
- EN_PATTERNSTART = 4, //!< Time when time patterns begin
122
- EN_REPORTSTEP = 5, //!< Reporting time step
123
- EN_REPORTSTART = 6, //!< Time when reporting starts
124
- EN_RULESTEP = 7, //!< Rule-based control evaluation time step
125
- EN_STATISTIC = 8, //!< Reporting statistic code (see @ref EN_StatisticType)
126
- EN_PERIODS = 9, //!< Number of reporting time periods (read only)
127
- EN_STARTTIME = 10, //!< Simulation starting time of day
128
- EN_HTIME = 11, //!< Elapsed time of current hydraulic solution (read only)
129
- EN_QTIME = 12, //!< Elapsed time of current quality solution (read only)
130
- EN_HALTFLAG = 13, //!< Flag indicating if the simulation was halted (read only)
131
- EN_NEXTEVENT = 14, //!< Shortest time until a tank becomes empty or full (read only)
132
- EN_NEXTEVENTTANK = 15 //!< Index of tank with shortest time to become empty or full (read only)
133
- } EN_TimeParameter;
134
-
135
- /// Time step events
136
- /**
137
- These are the types of events that can cause a new time step to be taken.
138
- **/
139
- typedef enum {
140
- EN_STEP_REPORT = 0, //!< A reporting time step has ended
141
- EN_STEP_HYD = 1, //!< A hydraulic time step has ended
142
- EN_STEP_WQ = 2, //!< A water quality time step has ended
143
- EN_STEP_TANKEVENT = 3, //!< A tank has become empty or full
144
- EN_STEP_CONTROLEVENT = 4 //!< A link control needs to be activated
145
- } EN_TimestepEvent;
146
-
147
- /// Analysis convergence statistics
148
- /**
149
- These statistics report the convergence criteria for the most current hydraulic analysis
150
- and the cumulative water quality mass balance error at the current simulation time. They
151
- can be retrieved with @ref EN_getstatistic.
152
- */
153
- typedef enum {
154
- EN_ITERATIONS = 0, //!< Number of hydraulic iterations taken
155
- EN_RELATIVEERROR = 1, //!< Sum of link flow changes / sum of link flows
156
- EN_MAXHEADERROR = 2, //!< Largest head loss error for links
157
- EN_MAXFLOWCHANGE = 3, //!< Largest flow change in links
158
- EN_MASSBALANCE = 4, //!< Cumulative water quality mass balance ratio
159
- EN_DEFICIENTNODES = 5, //!< Number of pressure deficient nodes
160
- EN_DEMANDREDUCTION = 6, //!< % demand reduction at pressure deficient nodes
161
- EN_LEAKAGELOSS = 7 //!< % flow lost to system leakage
162
- } EN_AnalysisStatistic;
163
-
164
- /// Types of network objects
165
- /**
166
- The types of objects that comprise a network model.
167
- */
168
- typedef enum {
169
- EN_NODE = 0, //!< Nodes
170
- EN_LINK = 1, //!< Links
171
- EN_TIMEPAT = 2, //!< Time patterns
172
- EN_CURVE = 3, //!< Data curves
173
- EN_CONTROL = 4, //!< Simple controls
174
- EN_RULE = 5 //!< Control rules
175
- } EN_ObjectType;
176
-
177
- /// Types of objects to count
178
- /**
179
- These options tell @ref EN_getcount which type of object to count.
180
- */
181
- typedef enum {
182
- EN_NODECOUNT = 0, //!< Number of nodes (junctions + tanks + reservoirs)
183
- EN_TANKCOUNT = 1, //!< Number of tanks and reservoirs
184
- EN_LINKCOUNT = 2, //!< Number of links (pipes + pumps + valves)
185
- EN_PATCOUNT = 3, //!< Number of time patterns
186
- EN_CURVECOUNT = 4, //!< Number of data curves
187
- EN_CONTROLCOUNT = 5, //!< Number of simple controls
188
- EN_RULECOUNT = 6 //!< Number of rule-based controls
189
- } EN_CountType;
190
-
191
- /// Node Types
192
- /**
193
- These are the different types of nodes that can be returned by calling @ref EN_getnodetype.
194
- */
195
- typedef enum {
196
- EN_JUNCTION = 0, //!< Junction node
197
- EN_RESERVOIR = 1, //!< Reservoir node
198
- EN_TANK = 2 //!< Storage tank node
199
- } EN_NodeType;
200
-
201
- /// Link types
202
- /**
203
- These are the different types of links that can be returned by calling @ref EN_getlinktype.
204
- */
205
- typedef enum {
206
- EN_CVPIPE = 0, //!< Pipe with check valve
207
- EN_PIPE = 1, //!< Pipe
208
- EN_PUMP = 2, //!< Pump
209
- EN_PRV = 3, //!< Pressure reducing valve
210
- EN_PSV = 4, //!< Pressure sustaining valve
211
- EN_PBV = 5, //!< Pressure breaker valve
212
- EN_FCV = 6, //!< Flow control valve
213
- EN_TCV = 7, //!< Throttle control valve
214
- EN_GPV = 8, //!< General purpose valve
215
- EN_PCV = 9 //!< Positional control valve
216
- } EN_LinkType;
217
-
218
- /// Link status
219
- /**
220
- One of these values is returned when @ref EN_getlinkvalue is used to retrieve a link's
221
- initial status (`EN_INITSTATUS`) or its current status (`EN_STATUS`). These options are
222
- also used with @ref EN_setlinkvalue to set values for these same properties.
223
- */
224
- typedef enum {
225
- EN_CLOSED = 0, //!< Link is closed and cannot convey any flow
226
- EN_OPEN = 1 //!< Link is open and is able to convey flow
227
- } EN_LinkStatusType;
228
-
229
- /// Pump states
230
- /**
231
- One of these codes is returned when @ref EN_getlinkvalue is used to retrieve a pump's
232
- current operating state (`EN_PUMP_STATE`). `EN_PUMP_XHEAD` indicates that the pump has been
233
- shut down because it is being asked to deliver more than its shutoff head. `EN_PUMP_XFLOW`
234
- indicates that the pump is being asked to deliver more than its maximum flow.
235
- */
236
- typedef enum {
237
- EN_PUMP_XHEAD = 0, //!< Pump closed - cannot supply head
238
- EN_PUMP_CLOSED = 2, //!< Pump closed
239
- EN_PUMP_OPEN = 3, //!< Pump open
240
- EN_PUMP_XFLOW = 5 //!< Pump open - cannot supply flow
241
- } EN_PumpStateType;
242
-
243
- /// Types of water quality analyses
244
- /**
245
- These are the different types of water quality analyses that EPANET can run. They
246
- are used with @ref EN_getqualinfo, @ref EN_getqualtype, and @ref EN_setqualtype.
247
- */
248
- typedef enum {
249
- EN_NONE = 0, //!< No quality analysis
250
- EN_CHEM = 1, //!< Chemical fate and transport
251
- EN_AGE = 2, //!< Water age analysis
252
- EN_TRACE = 3 //!< Source tracing analysis
253
- } EN_QualityType;
254
-
255
- /// Water quality source types
256
- /**
257
- These are the different types of external water quality sources that can be assigned
258
- to a node's `EN_SOURCETYPE` property as used by @ref EN_getnodevalue and @ref EN_setnodevalue.
259
- */
260
- typedef enum {
261
- EN_CONCEN = 0, //!< Sets the concentration of external inflow entering a node
262
- EN_MASS = 1, //!< Injects a given mass/minute into a node
263
- EN_SETPOINT = 2, //!< Sets the concentration leaving a node to a given value
264
- EN_FLOWPACED = 3 //!< Adds a given value to the concentration leaving a node
265
- } EN_SourceType;
266
-
267
- /// Head loss formulas
268
- /**
269
- The available choices for the `EN_HEADLOSSFORM` option in @ref EN_getoption and
270
- @ref EN_setoption. They are also used for the head loss type argument in @ref EN_init.
271
- Each head loss formula uses a different type of roughness coefficient (`EN_ROUGHNESS`)
272
- that can be set with @ref EN_setlinkvalue.
273
- */
274
- typedef enum {
275
- EN_HW = 0, //!< Hazen-Williams
276
- EN_DW = 1, //!< Darcy-Weisbach
277
- EN_CM = 2 //!< Chezy-Manning
278
- } EN_HeadLossType;
279
-
280
- /// Flow units
281
- /**
282
- These choices for flow units are used with @ref EN_getflowunits and @ref EN_setflowunits.
283
- They are also used for the flow units type argument in @ref EN_init. If flow units are
284
- expressed in US Customary units (`EN_CFS` through `EN_AFD`) then all other quantities are
285
- in US Customary units. Otherwise they are in metric units.
286
- */
287
- typedef enum {
288
- EN_CFS = 0, //!< Cubic feet per second
289
- EN_GPM = 1, //!< Gallons per minute
290
- EN_MGD = 2, //!< Million gallons per day
291
- EN_IMGD = 3, //!< Imperial million gallons per day
292
- EN_AFD = 4, //!< Acre-feet per day
293
- EN_LPS = 5, //!< Liters per second
294
- EN_LPM = 6, //!< Liters per minute
295
- EN_MLD = 7, //!< Million liters per day
296
- EN_CMH = 8, //!< Cubic meters per hour
297
- EN_CMD = 9, //!< Cubic meters per day
298
- EN_CMS = 10 //!< Cubic meters per second
299
- } EN_FlowUnits;
300
-
301
- /// Pressure units
302
- /**
303
- The available choices for pressure units for the `EN_PRESS_UNITS` option in @ref EN_getoption
304
- and @ref EN_setoption.
305
- */
306
- typedef enum {
307
- EN_PSI = 0, //!< Pounds per square inch
308
- EN_KPA = 1, //!< Kilopascals
309
- EN_METERS = 2, //!< Meters
310
- EN_BAR = 3, //!< Bar
311
- EN_FEET = 4 //!< Feet
312
- } EN_PressUnits;
313
-
314
- /// Demand models
315
- /**
316
- These choices for modeling consumer demands are used with @ref EN_getdemandmodel
317
- and @ref EN_setdemandmodel.
318
-
319
- A demand driven analysis requires that a junction's full demand be supplied
320
- in each time period independent of how much pressure is available. A pressure
321
- driven analysis makes demand be a power function of pressure, up to the point
322
- where the full demand is met.
323
- */
324
- typedef enum {
325
- EN_DDA = 0, //!< Demand driven analysis
326
- EN_PDA = 1 //!< Pressure driven analysis
327
- } EN_DemandModel;
328
-
329
- /// Simulation options
330
- /**
331
- These constants identify the hydraulic and water quality simulation options
332
- that are applied on a network-wide basis. They are accessed using the
333
- @ref EN_getoption and @ref EN_setoption functions.
334
- */
335
- typedef enum {
336
- EN_TRIALS = 0, //!< Maximum trials allowed for hydraulic convergence
337
- EN_ACCURACY = 1, //!< Total normalized flow change for hydraulic convergence
338
- EN_TOLERANCE = 2, //!< Water quality tolerance
339
- EN_EMITEXPON = 3, //!< Exponent in emitter discharge formula
340
- EN_DEMANDMULT = 4, //!< Global demand multiplier
341
- EN_HEADERROR = 5, //!< Maximum head loss error for hydraulic convergence
342
- EN_FLOWCHANGE = 6, //!< Maximum flow change for hydraulic convergence
343
- EN_HEADLOSSFORM = 7, //!< Head loss formula (see @ref EN_HeadLossType)
344
- EN_GLOBALEFFIC = 8, //!< Global pump efficiency (percent)
345
- EN_GLOBALPRICE = 9, //!< Global energy price per KWH
346
- EN_GLOBALPATTERN = 10, //!< Index of a global energy price pattern
347
- EN_DEMANDCHARGE = 11, //!< Energy charge per max. KW usage
348
- EN_SP_GRAVITY = 12, //!< Specific gravity
349
- EN_SP_VISCOS = 13, //!< Specific viscosity (relative to water at 20 deg C)
350
- EN_UNBALANCED = 14, //!< Extra trials allowed if hydraulics don't converge
351
- EN_CHECKFREQ = 15, //!< Frequency of hydraulic status checks
352
- EN_MAXCHECK = 16, //!< Maximum trials for status checking
353
- EN_DAMPLIMIT = 17, //!< Accuracy level where solution damping begins
354
- EN_SP_DIFFUS = 18, //!< Specific diffusivity (relative to chlorine at 20 deg C)
355
- EN_BULKORDER = 19, //!< Bulk water reaction order for pipes
356
- EN_WALLORDER = 20, //!< Wall reaction order for pipes (either 0 or 1)
357
- EN_TANKORDER = 21, //!< Bulk water reaction order for tanks
358
- EN_CONCENLIMIT = 22, //!< Limiting concentration for growth reactions
359
- EN_DEMANDPATTERN = 23, //!< Name of default demand pattern
360
- EN_EMITBACKFLOW = 24, //!< `EN_TRUE` (= 1) if emitters can backflow, `EN_FALSE` (= 0) if not
361
- EN_PRESS_UNITS = 25, //!< Pressure units (see @ref EN_PressUnits)
362
- EN_STATUS_REPORT = 26 //!< Type of status report to produce (see @ref EN_StatusReport)
363
- } EN_Option;
364
-
365
- /// Simple control types
366
- /**
367
- These are the different types of simple (single statement) controls that can be applied
368
- to network links. They are used as an argument to @ref EN_addcontrol,@ref EN_getcontrol,
369
- and @ref EN_setcontrol.
370
- */
371
- typedef enum {
372
- EN_LOWLEVEL = 0, //!< Act when pressure or tank level drops below a setpoint
373
- EN_HILEVEL = 1, //!< Act when pressure or tank level rises above a setpoint
374
- EN_TIMER = 2, //!< Act at a prescribed elapsed amount of time
375
- EN_TIMEOFDAY = 3 //!< Act at a particular time of day
376
- } EN_ControlType;
377
-
378
- /// Reporting statistic choices
379
- /**
380
- These options determine what kind of statistical post-processing should be done on
381
- the time series of simulation results before they are reported using @ref EN_report
382
- or saved to the project's binary output file. These options are used in the
383
- @ref EN_gettimeparam and @ref EN_settimeparam functions when `EN_STATISTIC` is the
384
- time parameter being set or retrieved.
385
- */
386
- typedef enum {
387
- EN_SERIES = 0, //!< Report all time series points
388
- EN_AVERAGE = 1, //!< Report average value over simulation period
389
- EN_MINIMUM = 2, //!< Report minimum value over simulation period
390
- EN_MAXIMUM = 3, //!< Report maximum value over simulation period
391
- EN_RANGE = 4 //!< Report maximum - minimum over simulation period
392
- } EN_StatisticType;
393
-
394
- /// Tank mixing models
395
- /**
396
- These are the different types of models that describe water quality mixing in storage tanks.
397
- The choice of model is accessed with the `EN_MIXMODEL` property of a Tank node using
398
- @ref EN_getnodevalue and @ref EN_setnodevalue.
399
- */
400
- typedef enum {
401
- EN_MIX1 = 0, //!< Complete mix model
402
- EN_MIX2 = 1, //!< 2-compartment model
403
- EN_FIFO = 2, //!< First in, first out model
404
- EN_LIFO = 3 //!< Last in, first out model
405
- } EN_MixingModel;
406
-
407
- /// Hydraulic initialization options
408
- /**
409
- These options are used to initialize a new hydraulic analysis when @ref EN_initH is called.
410
- */
411
- typedef enum {
412
- EN_NOSAVE = 0, //!< Don't save hydraulics; don't re-initialize flows
413
- EN_SAVE = 1, //!< Save hydraulics to file, don't re-initialize flows
414
- EN_INITFLOW = 10, //!< Don't save hydraulics; re-initialize flows
415
- EN_SAVE_AND_INIT = 11 //!< Save hydraulics; re-initialize flows
416
- } EN_InitHydOption;
417
-
418
- /// Types of pump curves
419
- /**
420
- @ref EN_getpumptype returns one of these values when it is called.
421
- */
422
- typedef enum {
423
- EN_CONST_HP = 0, //!< Constant horsepower
424
- EN_POWER_FUNC = 1, //!< Power function
425
- EN_CUSTOM = 2, //!< User-defined custom curve
426
- EN_NOCURVE = 3 //!< No curve
427
- } EN_PumpType;
428
-
429
- /// Types of data curves
430
- /**
431
- These are the different types of physical relationships that a data curve can
432
- represent as returned by calling @ref EN_getcurvetype.
433
- */
434
- typedef enum {
435
- EN_VOLUME_CURVE = 0, //!< Tank volume v. depth curve
436
- EN_PUMP_CURVE = 1, //!< Pump head v. flow curve
437
- EN_EFFIC_CURVE = 2, //!< Pump efficiency v. flow curve
438
- EN_HLOSS_CURVE = 3, //!< Valve head loss v. flow curve
439
- EN_GENERIC_CURVE = 4, //!< Generic curve
440
- EN_VALVE_CURVE = 5 //!< % of fully open flow v. % open
441
- } EN_CurveType;
442
-
443
- /// Deletion action codes
444
- /**
445
- These codes are used in @ref EN_deletenode and @ref EN_deletelink to indicate what action
446
- should be taken if the node or link being deleted appears in any simple or rule-based
447
- controls or if a deleted node has any links connected to it.
448
- */
449
- typedef enum {
450
- EN_UNCONDITIONAL = 0, //!< Delete all controls and connecting links
451
- EN_CONDITIONAL = 1 //!< Cancel object deletion if it appears in controls or has connecting links
452
- } EN_ActionCodeType;
453
-
454
- /// Status reporting levels
455
- /**
456
- These choices specify the level of status reporting written to a project's report
457
- file during a hydraulic analysis. The level is set using the @ref EN_setstatusreport
458
- or the @ref EN_setoption functions.
459
- */
460
- typedef enum {
461
- EN_NO_REPORT = 0, //!< No status reporting
462
- EN_NORMAL_REPORT = 1, //!< Normal level of status reporting
463
- EN_FULL_REPORT = 2 //!< Full level of status reporting
464
- } EN_StatusReport;
465
-
466
- /// Network objects used in rule-based controls
467
- typedef enum {
468
- EN_R_NODE = 6, //!< Clause refers to a node
469
- EN_R_LINK = 7, //!< Clause refers to a link
470
- EN_R_SYSTEM = 8 //!< Clause refers to a system parameter (e.g., time)
471
- } EN_RuleObject;
472
-
473
- /// Object variables used in rule-based controls
474
- typedef enum {
475
- EN_R_DEMAND = 0, //!< Nodal demand
476
- EN_R_HEAD = 1, //!< Nodal hydraulic head
477
- EN_R_GRADE = 2, //!< Nodal hydraulic grade
478
- EN_R_LEVEL = 3, //!< Tank water level
479
- EN_R_PRESSURE = 4, //!< Nodal pressure
480
- EN_R_FLOW = 5, //!< Link flow rate
481
- EN_R_STATUS = 6, //!< Link status
482
- EN_R_SETTING = 7, //!< Link setting
483
- EN_R_POWER = 8, //!< Pump power output
484
- EN_R_TIME = 9, //!< Elapsed simulation time
485
- EN_R_CLOCKTIME = 10, //!< Time of day
486
- EN_R_FILLTIME = 11, //!< Time to fill a tank
487
- EN_R_DRAINTIME = 12 //!< Time to drain a tank
488
- } EN_RuleVariable;
489
-
490
- /// Comparison operators used in rule-based controls
491
- typedef enum {
492
- EN_R_EQ = 0, //!< Equal to
493
- EN_R_NE = 1, //!< Not equal
494
- EN_R_LE = 2, //!< Less than or equal to
495
- EN_R_GE = 3, //!< Greater than or equal to
496
- EN_R_LT = 4, //!< Less than
497
- EN_R_GT = 5, //!< Greater than
498
- EN_R_IS = 6, //!< Is equal to
499
- EN_R_NOT = 7, //!< Is not equal to
500
- EN_R_BELOW = 8, //!< Is below
501
- EN_R_ABOVE = 9 //!< Is above
502
- } EN_RuleOperator;
503
-
504
- /// Link status codes used in rule-based controls
505
- typedef enum {
506
- EN_R_IS_OPEN = 1, //!< Link is open
507
- EN_R_IS_CLOSED = 2, //!< Link is closed
508
- EN_R_IS_ACTIVE = 3 //!< Control valve is active
509
- } EN_RuleStatus;
510
-
511
- #define EN_MISSING -1.E10 //!< Missing value indicator
512
- #define EN_SET_CLOSED -1.E10 //!< Link set closed indicator
513
- #define EN_SET_OPEN 1.E10 //!< Link set open indicator
514
-
515
- #define EN_FALSE 0 //!< boolean false
516
- #define EN_TRUE 1 //!< boolean true
517
-
518
- #endif //EPANET2_ENUMS_H