epyt-flow 0.14.2__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 (102) 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 +107 -104
  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/utils.py +0 -66
  19. epyt_flow/visualization/visualization_utils.py +2 -4
  20. {epyt_flow-0.14.2.dist-info → epyt_flow-0.15.0b1.dist-info}/METADATA +12 -18
  21. epyt_flow-0.15.0b1.dist-info/RECORD +65 -0
  22. epyt_flow/EPANET/EPANET/SRC_engines/AUTHORS +0 -28
  23. epyt_flow/EPANET/EPANET/SRC_engines/LICENSE +0 -21
  24. epyt_flow/EPANET/EPANET/SRC_engines/Readme_SRC_Engines.txt +0 -18
  25. epyt_flow/EPANET/EPANET/SRC_engines/enumstxt.h +0 -134
  26. epyt_flow/EPANET/EPANET/SRC_engines/epanet.c +0 -5578
  27. epyt_flow/EPANET/EPANET/SRC_engines/epanet2.c +0 -865
  28. epyt_flow/EPANET/EPANET/SRC_engines/epanet2.def +0 -131
  29. epyt_flow/EPANET/EPANET/SRC_engines/errors.dat +0 -73
  30. epyt_flow/EPANET/EPANET/SRC_engines/funcs.h +0 -193
  31. epyt_flow/EPANET/EPANET/SRC_engines/genmmd.c +0 -1000
  32. epyt_flow/EPANET/EPANET/SRC_engines/hash.c +0 -177
  33. epyt_flow/EPANET/EPANET/SRC_engines/hash.h +0 -28
  34. epyt_flow/EPANET/EPANET/SRC_engines/hydcoeffs.c +0 -1151
  35. epyt_flow/EPANET/EPANET/SRC_engines/hydraul.c +0 -1117
  36. epyt_flow/EPANET/EPANET/SRC_engines/hydsolver.c +0 -720
  37. epyt_flow/EPANET/EPANET/SRC_engines/hydstatus.c +0 -476
  38. epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2.h +0 -431
  39. epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_2.h +0 -1786
  40. epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_enums.h +0 -468
  41. epyt_flow/EPANET/EPANET/SRC_engines/inpfile.c +0 -810
  42. epyt_flow/EPANET/EPANET/SRC_engines/input1.c +0 -707
  43. epyt_flow/EPANET/EPANET/SRC_engines/input2.c +0 -864
  44. epyt_flow/EPANET/EPANET/SRC_engines/input3.c +0 -2170
  45. epyt_flow/EPANET/EPANET/SRC_engines/main.c +0 -93
  46. epyt_flow/EPANET/EPANET/SRC_engines/mempool.c +0 -142
  47. epyt_flow/EPANET/EPANET/SRC_engines/mempool.h +0 -24
  48. epyt_flow/EPANET/EPANET/SRC_engines/output.c +0 -852
  49. epyt_flow/EPANET/EPANET/SRC_engines/project.c +0 -1359
  50. epyt_flow/EPANET/EPANET/SRC_engines/quality.c +0 -685
  51. epyt_flow/EPANET/EPANET/SRC_engines/qualreact.c +0 -743
  52. epyt_flow/EPANET/EPANET/SRC_engines/qualroute.c +0 -694
  53. epyt_flow/EPANET/EPANET/SRC_engines/report.c +0 -1489
  54. epyt_flow/EPANET/EPANET/SRC_engines/rules.c +0 -1362
  55. epyt_flow/EPANET/EPANET/SRC_engines/smatrix.c +0 -871
  56. epyt_flow/EPANET/EPANET/SRC_engines/text.h +0 -497
  57. epyt_flow/EPANET/EPANET/SRC_engines/types.h +0 -874
  58. epyt_flow/EPANET/EPANET-MSX/MSX_Updates.txt +0 -53
  59. epyt_flow/EPANET/EPANET-MSX/Src/dispersion.h +0 -27
  60. epyt_flow/EPANET/EPANET-MSX/Src/hash.c +0 -107
  61. epyt_flow/EPANET/EPANET-MSX/Src/hash.h +0 -28
  62. epyt_flow/EPANET/EPANET-MSX/Src/include/epanetmsx.h +0 -102
  63. epyt_flow/EPANET/EPANET-MSX/Src/include/epanetmsx_export.h +0 -42
  64. epyt_flow/EPANET/EPANET-MSX/Src/mathexpr.c +0 -937
  65. epyt_flow/EPANET/EPANET-MSX/Src/mathexpr.h +0 -39
  66. epyt_flow/EPANET/EPANET-MSX/Src/mempool.c +0 -204
  67. epyt_flow/EPANET/EPANET-MSX/Src/mempool.h +0 -24
  68. epyt_flow/EPANET/EPANET-MSX/Src/msxchem.c +0 -1285
  69. epyt_flow/EPANET/EPANET-MSX/Src/msxcompiler.c +0 -368
  70. epyt_flow/EPANET/EPANET-MSX/Src/msxdict.h +0 -42
  71. epyt_flow/EPANET/EPANET-MSX/Src/msxdispersion.c +0 -586
  72. epyt_flow/EPANET/EPANET-MSX/Src/msxerr.c +0 -116
  73. epyt_flow/EPANET/EPANET-MSX/Src/msxfile.c +0 -260
  74. epyt_flow/EPANET/EPANET-MSX/Src/msxfuncs.c +0 -175
  75. epyt_flow/EPANET/EPANET-MSX/Src/msxfuncs.h +0 -35
  76. epyt_flow/EPANET/EPANET-MSX/Src/msxinp.c +0 -1504
  77. epyt_flow/EPANET/EPANET-MSX/Src/msxout.c +0 -401
  78. epyt_flow/EPANET/EPANET-MSX/Src/msxproj.c +0 -791
  79. epyt_flow/EPANET/EPANET-MSX/Src/msxqual.c +0 -2010
  80. epyt_flow/EPANET/EPANET-MSX/Src/msxrpt.c +0 -400
  81. epyt_flow/EPANET/EPANET-MSX/Src/msxtank.c +0 -422
  82. epyt_flow/EPANET/EPANET-MSX/Src/msxtoolkit.c +0 -1164
  83. epyt_flow/EPANET/EPANET-MSX/Src/msxtypes.h +0 -551
  84. epyt_flow/EPANET/EPANET-MSX/Src/msxutils.c +0 -524
  85. epyt_flow/EPANET/EPANET-MSX/Src/msxutils.h +0 -56
  86. epyt_flow/EPANET/EPANET-MSX/Src/newton.c +0 -158
  87. epyt_flow/EPANET/EPANET-MSX/Src/newton.h +0 -34
  88. epyt_flow/EPANET/EPANET-MSX/Src/rk5.c +0 -287
  89. epyt_flow/EPANET/EPANET-MSX/Src/rk5.h +0 -39
  90. epyt_flow/EPANET/EPANET-MSX/Src/ros2.c +0 -293
  91. epyt_flow/EPANET/EPANET-MSX/Src/ros2.h +0 -35
  92. epyt_flow/EPANET/EPANET-MSX/Src/smatrix.c +0 -816
  93. epyt_flow/EPANET/EPANET-MSX/Src/smatrix.h +0 -29
  94. epyt_flow/EPANET/EPANET-MSX/readme.txt +0 -14
  95. epyt_flow/EPANET/compile_linux.sh +0 -4
  96. epyt_flow/EPANET/compile_macos.sh +0 -4
  97. epyt_flow/simulation/backend/__init__.py +0 -1
  98. epyt_flow/simulation/backend/my_epyt.py +0 -1101
  99. epyt_flow-0.14.2.dist-info/RECORD +0 -142
  100. {epyt_flow-0.14.2.dist-info → epyt_flow-0.15.0b1.dist-info}/WHEEL +0 -0
  101. {epyt_flow-0.14.2.dist-info → epyt_flow-0.15.0b1.dist-info}/licenses/LICENSE +0 -0
  102. {epyt_flow-0.14.2.dist-info → epyt_flow-0.15.0b1.dist-info}/top_level.txt +0 -0
