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,442 +0,0 @@
1
- /*
2
- ******************************************************************************
3
- Project: OWA EPANET
4
- Version: 2.3
5
- Module: hydstatus.c
6
- Description: updates hydraulic status of network elements
7
- Authors: see AUTHORS
8
- Copyright: see AUTHORS
9
- License: see LICENSE
10
- Last Updated: 02/03/2023
11
- ******************************************************************************
12
- */
13
-
14
- #include <stdlib.h>
15
- #include <stdio.h>
16
-
17
- #include "types.h"
18
- #include "funcs.h"
19
-
20
- // Exported functions
21
- int valvestatus(Project *);
22
- int linkstatus(Project *);
23
-
24
- // Local functions
25
- static StatusType cvstatus(Project *, StatusType, double, double);
26
- static StatusType pumpstatus(Project *, int, double);
27
- static StatusType prvstatus(Project *, int, StatusType, double, double, double);
28
- static StatusType psvstatus(Project *, int, StatusType, double, double, double);
29
- static StatusType fcvstatus(Project *, int, StatusType, double, double);
30
- static void tankstatus(Project *, int, int, double);
31
-
32
-
33
- int valvestatus(Project *pr)
34
- /*
35
- **-----------------------------------------------------------------
36
- ** Input: none
37
- ** Output: returns 1 if any pressure or flow control valve
38
- ** changes status, 0 otherwise
39
- ** Purpose: updates status for PRVs & PSVs whose status
40
- ** is not fixed to OPEN/CLOSED
41
- **-----------------------------------------------------------------
42
- */
43
- {
44
- Network *net = &pr->network;
45
- Hydraul *hyd = &pr->hydraul;
46
- Report *rpt = &pr->report;
47
-
48
- int change = FALSE, // Status change flag
49
- i, k, // Valve & link indexes
50
- n1, n2; // Start & end nodes
51
- double hset; // Valve head setting
52
- StatusType status; // Valve status settings
53
- Slink *link;
54
-
55
- // Examine each valve
56
- for (i = 1; i <= net->Nvalves; i++)
57
- {
58
- // Get valve's link and its index
59
- k = net->Valve[i].Link;
60
- link = &net->Link[k];
61
-
62
- // Ignore valve if its status is fixed to OPEN/CLOSED
63
- if (hyd->LinkSetting[k] == MISSING) continue;
64
-
65
- // Get start/end node indexes & save current status
66
- n1 = link->N1;
67
- n2 = link->N2;
68
- status = hyd->LinkStatus[k];
69
-
70
- // Evaluate valve's new status
71
- switch (link->Type)
72
- {
73
- case PRV:
74
- hset = net->Node[n2].El + hyd->LinkSetting[k];
75
- hyd->LinkStatus[k] = prvstatus(pr, k, status, hset,
76
- hyd->NodeHead[n1], hyd->NodeHead[n2]);
77
- break;
78
- case PSV:
79
- hset = net->Node[n1].El + hyd->LinkSetting[k];
80
- hyd->LinkStatus[k] = psvstatus(pr, k, status, hset,
81
- hyd->NodeHead[n1], hyd->NodeHead[n2]);
82
- break;
83
- default:
84
- continue;
85
- }
86
-
87
- // Check for a status change
88
- if (status != hyd->LinkStatus[k])
89
- {
90
- if (rpt->Statflag == FULL)
91
- {
92
- writestatchange(pr, k, status, hyd->LinkStatus[k]);
93
- }
94
- change = TRUE;
95
- }
96
- }
97
- return change;
98
- }
99
-
100
-
101
- int linkstatus(Project *pr)
102
- /*
103
- **--------------------------------------------------------------
104
- ** Input: none
105
- ** Output: returns 1 if any link changes status, 0 otherwise
106
- ** Purpose: determines new status for pumps, CVs, FCVs & pipes
107
- ** to tanks.
108
- **--------------------------------------------------------------
109
- */
110
- {
111
- Network *net = &pr->network;
112
- Hydraul *hyd = &pr->hydraul;
113
- Report *rpt = &pr->report;
114
-
115
- int change = FALSE, // Status change flag
116
- k, // Link index
117
- n1, // Start node index
118
- n2; // End node index
119
- double dh; // Head difference across link
120
- StatusType status; // Current status
121
- Slink *link;
122
-
123
- // Examine each link
124
- for (k = 1; k <= net->Nlinks; k++)
125
- {
126
- link = &net->Link[k];
127
- n1 = link->N1;
128
- n2 = link->N2;
129
- dh = hyd->NodeHead[n1] - hyd->NodeHead[n2];
130
-
131
- // Re-open temporarily closed links (status = XHEAD or TEMPCLOSED)
132
- status = hyd->LinkStatus[k];
133
- if (status == XHEAD || status == TEMPCLOSED)
134
- {
135
- hyd->LinkStatus[k] = OPEN;
136
- }
137
-
138
- // Check for status changes in CVs and pumps
139
- if (link->Type == CVPIPE)
140
- {
141
- hyd->LinkStatus[k] = cvstatus(pr, hyd->LinkStatus[k], dh,
142
- hyd->LinkFlow[k]);
143
- }
144
- if (link->Type == PUMP && hyd->LinkStatus[k] >= OPEN &&
145
- hyd->LinkSetting[k] > 0.0)
146
- {
147
- hyd->LinkStatus[k] = pumpstatus(pr, k, -dh);
148
- }
149
-
150
- // Check for status changes in non-fixed FCVs
151
- if (link->Type == FCV && hyd->LinkSetting[k] != MISSING)
152
- {
153
- hyd->LinkStatus[k] = fcvstatus(pr, k, status, hyd->NodeHead[n1],
154
- hyd->NodeHead[n2]);
155
- }
156
-
157
- // Check for flow into (out of) full (empty) tanks
158
- if (n1 > net->Njuncs) tankstatus(pr, k, n1, hyd->LinkFlow[k]);
159
- if (n2 > net->Njuncs) tankstatus(pr, k, n2, -hyd->LinkFlow[k]);
160
-
161
- // Note any change in link status; do not revise link flow
162
- if (status != hyd->LinkStatus[k])
163
- {
164
- change = TRUE;
165
- if (rpt->Statflag == FULL)
166
- {
167
- writestatchange(pr, k, status, hyd->LinkStatus[k]);
168
- }
169
- }
170
- }
171
- return change;
172
- }
173
-
174
-
175
- StatusType cvstatus(Project *pr, StatusType s, double dh, double q)
176
- /*
177
- **--------------------------------------------------
178
- ** Input: s = current link status
179
- ** dh = head loss across link
180
- ** q = link flow
181
- ** Output: returns new link status
182
- ** Purpose: updates status of a check valve link.
183
- **--------------------------------------------------
184
- */
185
- {
186
- Hydraul *hyd = &pr->hydraul;
187
-
188
- // Prevent reverse flow through CVs
189
- if (ABS(dh) > hyd->Htol)
190
- {
191
- if (dh < -hyd->Htol) return CLOSED;
192
- else if (q < -hyd->Qtol) return CLOSED;
193
- else return OPEN;
194
- }
195
- else
196
- {
197
- if (q < -hyd->Qtol) return CLOSED;
198
- else return s;
199
- }
200
- }
201
-
202
-
203
- StatusType pumpstatus(Project *pr, int k, double dh)
204
- /*
205
- **--------------------------------------------------
206
- ** Input: k = link index
207
- ** dh = head gain across link
208
- ** Output: returns new pump status
209
- ** Purpose: updates status of an open pump.
210
- **--------------------------------------------------
211
- */
212
- {
213
- Hydraul *hyd = &pr->hydraul;
214
- Network *net = &pr->network;
215
-
216
- int p;
217
- double hmax;
218
-
219
- // Find maximum head (hmax) pump can deliver
220
- p = findpump(net, k);
221
- if (net->Pump[p].Ptype == CONST_HP)
222
- {
223
- // Use huge value for constant HP pump
224
- hmax = BIG;
225
- if (hyd->LinkFlow[k] < TINY) return TEMPCLOSED;
226
- }
227
- else
228
- {
229
- // Use speed-adjusted shut-off head for other pumps
230
- hmax = SQR(hyd->LinkSetting[k]) * net->Pump[p].Hmax;
231
- }
232
-
233
- // Check if currrent head gain exceeds pump's max. head
234
- if (dh > hmax + hyd->Htol) return XHEAD;
235
-
236
- // No check is made to see if flow exceeds pump's max. flow
237
- return OPEN;
238
- }
239
-
240
-
241
- StatusType prvstatus(Project *pr, int k, StatusType s, double hset,
242
- double h1, double h2)
243
- /*
244
- **-----------------------------------------------------------
245
- ** Input: k = link index
246
- ** s = current status
247
- ** hset = valve head setting
248
- ** h1 = head at upstream node
249
- ** h2 = head at downstream node
250
- ** Output: returns new valve status
251
- ** Purpose: updates status of a pressure reducing valve.
252
- **-----------------------------------------------------------
253
- */
254
- {
255
- Hydraul *hyd = &pr->hydraul;
256
-
257
- StatusType status; // Valve's new status
258
- double hml; // Head loss when fully opened
259
- double htol;
260
- Slink *link;
261
-
262
- htol = hyd->Htol;
263
- link = &pr->network.Link[k];
264
-
265
- // Head loss when fully open
266
- hml = link->Km * SQR(hyd->LinkFlow[k]);
267
-
268
- // Rules for updating valve's status from current value s
269
- status = s;
270
- switch (s)
271
- {
272
- case ACTIVE:
273
- if (hyd->LinkFlow[k] < -hyd->Qtol) status = CLOSED;
274
- else if (h1 - hml < hset - htol) status = OPEN;
275
- else status = ACTIVE;
276
- break;
277
-
278
- case OPEN:
279
- if (hyd->LinkFlow[k] < -hyd->Qtol) status = CLOSED;
280
- else if (h2 >= hset + htol) status = ACTIVE;
281
- else status = OPEN;
282
- break;
283
-
284
- case CLOSED:
285
- if (h1 >= hset + htol && h2 < hset - htol) status = ACTIVE;
286
- else if (h1 < hset - htol && h1 > h2 + htol) status = OPEN;
287
- else status = CLOSED;
288
- break;
289
-
290
- case XPRESSURE:
291
- if (hyd->LinkFlow[k] < -hyd->Qtol) status = CLOSED;
292
- break;
293
-
294
- default:
295
- break;
296
- }
297
- return status;
298
- }
299
-
300
-
301
- StatusType psvstatus(Project *pr, int k, StatusType s, double hset,
302
- double h1, double h2)
303
- /*
304
- **-----------------------------------------------------------
305
- ** Input: k = link index
306
- ** s = current status
307
- ** hset = valve head setting
308
- ** h1 = head at upstream node
309
- ** h2 = head at downstream node
310
- ** Output: returns new valve status
311
- ** Purpose: updates status of a pressure sustaining valve.
312
- **-----------------------------------------------------------
313
- */
314
- {
315
- Hydraul *hyd = &pr->hydraul;
316
-
317
- StatusType status; // Valve's new status
318
- double hml; // Head loss when fully opened
319
- double htol;
320
- Slink *link;
321
-
322
- htol = hyd->Htol;
323
- link = &pr->network.Link[k];
324
-
325
- // Head loss when fully open
326
- hml = link->Km * SQR(hyd->LinkFlow[k]);
327
-
328
- // Rules for updating valve's status from current value s
329
- status = s;
330
- switch (s)
331
- {
332
- case ACTIVE:
333
- if (hyd->LinkFlow[k] < -hyd->Qtol) status = CLOSED;
334
- else if (h2 + hml > hset + htol) status = OPEN;
335
- else status = ACTIVE;
336
- break;
337
-
338
- case OPEN:
339
- if (hyd->LinkFlow[k] < -hyd->Qtol) status = CLOSED;
340
- else if (h1 < hset - htol) status = ACTIVE;
341
- else status = OPEN;
342
- break;
343
-
344
- case CLOSED:
345
- if (h2 > hset + htol && h1 > h2 + htol) status = OPEN;
346
- else if (h1 >= hset + htol && h1 > h2 + htol) status = ACTIVE;
347
- else status = CLOSED;
348
- break;
349
-
350
- case XPRESSURE:
351
- if (hyd->LinkFlow[k] < -hyd->Qtol) status = CLOSED;
352
- break;
353
-
354
- default:
355
- break;
356
- }
357
- return status;
358
- }
359
-
360
-
361
- StatusType fcvstatus(Project *pr, int k, StatusType s, double h1, double h2)
362
- /*
363
- **-----------------------------------------------------------
364
- ** Input: k = link index
365
- ** s = current status
366
- ** h1 = head at upstream node
367
- ** h2 = head at downstream node
368
- ** Output: returns new valve status
369
- ** Purpose: updates status of a flow control valve.
370
- **
371
- ** Valve status changes to XFCV if flow reversal.
372
- ** If current status is XFCV and current flow is
373
- ** above setting, then valve becomes active.
374
- ** If current status is XFCV, and current flow
375
- ** positive but still below valve setting, then
376
- ** status remains same.
377
- **-----------------------------------------------------------
378
- */
379
- {
380
- Hydraul *hyd = &pr->hydraul;
381
- StatusType status; // New valve status
382
-
383
- status = s;
384
- if (h1 - h2 < -hyd->Htol)
385
- {
386
- status = XFCV;
387
- }
388
- else if (hyd->LinkFlow[k] < -hyd->Qtol)
389
- {
390
- status = XFCV;
391
- }
392
- else if (s == XFCV && hyd->LinkFlow[k] >= hyd->LinkSetting[k])
393
- {
394
- status = ACTIVE;
395
- }
396
-
397
- // Active valve's loss coeff. can't be < fully open loss coeff.
398
- else if (status == ACTIVE)
399
- {
400
- if ((h1 - h2) / SQR(hyd->LinkFlow[k]) < pr->network.Link[k].Km)
401
- {
402
- status = XFCV;
403
- }
404
- }
405
- return status;
406
- }
407
-
408
-
409
- void tankstatus(Project *pr, int k, int n, double q)
410
- /*
411
- **----------------------------------------------------------------
412
- ** Input: k = link index
413
- ** n = tank node index
414
- ** q = link flow rate out of (+) or into (-) tank
415
- ** Output: none
416
- ** Purpose: closes link flowing into full or out of empty tank
417
- **----------------------------------------------------------------
418
- */
419
- {
420
- Network *net = &pr->network;
421
- Hydraul *hyd = &pr->hydraul;
422
-
423
- int i;
424
- Stank *tank;
425
- Slink *link = &net->Link[k];
426
-
427
- // Return if link is closed
428
- if (hyd->LinkStatus[k] <= CLOSED) return;
429
-
430
- // Ignore reservoirs
431
- i = n - net->Njuncs;
432
- tank = &net->Tank[i];
433
- if (tank->A == 0.0) return;
434
-
435
- // Can't add flow to a full tank
436
- if (hyd->NodeHead[n] >= tank->Hmax && !tank->CanOverflow && q < 0.0)
437
- hyd->LinkStatus[k] = TEMPCLOSED;
438
-
439
- // Can't remove flow from an empty tank
440
- else if (hyd->NodeHead[n] <= tank->Hmin && q > 0.0)
441
- hyd->LinkStatus[k] = TEMPCLOSED;
442
- }