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,93 +0,0 @@
1
- /*
2
- ******************************************************************************
3
- Project: OWA EPANET
4
- Version: 2.2
5
- Module: main.c
6
- Description: main stub for a command line executable version of EPANET
7
- Authors: see AUTHORS
8
- Copyright: see AUTHORS
9
- License: see LICENSE
10
- Last Updated: 12/07/2018
11
- ******************************************************************************
12
- */
13
-
14
- #include <stdio.h>
15
- #include "epanet2.h"
16
-
17
- void writeConsole(char *s)
18
- {
19
- fprintf(stdout, "\r%s", s);
20
- fflush(stdout);
21
- }
22
-
23
- int main(int argc, char *argv[])
24
- /*--------------------------------------------------------------
25
- ** Input: argc = number of command line arguments
26
- ** *argv[] = array of command line arguments
27
- ** Output: none
28
- ** Purpose: main program stub for command line EPANET
29
- **
30
- ** Command line for stand-alone operation is:
31
- ** progname f1 f2 f3
32
- ** where progname = name of executable this code was compiled to,
33
- ** f1 = name of input file,
34
- ** f2 = name of report file
35
- ** f3 = name of binary output file (optional).
36
- **--------------------------------------------------------------
37
- */
38
- {
39
- char *f1,*f2,*f3;
40
- char blank[] = "";
41
- char errmsg[256] = "";
42
- int errcode;
43
- int version;
44
- int major;
45
- int minor;
46
- int patch;
47
-
48
- // Check for proper number of command line arguments
49
- if (argc < 3)
50
- {
51
- printf(
52
- "\nUsage:\n %s <input_filename> <report_filename> [<binary_filename>]\n",
53
- argv[0]);
54
- return 0;
55
- }
56
-
57
- // Get version number and display in Major.Minor.Patch format
58
- ENgetversion(&version);
59
- major = version/10000;
60
- minor = (version%10000)/100;
61
- patch = version%100;
62
- printf("\n... Running EPANET Version %d.%d.%d\n", major, minor, patch);
63
-
64
- // Assign pointers to file names
65
- f1 = argv[1];
66
- f2 = argv[2];
67
- if (argc > 3) f3 = argv[3];
68
- else f3 = blank;
69
-
70
- // Run EPANET
71
- errcode = ENepanet(f1, f2, f3, &writeConsole);
72
-
73
- // Blank out the last progress message
74
- printf("\r ");
75
-
76
- // Check for errors/warnings and report accordingly
77
- if (errcode == 0)
78
- {
79
- printf("\n... EPANET ran successfully.\n");
80
- return 0;
81
- }
82
- else if (errcode < 100)
83
- {
84
- printf("\n... EPANET ran with warnings - check the Status Report.\n");
85
- return 0;
86
- }
87
- else
88
- {
89
- ENgeterror(errcode, errmsg, 255);
90
- printf("\n... EPANET failed with %s.\n", errmsg);
91
- return 100;
92
- }
93
- }
@@ -1,142 +0,0 @@
1
- /*
2
- ******************************************************************************
3
- Project: OWA EPANET
4
- Version: 2.2
5
- Module: mempool.c
6
- Description: a simple fast poooled memory allocation package
7
- Authors: see AUTHORS
8
- Copyright: see AUTHORS
9
- License: see LICENSE
10
- Last Updated: 05/15/2019
11
-
12
- This module is based code by Steve Hill in Graphics Gems III,
13
- David Kirk (ed.), Academic Press, Boston, MA, 1992
14
- ******************************************************************************
15
- */
16
-
17
- #include <stdlib.h>
18
-
19
- #include "mempool.h"
20
-
21
- /*
22
- ** ALLOC_BLOCK_SIZE - adjust this size to suit your installation - it
23
- ** should be reasonably large otherwise you will be mallocing a lot.
24
- */
25
-
26
- #define ALLOC_BLOCK_SIZE 64000 /*(62*1024)*/
27
-
28
- struct MemBlock
29
- {
30
- struct MemBlock *next; // Next block
31
- char *block, // Start of block
32
- *free, // Next free position in block
33
- *end; // block + block size
34
- };
35
-
36
- struct Mempool
37
- {
38
- struct MemBlock *first;
39
- struct MemBlock *current;
40
- };
41
-
42
- static struct MemBlock* createMemBlock()
43
- {
44
- struct MemBlock* memBlock = malloc(sizeof(struct MemBlock));
45
- if (memBlock)
46
- {
47
- memBlock->block = malloc(ALLOC_BLOCK_SIZE * sizeof(char));
48
- if (memBlock->block == NULL)
49
- {
50
- free(memBlock);
51
- return NULL;
52
- }
53
- memBlock->free = memBlock->block;
54
- memBlock->next = NULL;
55
- memBlock->end = memBlock->block + ALLOC_BLOCK_SIZE;
56
- }
57
- return memBlock;
58
- }
59
-
60
-
61
- static void deleteMemBlock(struct MemBlock* memBlock)
62
- {
63
- free(memBlock->block);
64
- free(memBlock);
65
- }
66
-
67
-
68
- struct Mempool * mempool_create()
69
- {
70
- struct Mempool *mempool;
71
- mempool = (struct Mempool *)malloc(sizeof(struct Mempool));
72
- if (mempool == NULL) return NULL;
73
- mempool->first = createMemBlock();
74
- mempool->current = mempool->first;
75
- if (mempool->first == NULL) return NULL;
76
- return mempool;
77
- }
78
-
79
- void mempool_delete(struct Mempool *mempool)
80
- {
81
- if (mempool == NULL) return;
82
- while (mempool->first)
83
- {
84
- mempool->current = mempool->first->next;
85
- deleteMemBlock(mempool->first);
86
- mempool->first = mempool->current;
87
- }
88
- free(mempool);
89
- mempool = NULL;
90
- }
91
-
92
- void mempool_reset(struct Mempool *mempool)
93
- {
94
- mempool->current = mempool->first;
95
- mempool->current->free = mempool->current->block;
96
- }
97
-
98
-
99
- char * mempool_alloc(struct Mempool *mempool, size_t size)
100
- {
101
- char* ptr;
102
-
103
- /*
104
- ** Align to 4 byte boundary - should be ok for most machines.
105
- ** Change this if your machine has weird alignment requirements.
106
- */
107
- size = (size + 3) & 0xfffffffc;
108
-
109
- if (!mempool->current) return NULL;
110
- ptr = mempool->current->free;
111
- mempool->current->free += size;
112
-
113
- // Check if the current block is exhausted
114
-
115
- if (mempool->current->free >= mempool->current->end)
116
- {
117
- // Is the next block already allocated?
118
-
119
- if (mempool->current->next)
120
- {
121
- // re-use block
122
- mempool->current->next->free = mempool->current->next->block;
123
- mempool->current = mempool->current->next;
124
- }
125
- else
126
- {
127
- // extend the pool with a new block
128
- mempool->current->next = createMemBlock();
129
- if (!mempool->current->next) return NULL;
130
- mempool->current = mempool->current->next;
131
- }
132
-
133
- // set ptr to the first location in the next block
134
-
135
- ptr = mempool->current->free;
136
- mempool->current->free += size;
137
- }
138
-
139
- // Return pointer to allocated memory
140
-
141
- return ptr;
142
- }
@@ -1,24 +0,0 @@
1
- /*
2
- ******************************************************************************
3
- Project: OWA EPANET
4
- Version: 2.2
5
- Module: mempool.h
6
- Description: header for a simple pooled memory allocator
7
- Authors: see AUTHORS
8
- Copyright: see AUTHORS
9
- License: see LICENSE
10
- Last Updated: 11/27/2018
11
- ******************************************************************************
12
- */
13
-
14
- #ifndef MEMPOOL_H
15
- #define MEMPOOL_H
16
-
17
- struct Mempool;
18
-
19
- struct Mempool * mempool_create();
20
- void mempool_delete(struct Mempool *mempool);
21
- void mempool_reset(struct Mempool *mempool);
22
- char * mempool_alloc(struct Mempool *mempool, size_t size);
23
-
24
- #endif