epyt-flow 0.14.1__py3-none-any.whl → 0.15.0b1__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 (106) 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 +367 -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-0.14.1.dist-info → epyt_flow-0.15.0b1.dist-info}/METADATA +12 -18
  19. epyt_flow-0.15.0b1.dist-info/RECORD +65 -0
  20. epyt_flow/EPANET/EPANET/SRC_engines/AUTHORS +0 -60
  21. epyt_flow/EPANET/EPANET/SRC_engines/LICENSE +0 -21
  22. epyt_flow/EPANET/EPANET/SRC_engines/enumstxt.h +0 -151
  23. epyt_flow/EPANET/EPANET/SRC_engines/epanet.c +0 -5930
  24. epyt_flow/EPANET/EPANET/SRC_engines/epanet2.c +0 -961
  25. epyt_flow/EPANET/EPANET/SRC_engines/errors.dat +0 -79
  26. epyt_flow/EPANET/EPANET/SRC_engines/flowbalance.c +0 -186
  27. epyt_flow/EPANET/EPANET/SRC_engines/funcs.h +0 -219
  28. epyt_flow/EPANET/EPANET/SRC_engines/genmmd.c +0 -1000
  29. epyt_flow/EPANET/EPANET/SRC_engines/hash.c +0 -177
  30. epyt_flow/EPANET/EPANET/SRC_engines/hash.h +0 -28
  31. epyt_flow/EPANET/EPANET/SRC_engines/hydcoeffs.c +0 -1303
  32. epyt_flow/EPANET/EPANET/SRC_engines/hydraul.c +0 -1172
  33. epyt_flow/EPANET/EPANET/SRC_engines/hydsolver.c +0 -781
  34. epyt_flow/EPANET/EPANET/SRC_engines/hydstatus.c +0 -442
  35. epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2.h +0 -464
  36. epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_2.h +0 -1960
  37. epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_enums.h +0 -518
  38. epyt_flow/EPANET/EPANET/SRC_engines/inpfile.c +0 -884
  39. epyt_flow/EPANET/EPANET/SRC_engines/input1.c +0 -672
  40. epyt_flow/EPANET/EPANET/SRC_engines/input2.c +0 -735
  41. epyt_flow/EPANET/EPANET/SRC_engines/input3.c +0 -2265
  42. epyt_flow/EPANET/EPANET/SRC_engines/leakage.c +0 -527
  43. epyt_flow/EPANET/EPANET/SRC_engines/mempool.c +0 -146
  44. epyt_flow/EPANET/EPANET/SRC_engines/mempool.h +0 -24
  45. epyt_flow/EPANET/EPANET/SRC_engines/output.c +0 -853
  46. epyt_flow/EPANET/EPANET/SRC_engines/project.c +0 -1691
  47. epyt_flow/EPANET/EPANET/SRC_engines/quality.c +0 -695
  48. epyt_flow/EPANET/EPANET/SRC_engines/qualreact.c +0 -800
  49. epyt_flow/EPANET/EPANET/SRC_engines/qualroute.c +0 -696
  50. epyt_flow/EPANET/EPANET/SRC_engines/report.c +0 -1557
  51. epyt_flow/EPANET/EPANET/SRC_engines/rules.c +0 -1500
  52. epyt_flow/EPANET/EPANET/SRC_engines/smatrix.c +0 -871
  53. epyt_flow/EPANET/EPANET/SRC_engines/text.h +0 -508
  54. epyt_flow/EPANET/EPANET/SRC_engines/types.h +0 -928
  55. epyt_flow/EPANET/EPANET/SRC_engines/util/cstr_helper.c +0 -59
  56. epyt_flow/EPANET/EPANET/SRC_engines/util/cstr_helper.h +0 -38
  57. epyt_flow/EPANET/EPANET/SRC_engines/util/errormanager.c +0 -92
  58. epyt_flow/EPANET/EPANET/SRC_engines/util/errormanager.h +0 -39
  59. epyt_flow/EPANET/EPANET/SRC_engines/util/filemanager.c +0 -212
  60. epyt_flow/EPANET/EPANET/SRC_engines/util/filemanager.h +0 -81
  61. epyt_flow/EPANET/EPANET/SRC_engines/validate.c +0 -408
  62. epyt_flow/EPANET/EPANET-MSX/MSX_Updates.txt +0 -53
  63. epyt_flow/EPANET/EPANET-MSX/Src/dispersion.h +0 -27
  64. epyt_flow/EPANET/EPANET-MSX/Src/hash.c +0 -107
  65. epyt_flow/EPANET/EPANET-MSX/Src/hash.h +0 -28
  66. epyt_flow/EPANET/EPANET-MSX/Src/include/epanetmsx.h +0 -102
  67. epyt_flow/EPANET/EPANET-MSX/Src/include/epanetmsx_export.h +0 -42
  68. epyt_flow/EPANET/EPANET-MSX/Src/mathexpr.c +0 -937
  69. epyt_flow/EPANET/EPANET-MSX/Src/mathexpr.h +0 -39
  70. epyt_flow/EPANET/EPANET-MSX/Src/mempool.c +0 -204
  71. epyt_flow/EPANET/EPANET-MSX/Src/mempool.h +0 -24
  72. epyt_flow/EPANET/EPANET-MSX/Src/msxchem.c +0 -1285
  73. epyt_flow/EPANET/EPANET-MSX/Src/msxcompiler.c +0 -368
  74. epyt_flow/EPANET/EPANET-MSX/Src/msxdict.h +0 -42
  75. epyt_flow/EPANET/EPANET-MSX/Src/msxdispersion.c +0 -586
  76. epyt_flow/EPANET/EPANET-MSX/Src/msxerr.c +0 -116
  77. epyt_flow/EPANET/EPANET-MSX/Src/msxfile.c +0 -260
  78. epyt_flow/EPANET/EPANET-MSX/Src/msxfuncs.c +0 -175
  79. epyt_flow/EPANET/EPANET-MSX/Src/msxfuncs.h +0 -35
  80. epyt_flow/EPANET/EPANET-MSX/Src/msxinp.c +0 -1504
  81. epyt_flow/EPANET/EPANET-MSX/Src/msxout.c +0 -401
  82. epyt_flow/EPANET/EPANET-MSX/Src/msxproj.c +0 -791
  83. epyt_flow/EPANET/EPANET-MSX/Src/msxqual.c +0 -2010
  84. epyt_flow/EPANET/EPANET-MSX/Src/msxrpt.c +0 -400
  85. epyt_flow/EPANET/EPANET-MSX/Src/msxtank.c +0 -422
  86. epyt_flow/EPANET/EPANET-MSX/Src/msxtoolkit.c +0 -1164
  87. epyt_flow/EPANET/EPANET-MSX/Src/msxtypes.h +0 -551
  88. epyt_flow/EPANET/EPANET-MSX/Src/msxutils.c +0 -524
  89. epyt_flow/EPANET/EPANET-MSX/Src/msxutils.h +0 -56
  90. epyt_flow/EPANET/EPANET-MSX/Src/newton.c +0 -158
  91. epyt_flow/EPANET/EPANET-MSX/Src/newton.h +0 -34
  92. epyt_flow/EPANET/EPANET-MSX/Src/rk5.c +0 -287
  93. epyt_flow/EPANET/EPANET-MSX/Src/rk5.h +0 -39
  94. epyt_flow/EPANET/EPANET-MSX/Src/ros2.c +0 -293
  95. epyt_flow/EPANET/EPANET-MSX/Src/ros2.h +0 -35
  96. epyt_flow/EPANET/EPANET-MSX/Src/smatrix.c +0 -816
  97. epyt_flow/EPANET/EPANET-MSX/Src/smatrix.h +0 -29
  98. epyt_flow/EPANET/EPANET-MSX/readme.txt +0 -14
  99. epyt_flow/EPANET/compile_linux.sh +0 -4
  100. epyt_flow/EPANET/compile_macos.sh +0 -4
  101. epyt_flow/simulation/backend/__init__.py +0 -1
  102. epyt_flow/simulation/backend/my_epyt.py +0 -1101
  103. epyt_flow-0.14.1.dist-info/RECORD +0 -148
  104. {epyt_flow-0.14.1.dist-info → epyt_flow-0.15.0b1.dist-info}/WHEEL +0 -0
  105. {epyt_flow-0.14.1.dist-info → epyt_flow-0.15.0b1.dist-info}/licenses/LICENSE +0 -0
  106. {epyt_flow-0.14.1.dist-info → epyt_flow-0.15.0b1.dist-info}/top_level.txt +0 -0
