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.
- epyt_flow/EPANET/EPANET/SRC_engines/AUTHORS +8 -40
- epyt_flow/EPANET/EPANET/SRC_engines/LICENSE +3 -3
- epyt_flow/EPANET/EPANET/SRC_engines/Readme_SRC_Engines.txt +18 -0
- epyt_flow/EPANET/EPANET/SRC_engines/enumstxt.h +7 -24
- epyt_flow/EPANET/EPANET/SRC_engines/epanet.c +374 -726
- epyt_flow/EPANET/EPANET/SRC_engines/epanet2.c +32 -128
- epyt_flow/EPANET/EPANET/SRC_engines/epanet2.def +131 -0
- epyt_flow/EPANET/EPANET/SRC_engines/errors.dat +1 -7
- epyt_flow/EPANET/EPANET/SRC_engines/funcs.h +14 -40
- epyt_flow/EPANET/EPANET/SRC_engines/hash.c +177 -177
- epyt_flow/EPANET/EPANET/SRC_engines/hash.h +28 -28
- epyt_flow/EPANET/EPANET/SRC_engines/hydcoeffs.c +40 -192
- epyt_flow/EPANET/EPANET/SRC_engines/hydraul.c +46 -101
- epyt_flow/EPANET/EPANET/SRC_engines/hydsolver.c +24 -85
- epyt_flow/EPANET/EPANET/SRC_engines/hydstatus.c +63 -29
- epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2.h +37 -70
- epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_2.h +234 -408
- epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_enums.h +37 -87
- epyt_flow/EPANET/EPANET/SRC_engines/inpfile.c +79 -153
- epyt_flow/EPANET/EPANET/SRC_engines/input1.c +94 -59
- epyt_flow/EPANET/EPANET/SRC_engines/input2.c +202 -73
- epyt_flow/EPANET/EPANET/SRC_engines/input3.c +351 -446
- epyt_flow/EPANET/EPANET/SRC_engines/main.c +93 -0
- epyt_flow/EPANET/EPANET/SRC_engines/mempool.c +4 -8
- epyt_flow/EPANET/EPANET/SRC_engines/mempool.h +23 -23
- epyt_flow/EPANET/EPANET/SRC_engines/output.c +4 -5
- epyt_flow/EPANET/EPANET/SRC_engines/project.c +75 -407
- epyt_flow/EPANET/EPANET/SRC_engines/quality.c +2 -12
- epyt_flow/EPANET/EPANET/SRC_engines/qualreact.c +13 -70
- epyt_flow/EPANET/EPANET/SRC_engines/qualroute.c +5 -7
- epyt_flow/EPANET/EPANET/SRC_engines/report.c +20 -88
- epyt_flow/EPANET/EPANET/SRC_engines/rules.c +6 -144
- epyt_flow/EPANET/EPANET/SRC_engines/smatrix.c +19 -19
- epyt_flow/EPANET/EPANET/SRC_engines/text.h +5 -16
- epyt_flow/EPANET/EPANET/SRC_engines/types.h +19 -73
- epyt_flow/EPANET/compile_linux.sh +1 -1
- epyt_flow/EPANET/compile_macos.sh +1 -1
- epyt_flow/VERSION +1 -1
- epyt_flow/simulation/scada/scada_data.py +1 -1
- epyt_flow/utils.py +66 -0
- epyt_flow/visualization/visualization_utils.py +4 -2
- {epyt_flow-0.14.1.dist-info → epyt_flow-0.14.2.dist-info}/METADATA +1 -1
- {epyt_flow-0.14.1.dist-info → epyt_flow-0.14.2.dist-info}/RECORD +46 -52
- epyt_flow/EPANET/EPANET/SRC_engines/flowbalance.c +0 -186
- epyt_flow/EPANET/EPANET/SRC_engines/leakage.c +0 -527
- epyt_flow/EPANET/EPANET/SRC_engines/util/cstr_helper.c +0 -59
- epyt_flow/EPANET/EPANET/SRC_engines/util/cstr_helper.h +0 -38
- epyt_flow/EPANET/EPANET/SRC_engines/util/errormanager.c +0 -92
- epyt_flow/EPANET/EPANET/SRC_engines/util/errormanager.h +0 -39
- epyt_flow/EPANET/EPANET/SRC_engines/util/filemanager.c +0 -212
- epyt_flow/EPANET/EPANET/SRC_engines/util/filemanager.h +0 -81
- epyt_flow/EPANET/EPANET/SRC_engines/validate.c +0 -408
- {epyt_flow-0.14.1.dist-info → epyt_flow-0.14.2.dist-info}/WHEEL +0 -0
- {epyt_flow-0.14.1.dist-info → epyt_flow-0.14.2.dist-info}/licenses/LICENSE +0 -0
- {epyt_flow-0.14.1.dist-info → epyt_flow-0.14.2.dist-info}/top_level.txt +0 -0
|
@@ -1,52 +1,46 @@
|
|
|
1
|
-
epyt_flow/VERSION,sha256=
|
|
1
|
+
epyt_flow/VERSION,sha256=IyzKFfnKsEU9gg0gZJBnV27BjSec47HcbSkx0etjhyE,7
|
|
2
2
|
epyt_flow/__init__.py,sha256=wktX10SXX9GEamDUWR-tcm-8T4d5s6j6aPYr_x4EpOc,1768
|
|
3
3
|
epyt_flow/serialization.py,sha256=uGGN1iZ21ek1u6Xzs4z2xum5Qt8554Wem-wEMGEaa7I,14574
|
|
4
4
|
epyt_flow/topology.py,sha256=FhkPa87vnVX_tQVOKumbRD6kMb3RpGgIdGfZdpmF1Bg,26396
|
|
5
|
-
epyt_flow/utils.py,sha256=
|
|
6
|
-
epyt_flow/EPANET/compile_linux.sh,sha256=
|
|
7
|
-
epyt_flow/EPANET/compile_macos.sh,sha256=
|
|
8
|
-
epyt_flow/EPANET/EPANET/SRC_engines/AUTHORS,sha256=
|
|
9
|
-
epyt_flow/EPANET/EPANET/SRC_engines/LICENSE,sha256=
|
|
10
|
-
epyt_flow/EPANET/EPANET/SRC_engines/
|
|
11
|
-
epyt_flow/EPANET/EPANET/SRC_engines/
|
|
12
|
-
epyt_flow/EPANET/EPANET/SRC_engines/
|
|
13
|
-
epyt_flow/EPANET/EPANET/SRC_engines/
|
|
14
|
-
epyt_flow/EPANET/EPANET/SRC_engines/
|
|
15
|
-
epyt_flow/EPANET/EPANET/SRC_engines/
|
|
5
|
+
epyt_flow/utils.py,sha256=dCEx7FwgTmU8T-ajI-abbrLzJu8llhgn0QDewfTuqHk,20074
|
|
6
|
+
epyt_flow/EPANET/compile_linux.sh,sha256=wcrDyiB8NkivmaC-X9FI2WxhY3IJqDLiyIbVTv2XEPY,489
|
|
7
|
+
epyt_flow/EPANET/compile_macos.sh,sha256=JfXkCDe5OHhNXgukU13_ViCsD7KPV8qClzSXGLH1HVk,504
|
|
8
|
+
epyt_flow/EPANET/EPANET/SRC_engines/AUTHORS,sha256=yie5yAsEEPY0984PmkSRUdqEU9rVvRSGGWmjxdwCYMU,925
|
|
9
|
+
epyt_flow/EPANET/EPANET/SRC_engines/LICENSE,sha256=8SIIcPPO-ga2HotvptcK3uRccZOEGCeUOIU0Asiq7CU,1070
|
|
10
|
+
epyt_flow/EPANET/EPANET/SRC_engines/Readme_SRC_Engines.txt,sha256=7LWHGbghkYJb18wkIskUzYswRq0ZTMu_m6nV0IfvCOs,1005
|
|
11
|
+
epyt_flow/EPANET/EPANET/SRC_engines/enumstxt.h,sha256=osQ2G-uA_a-wdmcYEsRE-nfjuVXxDuYSlUTqSYL4N1s,4351
|
|
12
|
+
epyt_flow/EPANET/EPANET/SRC_engines/epanet.c,sha256=0ZYq1QPL1zLO6PU2syM9JLCD40gq1XNWbN3MZiKek6o,171230
|
|
13
|
+
epyt_flow/EPANET/EPANET/SRC_engines/epanet2.c,sha256=zxsmgt79TZTfF5xFjKoU06yaoGt9aoi07gF1T-yfE70,25173
|
|
14
|
+
epyt_flow/EPANET/EPANET/SRC_engines/epanet2.def,sha256=5265uHv5EV-GSO5XbdXvod469pencib1LZThMyJ7siM,7782
|
|
15
|
+
epyt_flow/EPANET/EPANET/SRC_engines/errors.dat,sha256=mCznP4jfZylKSmCvl1QgnUCyCYnp63F4HOHh9B89m9s,2786
|
|
16
|
+
epyt_flow/EPANET/EPANET/SRC_engines/funcs.h,sha256=KOM54FtTJi5CfWIRtWaGcCW6NaZx8uxuZ8VlyDRHv3Y,5991
|
|
16
17
|
epyt_flow/EPANET/EPANET/SRC_engines/genmmd.c,sha256=qM0JX1LbiGTawbANyXs93XK-khVPMyWhiGQRNQ8SSKE,32936
|
|
17
|
-
epyt_flow/EPANET/EPANET/SRC_engines/hash.c,sha256=
|
|
18
|
-
epyt_flow/EPANET/EPANET/SRC_engines/hash.h,sha256=
|
|
19
|
-
epyt_flow/EPANET/EPANET/SRC_engines/hydcoeffs.c,sha256=
|
|
20
|
-
epyt_flow/EPANET/EPANET/SRC_engines/hydraul.c,sha256=
|
|
21
|
-
epyt_flow/EPANET/EPANET/SRC_engines/hydsolver.c,sha256=
|
|
22
|
-
epyt_flow/EPANET/EPANET/SRC_engines/hydstatus.c,sha256=
|
|
23
|
-
epyt_flow/EPANET/EPANET/SRC_engines/inpfile.c,sha256=
|
|
24
|
-
epyt_flow/EPANET/EPANET/SRC_engines/input1.c,sha256=
|
|
25
|
-
epyt_flow/EPANET/EPANET/SRC_engines/input2.c,sha256=
|
|
26
|
-
epyt_flow/EPANET/EPANET/SRC_engines/input3.c,sha256=
|
|
27
|
-
epyt_flow/EPANET/EPANET/SRC_engines/
|
|
28
|
-
epyt_flow/EPANET/EPANET/SRC_engines/mempool.c,sha256=
|
|
29
|
-
epyt_flow/EPANET/EPANET/SRC_engines/mempool.h,sha256=
|
|
30
|
-
epyt_flow/EPANET/EPANET/SRC_engines/output.c,sha256=
|
|
31
|
-
epyt_flow/EPANET/EPANET/SRC_engines/project.c,sha256=
|
|
32
|
-
epyt_flow/EPANET/EPANET/SRC_engines/quality.c,sha256=
|
|
33
|
-
epyt_flow/EPANET/EPANET/SRC_engines/qualreact.c,sha256=
|
|
34
|
-
epyt_flow/EPANET/EPANET/SRC_engines/qualroute.c,sha256=
|
|
35
|
-
epyt_flow/EPANET/EPANET/SRC_engines/report.c,sha256=
|
|
36
|
-
epyt_flow/EPANET/EPANET/SRC_engines/rules.c,sha256=
|
|
37
|
-
epyt_flow/EPANET/EPANET/SRC_engines/smatrix.c,sha256=
|
|
38
|
-
epyt_flow/EPANET/EPANET/SRC_engines/text.h,sha256=
|
|
39
|
-
epyt_flow/EPANET/EPANET/SRC_engines/types.h,sha256=
|
|
40
|
-
epyt_flow/EPANET/EPANET/SRC_engines/
|
|
41
|
-
epyt_flow/EPANET/EPANET/SRC_engines/include/
|
|
42
|
-
epyt_flow/EPANET/EPANET/SRC_engines/include/
|
|
43
|
-
epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_enums.h,sha256=vP4c3AhIB6Md2HLS8YaKVXADUqXiuJSu1NmNDl9vhEY,22683
|
|
44
|
-
epyt_flow/EPANET/EPANET/SRC_engines/util/cstr_helper.c,sha256=qFvFKXV0YLtk_Q79T0ERuXlgvsgznPMQKbpzz40xbkI,1348
|
|
45
|
-
epyt_flow/EPANET/EPANET/SRC_engines/util/cstr_helper.h,sha256=2ivKuiOY097jBCFb0hWWoSgZqrxUyo6BVVbdmqkTYlc,727
|
|
46
|
-
epyt_flow/EPANET/EPANET/SRC_engines/util/errormanager.c,sha256=yvdysNOo6yeoSWWYYGsBn6ywtpTmuV5Qpq4Vy_QIdLs,2058
|
|
47
|
-
epyt_flow/EPANET/EPANET/SRC_engines/util/errormanager.h,sha256=ghebj0NO_1lvmFncgUt35t9Z9D4zrWwTSnpxzyfahig,982
|
|
48
|
-
epyt_flow/EPANET/EPANET/SRC_engines/util/filemanager.c,sha256=ul4LdINZ8Lb273KPCRWo1KjCLC6dIzhWE62sXJwX5kc,4666
|
|
49
|
-
epyt_flow/EPANET/EPANET/SRC_engines/util/filemanager.h,sha256=QM0J6ED52S-LjJIOJ3zYw0KRSGnQ9KCogJtf77kqsb0,1844
|
|
18
|
+
epyt_flow/EPANET/EPANET/SRC_engines/hash.c,sha256=NiuW7NXMzHVJzZCl_IF6OBoc9MoxIaIZ8IpGauKPzos,4018
|
|
19
|
+
epyt_flow/EPANET/EPANET/SRC_engines/hash.h,sha256=GBNyY8j3CF9rvXRo7pSThJoFfAtubqMVvo3jY48d9Q8,838
|
|
20
|
+
epyt_flow/EPANET/EPANET/SRC_engines/hydcoeffs.c,sha256=Zspd53cs8JafMwEfu0mzSBgmun8h_DnZ2-lJpz3hnS4,33821
|
|
21
|
+
epyt_flow/EPANET/EPANET/SRC_engines/hydraul.c,sha256=OC5GW4lH4RXjB2JtuKM_OE5oD3eSWqfQ9w0Rnbnk0Bs,32358
|
|
22
|
+
epyt_flow/EPANET/EPANET/SRC_engines/hydsolver.c,sha256=171wY7AsPn9kG45u7XAy2GTrGIfTP0QsIZoECMagS7Y,23669
|
|
23
|
+
epyt_flow/EPANET/EPANET/SRC_engines/hydstatus.c,sha256=yhnLvQfnNwNPBmRv_QOQc4eaISnQ5PDajbWxEv6zWJg,13947
|
|
24
|
+
epyt_flow/EPANET/EPANET/SRC_engines/inpfile.c,sha256=jUXIweD0XV7uxYBKB3JwyJVR687CExaC46UUiiBNGG4,24745
|
|
25
|
+
epyt_flow/EPANET/EPANET/SRC_engines/input1.c,sha256=dIhHPr7ATPDbKsUVVBQPOVenYPWh_9etoCee7PZOrGg,24278
|
|
26
|
+
epyt_flow/EPANET/EPANET/SRC_engines/input2.c,sha256=LpgMFWIT9Ut9Q1kTiizyrTbWmUstVrklzwNvl0az-DU,25371
|
|
27
|
+
epyt_flow/EPANET/EPANET/SRC_engines/input3.c,sha256=tMsV9nOqs5wmZiT3SJ4sX8MfCdyRdn7D0an_GhP36Kk,67160
|
|
28
|
+
epyt_flow/EPANET/EPANET/SRC_engines/main.c,sha256=SpjeDWuOGK-eZRTddrRAaa-EbWDT-ybVkr3Sqw2K_Jw,2563
|
|
29
|
+
epyt_flow/EPANET/EPANET/SRC_engines/mempool.c,sha256=oKC-rCMuAZ09nLY4mclO36v4C_360epYnbZZGe3n_t8,3600
|
|
30
|
+
epyt_flow/EPANET/EPANET/SRC_engines/mempool.h,sha256=sQhzqPYaPn8Y2W0DngGOGDfURArD1N0ARkArrpBMnl8,654
|
|
31
|
+
epyt_flow/EPANET/EPANET/SRC_engines/output.c,sha256=9V1e5d2vLMlM4jAWtEoQZquN8YQiX7SKcgR5URELZqY,26660
|
|
32
|
+
epyt_flow/EPANET/EPANET/SRC_engines/project.c,sha256=br1qo2OBmUXlea5B1WBTOBDJIgKe99uXhwQ47X4O47k,41722
|
|
33
|
+
epyt_flow/EPANET/EPANET/SRC_engines/quality.c,sha256=TjWSkwcsRyfHZNcFwUpw9QixyciIRLDXng7hdAIxRuc,19500
|
|
34
|
+
epyt_flow/EPANET/EPANET/SRC_engines/qualreact.c,sha256=pSaAmJRHUR2dHyLE91E8Tdk3EUzVB7NX1yBY0q1GD-s,21691
|
|
35
|
+
epyt_flow/EPANET/EPANET/SRC_engines/qualroute.c,sha256=uYFYu1oZTID2a-BPAfhRSnkJFiBR8NRReaZQPNErBDQ,21516
|
|
36
|
+
epyt_flow/EPANET/EPANET/SRC_engines/report.c,sha256=sMEhMbSbZFDieFEdCHr7pJOLLyrX-9AP8j25ZeC-BJ0,43451
|
|
37
|
+
epyt_flow/EPANET/EPANET/SRC_engines/rules.c,sha256=DKnxUdgdYyPa7MZobElZubJNT2rbPDILDhT2V4EtfVc,36206
|
|
38
|
+
epyt_flow/EPANET/EPANET/SRC_engines/smatrix.c,sha256=32g-qcwJUm5doqAL1DfSLc04jco5tCR9ZVRqxhvtEw4,25997
|
|
39
|
+
epyt_flow/EPANET/EPANET/SRC_engines/text.h,sha256=2xMgPCxJyjcnRyLlIYdyGJBeF5KKS0kNIt6I8A2bGJU,17375
|
|
40
|
+
epyt_flow/EPANET/EPANET/SRC_engines/types.h,sha256=SNg5XzbNDgaZ0C4KpwhQzaE8YSDOD47q774WtVk-G8I,30772
|
|
41
|
+
epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2.h,sha256=gw2UabMXxnQpFuoLmWClsuL3zijjrsX5YaJQhfgRdVU,13955
|
|
42
|
+
epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_2.h,sha256=G0MjCtgiJnZFiCo24b4iEqyrOdqfsIJRDZldvCXlq68,69518
|
|
43
|
+
epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_enums.h,sha256=wEecv1S6BADBKGxnzCCotLSH63VtD0Gn9p6lS_8NkGU,19874
|
|
50
44
|
epyt_flow/EPANET/EPANET-MSX/MSX_Updates.txt,sha256=CLrBkmZ9YKYsBA1TImXIgKYK-jgemf5aoCLlhcE9tt0,1536
|
|
51
45
|
epyt_flow/EPANET/EPANET-MSX/readme.txt,sha256=Zw0A2HN11LN1L7GY3Ev7XuBcH4Ujof_TSvA3R1LTQVQ,911
|
|
52
46
|
epyt_flow/EPANET/EPANET-MSX/Src/dispersion.h,sha256=qYeHTzI4N2Y2ja0qGkKUBG6aGaD_erNgvHuhGgy0iLM,941
|
|
@@ -130,7 +124,7 @@ epyt_flow/simulation/events/system_event.py,sha256=plnHp53Xnua5QMmSwrKsU6aP-omrT
|
|
|
130
124
|
epyt_flow/simulation/scada/__init__.py,sha256=pfJhg-tM5DaiZTXs0_1qJsY2R6Py_LwSz6BUFJexfQM,150
|
|
131
125
|
epyt_flow/simulation/scada/complex_control.py,sha256=p2ehLyScJbj2jbyevXf7T3Ot8jnBYWgRR3Cz-m3boB0,22107
|
|
132
126
|
epyt_flow/simulation/scada/custom_control.py,sha256=QzkKcn7t53GcTaRofRDbY-HErcDReMF4utWkck6bN60,4681
|
|
133
|
-
epyt_flow/simulation/scada/scada_data.py,sha256=
|
|
127
|
+
epyt_flow/simulation/scada/scada_data.py,sha256=kkqb8iDWtoRYEkCoJ9Jy3kCi9vEQmM7bh028cUMX36o,203284
|
|
134
128
|
epyt_flow/simulation/scada/scada_data_export.py,sha256=WNAFn_WNfzYAEFbl2Al-cOIx-A0ozY4AI60-i_qEHdc,11643
|
|
135
129
|
epyt_flow/simulation/scada/simple_control.py,sha256=wUsxsrgqmYxXR93_atcKbV9E-t3hgqj60ZeTvoBBnoQ,12215
|
|
136
130
|
epyt_flow/uncertainty/__init__.py,sha256=ZRjuJL9rDpWVSdPwObPxFpEmMTcgAl3VmPOsS6cIyGg,89
|
|
@@ -140,9 +134,9 @@ epyt_flow/uncertainty/uncertainties.py,sha256=QBRbI3zIzkeFScyYD5Dy0TBxuL9jPV4SnV
|
|
|
140
134
|
epyt_flow/uncertainty/utils.py,sha256=K-ZhyO6Bg7UmNPgpfND0JLa_wRwyrtUUgGTWyWwy-fo,8029
|
|
141
135
|
epyt_flow/visualization/__init__.py,sha256=uQ7lO6AsgLc88X48Te3QhBQY-iDKGvdPtxKCl4b-Mfw,70
|
|
142
136
|
epyt_flow/visualization/scenario_visualizer.py,sha256=vkP0J_OfjvePUz_HehXJkH4CGKR3chAHe_UTx4hQ6XI,57860
|
|
143
|
-
epyt_flow/visualization/visualization_utils.py,sha256
|
|
144
|
-
epyt_flow-0.14.
|
|
145
|
-
epyt_flow-0.14.
|
|
146
|
-
epyt_flow-0.14.
|
|
147
|
-
epyt_flow-0.14.
|
|
148
|
-
epyt_flow-0.14.
|
|
137
|
+
epyt_flow/visualization/visualization_utils.py,sha256=-_Hs3FKQz--iVJ10ZeEv1Co9OSbayZmHjxyhKsnzalE,27629
|
|
138
|
+
epyt_flow-0.14.2.dist-info/licenses/LICENSE,sha256=YRJC2kcAhMlpEeHwUF0lzE-GRXLFyAjXNErI8L5UwYk,1071
|
|
139
|
+
epyt_flow-0.14.2.dist-info/METADATA,sha256=P3IAnVg0LiPBE2I2zfOlLGudlNwQzLjERE3vMH1TIPg,9713
|
|
140
|
+
epyt_flow-0.14.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
141
|
+
epyt_flow-0.14.2.dist-info/top_level.txt,sha256=Wh_kd7TRL8ownCw3Y3dxx-9C0iTSk6wNauv_NX9JcrY,10
|
|
142
|
+
epyt_flow-0.14.2.dist-info/RECORD,,
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
******************************************************************************
|
|
3
|
-
Project: OWA EPANET
|
|
4
|
-
Version: 2.3
|
|
5
|
-
Module: flowbalance.c
|
|
6
|
-
Description: computes components of network's flow balance
|
|
7
|
-
Authors: see AUTHORS
|
|
8
|
-
Copyright: see AUTHORS
|
|
9
|
-
License: see LICENSE
|
|
10
|
-
Last Updated: 06/26/2024
|
|
11
|
-
******************************************************************************
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
#include "types.h"
|
|
15
|
-
|
|
16
|
-
// Exported functions (declared in funcs.h)
|
|
17
|
-
//void startflowbalance(Project *);
|
|
18
|
-
//void updateflowbalance(Project *, long);
|
|
19
|
-
//void endflowbalance(Project *);
|
|
20
|
-
|
|
21
|
-
void startflowbalance(Project *pr)
|
|
22
|
-
/*
|
|
23
|
-
**-------------------------------------------------------------------
|
|
24
|
-
** Input: none
|
|
25
|
-
** Output: none
|
|
26
|
-
** Purpose: initializes components of the network's flow balance.
|
|
27
|
-
**-------------------------------------------------------------------
|
|
28
|
-
*/
|
|
29
|
-
{
|
|
30
|
-
Hydraul *hyd = &pr->hydraul;
|
|
31
|
-
hyd->FlowBalance.totalInflow = 0.0;
|
|
32
|
-
hyd->FlowBalance.totalOutflow = 0.0;
|
|
33
|
-
hyd->FlowBalance.consumerDemand = 0.0;
|
|
34
|
-
hyd->FlowBalance.emitterDemand = 0.0;
|
|
35
|
-
hyd->FlowBalance.leakageDemand = 0.0;
|
|
36
|
-
hyd->FlowBalance.deficitDemand = 0.0;
|
|
37
|
-
hyd->FlowBalance.storageDemand = 0.0;
|
|
38
|
-
hyd->FlowBalance.ratio = 0.0;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
void updateflowbalance(Project *pr, long hstep)
|
|
42
|
-
/*
|
|
43
|
-
**-------------------------------------------------------------------
|
|
44
|
-
** Input: hstep = time step (sec)
|
|
45
|
-
** Output: none
|
|
46
|
-
** Purpose: updates components of the system flow balance.
|
|
47
|
-
**-------------------------------------------------------------------
|
|
48
|
-
*/
|
|
49
|
-
{
|
|
50
|
-
Network *net = &pr->network;
|
|
51
|
-
Hydraul *hyd = &pr->hydraul;
|
|
52
|
-
Times *time = &pr->times;
|
|
53
|
-
|
|
54
|
-
int i, j;
|
|
55
|
-
double v, dt, deficit, fullDemand;
|
|
56
|
-
SflowBalance flowBalance;
|
|
57
|
-
|
|
58
|
-
// Determine current time interval in seconds
|
|
59
|
-
if (time->Dur == 0) dt = 1.0;
|
|
60
|
-
else if (time->Htime < time->Dur)
|
|
61
|
-
{
|
|
62
|
-
dt = (double) hstep;
|
|
63
|
-
}
|
|
64
|
-
else return;
|
|
65
|
-
|
|
66
|
-
// Initialize local flow balance
|
|
67
|
-
flowBalance.totalInflow = 0.0;
|
|
68
|
-
flowBalance.totalOutflow = 0.0;
|
|
69
|
-
flowBalance.consumerDemand = 0.0;
|
|
70
|
-
flowBalance.emitterDemand = 0.0;
|
|
71
|
-
flowBalance.leakageDemand = 0.0;
|
|
72
|
-
flowBalance.deficitDemand = 0.0;
|
|
73
|
-
flowBalance.storageDemand = 0.0;
|
|
74
|
-
fullDemand = 0.0;
|
|
75
|
-
|
|
76
|
-
// Initialize leakage loss
|
|
77
|
-
hyd->LeakageLoss = 0.0;
|
|
78
|
-
|
|
79
|
-
// Examine each junction node
|
|
80
|
-
for (i = 1; i <= net->Njuncs; i++)
|
|
81
|
-
{
|
|
82
|
-
// Accumulate consumer demand flow
|
|
83
|
-
v = hyd->DemandFlow[i];
|
|
84
|
-
if (v < 0.0)
|
|
85
|
-
flowBalance.totalInflow += (-v);
|
|
86
|
-
else
|
|
87
|
-
{
|
|
88
|
-
fullDemand += hyd->FullDemand[i];
|
|
89
|
-
flowBalance.consumerDemand += v;
|
|
90
|
-
flowBalance.totalOutflow += v;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// Accumulate emitter and leakage flow
|
|
94
|
-
v = hyd->EmitterFlow[i];
|
|
95
|
-
flowBalance.emitterDemand += v;
|
|
96
|
-
flowBalance.totalOutflow += v;
|
|
97
|
-
v = hyd->LeakageFlow[i];
|
|
98
|
-
flowBalance.leakageDemand += v;
|
|
99
|
-
flowBalance.totalOutflow += v;
|
|
100
|
-
|
|
101
|
-
// Accumulate demand deficit flow
|
|
102
|
-
if (hyd->DemandModel == PDA && hyd->FullDemand[i] > 0.0)
|
|
103
|
-
{
|
|
104
|
-
deficit = hyd->FullDemand[i] - hyd->DemandFlow[i];
|
|
105
|
-
if (deficit > 0.0)
|
|
106
|
-
flowBalance.deficitDemand += deficit;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
// Examine each tank/reservoir node
|
|
111
|
-
for (j = 1; j <= net->Ntanks; j++)
|
|
112
|
-
{
|
|
113
|
-
i = net->Tank[j].Node;
|
|
114
|
-
v = hyd->NodeDemand[i];
|
|
115
|
-
|
|
116
|
-
// For a reservoir node
|
|
117
|
-
if (net->Tank[j].A == 0.0)
|
|
118
|
-
{
|
|
119
|
-
if (v >= 0.0)
|
|
120
|
-
flowBalance.totalOutflow += v;
|
|
121
|
-
else
|
|
122
|
-
flowBalance.totalInflow += (-v);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// For tank
|
|
126
|
-
else
|
|
127
|
-
flowBalance.storageDemand += v;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
// Find % leakage for current period
|
|
131
|
-
v = flowBalance.totalInflow;
|
|
132
|
-
if (flowBalance.storageDemand < 0.0) v += (-flowBalance.storageDemand);
|
|
133
|
-
if (v > 0.0)
|
|
134
|
-
hyd->LeakageLoss = flowBalance.leakageDemand / v * 100.0;
|
|
135
|
-
|
|
136
|
-
// Update flow balance for entire run
|
|
137
|
-
hyd->FlowBalance.totalInflow += flowBalance.totalInflow * dt;
|
|
138
|
-
hyd->FlowBalance.totalOutflow += flowBalance.totalOutflow * dt;
|
|
139
|
-
hyd->FlowBalance.consumerDemand += flowBalance.consumerDemand * dt;
|
|
140
|
-
hyd->FlowBalance.emitterDemand += flowBalance.emitterDemand * dt;
|
|
141
|
-
hyd->FlowBalance.leakageDemand += flowBalance.leakageDemand * dt;
|
|
142
|
-
hyd->FlowBalance.deficitDemand += flowBalance.deficitDemand * dt;
|
|
143
|
-
hyd->FlowBalance.storageDemand += flowBalance.storageDemand * dt;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
void endflowbalance(Project *pr)
|
|
147
|
-
/*
|
|
148
|
-
**-------------------------------------------------------------------
|
|
149
|
-
** Input: none
|
|
150
|
-
** Output: none
|
|
151
|
-
** Purpose: finalizes components of the system flow balance.
|
|
152
|
-
**-------------------------------------------------------------------
|
|
153
|
-
*/
|
|
154
|
-
{
|
|
155
|
-
Hydraul *hyd = &pr->hydraul;
|
|
156
|
-
Times *time = &pr->times;
|
|
157
|
-
|
|
158
|
-
double seconds, qin, qout, qstor, r;
|
|
159
|
-
|
|
160
|
-
if (time->Htime > 0)
|
|
161
|
-
seconds = time->Htime;
|
|
162
|
-
else
|
|
163
|
-
seconds = 1.0;
|
|
164
|
-
hyd->FlowBalance.totalInflow /= seconds;
|
|
165
|
-
hyd->FlowBalance.totalOutflow /= seconds;
|
|
166
|
-
hyd->FlowBalance.consumerDemand /= seconds;
|
|
167
|
-
hyd->FlowBalance.emitterDemand /= seconds;
|
|
168
|
-
hyd->FlowBalance.leakageDemand /= seconds;
|
|
169
|
-
hyd->FlowBalance.deficitDemand /= seconds;
|
|
170
|
-
hyd->FlowBalance.storageDemand /= seconds;
|
|
171
|
-
|
|
172
|
-
qin = hyd->FlowBalance.totalInflow;
|
|
173
|
-
qout = hyd->FlowBalance.totalOutflow;
|
|
174
|
-
qstor = hyd->FlowBalance.storageDemand;
|
|
175
|
-
if (qstor > 0.0)
|
|
176
|
-
qout += qstor;
|
|
177
|
-
else
|
|
178
|
-
qin -= qstor;
|
|
179
|
-
if (qin == qout)
|
|
180
|
-
r = 1.0;
|
|
181
|
-
else if (qin > 0.0)
|
|
182
|
-
r = qout / qin;
|
|
183
|
-
else
|
|
184
|
-
r = 0.0;
|
|
185
|
-
hyd->FlowBalance.ratio = r;
|
|
186
|
-
}
|