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,177 +0,0 @@
1
- /*
2
- ******************************************************************************
3
- Project: OWA EPANET
4
- Version: 2.3
5
- Module: hash.c
6
- Description: implementation of a simple hash table
7
- Authors: see AUTHORS
8
- Copyright: see AUTHORS
9
- License: see LICENSE
10
- Last Updated: 05/15/2019
11
- ******************************************************************************
12
- */
13
-
14
- #include <stdlib.h>
15
- #include <string.h>
16
- #include "hash.h"
17
-
18
- #define HASHTABLEMAXSIZE 128000
19
-
20
- // An entry in the hash table
21
- typedef struct DataEntryStruct
22
- {
23
- char *key;
24
- int data;
25
- struct DataEntryStruct *next;
26
- } DataEntry;
27
-
28
- // Hash a string to an integer
29
- unsigned int gethash(const char *str)
30
- {
31
- unsigned int hash = 5381;
32
- unsigned int retHash;
33
- int c;
34
- while ((c = *str++))
35
- {
36
- hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
37
- }
38
- retHash = hash % HASHTABLEMAXSIZE;
39
- return retHash;
40
- }
41
-
42
- // Produce a duplicate string
43
- char *dupstr(const char *s)
44
- {
45
- size_t size = strlen(s) + 1;
46
- char *p = malloc(size);
47
- if (p) memcpy(p, s, size);
48
- return p;
49
- }
50
-
51
- // Create a hash table
52
- HashTable *hashtable_create()
53
- {
54
- int i;
55
- HashTable *ht = (HashTable *) calloc(HASHTABLEMAXSIZE, sizeof(HashTable));
56
- if (ht != NULL)
57
- {
58
- for (i = 0; i < HASHTABLEMAXSIZE; i++) ht[i] = NULL;
59
- }
60
- return ht;
61
- }
62
-
63
- // Insert an entry into the hash table
64
- int hashtable_insert(HashTable *ht, const char *key, int data)
65
- {
66
- unsigned int i = gethash(key);
67
- DataEntry *entry;
68
- if ( i >= HASHTABLEMAXSIZE ) return 0;
69
- entry = (DataEntry *) malloc(sizeof(DataEntry));
70
- if (entry == NULL) return(0);
71
- entry->key = dupstr(key);
72
- entry->data = data;
73
- entry->next = ht[i];
74
- ht[i] = entry;
75
- return 1;
76
- }
77
-
78
- // Change the hash table's data entry for a particular key
79
- int hashtable_update(HashTable *ht, const char *key, int new_data)
80
- {
81
- unsigned int i = gethash(key);
82
- DataEntry *entry;
83
-
84
- if ( i >= HASHTABLEMAXSIZE ) return NOTFOUND;
85
- entry = ht[i];
86
- while (entry != NULL)
87
- {
88
- if ( strcmp(entry->key, key) == 0 )
89
- {
90
- entry->data = new_data;
91
- return 1;
92
- }
93
- entry = entry->next;
94
- }
95
- return NOTFOUND;
96
- }
97
-
98
- // Delete an entry in the hash table
99
- int hashtable_delete(HashTable *ht, const char *key)
100
- {
101
- unsigned int i = gethash(key);
102
- DataEntry *entry, *preventry;
103
-
104
- if ( i >= HASHTABLEMAXSIZE ) return NOTFOUND;
105
-
106
- preventry = NULL;
107
- entry = ht[i];
108
- while (entry != NULL)
109
- {
110
- if (strcmp(entry->key, key) == 0)
111
- {
112
- if (preventry == NULL) ht[i] = entry->next;
113
- else preventry->next = entry->next;
114
- free(entry->key);
115
- free(entry);
116
- return 1;
117
- }
118
- preventry = entry;
119
- entry = entry->next;
120
- }
121
- return NOTFOUND;
122
- }
123
-
124
- // Find the data for a particular key
125
- int hashtable_find(HashTable *ht, const char *key)
126
- {
127
- unsigned int i = gethash(key);
128
- DataEntry *entry;
129
-
130
- if ( i >= HASHTABLEMAXSIZE ) return NOTFOUND;
131
- entry = ht[i];
132
- while (entry != NULL)
133
- {
134
- if ( strcmp(entry->key, key) == 0 )
135
- {
136
- return entry->data;
137
- }
138
- entry = entry->next;
139
- }
140
- return NOTFOUND;
141
- }
142
-
143
- // Find a particular key in the hash table
144
- char *hashtable_findkey(HashTable *ht, const char *key)
145
- {
146
- unsigned int i = gethash(key);
147
- DataEntry *entry;
148
- if ( i >= HASHTABLEMAXSIZE ) return NULL;
149
- entry = ht[i];
150
- while (entry != NULL)
151
- {
152
- if ( strcmp(entry->key, key) == 0 ) return entry->key;
153
- entry = entry->next;
154
- }
155
- return NULL;
156
- }
157
-
158
- // Delete a hash table and free all of its memory
159
- void hashtable_free(HashTable *ht)
160
- {
161
- DataEntry *entry, *nextentry;
162
- int i;
163
-
164
- for (i = 0; i < HASHTABLEMAXSIZE; i++)
165
- {
166
- entry = ht[i];
167
- while (entry != NULL)
168
- {
169
- nextentry = entry->next;
170
- free(entry->key);
171
- free(entry);
172
- entry = nextentry;
173
- }
174
- ht[i] = NULL;
175
- }
176
- free(ht);
177
- }
@@ -1,28 +0,0 @@
1
- /*
2
- ******************************************************************************
3
- Project: OWA EPANET
4
- Version: 2.3
5
- Module: hash.h
6
- Description: header for a simple hash table
7
- Authors: see AUTHORS
8
- Copyright: see AUTHORS
9
- License: see LICENSE
10
- Last Updated: 11/27/2018
11
- ******************************************************************************
12
- */
13
- #ifndef HASH_H
14
- #define HASH_H
15
-
16
- #define NOTFOUND 0
17
-
18
- typedef struct DataEntryStruct *HashTable;
19
-
20
- HashTable *hashtable_create(void);
21
- int hashtable_insert(HashTable *, const char *, int);
22
- int hashtable_find(HashTable *, const char *);
23
- char *hashtable_findkey(HashTable *, const char *);
24
- void hashtable_free(HashTable *);
25
- int hashtable_update(HashTable *ht, const char *key, int new_data);
26
- int hashtable_delete(HashTable *ht, const char *key);
27
-
28
- #endif