@@ -1,79 +0,0 @@
1
- //EPANET 2 Error Messages
2
- DAT(0,"ok")
3
- DAT(101,"insufficient memory available")
4
- DAT(102,"no network data available")
5
- DAT(103,"hydraulic solver not opened")
6
- DAT(104,"no hydraulics for water quality analysis")
7
- DAT(105,"water quality solver not opened")
8
- DAT(106,"no results saved to report on")
9
- DAT(107,"hydraulics supplied from external file")
10
- DAT(108,"cannot use external file while hydraulics solver is active")
11
- DAT(110,"cannot solve network hydraulic equations")
12
- DAT(120,"cannot solve water quality transport equations")
13
-
14
- // These errors apply only to an input file
15
- DAT(200,"one or more errors in input file")
16
- DAT(201,"syntax error")
17
- DAT(299,"invalid section keyword")
18
-
19
- // These errors apply to both an input file and to API functions
20
- DAT(202,"illegal numeric value")
21
- DAT(203,"undefined node")
22
- DAT(204,"undefined link")
23
- DAT(205,"undefined time pattern")
24
- DAT(206,"undefined curve")
25
- DAT(207,"attempt to control CV/GPV link")
26
- DAT(208,"illegal PDA pressure limits")
27
- DAT(209,"illegal node property value")
28
- DAT(211,"illegal link property value")
29
- DAT(212,"undefined trace node")
30
- DAT(213,"invalid option value")
31
- DAT(214,"too many characters in input line")
32
- DAT(215,"duplicate ID label")
33
- DAT(216,"reference to undefined pump")
34
- DAT(217,"invalid pump energy data")
35
- DAT(219,"illegal valve connection to tank node")
36
- DAT(220,"illegal valve connection to another valve")
37
- DAT(221,"mis-placed rule clause in rule-based control")
38
- DAT(222,"same start and end nodes for link")
39
-
40
- // These errors apply to network consistency check
41
- DAT(223,"not enough nodes in network")
42
- DAT(224,"no tanks or reservoirs in network")
43
- DAT(225,"invalid lower/upper levels for tank")
44
- DAT(226,"no head curve or power rating for pump")
45
- DAT(227,"invalid head curve for pump")
46
- DAT(230,"nonincreasing x-values for curve")
47
- DAT(231,"no data provided for curve")
48
- DAT(232,"no data provided for pattern")
49
- DAT(233,"network has unconnected nodes")
50
- DAT(234,"network has an unconnected node with ID: ")
51
-
52
- // These errors apply only to API functions
53
- DAT(240,"nonexistent source")
54
- DAT(241,"nonexistent control")
55
- DAT(250,"invalid format")
56
- DAT(251,"invalid parameter code")
57
- DAT(252,"invalid ID name")
58
- DAT(253,"nonexistent demand category")
59
- DAT(254,"node with no coordinates")
60
- DAT(255,"invalid link vertex")
61
- DAT(257,"nonexistent rule")
62
- DAT(258,"nonexistent rule clause")
63
- DAT(259,"attempt to delete a node that still has links connected to it")
64
- DAT(260,"attempt to delete node assigned as a Trace Node")
65
- DAT(261,"attempt to delete a node or link contained in a control")
66
- DAT(262,"attempt to modify network structure while solver is active")
67
- DAT(263,"node is not a tank")
68
- DAT(264,"link is not a valve")
69
-
70
- // File errors
71
- DAT(301,"identical file names")
72
- DAT(302,"cannot open input file")
73
- DAT(303,"cannot open report file")
74
- DAT(304,"cannot open binary output file")
75
- DAT(305,"cannot open hydraulics file")
76
- DAT(306,"hydraulics file does not match network data")
77
- DAT(307,"cannot read hydraulics file")
78
- DAT(308,"cannot save results to file")
79
- DAT(309,"cannot save results to report file")
@@ -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
- }
@@ -1,219 +0,0 @@
1
- /*
2
- ******************************************************************************
3
- Project: OWA EPANET
4
- Version: 2.3
5
- Module: funcs.h
6
- Description: prototypes of external functions called by various modules
7
- Authors: see AUTHORS
8
- Copyright: see AUTHORS
9
- License: see LICENSE
10
- Last Updated: 04/23/2025
11
- ******************************************************************************
12
- */
13
- #ifndef FUNCS_H
14
- #define FUNCS_H
15
-
16
- // ------- PROJECT.C ------------
17
-
18
- void initpointers(Project *);
19
- int allocdata(Project *);
20
- void freedata(Project *);
21
-
22
- int openproject(Project *, const char *, const char *, const char *, int);
23
- int openfiles(Project *, const char *, const char *,const char *);
24
- int openhydfile(Project *);
25
- int openoutfile(Project *);
26
- void closeoutfile(Project *);
27
-
28
- int buildadjlists(Network *);
29
- void freeadjlists(Network *);
30
-
31
- int incontrols(Project *, int, int);
32
- int changevalvetype(Project *, int, int);
33
- int valvecheck(Project *, int, int, int, int);
34
- int unlinked(Project *);
35
-
36
- int findnode(Network *, const char *);
37
- int findlink(Network *, const char *);
38
- int findtank(Network *, int);
39
- int findvalve(Network *, int);
40
- int findpump(Network *, int);
41
- int findpattern(Network *, const char *);
42
- int findcurve(Network *, const char *);
43
-
44
- Pdemand finddemand(Pdemand, int);
45
- int adddemand(Snode *, double, int, const char *);
46
- void freedemands(Snode *);
47
-
48
- int addlinkvertex(Slink *, double, double);
49
- void freelinkvertices(Slink *);
50
-
51
- void adjustpatterns(Network *, int);
52
- void adjustcurves(Network *, int);
53
- int resizecurve(Scurve *, int);
54
- int setcontrol(Project *, int, int, double, int, double, Scontrol *);
55
-
56
- int getcomment(Network *, int, int, char *);
57
- int setcomment(Network *, int, int, const char *);
58
- int gettag(Network *, int, int, char *);
59
- int settag(Network *, int, int, const char *);
60
-
61
- int namevalid(const char *);
62
- void getTmpName(char *);
63
- char *xstrcpy(char **, const char *, const size_t n);
64
- int strcomp(const char *, const char *);
65
- double interp(int, double [], double [], double);
66
- char *geterrmsg(int, char *);
67
- void errmsg(Project *, int);
68
- void writewin(void (*vp)(char *), char *);
69
-
70
- // ------- INPUT1.C ----------------
71
-
72
- int getdata(Project *);
73
- void setdefaults(Project *);
74
- void initreport(Report *);
75
- void adjustdata(Project *);
76
- void inittanks(Project *);
77
- void initunits(Project *);
78
- void convertunits(Project *);
79
-
80
- //-------- INPUT2.C -----------------
81
-
82
- int netsize(Project *);
83
- int readdata(Project *);
84
- int findmatch(char *, char *[]);
85
- int match(const char *, const char *);
86
- int gettokens(char *, char **, int, char *);
87
- int getfloat(char *, double *);
88
- double hour(char *, char *);
89
- int setreport(Project *, char *);
90
-
91
- // ------- INPUT3.C -----------------
92
-
93
- int juncdata(Project *);
94
- int tankdata(Project *);
95
- int pipedata(Project *);
96
- int pumpdata(Project *);
97
- int valvedata(Project *);
98
- int patterndata(Project *);
99
- int curvedata(Project *);
100
- int coordata(Project *);
101
- int demanddata(Project *);
102
- int controldata(Project *);
103
- int energydata(Project *);
104
- int sourcedata(Project *);
105
- int emitterdata(Project *);
106
- int leakagedata(Project *);
107
- int qualdata(Project *);
108
- int reactdata(Project *);
109
- int mixingdata(Project *);
110
- int statusdata(Project *);
111
- int reportdata(Project *);
112
- int timedata(Project *);
113
- int optiondata(Project *);
114
- int vertexdata(Project *);
115
- int tagdata(Project *);
116
-
117
- // ------- RULES.C ------------------
118
-
119
- void initrules(Project *);
120
- void addrule(Parser *, char *);
121
- void deleterule(Project *, int);
122
- int allocrules(Project *);
123
- void freerules(Project *);
124
- int ruledata(Project *);
125
- void ruleerrmsg(Project *);
126
- void adjustrules(Project *, int, int);
127
- void adjusttankrules(Project *, int);
128
- Spremise *getpremise(Spremise *, int);
129
- Saction *getaction(Saction *, int);
130
- int writerule(Project *, FILE *, int);
131
- int checkrules(Project *, long);
132
- void updateruleunits(Project *pr, double dcf, double pcf, double hcf, double qcf);
133
-
134
- // ------- REPORT.C -----------------
135
-
136
- int clearreport(Project *);
137
- int copyreport(Project *, const char *);
138
- int writereport(Project *);
139
- void writelogo(Project *);
140
- void writesummary(Project *);
141
- void writehydstat(Project *, int, double);
142
- void writeheader(Project *, int,int);
143
- void writeline(Project *, const char *);
144
- void writerelerr(Project *, int, double);
145
- void writestatchange(Project *, int,char,char);
146
- void writecontrolaction(Project *, int, int);
147
- void writeruleaction(Project *, int, char *);
148
- int writehydwarn(Project *, int,double);
149
- void writehyderr(Project *, int);
150
- void writeflowbalance(Project *);
151
- void writemassbalance(Project *);
152
- void writetime(Project *, char *);
153
- char *clocktime(char *, long);
154
-
155
- // ------- HYDRAUL.C -----------------
156
-
157
- int openhyd(Project *);
158
- void inithyd(Project *, int initFlags);
159
- int runhyd(Project *, long *);
160
- int nexthyd(Project *, long *);
161
- void closehyd(Project *);
162
- void setlinkstatus(Project *, int, char, StatusType *, double *);
163
- void setlinksetting(Project *, int, double, StatusType *, double *);
164
- int tanktimestep(Project *, long *);
165
- int controltimestep(Project *, long *);
166
- void getenergy(Project *, int, double *, double *);
167
- double tankvolume(Project *, int, double);
168
- double tankgrade(Project *, int, double);
169
-
170
- // ------- HYDCOEFFS.C -----------------
171
-
172
- void resistcoeff(Project *, int);
173
- void headlosscoeffs(Project *);
174
- void matrixcoeffs(Project *);
175
- void emitterheadloss(Project *, int, double *, double *);
176
- void demandheadloss(Project *, int, double, double, double *, double *);
177
- double pcvlosscoeff(Project *, int, double);
178
-
179
- // ------- QUALITY.C --------------------
180
-
181
- int openqual(Project *);
182
- int initqual(Project *);
183
- int runqual(Project *, long *);
184
- int nextqual(Project *, long *);
185
- int stepqual(Project *, long *);
186
- int closequal(Project *);
187
- double avgqual(Project *, int);
188
-
189
- // ------- OUTPUT.C ---------------------
190
-
191
- int savenetdata(Project *);
192
- int savehyd(Project *, long *);
193
- int savehydstep(Project *, long *);
194
- int saveenergy(Project *);
195
- int readhyd(Project *, long *);
196
- int readhydstep(Project *, long *);
197
- int saveoutput(Project *);
198
- int savefinaloutput(Project *);
199
-
200
- // ------- INPFILE.C --------------------
201
-
202
- int saveinpfile(Project *, const char *);
203
-
204
- // ------- LEAKAGE.C --------------------
205
-
206
- int openleakage(Project *);
207
- void closeleakage(Project *);
208
- double findlinkleakage(Project *, int);
209
- void leakagecoeffs(Project *);
210
- double leakageflowchange(Project *, int);
211
- int leakagehasconverged(Project *);
212
-
213
- // ------- FLOWBALANCE.C-----------------
214
-
215
- void startflowbalance(Project *);
216
- void updateflowbalance(Project *, long);
217
- void endflowbalance(Project *);
218
-
219
- #endif