epyt-flow 0.14.1__py3-none-any.whl → 0.14.2__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 (55) hide show
  1. epyt_flow/EPANET/EPANET/SRC_engines/AUTHORS +8 -40
  2. epyt_flow/EPANET/EPANET/SRC_engines/LICENSE +3 -3
  3. epyt_flow/EPANET/EPANET/SRC_engines/Readme_SRC_Engines.txt +18 -0
  4. epyt_flow/EPANET/EPANET/SRC_engines/enumstxt.h +7 -24
  5. epyt_flow/EPANET/EPANET/SRC_engines/epanet.c +374 -726
  6. epyt_flow/EPANET/EPANET/SRC_engines/epanet2.c +32 -128
  7. epyt_flow/EPANET/EPANET/SRC_engines/epanet2.def +131 -0
  8. epyt_flow/EPANET/EPANET/SRC_engines/errors.dat +1 -7
  9. epyt_flow/EPANET/EPANET/SRC_engines/funcs.h +14 -40
  10. epyt_flow/EPANET/EPANET/SRC_engines/hash.c +177 -177
  11. epyt_flow/EPANET/EPANET/SRC_engines/hash.h +28 -28
  12. epyt_flow/EPANET/EPANET/SRC_engines/hydcoeffs.c +40 -192
  13. epyt_flow/EPANET/EPANET/SRC_engines/hydraul.c +46 -101
  14. epyt_flow/EPANET/EPANET/SRC_engines/hydsolver.c +24 -85
  15. epyt_flow/EPANET/EPANET/SRC_engines/hydstatus.c +63 -29
  16. epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2.h +37 -70
  17. epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_2.h +234 -408
  18. epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_enums.h +37 -87
  19. epyt_flow/EPANET/EPANET/SRC_engines/inpfile.c +79 -153
  20. epyt_flow/EPANET/EPANET/SRC_engines/input1.c +94 -59
  21. epyt_flow/EPANET/EPANET/SRC_engines/input2.c +202 -73
  22. epyt_flow/EPANET/EPANET/SRC_engines/input3.c +351 -446
  23. epyt_flow/EPANET/EPANET/SRC_engines/main.c +93 -0
  24. epyt_flow/EPANET/EPANET/SRC_engines/mempool.c +4 -8
  25. epyt_flow/EPANET/EPANET/SRC_engines/mempool.h +23 -23
  26. epyt_flow/EPANET/EPANET/SRC_engines/output.c +4 -5
  27. epyt_flow/EPANET/EPANET/SRC_engines/project.c +75 -407
  28. epyt_flow/EPANET/EPANET/SRC_engines/quality.c +2 -12
  29. epyt_flow/EPANET/EPANET/SRC_engines/qualreact.c +13 -70
  30. epyt_flow/EPANET/EPANET/SRC_engines/qualroute.c +5 -7
  31. epyt_flow/EPANET/EPANET/SRC_engines/report.c +20 -88
  32. epyt_flow/EPANET/EPANET/SRC_engines/rules.c +6 -144
  33. epyt_flow/EPANET/EPANET/SRC_engines/smatrix.c +19 -19
  34. epyt_flow/EPANET/EPANET/SRC_engines/text.h +5 -16
  35. epyt_flow/EPANET/EPANET/SRC_engines/types.h +19 -73
  36. epyt_flow/EPANET/compile_linux.sh +1 -1
  37. epyt_flow/EPANET/compile_macos.sh +1 -1
  38. epyt_flow/VERSION +1 -1
  39. epyt_flow/simulation/scada/scada_data.py +1 -1
  40. epyt_flow/utils.py +66 -0
  41. epyt_flow/visualization/visualization_utils.py +4 -2
  42. {epyt_flow-0.14.1.dist-info → epyt_flow-0.14.2.dist-info}/METADATA +1 -1
  43. {epyt_flow-0.14.1.dist-info → epyt_flow-0.14.2.dist-info}/RECORD +46 -52
  44. epyt_flow/EPANET/EPANET/SRC_engines/flowbalance.c +0 -186
  45. epyt_flow/EPANET/EPANET/SRC_engines/leakage.c +0 -527
  46. epyt_flow/EPANET/EPANET/SRC_engines/util/cstr_helper.c +0 -59
  47. epyt_flow/EPANET/EPANET/SRC_engines/util/cstr_helper.h +0 -38
  48. epyt_flow/EPANET/EPANET/SRC_engines/util/errormanager.c +0 -92
  49. epyt_flow/EPANET/EPANET/SRC_engines/util/errormanager.h +0 -39
  50. epyt_flow/EPANET/EPANET/SRC_engines/util/filemanager.c +0 -212
  51. epyt_flow/EPANET/EPANET/SRC_engines/util/filemanager.h +0 -81
  52. epyt_flow/EPANET/EPANET/SRC_engines/validate.c +0 -408
  53. {epyt_flow-0.14.1.dist-info → epyt_flow-0.14.2.dist-info}/WHEEL +0 -0
  54. {epyt_flow-0.14.1.dist-info → epyt_flow-0.14.2.dist-info}/licenses/LICENSE +0 -0
  55. {epyt_flow-0.14.1.dist-info → epyt_flow-0.14.2.dist-info}/top_level.txt +0 -0