@@ -1,53 +0,0 @@
1
-
2
- MSX 1.1.00
3
- 02/08/2011
4
-
5
- 1. A new compilation option for the user's chemistry functions
6
- was added that makes the program run anywhere from 2 to ten
7
- times faster. Details are in the Users Manual.
8
-
9
- 2. Problems related to the exponentiation operator (^) used
10
- in math expressions were fixed.
11
-
12
- 3. A new error message (number 524) was added that detects if
13
- an expression tries to perform an illegal math operation.
14
-
15
- 4. Several bugs in the routines that implement the MSXsavemsxfile
16
- toolkit function were fixed.
17
-
18
- 5. A memory leak occurring when the MSXclose toolkit function is
19
- called was fixed.
20
-
21
- 6. A possible unterminated string copy was fixed in the MSXgetID
22
- toolkit function.
23
-
24
- 7. Temporary files are now created in the user's current working
25
- directory.
26
-
27
- MSX 1.00.01
28
- 05/05/2008
29
-
30
- The following bugs are fixed.
31
-
32
- 1. Report file specified in the [REPORT] section of the msx configuration file is not generated. Instead the multispecies modeling results are written to the EPANET report file.
33
-
34
- 2. Memory violation error may occur when toolkit function MSXsavemsxfile is called.
35
-
36
- 3. A source node which is defined as �setpoint� source behaves like �flowpaced� source and vice versa.
37
-
38
- 4. MSXsetpattern did not set the current patternvalue index to be the first.
39
-
40
- 5. Pipe roughness is added as a reserved hydraulic variable. The keyword is Kc.
41
-
42
- MSX 2.00.00
43
-
44
- 08/26/2022
45
-
46
- 1. Dispersion modeling is included as an option.
47
-
48
- 2. OPENMP parallelization for both reactuion and dispersion solver.
49
-
50
- 3. EPANET 2.2 WQ routing method.
51
-
52
- 4. Mass balance report.
53
-
@@ -1,27 +0,0 @@
1
- #ifndef DISPERSION_H
2
- #define DISPERSION_H
3
-
4
- #define MAXSEGMENTS 5000
5
-
6
- typedef enum {
7
- XHEAD, // pump cannot deliver head (closed)
8
- TEMPCLOSED, // temporarily closed
9
- CLOSED, // closed
10
- OPEN, // open
11
- ACTIVE, // valve active (partially open)
12
- XFLOW, // pump exceeds maximum flow
13
- XFCV, // FCV cannot supply flow
14
- XPRESSURE, // valve cannot supply pressure
15
- FILLING, // tank filling
16
- EMPTYING, // tank emptying
17
- OVERFLOWING // tank overflowing
18
- } StatusType;
19
-
20
- int dispersion_open();
21
- int dispersion_close();
22
- void dispersion_pipe(int m, double tstep); //effective dispersion coefficient and upstream/downstream node impact calculation
23
- void solve_nodequal(int m, double tstep); //solve nodal concentration
24
- void segqual_update(int m, double tstep); //update pipe segment concentration
25
- void tridiag(int n, double *a, double *b, double *c, double *r, double *y);
26
-
27
- #endif
@@ -1,107 +0,0 @@
1
- //-----------------------------------------------------------------------------
2
- // hash.c
3
- //
4
- // Implementation of a simple Hash Table for string storage & retrieval
5
- // /
6
- // Written by L. Rossman
7
- // Last Updated on 6/19/03
8
- //
9
- // The hash table data structure (HTable) is defined in "hash.h".
10
- // Interface Functions:
11
- // HTcreate() - creates a hash table
12
- // HTinsert() - inserts a string & its index value into a hash table
13
- // HTfind() - retrieves the index value of a string from a table
14
- // HTfree() - frees a hash table
15
- //-----------------------------------------------------------------------------
16
-
17
- #include <string.h>
18
- #include <stdlib.h>
19
-
20
- #include "hash.h"
21
-
22
- /* Use Fletcher's checksum to compute 2-byte hash of string */
23
- unsigned int hash(char *str)
24
- {
25
- unsigned int sum1= 0, check1;
26
- unsigned long sum2= 0L;
27
- while( '\0' != *str )
28
- {
29
- sum1 += (*str);
30
- str++;
31
- if ( 255 <= sum1 ) sum1 -= 255;
32
- sum2 += sum1;
33
- }
34
- check1= sum2;
35
- check1 %= 255;
36
- check1= 255 - (sum1+check1) % 255;
37
- sum1= 255 - (sum1+check1) % 255;
38
- return( ( ( check1 << 8 ) | sum1 ) % HTMAXSIZE);
39
- }
40
-
41
- HTtable *HTcreate()
42
- {
43
- int i;
44
- HTtable *ht = (HTtable *) calloc(HTMAXSIZE, sizeof(HTtable));
45
- if (ht != NULL) for (i=0; i<HTMAXSIZE; i++) ht[i] = NULL;
46
- return(ht);
47
- }
48
-
49
- int HTinsert(HTtable *ht, char *key, int data)
50
- {
51
- unsigned int i = hash(key);
52
- struct HTentry *entry;
53
- if ( i >= HTMAXSIZE ) return(0);
54
- entry = (struct HTentry *) malloc(sizeof(struct HTentry));
55
- if (entry == NULL) return(0);
56
- entry->key = key;
57
- entry->data = data;
58
- entry->next = ht[i];
59
- ht[i] = entry;
60
- return(1);
61
- }
62
-
63
- int HTfind(HTtable *ht, char *key)
64
- {
65
- unsigned int i = hash(key);
66
- struct HTentry *entry;
67
- if ( i >= HTMAXSIZE ) return(NOTFOUND);
68
- entry = ht[i];
69
- while (entry != NULL)
70
- {
71
- if ( strcmp(entry->key,key) == 0 ) return(entry->data);
72
- entry = entry->next;
73
- }
74
- return(NOTFOUND);
75
- }
76
-
77
- char *HTfindKey(HTtable *ht, char *key)
78
- {
79
- unsigned int i = hash(key);
80
- struct HTentry *entry;
81
- if ( i >= HTMAXSIZE ) return(NULL);
82
- entry = ht[i];
83
- while (entry != NULL)
84
- {
85
- if ( strcmp(entry->key,key) == 0 ) return(entry->key);
86
- entry = entry->next;
87
- }
88
- return(NULL);
89
- }
90
-
91
- void HTfree(HTtable *ht)
92
- {
93
- struct HTentry *entry,
94
- *nextentry;
95
- int i;
96
- for (i=0; i<HTMAXSIZE; i++)
97
- {
98
- entry = ht[i];
99
- while (entry != NULL)
100
- {
101
- nextentry = entry->next;
102
- free(entry);
103
- entry = nextentry;
104
- }
105
- }
106
- free(ht);
107
- }
@@ -1,28 +0,0 @@
1
- /* HASH.H
2
- **
3
- ** Header file for Hash Table module HASH.C
4
- **
5
- */
6
-
7
- #ifndef HASH_H
8
- #define HASH_H
9
-
10
- #define HTMAXSIZE 1999
11
- #define NOTFOUND 0
12
-
13
- struct HTentry
14
- {
15
- char *key;
16
- int data;
17
- struct HTentry *next;
18
- };
19
-
20
- typedef struct HTentry *HTtable;
21
-
22
- HTtable *HTcreate(void);
23
- int HTinsert(HTtable *, char *, int);
24
- int HTfind(HTtable *, char *);
25
- char *HTfindKey(HTtable *, char *);
26
- void HTfree(HTtable *);
27
-
28
- #endif
@@ -1,102 +0,0 @@
1
- /******************************************************************************
2
- ** MODULE: EPANETMSX.H
3
- ** PROJECT: EPANET-MSX
4
- ** DESCRIPTION: C/C++ header file for EPANET Multi-Species Extension Toolkit
5
- ** AUTHORS: see AUTHORS
6
- ** Copyright: see AUTHORS
7
- ** License: see LICENSE
8
- ** VERSION: 2.0.0
9
- ** LAST UPDATE: 11/01/10
10
- *******************************************************************************/
11
-
12
- #include "epanet2.h" // EPANET toolkit header file
13
-
14
- #ifndef EPANETMSX_H
15
- #define EPANETMSX_H
16
-
17
- #ifndef MSXDLLEXPORT
18
- #ifdef _WIN32
19
- #ifdef epanetmsx_EXPORTS
20
- #define MSXDLLEXPORT __declspec(dllexport) __stdcall
21
- #else
22
- #define MSXDLLEXPORT __declspec(dllimport) __stdcall
23
- #endif
24
- #elif defined(__CYGWIN__)
25
- #define MSXDLLEXPORT __stdcall
26
- #else
27
- #define MSXDLLEXPORT
28
- #endif
29
- #endif
30
-
31
- // --- Declare the EPANETMSX toolkit functions
32
- #if defined(__cplusplus)
33
- extern "C" {
34
- #endif
35
-
36
- // --- define MSX constants
37
-
38
- #define MSX_NODE 0
39
- #define MSX_LINK 1
40
- #define MSX_TANK 2
41
- #define MSX_SPECIES 3
42
- #define MSX_TERM 4
43
- #define MSX_PARAMETER 5
44
- #define MSX_CONSTANT 6
45
- #define MSX_PATTERN 7
46
-
47
- #define MSX_BULK 0
48
- #define MSX_WALL 1
49
-
50
- #define MSX_NOSOURCE -1
51
- #define MSX_CONCEN 0
52
- #define MSX_MASS 1
53
- #define MSX_SETPOINT 2
54
- #define MSX_FLOWPACED 3
55
-
56
- // --- declare MSX functions
57
-
58
- int MSXDLLEXPORT MSXENopen(const char *inpFile, const char *rptFile,
59
- const char *outFile);
60
- int MSXDLLEXPORT MSXopen(char *fname);
61
- int MSXDLLEXPORT MSXsolveH(void);
62
- int MSXDLLEXPORT MSXusehydfile(char *fname);
63
- int MSXDLLEXPORT MSXsolveQ(void);
64
- int MSXDLLEXPORT MSXinit(int saveFlag);
65
- int MSXDLLEXPORT MSXstep(double *t, double *tleft);
66
- int MSXDLLEXPORT MSXsaveoutfile(char *fname);
67
- int MSXDLLEXPORT MSXsavemsxfile(char *fname);
68
- int MSXDLLEXPORT MSXreport(void);
69
- int MSXDLLEXPORT MSXclose(void);
70
- int MSXDLLEXPORT MSXENclose(void);
71
-
72
- int MSXDLLEXPORT MSXgetindex(int type, char *id, int *index);
73
- int MSXDLLEXPORT MSXgetIDlen(int type, int index, int *len);
74
- int MSXDLLEXPORT MSXgetID(int type, int index, char *id, int len);
75
- int MSXDLLEXPORT MSXgetcount(int type, int *count);
76
- int MSXDLLEXPORT MSXgetspecies(int index, int *type, char *units, double *aTol,
77
- double *rTol);
78
- int MSXDLLEXPORT MSXgetconstant(int index, double *value);
79
- int MSXDLLEXPORT MSXgetparameter(int type, int index, int param, double *value);
80
- int MSXDLLEXPORT MSXgetsource(int node, int species, int *type, double *level,
81
- int *pat);
82
- int MSXDLLEXPORT MSXgetpatternlen(int pat, int *len);
83
- int MSXDLLEXPORT MSXgetpatternvalue(int pat, int period, double *value);
84
- int MSXDLLEXPORT MSXgetinitqual(int type, int index, int species, double *value);
85
- int MSXDLLEXPORT MSXgetqual(int type, int index, int species, double *value);
86
- int MSXDLLEXPORT MSXgeterror(int code, char *msg, int len);
87
-
88
- int MSXDLLEXPORT MSXsetconstant(int index, double value);
89
- int MSXDLLEXPORT MSXsetparameter(int type, int index, int param, double value);
90
- int MSXDLLEXPORT MSXsetinitqual(int type, int index, int species, double value);
91
- int MSXDLLEXPORT MSXsetsource(int node, int species, int type, double level,
92
- int pat);
93
- int MSXDLLEXPORT MSXsetpatternvalue(int pat, int period, double value);
94
- int MSXDLLEXPORT MSXsetpattern(int pat, double mult[], int len);
95
- int MSXDLLEXPORT MSXaddpattern(char *id);
96
-
97
-
98
- #if defined(__cplusplus)
99
- }
100
- #endif
101
-
102
- #endif
@@ -1,42 +0,0 @@
1
-
2
- #ifndef MSXDLLEXPORT_H
3
- #define MSXDLLEXPORT_H
4
-
5
- #ifdef SHARED_EXPORTS_BUILT_AS_STATIC
6
- # define MSXDLLEXPORT
7
- # define EPANETMSX_NO_EXPORT
8
- #else
9
- # ifndef MSXDLLEXPORT
10
- # ifdef epanetmsx_EXPORTS
11
- /* We are building this library */
12
- # define MSXDLLEXPORT __attribute__((visibility("default")))
13
- # else
14
- /* We are using this library */
15
- # define MSXDLLEXPORT __attribute__((visibility("default")))
16
- # endif
17
- # endif
18
-
19
- # ifndef EPANETMSX_NO_EXPORT
20
- # define EPANETMSX_NO_EXPORT __attribute__((visibility("hidden")))
21
- # endif
22
- #endif
23
-
24
- #ifndef EPANETMSX_DEPRECATED
25
- # define EPANETMSX_DEPRECATED __attribute__ ((__deprecated__))
26
- #endif
27
-
28
- #ifndef EPANETMSX_DEPRECATED_EXPORT
29
- # define EPANETMSX_DEPRECATED_EXPORT MSXDLLEXPORT EPANETMSX_DEPRECATED
30
- #endif
31
-
32
- #ifndef EPANETMSX_DEPRECATED_NO_EXPORT
33
- # define EPANETMSX_DEPRECATED_NO_EXPORT EPANETMSX_NO_EXPORT EPANETMSX_DEPRECATED
34
- #endif
35
-
36
- #if 0 /* DEFINE_NO_DEPRECATED */
37
- # ifndef EPANETMSX_NO_DEPRECATED
38
- # define EPANETMSX_NO_DEPRECATED
39
- # endif
40
- #endif
41
-
42
- #endif /* MSXDLLEXPORT_H */