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,13 +1,13 @@
|
|
|
1
1
|
/*
|
|
2
2
|
******************************************************************************
|
|
3
3
|
Project: OWA EPANET
|
|
4
|
-
Version: 2.
|
|
4
|
+
Version: 2.2
|
|
5
5
|
Module: epanet2.c
|
|
6
6
|
Description: implementation of the legacy EPANET API functions
|
|
7
7
|
Authors: see AUTHORS
|
|
8
8
|
Copyright: see AUTHORS
|
|
9
9
|
License: see LICENSE
|
|
10
|
-
Last Updated: 02/
|
|
10
|
+
Last Updated: 11/02/2019
|
|
11
11
|
******************************************************************************
|
|
12
12
|
*/
|
|
13
13
|
|
|
@@ -99,20 +99,12 @@ int DLLEXPORT ENopen(const char *inpFile, const char *rptFile, const char *outFi
|
|
|
99
99
|
return errcode;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
int DLLEXPORT ENopenX(const char *inpFile, const char *rptFile, const char *outFile)
|
|
103
|
-
{
|
|
104
|
-
int errcode = 0;
|
|
105
|
-
createtmpfiles();
|
|
106
|
-
errcode = EN_openX(_defaultProject, inpFile, rptFile, outFile);
|
|
107
|
-
return errcode;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
102
|
int DLLEXPORT ENgettitle(char *line1, char *line2, char *line3)
|
|
111
103
|
{
|
|
112
104
|
return EN_gettitle(_defaultProject, line1, line2, line3) ;
|
|
113
105
|
}
|
|
114
106
|
|
|
115
|
-
int DLLEXPORT ENsettitle(
|
|
107
|
+
int DLLEXPORT ENsettitle(char *line1, char *line2, char *line3)
|
|
116
108
|
{
|
|
117
109
|
return EN_settitle(_defaultProject, line1, line2, line3) ;
|
|
118
110
|
}
|
|
@@ -122,20 +114,11 @@ int DLLEXPORT ENgetcomment(int object, int index, char *comment)
|
|
|
122
114
|
return EN_getcomment(_defaultProject, object, index, comment);
|
|
123
115
|
}
|
|
124
116
|
|
|
125
|
-
int DLLEXPORT ENsetcomment(int object, int index,
|
|
117
|
+
int DLLEXPORT ENsetcomment(int object, int index, char *comment)
|
|
126
118
|
{
|
|
127
119
|
return EN_setcomment(_defaultProject, object, index, comment);
|
|
128
120
|
}
|
|
129
121
|
|
|
130
|
-
int DLLEXPORT ENgettag(int object, int index, char *tag)
|
|
131
|
-
{
|
|
132
|
-
return EN_gettag(_defaultProject, object, index, tag);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
int DLLEXPORT ENsettag(int object, int index, const char *tag)
|
|
136
|
-
{
|
|
137
|
-
return EN_settag(_defaultProject, object, index, tag);
|
|
138
|
-
}
|
|
139
122
|
int DLLEXPORT ENgetcount(int object, int *count)
|
|
140
123
|
{
|
|
141
124
|
return EN_getcount(_defaultProject, object, count);
|
|
@@ -173,12 +156,12 @@ int DLLEXPORT ENnextH(long *tStep) { return EN_nextH(_defaultProject, tStep); }
|
|
|
173
156
|
|
|
174
157
|
int DLLEXPORT ENcloseH() { return EN_closeH(_defaultProject); }
|
|
175
158
|
|
|
176
|
-
int DLLEXPORT ENsavehydfile(
|
|
159
|
+
int DLLEXPORT ENsavehydfile(char *filename)
|
|
177
160
|
{
|
|
178
161
|
return EN_savehydfile(_defaultProject, filename);
|
|
179
162
|
}
|
|
180
163
|
|
|
181
|
-
int DLLEXPORT ENusehydfile(
|
|
164
|
+
int DLLEXPORT ENusehydfile(char *filename)
|
|
182
165
|
{
|
|
183
166
|
return EN_usehydfile(_defaultProject, filename);
|
|
184
167
|
}
|
|
@@ -209,11 +192,11 @@ int DLLEXPORT ENcloseQ() { return EN_closeQ(_defaultProject); }
|
|
|
209
192
|
|
|
210
193
|
********************************************************************/
|
|
211
194
|
|
|
212
|
-
int DLLEXPORT ENwriteline(
|
|
195
|
+
int DLLEXPORT ENwriteline(char *line) { return EN_writeline(_defaultProject, line); }
|
|
213
196
|
|
|
214
197
|
int DLLEXPORT ENreport() { return EN_report(_defaultProject); }
|
|
215
198
|
|
|
216
|
-
int DLLEXPORT ENcopyreport(
|
|
199
|
+
int DLLEXPORT ENcopyreport(char *filename)
|
|
217
200
|
{
|
|
218
201
|
return EN_copyreport(_defaultProject, filename);
|
|
219
202
|
}
|
|
@@ -222,23 +205,13 @@ int DLLEXPORT ENclearreport() { return EN_clearreport(_defaultProject); }
|
|
|
222
205
|
|
|
223
206
|
int DLLEXPORT ENresetreport() { return EN_resetreport(_defaultProject); }
|
|
224
207
|
|
|
225
|
-
int DLLEXPORT ENsetreport(
|
|
208
|
+
int DLLEXPORT ENsetreport(char *format) { return EN_setreport(_defaultProject, format); }
|
|
226
209
|
|
|
227
210
|
int DLLEXPORT ENsetstatusreport(int level)
|
|
228
211
|
{
|
|
229
212
|
return EN_setstatusreport(_defaultProject, level);
|
|
230
213
|
}
|
|
231
214
|
|
|
232
|
-
int DLLEXPORT ENsetreportcallback(void (*callback)(void *userData, void *EN_projectHandle, const char*))
|
|
233
|
-
{
|
|
234
|
-
return EN_setreportcallback(_defaultProject, callback);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
int DLLEXPORT ENsetreportcallbackuserdata(void *userData)
|
|
238
|
-
{
|
|
239
|
-
return EN_setreportcallbackuserdata(_defaultProject, userData);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
215
|
int DLLEXPORT ENgetversion(int *version) { return EN_getversion(version); }
|
|
243
216
|
|
|
244
217
|
int DLLEXPORT ENgeterror(int errcode, char *errmsg, int maxLen)
|
|
@@ -259,10 +232,6 @@ int DLLEXPORT ENgetresultindex(int type, int index, int *value)
|
|
|
259
232
|
return EN_getresultindex(_defaultProject, type, index, value);
|
|
260
233
|
}
|
|
261
234
|
|
|
262
|
-
int DLLEXPORT ENtimetonextevent(int *eventType, long *duration, int *elementIndex)
|
|
263
|
-
{
|
|
264
|
-
return EN_timetonextevent(_defaultProject, eventType, duration, elementIndex);
|
|
265
|
-
}
|
|
266
235
|
|
|
267
236
|
/********************************************************************
|
|
268
237
|
|
|
@@ -314,8 +283,8 @@ int DLLEXPORT ENgetqualtype(int *qualType, int *traceNode)
|
|
|
314
283
|
return EN_getqualtype(_defaultProject, qualType, traceNode);
|
|
315
284
|
}
|
|
316
285
|
|
|
317
|
-
int DLLEXPORT ENsetqualtype(int qualType,
|
|
318
|
-
|
|
286
|
+
int DLLEXPORT ENsetqualtype(int qualType, char *chemName, char *chemUnits,
|
|
287
|
+
char *traceNode)
|
|
319
288
|
{
|
|
320
289
|
return EN_setqualtype(_defaultProject, qualType, chemName, chemUnits, traceNode);
|
|
321
290
|
}
|
|
@@ -326,7 +295,7 @@ int DLLEXPORT ENsetqualtype(int qualType, const char *chemName,
|
|
|
326
295
|
|
|
327
296
|
********************************************************************/
|
|
328
297
|
|
|
329
|
-
int DLLEXPORT ENaddnode(
|
|
298
|
+
int DLLEXPORT ENaddnode(char *id, int nodeType, int *index)
|
|
330
299
|
{
|
|
331
300
|
return EN_addnode(_defaultProject, id, nodeType, index);
|
|
332
301
|
}
|
|
@@ -336,7 +305,7 @@ int DLLEXPORT ENdeletenode(int index, int actionCode)
|
|
|
336
305
|
return EN_deletenode(_defaultProject, index, actionCode);
|
|
337
306
|
}
|
|
338
307
|
|
|
339
|
-
int DLLEXPORT ENgetnodeindex(
|
|
308
|
+
int DLLEXPORT ENgetnodeindex(char *id, int *index)
|
|
340
309
|
{
|
|
341
310
|
return EN_getnodeindex(_defaultProject, id, index);
|
|
342
311
|
}
|
|
@@ -346,7 +315,7 @@ int DLLEXPORT ENgetnodeid(int index, char *id)
|
|
|
346
315
|
return EN_getnodeid(_defaultProject, index, id);
|
|
347
316
|
}
|
|
348
317
|
|
|
349
|
-
int DLLEXPORT ENsetnodeid(int index,
|
|
318
|
+
int DLLEXPORT ENsetnodeid(int index, char *newid)
|
|
350
319
|
{
|
|
351
320
|
return EN_setnodeid(_defaultProject, index, newid);
|
|
352
321
|
}
|
|
@@ -364,27 +333,13 @@ int DLLEXPORT ENgetnodevalue(int index, int property, EN_API_FLOAT_TYPE *value)
|
|
|
364
333
|
return errcode;
|
|
365
334
|
}
|
|
366
335
|
|
|
367
|
-
int DLLEXPORT ENgetnodevalues(int property, EN_API_FLOAT_TYPE *values)
|
|
368
|
-
{
|
|
369
|
-
int i, errcode = 0;
|
|
370
|
-
EN_API_FLOAT_TYPE value;
|
|
371
|
-
|
|
372
|
-
for (i = 1; i <= _defaultProject->network.Nnodes; i++)
|
|
373
|
-
{
|
|
374
|
-
errcode = ENgetnodevalue(i, property, &value);
|
|
375
|
-
values[i-1] = value;
|
|
376
|
-
if (errcode != 0) return errcode;
|
|
377
|
-
}
|
|
378
|
-
return 0;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
336
|
int DLLEXPORT ENsetnodevalue(int index, int property, EN_API_FLOAT_TYPE value)
|
|
382
337
|
{
|
|
383
338
|
return EN_setnodevalue(_defaultProject, index, property, value);
|
|
384
339
|
}
|
|
385
340
|
|
|
386
341
|
int DLLEXPORT ENsetjuncdata(int index, EN_API_FLOAT_TYPE elev, EN_API_FLOAT_TYPE dmnd,
|
|
387
|
-
|
|
342
|
+
char *dmndpat)
|
|
388
343
|
{
|
|
389
344
|
return EN_setjuncdata(_defaultProject, index, elev, dmnd, dmndpat);
|
|
390
345
|
}
|
|
@@ -392,7 +347,7 @@ int DLLEXPORT ENsetjuncdata(int index, EN_API_FLOAT_TYPE elev, EN_API_FLOAT_TYPE
|
|
|
392
347
|
int DLLEXPORT ENsettankdata(int index, EN_API_FLOAT_TYPE elev,
|
|
393
348
|
EN_API_FLOAT_TYPE initlvl, EN_API_FLOAT_TYPE minlvl,
|
|
394
349
|
EN_API_FLOAT_TYPE maxlvl, EN_API_FLOAT_TYPE diam,
|
|
395
|
-
EN_API_FLOAT_TYPE minvol,
|
|
350
|
+
EN_API_FLOAT_TYPE minvol, char *volcurve)
|
|
396
351
|
{
|
|
397
352
|
return EN_settankdata(_defaultProject, index, elev, initlvl, minlvl, maxlvl,
|
|
398
353
|
diam, minvol, volcurve);
|
|
@@ -432,7 +387,7 @@ int DLLEXPORT ENsetdemandmodel(int model, EN_API_FLOAT_TYPE pmin,
|
|
|
432
387
|
}
|
|
433
388
|
|
|
434
389
|
int DLLEXPORT ENadddemand(int nodeIndex, EN_API_FLOAT_TYPE baseDemand,
|
|
435
|
-
|
|
390
|
+
char *demandPattern, char *demandName)
|
|
436
391
|
{
|
|
437
392
|
return EN_adddemand(_defaultProject, nodeIndex, baseDemand, demandPattern, demandName);
|
|
438
393
|
}
|
|
@@ -442,7 +397,7 @@ int DLLEXPORT ENdeletedemand(int nodeIndex, int demandIndex)
|
|
|
442
397
|
return EN_deletedemand(_defaultProject, nodeIndex, demandIndex);
|
|
443
398
|
}
|
|
444
399
|
|
|
445
|
-
int DLLEXPORT ENgetdemandindex(int nodeIndex,
|
|
400
|
+
int DLLEXPORT ENgetdemandindex(int nodeIndex, char *demandName, int *demandIndex)
|
|
446
401
|
{
|
|
447
402
|
return EN_getdemandindex(_defaultProject, nodeIndex, demandName, demandIndex);
|
|
448
403
|
}
|
|
@@ -482,7 +437,7 @@ int DLLEXPORT ENgetdemandname(int nodeIndex, int demandIndex, char *demandName)
|
|
|
482
437
|
return EN_getdemandname(_defaultProject, nodeIndex, demandIndex, demandName);
|
|
483
438
|
}
|
|
484
439
|
|
|
485
|
-
int DLLEXPORT ENsetdemandname(int nodeIndex, int demandIndex,
|
|
440
|
+
int DLLEXPORT ENsetdemandname(int nodeIndex, int demandIndex, char *demandName)
|
|
486
441
|
{
|
|
487
442
|
return EN_setdemandname(_defaultProject, nodeIndex, demandIndex, demandName);
|
|
488
443
|
}
|
|
@@ -493,8 +448,7 @@ int DLLEXPORT ENsetdemandname(int nodeIndex, int demandIndex, const char *demand
|
|
|
493
448
|
|
|
494
449
|
********************************************************************/
|
|
495
450
|
|
|
496
|
-
int DLLEXPORT ENaddlink(
|
|
497
|
-
const char *toNode, int *index)
|
|
451
|
+
int DLLEXPORT ENaddlink(char *id, int linkType, char *fromNode, char *toNode, int *index)
|
|
498
452
|
{
|
|
499
453
|
return EN_addlink(_defaultProject, id, linkType, fromNode, toNode, index);
|
|
500
454
|
}
|
|
@@ -504,7 +458,7 @@ int DLLEXPORT ENdeletelink(int index, int actionCode)
|
|
|
504
458
|
return EN_deletelink(_defaultProject, index, actionCode);
|
|
505
459
|
}
|
|
506
460
|
|
|
507
|
-
int DLLEXPORT ENgetlinkindex(
|
|
461
|
+
int DLLEXPORT ENgetlinkindex(char *id, int *index)
|
|
508
462
|
{
|
|
509
463
|
return EN_getlinkindex(_defaultProject, id, index);
|
|
510
464
|
}
|
|
@@ -514,7 +468,7 @@ int DLLEXPORT ENgetlinkid(int index, char *id)
|
|
|
514
468
|
return EN_getlinkid(_defaultProject, index, id);
|
|
515
469
|
}
|
|
516
470
|
|
|
517
|
-
int DLLEXPORT ENsetlinkid(int index,
|
|
471
|
+
int DLLEXPORT ENsetlinkid(int index, char *newid)
|
|
518
472
|
{
|
|
519
473
|
return EN_setlinkid(_defaultProject, index, newid);
|
|
520
474
|
}
|
|
@@ -546,19 +500,6 @@ int DLLEXPORT ENgetlinkvalue(int index, int property, EN_API_FLOAT_TYPE *value)
|
|
|
546
500
|
*value = (EN_API_FLOAT_TYPE)v;
|
|
547
501
|
return errcode;
|
|
548
502
|
}
|
|
549
|
-
int DLLEXPORT ENgetlinkvalues(int property, EN_API_FLOAT_TYPE *values)
|
|
550
|
-
{
|
|
551
|
-
int i, errcode = 0;
|
|
552
|
-
EN_API_FLOAT_TYPE value;
|
|
553
|
-
|
|
554
|
-
for (i = 1; i <= _defaultProject->network.Nlinks; i++)
|
|
555
|
-
{
|
|
556
|
-
errcode = ENgetlinkvalue(i, property, &value);
|
|
557
|
-
values[i-1] = value;
|
|
558
|
-
if (errcode != 0) return errcode;
|
|
559
|
-
}
|
|
560
|
-
return 0;
|
|
561
|
-
}
|
|
562
503
|
|
|
563
504
|
int DLLEXPORT ENsetlinkvalue(int index, int property, EN_API_FLOAT_TYPE value)
|
|
564
505
|
{
|
|
@@ -575,21 +516,16 @@ int DLLEXPORT ENgetvertexcount(int index, int *count)
|
|
|
575
516
|
{
|
|
576
517
|
return EN_getvertexcount(_defaultProject, index, count);
|
|
577
518
|
}
|
|
578
|
-
|
|
519
|
+
|
|
579
520
|
int DLLEXPORT ENgetvertex(int index, int vertex, double *x, double *y)
|
|
580
521
|
{
|
|
581
522
|
return EN_getvertex(_defaultProject, index, vertex, x, y);
|
|
582
523
|
}
|
|
583
524
|
|
|
584
|
-
int DLLEXPORT ENsetvertex(int index, int vertex, double x, double y)
|
|
585
|
-
{
|
|
586
|
-
return EN_setvertex(_defaultProject, index, vertex, x, y);
|
|
587
|
-
}
|
|
588
|
-
|
|
589
525
|
int DLLEXPORT ENsetvertices(int index, double *x, double *y, int count)
|
|
590
526
|
{
|
|
591
527
|
return EN_setvertices(_defaultProject, index, x, y, count);
|
|
592
|
-
}
|
|
528
|
+
}
|
|
593
529
|
|
|
594
530
|
/********************************************************************
|
|
595
531
|
|
|
@@ -618,7 +554,7 @@ int DLLEXPORT ENsetheadcurveindex(int linkIndex, int curveIndex)
|
|
|
618
554
|
|
|
619
555
|
********************************************************************/
|
|
620
556
|
|
|
621
|
-
int DLLEXPORT ENaddpattern(
|
|
557
|
+
int DLLEXPORT ENaddpattern(char *id)
|
|
622
558
|
{
|
|
623
559
|
return EN_addpattern(_defaultProject, id);
|
|
624
560
|
}
|
|
@@ -628,7 +564,7 @@ int DLLEXPORT ENdeletepattern(int index)
|
|
|
628
564
|
return EN_deletepattern(_defaultProject, index);
|
|
629
565
|
}
|
|
630
566
|
|
|
631
|
-
int DLLEXPORT ENgetpatternindex(
|
|
567
|
+
int DLLEXPORT ENgetpatternindex(char *id, int *index)
|
|
632
568
|
{
|
|
633
569
|
return EN_getpatternindex(_defaultProject, id, index);
|
|
634
570
|
}
|
|
@@ -638,7 +574,7 @@ int DLLEXPORT ENgetpatternid(int index, char *id)
|
|
|
638
574
|
return EN_getpatternid(_defaultProject, index, id);
|
|
639
575
|
}
|
|
640
576
|
|
|
641
|
-
int DLLEXPORT ENsetpatternid(int index,
|
|
577
|
+
int DLLEXPORT ENsetpatternid(int index, char *id)
|
|
642
578
|
{
|
|
643
579
|
return EN_setpatternid(_defaultProject, index, id);
|
|
644
580
|
}
|
|
@@ -685,18 +621,13 @@ int DLLEXPORT ENsetpattern(int index, EN_API_FLOAT_TYPE *values, int len)
|
|
|
685
621
|
return errcode;
|
|
686
622
|
}
|
|
687
623
|
|
|
688
|
-
int DLLEXPORT ENloadpatternfile(const char *filename, const char *id)
|
|
689
|
-
{
|
|
690
|
-
return EN_loadpatternfile(_defaultProject, filename, id);
|
|
691
|
-
}
|
|
692
|
-
|
|
693
624
|
/********************************************************************
|
|
694
625
|
|
|
695
626
|
Data Curve Functions
|
|
696
627
|
|
|
697
628
|
********************************************************************/
|
|
698
629
|
|
|
699
|
-
int DLLEXPORT ENaddcurve(
|
|
630
|
+
int DLLEXPORT ENaddcurve(char *id)
|
|
700
631
|
{
|
|
701
632
|
return EN_addcurve(_defaultProject, id);
|
|
702
633
|
}
|
|
@@ -706,7 +637,7 @@ int DLLEXPORT ENdeletecurve(int index)
|
|
|
706
637
|
return EN_deletecurve(_defaultProject, index);
|
|
707
638
|
}
|
|
708
639
|
|
|
709
|
-
int DLLEXPORT ENgetcurveindex(
|
|
640
|
+
int DLLEXPORT ENgetcurveindex(char *id, int *index)
|
|
710
641
|
{
|
|
711
642
|
return EN_getcurveindex(_defaultProject, id, index);
|
|
712
643
|
}
|
|
@@ -716,7 +647,7 @@ int DLLEXPORT ENgetcurveid(int index, char *id)
|
|
|
716
647
|
return EN_getcurveid(_defaultProject, index, id);
|
|
717
648
|
}
|
|
718
649
|
|
|
719
|
-
int DLLEXPORT ENsetcurveid(int index,
|
|
650
|
+
int DLLEXPORT ENsetcurveid(int index, char *id)
|
|
720
651
|
{
|
|
721
652
|
return EN_setcurveid(_defaultProject, index, id);
|
|
722
653
|
}
|
|
@@ -731,11 +662,6 @@ int DLLEXPORT ENgetcurvetype(int index, int *type)
|
|
|
731
662
|
return EN_getcurvetype(_defaultProject, index, type);
|
|
732
663
|
}
|
|
733
664
|
|
|
734
|
-
int DLLEXPORT ENsetcurvetype(int index, int type)
|
|
735
|
-
{
|
|
736
|
-
return EN_setcurvetype(_defaultProject, index, type);
|
|
737
|
-
}
|
|
738
|
-
|
|
739
665
|
int DLLEXPORT ENgetcurvevalue(int curveIndex, int pointIndex, EN_API_FLOAT_TYPE *x,
|
|
740
666
|
EN_API_FLOAT_TYPE *y)
|
|
741
667
|
{
|
|
@@ -778,10 +704,10 @@ int DLLEXPORT ENsetcurve(int index, EN_API_FLOAT_TYPE *xValues,
|
|
|
778
704
|
double *xx = NULL;
|
|
779
705
|
double *yy = NULL;
|
|
780
706
|
int i, errcode = 0;
|
|
781
|
-
|
|
707
|
+
|
|
782
708
|
if (xValues == NULL || yValues == NULL) return 206;
|
|
783
709
|
if (nPoints < 1) return 202;
|
|
784
|
-
|
|
710
|
+
|
|
785
711
|
xx = (double *)calloc(nPoints, sizeof(double));
|
|
786
712
|
yy = (double *)calloc(nPoints, sizeof(double));
|
|
787
713
|
if (xx && yy)
|
|
@@ -835,17 +761,6 @@ int DLLEXPORT ENsetcontrol(int index, int type, int linkIndex,
|
|
|
835
761
|
nodeIndex, level);
|
|
836
762
|
}
|
|
837
763
|
|
|
838
|
-
|
|
839
|
-
int DLLEXPORT ENgetcontrolenabled(int index, int *out_enabled)
|
|
840
|
-
{
|
|
841
|
-
return EN_getcontrolenabled(_defaultProject, index, out_enabled);
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
int DLLEXPORT ENsetcontrolenabled(int index, int enabled)
|
|
845
|
-
{
|
|
846
|
-
return EN_setcontrolenabled(_defaultProject, index, enabled);
|
|
847
|
-
}
|
|
848
|
-
|
|
849
764
|
/********************************************************************
|
|
850
765
|
|
|
851
766
|
Rule-Based Controls Functions
|
|
@@ -948,14 +863,3 @@ int DLLEXPORT ENsetrulepriority(int index, EN_API_FLOAT_TYPE priority)
|
|
|
948
863
|
{
|
|
949
864
|
return EN_setrulepriority(_defaultProject, index, priority);
|
|
950
865
|
}
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
int DLLEXPORT ENgetruleenabled(int index, int *out_enabled)
|
|
954
|
-
{
|
|
955
|
-
return EN_getruleenabled(_defaultProject, index, out_enabled);
|
|
956
|
-
}
|
|
957
|
-
|
|
958
|
-
int DLLEXPORT ENsetruleenabled(int index, int enabled)
|
|
959
|
-
{
|
|
960
|
-
return EN_setruleenabled(_defaultProject, index, enabled);
|
|
961
|
-
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
LIBRARY EPANET2.DLL
|
|
2
|
+
|
|
3
|
+
EXPORTS
|
|
4
|
+
ENaddcontrol = _ENaddcontrol@24
|
|
5
|
+
ENaddcurve = _ENaddcurve@4
|
|
6
|
+
ENaddlink = _ENaddlink@20
|
|
7
|
+
ENaddnode = _ENaddnode@12
|
|
8
|
+
ENadddemand = _ENadddemand@16
|
|
9
|
+
ENaddpattern = _ENaddpattern@4
|
|
10
|
+
ENaddrule = _ENaddrule@4
|
|
11
|
+
ENclearreport = _ENclearreport@0
|
|
12
|
+
ENclose = _ENclose@0
|
|
13
|
+
ENcloseH = _ENcloseH@0
|
|
14
|
+
ENcloseQ = _ENcloseQ@0
|
|
15
|
+
ENcopyreport = _ENcopyreport@4
|
|
16
|
+
ENdeletecontrol = _ENdeletecontrol@4
|
|
17
|
+
ENdeletecurve = _ENdeletecurve@4
|
|
18
|
+
ENdeletedemand = _ENdeletedemand@8
|
|
19
|
+
ENdeletelink = _ENdeletelink@8
|
|
20
|
+
ENdeletenode = _ENdeletenode@8
|
|
21
|
+
ENdeletepattern = _ENdeletepattern@4
|
|
22
|
+
ENdeleterule = _ENdeleterule@4
|
|
23
|
+
ENepanet = _ENepanet@16
|
|
24
|
+
ENgetaveragepatternvalue = _ENgetaveragepatternvalue@8
|
|
25
|
+
ENgetbasedemand = _ENgetbasedemand@12
|
|
26
|
+
ENgetcomment = _ENgetcomment@12
|
|
27
|
+
ENgetcontrol = _ENgetcontrol@24
|
|
28
|
+
ENgetcoord = _ENgetcoord@12
|
|
29
|
+
ENgetcount = _ENgetcount@8
|
|
30
|
+
ENgetcurve = _ENgetcurve@20
|
|
31
|
+
ENgetcurveid = _ENgetcurveid@8
|
|
32
|
+
ENgetcurveindex = _ENgetcurveindex@8
|
|
33
|
+
ENgetcurvelen = _ENgetcurvelen@8
|
|
34
|
+
ENgetcurvetype = _ENgetcurvetype@8
|
|
35
|
+
ENgetcurvevalue = _ENgetcurvevalue@16
|
|
36
|
+
ENgetdemandindex = _ENgetdemandindex@12
|
|
37
|
+
ENgetdemandmodel = _ENgetdemandmodel@16
|
|
38
|
+
ENgetdemandname = _ENgetdemandname@12
|
|
39
|
+
ENgetdemandpattern = _ENgetdemandpattern@12
|
|
40
|
+
ENgetelseaction = _ENgetelseaction@20
|
|
41
|
+
ENgeterror = _ENgeterror@12
|
|
42
|
+
ENgetflowunits = _ENgetflowunits@4
|
|
43
|
+
ENgetheadcurveindex = _ENgetheadcurveindex@8
|
|
44
|
+
ENgetlinkid = _ENgetlinkid@8
|
|
45
|
+
ENgetlinkindex = _ENgetlinkindex@8
|
|
46
|
+
ENgetlinknodes = _ENgetlinknodes@12
|
|
47
|
+
ENsetlinknodes = _ENsetlinknodes@12
|
|
48
|
+
ENgetlinktype = _ENgetlinktype@8
|
|
49
|
+
ENgetlinkvalue = _ENgetlinkvalue@12
|
|
50
|
+
ENgetnodeid = _ENgetnodeid@8
|
|
51
|
+
ENgetnodeindex = _ENgetnodeindex@8
|
|
52
|
+
ENgetnodetype = _ENgetnodetype@8
|
|
53
|
+
ENgetnodevalue = _ENgetnodevalue@12
|
|
54
|
+
ENgetnumdemands = _ENgetnumdemands@8
|
|
55
|
+
ENgetoption = _ENgetoption@8
|
|
56
|
+
ENgetpatternid = _ENgetpatternid@8
|
|
57
|
+
ENgetpatternindex = _ENgetpatternindex@8
|
|
58
|
+
ENgetpatternlen = _ENgetpatternlen@8
|
|
59
|
+
ENgetpatternvalue = _ENgetpatternvalue@12
|
|
60
|
+
ENgetpremise = _ENgetpremise@36
|
|
61
|
+
ENgetpumptype = _ENgetpumptype@8
|
|
62
|
+
ENgetqualinfo = _ENgetqualinfo@16
|
|
63
|
+
ENgetqualtype = _ENgetqualtype@8
|
|
64
|
+
ENgetresultindex = _ENgetresultindex@12
|
|
65
|
+
ENgetrule = _ENgetrule@20
|
|
66
|
+
ENgetruleID = _ENgetruleID@8
|
|
67
|
+
ENgetstatistic = _ENgetstatistic@8
|
|
68
|
+
ENgetthenaction = _ENgetthenaction@20
|
|
69
|
+
ENgettimeparam = _ENgettimeparam@8
|
|
70
|
+
ENgettitle = _ENgettitle@12
|
|
71
|
+
ENgetversion = _ENgetversion@4
|
|
72
|
+
ENgetvertex = _ENgetvertex@16
|
|
73
|
+
ENgetvertexcount = _ENgetvertexcount@8
|
|
74
|
+
ENinit = _ENinit@16
|
|
75
|
+
ENinitH = _ENinitH@4
|
|
76
|
+
ENinitQ = _ENinitQ@4
|
|
77
|
+
ENnextH = _ENnextH@4
|
|
78
|
+
ENnextQ = _ENnextQ@4
|
|
79
|
+
ENopen = _ENopen@12
|
|
80
|
+
ENopenH = _ENopenH@0
|
|
81
|
+
ENopenQ = _ENopenQ@0
|
|
82
|
+
ENreport = _ENreport@0
|
|
83
|
+
ENresetreport = _ENresetreport@0
|
|
84
|
+
ENrunH = _ENrunH@4
|
|
85
|
+
ENrunQ = _ENrunQ@4
|
|
86
|
+
ENsaveH = _ENsaveH@0
|
|
87
|
+
ENsavehydfile = _ENsavehydfile@4
|
|
88
|
+
ENsaveinpfile = _ENsaveinpfile@4
|
|
89
|
+
ENsetbasedemand = _ENsetbasedemand@12
|
|
90
|
+
ENsetcomment = _ENsetcomment@12
|
|
91
|
+
ENsetcontrol = _ENsetcontrol@24
|
|
92
|
+
ENsetcoord = _ENsetcoord@20
|
|
93
|
+
ENsetcurve = _ENsetcurve@16
|
|
94
|
+
ENsetcurveid = _ENsetcurveid@8
|
|
95
|
+
ENsetcurvevalue = _ENsetcurvevalue@16
|
|
96
|
+
ENsetdemandmodel = _ENsetdemandmodel@16
|
|
97
|
+
ENsetdemandname = _ENsetdemandname@12
|
|
98
|
+
ENsetdemandpattern = _ENsetdemandpattern@12
|
|
99
|
+
ENsetelseaction = _ENsetelseaction@20
|
|
100
|
+
ENsetflowunits = _ENsetflowunits@4
|
|
101
|
+
ENsetheadcurveindex = _ENsetheadcurveindex@8
|
|
102
|
+
ENsetjuncdata = _ENsetjuncdata@16
|
|
103
|
+
ENsetlinkid = _ENsetlinkid@8
|
|
104
|
+
ENsetlinknodes = _ENsetlinknodes@12
|
|
105
|
+
ENsetlinktype = _ENsetlinktype@12
|
|
106
|
+
ENsetlinkvalue = _ENsetlinkvalue@12
|
|
107
|
+
ENsetnodeid = _ENsetnodeid@8
|
|
108
|
+
ENsetnodevalue = _ENsetnodevalue@12
|
|
109
|
+
ENsetoption = _ENsetoption@8
|
|
110
|
+
ENsetpattern = _ENsetpattern@12
|
|
111
|
+
ENsetpatternid = _ENsetpatternid@8
|
|
112
|
+
ENsetpatternvalue = _ENsetpatternvalue@12
|
|
113
|
+
ENsetpipedata = _ENsetpipedata@20
|
|
114
|
+
ENsetpremise = _ENsetpremise@36
|
|
115
|
+
ENsetpremiseindex = _ENsetpremiseindex@12
|
|
116
|
+
ENsetpremisestatus = _ENsetpremisestatus@12
|
|
117
|
+
ENsetpremisevalue = _ENsetpremisevalue@12
|
|
118
|
+
ENsetqualtype = _ENsetqualtype@16
|
|
119
|
+
ENsetreport = _ENsetreport@4
|
|
120
|
+
ENsetrulepriority = _ENsetrulepriority@8
|
|
121
|
+
ENsetstatusreport = _ENsetstatusreport@4
|
|
122
|
+
ENsettankdata = _ENsettankdata@32
|
|
123
|
+
ENsetthenaction = _ENsetthenaction@20
|
|
124
|
+
ENsettimeparam = _ENsettimeparam@8
|
|
125
|
+
ENsettitle = _ENsettitle@12
|
|
126
|
+
ENsetvertices = _ENsetvertices@16
|
|
127
|
+
ENsolveH = _ENsolveH@0
|
|
128
|
+
ENsolveQ = _ENsolveQ@0
|
|
129
|
+
ENstepQ = _ENstepQ@4
|
|
130
|
+
ENusehydfile = _ENusehydfile@4
|
|
131
|
+
ENwriteline = _ENwriteline@4
|
|
@@ -14,7 +14,6 @@ DAT(120,"cannot solve water quality transport equations")
|
|
|
14
14
|
// These errors apply only to an input file
|
|
15
15
|
DAT(200,"one or more errors in input file")
|
|
16
16
|
DAT(201,"syntax error")
|
|
17
|
-
DAT(299,"invalid section keyword")
|
|
18
17
|
|
|
19
18
|
// These errors apply to both an input file and to API functions
|
|
20
19
|
DAT(202,"illegal numeric value")
|
|
@@ -44,10 +43,7 @@ DAT(225,"invalid lower/upper levels for tank")
|
|
|
44
43
|
DAT(226,"no head curve or power rating for pump")
|
|
45
44
|
DAT(227,"invalid head curve for pump")
|
|
46
45
|
DAT(230,"nonincreasing x-values for curve")
|
|
47
|
-
DAT(
|
|
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: ")
|
|
46
|
+
DAT(233,"network has unconnected node")
|
|
51
47
|
|
|
52
48
|
// These errors apply only to API functions
|
|
53
49
|
DAT(240,"nonexistent source")
|
|
@@ -64,8 +60,6 @@ DAT(259,"attempt to delete a node that still has links connected to it")
|
|
|
64
60
|
DAT(260,"attempt to delete node assigned as a Trace Node")
|
|
65
61
|
DAT(261,"attempt to delete a node or link contained in a control")
|
|
66
62
|
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
63
|
|
|
70
64
|
// File errors
|
|
71
65
|
DAT(301,"identical file names")
|