@@ -3,13 +3,13 @@
3
3
  /*
4
4
  ******************************************************************************
5
5
  Project: OWA EPANET
6
- Version: 2.3
6
+ Version: 2.2
7
7
  Module: epanet2_enums.h
8
8
  Description: enumerations of symbolic constants used by the API functions
9
9
  Authors: see AUTHORS
10
10
  Copyright: see AUTHORS
11
11
  License: see LICENSE
12
- Last Updated: 04/23/2025
12
+ Last Updated: 11/06/2019
13
13
  ******************************************************************************
14
14
  */
15
15
 
@@ -17,11 +17,13 @@
17
17
  #ifndef EPANET2_ENUMS_H
18
18
  #define EPANET2_ENUMS_H
19
19
 
20
+
20
21
  // --- 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.
22
+
23
+ /// Size Limts
24
+ /**
25
+ Limits on the size of character arrays used to store ID names
26
+ and text messages.
25
27
  */
26
28
  typedef enum {
27
29
  EN_MAXID = 31, //!< Max. # characters in ID name
@@ -29,11 +31,11 @@ typedef enum {
29
31
  } EN_SizeLimits;
30
32
 
31
33
  /// 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.
34
+ /**
35
+ These node properties are used with @ref EN_getnodevalue and @ref EN_setnodevalue.
36
+ Those marked as read only are computed values that can only be retrieved.
35
37
  */
36
- typedef enum {
38
+ typedef enum {
37
39
  EN_ELEVATION = 0, //!< Elevation
38
40
  EN_BASEDEMAND = 1, //!< Primary demand baseline value
39
41
  EN_PATTERN = 2, //!< Primary demand time pattern index
@@ -60,13 +62,8 @@ typedef enum {
60
62
  EN_TANK_KBULK = 23, //!< Tank bulk decay coefficient
61
63
  EN_TANKVOLUME = 24, //!< Current computed tank volume (read only)
62
64
  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)
65
+ EN_CANOVERFLOW = 26, //!< Tank can overflow (= 1) or not (= 0)
66
+ EN_DEMANDDEFICIT = 27 //!< Amount that full demand is reduced under PDA (read only)
70
67
  } EN_NodeProperty;
71
68
 
72
69
  /// Link properties
@@ -81,7 +78,7 @@ typedef enum {
81
78
  EN_MINORLOSS = 3, //!< Pipe/valve minor loss coefficient
82
79
  EN_INITSTATUS = 4, //!< Initial status (see @ref EN_LinkStatusType)
83
80
  EN_INITSETTING = 5, //!< Initial pump speed or valve setting
84
- EN_KBULK = 6, //!< Bulk flow chemical reaction coefficient
81
+ EN_KBULK = 6, //!< Bulk chemical reaction coefficient
85
82
  EN_KWALL = 7, //!< Pipe wall chemical reaction coefficient
86
83
  EN_FLOW = 8, //!< Current computed flow rate (read only)
87
84
  EN_VELOCITY = 9, //!< Current computed flow velocity (read only)
@@ -97,14 +94,7 @@ typedef enum {
97
94
  EN_PUMP_HCURVE = 19, //!< Pump head v. flow curve index
98
95
  EN_PUMP_ECURVE = 20, //!< Pump efficiency v. flow curve index
99
96
  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)
97
+ EN_PUMP_EPAT = 22 //!< Pump energy price time pattern index
108
98
  } EN_LinkProperty;
109
99
 
110
100
  /// Time parameters
@@ -132,18 +122,6 @@ typedef enum {
132
122
  EN_NEXTEVENTTANK = 15 //!< Index of tank with shortest time to become empty or full (read only)
133
123
  } EN_TimeParameter;
134
124
 
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
125
  /// Analysis convergence statistics
148
126
  /**
149
127
  These statistics report the convergence criteria for the most current hydraulic analysis
@@ -157,8 +135,7 @@ typedef enum {
157
135
  EN_MAXFLOWCHANGE = 3, //!< Largest flow change in links
158
136
  EN_MASSBALANCE = 4, //!< Cumulative water quality mass balance ratio
159
137
  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
138
+ EN_DEMANDREDUCTION = 6 //!< % demand reduction at pressure deficient nodes
162
139
  } EN_AnalysisStatistic;
163
140
 
164
141
  /// Types of network objects
@@ -211,26 +188,25 @@ typedef enum {
211
188
  EN_PBV = 5, //!< Pressure breaker valve
212
189
  EN_FCV = 6, //!< Flow control valve
213
190
  EN_TCV = 7, //!< Throttle control valve
214
- EN_GPV = 8, //!< General purpose valve
215
- EN_PCV = 9 //!< Positional control valve
191
+ EN_GPV = 8 //!< General purpose valve
216
192
  } EN_LinkType;
217
193
 
218
194
  /// Link status
219
195
  /**
220
196
  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
197
+ initial status ( \b EN_INITSTATUS ) or its current status ( \b EN_STATUS ). These options are
222
198
  also used with @ref EN_setlinkvalue to set values for these same properties.
223
199
  */
224
200
  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
201
+ EN_CLOSED = 0,
202
+ EN_OPEN = 1
227
203
  } EN_LinkStatusType;
228
204
 
229
205
  /// Pump states
230
206
  /**
231
207
  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`
208
+ current operating state ( \b EN_PUMP_STATE ). \b EN_PUMP_XHEAD indicates that the pump has been
209
+ shut down because it is being asked to deliver more than its shutoff head. \b EN_PUMP_XFLOW
234
210
  indicates that the pump is being asked to deliver more than its maximum flow.
235
211
  */
236
212
  typedef enum {
@@ -255,7 +231,7 @@ typedef enum {
255
231
  /// Water quality source types
256
232
  /**
257
233
  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.
234
+ to a node's \b EN_SOURCETYPE property as used by @ref EN_getnodevalue and @ref EN_setnodevalue.
259
235
  */
260
236
  typedef enum {
261
237
  EN_CONCEN = 0, //!< Sets the concentration of external inflow entering a node
@@ -266,9 +242,9 @@ typedef enum {
266
242
 
267
243
  /// Head loss formulas
268
244
  /**
269
- The available choices for the `EN_HEADLOSSFORM` option in @ref EN_getoption and
245
+ The available choices for the \b EN_HEADLOSSFORM option in @ref EN_getoption and
270
246
  @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`)
247
+ Each head loss formula uses a different type of roughness coefficient ( \b EN_ROUGHNESS )
272
248
  that can be set with @ref EN_setlinkvalue.
273
249
  */
274
250
  typedef enum {
@@ -281,7 +257,7 @@ typedef enum {
281
257
  /**
282
258
  These choices for flow units are used with @ref EN_getflowunits and @ref EN_setflowunits.
283
259
  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
260
+ expressed in US Customary units ( \b EN_CFS through \b EN_AFD ) then all other quantities are
285
261
  in US Customary units. Otherwise they are in metric units.
286
262
  */
287
263
  typedef enum {
@@ -294,23 +270,9 @@ typedef enum {
294
270
  EN_LPM = 6, //!< Liters per minute
295
271
  EN_MLD = 7, //!< Million liters per day
296
272
  EN_CMH = 8, //!< Cubic meters per hour
297
- EN_CMD = 9, //!< Cubic meters per day
298
- EN_CMS = 10 //!< Cubic meters per second
273
+ EN_CMD = 9 //!< Cubic meters per day
299
274
  } EN_FlowUnits;
300
275
 
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
276
  /// Demand models
315
277
  /**
316
278
  These choices for modeling consumer demands are used with @ref EN_getdemandmodel
@@ -355,11 +317,7 @@ typedef enum {
355
317
  EN_BULKORDER = 19, //!< Bulk water reaction order for pipes
356
318
  EN_WALLORDER = 20, //!< Wall reaction order for pipes (either 0 or 1)
357
319
  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)
320
+ EN_CONCENLIMIT = 22 //!< Limiting concentration for growth reactions
363
321
  } EN_Option;
364
322
 
365
323
  /// Simple control types
@@ -378,10 +336,9 @@ typedef enum {
378
336
  /// Reporting statistic choices
379
337
  /**
380
338
  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.
339
+ the time series of simulation results generated before they are reported using
340
+ @ref EN_report. An option can be chosen by using \b STATISTIC _option_ as the argument
341
+ to @ref EN_setreport.
385
342
  */
386
343
  typedef enum {
387
344
  EN_SERIES = 0, //!< Report all time series points
@@ -394,7 +351,7 @@ typedef enum {
394
351
  /// Tank mixing models
395
352
  /**
396
353
  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
354
+ The choice of model is accessed with the \b EN_MIXMODEL property of a Tank node using
398
355
  @ref EN_getnodevalue and @ref EN_setnodevalue.
399
356
  */
400
357
  typedef enum {
@@ -436,8 +393,7 @@ typedef enum {
436
393
  EN_PUMP_CURVE = 1, //!< Pump head v. flow curve
437
394
  EN_EFFIC_CURVE = 2, //!< Pump efficiency v. flow curve
438
395
  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
396
+ EN_GENERIC_CURVE = 4 //!< Generic curve
441
397
  } EN_CurveType;
442
398
 
443
399
  /// Deletion action codes
@@ -447,15 +403,14 @@ should be taken if the node or link being deleted appears in any simple or rule-
447
403
  controls or if a deleted node has any links connected to it.
448
404
  */
449
405
  typedef enum {
450
- EN_UNCONDITIONAL = 0, //!< Delete all controls and connecting links
406
+ EN_UNCONDITIONAL = 0, //!< Delete all controls and connecing links
451
407
  EN_CONDITIONAL = 1 //!< Cancel object deletion if it appears in controls or has connecting links
452
408
  } EN_ActionCodeType;
453
409
 
454
410
  /// Status reporting levels
455
411
  /**
456
412
  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.
413
+ file during a hydraulic analysis. The level is set using the @ref EN_setstatusreport function.
459
414
  */
460
415
  typedef enum {
461
416
  EN_NO_REPORT = 0, //!< No status reporting
@@ -508,11 +463,6 @@ typedef enum {
508
463
  EN_R_IS_ACTIVE = 3 //!< Control valve is active
509
464
  } EN_RuleStatus;
510
465
 
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
466
+ #define EN_MISSING -1.E10 //!< Missing value indicator
517
467
 
518
468
  #endif //EPANET2_ENUMS_H