epyt-flow 0.1.0__py3-none-any.whl → 0.2.0__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/utils.py CHANGED
@@ -9,6 +9,7 @@ from pathlib import Path
9
9
  import requests
10
10
  from tqdm import tqdm
11
11
  import numpy as np
12
+ import matplotlib
12
13
  import matplotlib.pyplot as plt
13
14
 
14
15
 
@@ -67,7 +68,8 @@ def volume_to_level(tank_volume: float, tank_diameter: float) -> float:
67
68
 
68
69
 
69
70
  def plot_timeseries_data(data: np.ndarray, labels: list[str] = None, x_axis_label: str = None,
70
- y_axis_label: str = None, show: bool = True) -> None:
71
+ y_axis_label: str = None, show: bool = True,
72
+ ax: matplotlib.axes.Axes = None) -> matplotlib.axes.Axes:
71
73
  """
72
74
  Plots a single or multiple time series.
73
75
 
@@ -91,7 +93,18 @@ def plot_timeseries_data(data: np.ndarray, labels: list[str] = None, x_axis_labe
91
93
  show : `bool`, optional
92
94
  If True, the plot/figure is shown in a window.
93
95
 
96
+ Only considered when 'ax' is None.
97
+
94
98
  The default is True.
99
+ ax : `matplotlib.axes.Axes`, optional
100
+ If not None, 'ax' is used for plotting.
101
+
102
+ The default is None.
103
+
104
+ Returns
105
+ -------
106
+ `matplotlib.axes.Axes`
107
+ Plot.
95
108
  """
96
109
  if not isinstance(data, np.ndarray):
97
110
  raise TypeError(f"'data' must be an instance of 'numpy.ndarray' but not of '{type(data)}'")
@@ -111,28 +124,37 @@ def plot_timeseries_data(data: np.ndarray, labels: list[str] = None, x_axis_labe
111
124
  f"but not of '{type(y_axis_label)}'")
112
125
  if not isinstance(show, bool):
113
126
  raise TypeError(f"'show' must be an instance of 'bool' but not of '{type(show)}'")
127
+ if ax is not None:
128
+ if not isinstance(ax, matplotlib.axes.Axes):
129
+ raise TypeError("ax' must be an instance of 'matplotlib.axes.Axes'" +
130
+ f"but not of '{type(ax)}'")
114
131
 
115
- plt.figure()
132
+ fig = None
133
+ if ax is None:
134
+ fig, ax = plt.subplots()
116
135
 
117
136
  labels = labels if labels is not None else [None] * data.shape[0]
118
137
 
119
138
  for i in range(data.shape[0]):
120
- plt.plot(data[i, :], ".-", label=labels[i])
139
+ ax.plot(data[i, :], ".-", label=labels[i])
121
140
 
122
141
  if not any(label is None for label in labels):
123
- plt.legend()
142
+ ax.legend()
124
143
 
125
144
  if x_axis_label is not None:
126
- plt.xlabel(x_axis_label)
145
+ ax.set_xlabel(x_axis_label)
127
146
  if y_axis_label is not None:
128
- plt.ylabel(y_axis_label)
147
+ ax.set_ylabel(y_axis_label)
129
148
 
130
- if show is True:
149
+ if show is True and fig is not None:
131
150
  plt.show()
132
151
 
152
+ return ax
153
+
133
154
 
134
155
  def plot_timeseries_prediction(y: np.ndarray, y_pred: np.ndarray,
135
- confidence_interval: np.ndarray = None, show: bool = True) -> None:
156
+ confidence_interval: np.ndarray = None, show: bool = True,
157
+ ax: matplotlib.axes.Axes = None) -> matplotlib.axes.Axes:
136
158
  """
137
159
  Plots the prediction (e.g. forecast) of *single* time series together with the
138
160
  ground truth time series. In addition, confidence intervals can be plotted as well.
@@ -151,7 +173,18 @@ def plot_timeseries_prediction(y: np.ndarray, y_pred: np.ndarray,
151
173
  show : `bool`, optional
152
174
  If True, the plot/figure is shown in a window.
153
175
 
176
+ Only considered when 'ax' is None.
177
+
154
178
  The default is True.
179
+ ax : `matplotlib.axes.Axes`, optional
180
+ If not None, 'axes' is used for plotting.
181
+
182
+ The default is None.
183
+
184
+ Returns
185
+ -------
186
+ `matplotlib.axes.Axes`
187
+ Plot.
155
188
  """
156
189
  if not isinstance(y_pred, np.ndarray):
157
190
  raise TypeError("'y_pred' must be an instance of 'numpy.ndarray' " +
@@ -167,21 +200,29 @@ def plot_timeseries_prediction(y: np.ndarray, y_pred: np.ndarray,
167
200
  raise ValueError("'y' must be a 1d array")
168
201
  if not isinstance(show, bool):
169
202
  raise TypeError(f"'show' must be an instance of 'bool' but not of '{type(show)}'")
203
+ if ax is not None:
204
+ if not isinstance(ax, matplotlib.axes.Axes):
205
+ raise TypeError("ax' must be an instance of 'matplotlib.axes.Axes'" +
206
+ f"but not of '{type(ax)}'")
170
207
 
171
- plt.figure()
208
+ fig = None
209
+ if ax is None:
210
+ fig, ax = plt.subplots()
172
211
 
173
212
  if confidence_interval is not None:
174
- plt.fill_between(range(len(y_pred)),
175
- y_pred - confidence_interval[0],
176
- y_pred + confidence_interval[1],
177
- alpha=0.5)
178
- plt.plot(y_pred, ".-", label="Prediction")
179
- plt.plot(y, ".-", label="Ground truth")
180
- plt.legend()
181
-
182
- if show is True:
213
+ ax.fill_between(range(len(y_pred)),
214
+ y_pred - confidence_interval[0],
215
+ y_pred + confidence_interval[1],
216
+ alpha=0.5)
217
+ ax.plot(y_pred, ".-", label="Prediction")
218
+ ax.plot(y, ".-", label="Ground truth")
219
+ ax.legend()
220
+
221
+ if show is True and fig is not None:
183
222
  plt.show()
184
223
 
224
+ return ax
225
+
185
226
 
186
227
  def download_if_necessary(download_path: str, url: str, verbose: bool = True) -> None:
187
228
  """
@@ -234,6 +275,22 @@ def create_path_if_not_exist(path_in: str) -> None:
234
275
  Path(path_in).mkdir(parents=True, exist_ok=True)
235
276
 
236
277
 
278
+ def pack_zip_archive(f_in: list[str], f_out: str) -> None:
279
+ """
280
+ Compresses a given list of files into a .zip archive.
281
+
282
+ Parameters
283
+ ----------
284
+ f_in : `list[str]`
285
+ List of files to be compressed into the .zip archive.
286
+ f_out : `str`
287
+ Path to the final .zip file.
288
+ """
289
+ with zipfile.ZipFile(f_out, "w") as f_zip_out:
290
+ for f_cur_in in f_in:
291
+ f_zip_out.write(f_cur_in, compress_type=zipfile.ZIP_DEFLATED)
292
+
293
+
237
294
  def unpack_zip_archive(f_in: str, folder_out: str) -> None:
238
295
  """
239
296
  Unpacks a .zip archive.
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: epyt-flow
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: EPyT-Flow -- EPANET Python Toolkit - Flow
5
5
  Author-email: André Artelt <aartelt@techfak.uni-bielefeld.de>, "Marios S. Kyriakou" <kiriakou.marios@ucy.ac.cy>, "Stelios G. Vrachimis" <vrachimis.stelios@ucy.ac.cy>
6
6
  License: MIT License
7
7
  Project-URL: Homepage, https://github.com/WaterFutures/EPyT-Flow
8
- Project-URL: Documentation, https://epytflow.readthedocs.io/en/latest/
8
+ Project-URL: Documentation, https://epyt-flow.readthedocs.io/en/latest/
9
9
  Project-URL: Repository, https://github.com/WaterFutures/EPyT-Flow.git
10
10
  Project-URL: Issues, https://github.com/WaterFutures/EPyT-Flow/issues
11
11
  Keywords: epanet,water,networks,hydraulics,quality,simulations
@@ -20,7 +20,7 @@ Classifier: Programming Language :: Python :: 3.12
20
20
  Requires-Python: >=3.9
21
21
  Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
- Requires-Dist: epyt >=1.1.3
23
+ Requires-Dist: epyt >=1.1.6
24
24
  Requires-Dist: requests >=2.31.0
25
25
  Requires-Dist: scipy >=1.11.4
26
26
  Requires-Dist: u-msgpack-python >=2.8.0
@@ -32,6 +32,13 @@ Requires-Dist: falcon >=3.1.3
32
32
  Requires-Dist: multiprocess >=0.70.16
33
33
  Requires-Dist: psutil
34
34
 
35
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
36
+ [![pypi](https://img.shields.io/pypi/v/epyt-flow.svg)](https://pypi.org/project/epyt-flow/)
37
+ [![build](https://github.com/WaterFutures/EPyT-Flow/actions/workflows/build_tests.yml/badge.svg)](https://github.com/WaterFutures/EPyT-Flow/actions/workflows/build_tests.yml)
38
+ [![Documentation Status](https://readthedocs.org/projects/epyt-flow/badge/?version=stable)](https://epyt-flow.readthedocs.io/en/stable/?badge=stable)
39
+ [![Downloads](https://static.pepy.tech/badge/epyt-flow)](https://pepy.tech/project/epyt-flow)
40
+ [![Downloads](https://static.pepy.tech/badge/epyt-flow/month)](https://pepy.tech/project/epyt-flow)
41
+
35
42
  # EPyT-Flow -- EPANET Python Toolkit - Flow
36
43
 
37
44
  EPyT-Flow is a Python package building on top of [EPyT](https://github.com/OpenWaterAnalytics/EPyT)
@@ -45,11 +52,28 @@ Furthermore, it also provides an environment for developing and testing control
45
52
 
46
53
  ![](https://github.com/WaterFutures/EPyT-Flow/blob/main/docs/_static/net1_plot.png?raw=true)
47
54
 
55
+
56
+ ## Unique Features
57
+
58
+ Unique features of EPyT-Flow that make it superior to other (Python) toolboxes are the following:
59
+
60
+ - High-performance hydraulic and (advanced) water quality simulation
61
+ - High- and low-level interface
62
+ - Object-orientated design that is easy to extend and customize
63
+ - Sensor configurations
64
+ - Wide variety of pre-defined events (e.g. leakages, sensor faults, actuator events, cyber-attacks, etc.)
65
+ - Wide variety of pre-defined types of uncertainties (e.g. model uncertainties)
66
+ - Step-wise simulation and environment for training and evaluating control strategies
67
+ - Serialization module for easy exchange of data and (scenario) configurations
68
+ - REST API to make EPyT-Flow accessible in other applications
69
+ - Access to many WDNs and popular benchmarks (incl. their evaluation)
70
+
71
+
48
72
  ## Installation
49
73
 
50
74
  EPyT-Flow supports Python 3.9 - 3.12
51
75
 
52
- Note that [EPANET and EPANET-MSX sources](epyt_flow/EPANET/) are compiled and overrite the binaries
76
+ Note that [EPANET and EPANET-MSX sources](epyt_flow/EPANET/) are compiled and overwrite the binaries
53
77
  shipped by EPyT IF EPyT-Flow is installed on a Linux system. By this we not only aim to achieve
54
78
  a better performance of the simulations but also avoid any compatibility problems of pre-compiled binaries.
55
79
 
@@ -113,7 +137,7 @@ if __name__ == "__main__":
113
137
 
114
138
  ## Documentation
115
139
 
116
- Documentation is available on readthedocs: [https://epytflow.readthedocs.io/en/latest/](https://epytflow.readthedocs.io/en/latest/)
140
+ Documentation is available on readthedocs:[https://epyt-flow.readthedocs.io/en/latest/](https://epyt-flow.readthedocs.io/en/stable)
117
141
 
118
142
  ## License
119
143
 
@@ -1,10 +1,10 @@
1
- epyt_flow/VERSION,sha256=6d2FB_S_DG9CRY5BrqgzrQvT9hJycjNe7pv01YVB7Wc,6
2
- epyt_flow/__init__.py,sha256=jn9If-KyB0-XPSq8iT2_d1oORIs-A7kBojXVk3DzOHU,872
1
+ epyt_flow/VERSION,sha256=H5MN0fEzwfl6lP46y42zQ3LPTAH_2ys_9Mpy-UlBIek,6
2
+ epyt_flow/__init__.py,sha256=0xHKMfJ1mmAcaFVcg723MH0fps8q-7ELCRBaUkX0o8k,1456
3
3
  epyt_flow/metrics.py,sha256=kvt42pzZrUR9PSlCyK4uq5kj6UlYHkt7OcCjLnI1RQE,12883
4
4
  epyt_flow/serialization.py,sha256=nBcwc3aMUbHF0zW8Nvpc49kKeLPh75blc3gzjKDR1ok,12893
5
- epyt_flow/topology.py,sha256=MwGH-qz5bulilXcT6u-Gyize38eLvYAOyOmqMG1ID3E,9795
6
- epyt_flow/utils.py,sha256=06hh8l-g-qQuhThWjAfrjKlr7S3MmFiK34kOnqM7ZsM,9817
7
- epyt_flow/EPANET/compile.sh,sha256=fA4Y5lYNr1pWKTbCkNa1rk_OOCd4_IJpLknOvlOoTYg,453
5
+ epyt_flow/topology.py,sha256=ou5TMr-PCE7EbiyS2awp0MuC5v6-4Zw5AI63NApnZ_A,10961
6
+ epyt_flow/utils.py,sha256=-1DFDpST_J86AB6pd2ufe_QQ06_tvQqB-5wD8DXacaU,11507
7
+ epyt_flow/EPANET/compile_linux.sh,sha256=wcrDyiB8NkivmaC-X9FI2WxhY3IJqDLiyIbVTv2XEPY,489
8
8
  epyt_flow/EPANET/EPANET/SRC_engines/AUTHORS,sha256=yie5yAsEEPY0984PmkSRUdqEU9rVvRSGGWmjxdwCYMU,925
9
9
  epyt_flow/EPANET/EPANET/SRC_engines/LICENSE,sha256=8SIIcPPO-ga2HotvptcK3uRccZOEGCeUOIU0Asiq7CU,1070
10
10
  epyt_flow/EPANET/EPANET/SRC_engines/Readme_SRC_Engines.txt,sha256=7LWHGbghkYJb18wkIskUzYswRq0ZTMu_m6nV0IfvCOs,1005
@@ -98,15 +98,22 @@ epyt_flow/models/sensor_interpolation_detector.py,sha256=5MBK9WlliGPonrNApf0j9lp
98
98
  epyt_flow/rest_api/__init__.py,sha256=4HilmXhdh6H56UHJBB2WUSULlEBUDnI1FPTP11ft3HE,126
99
99
  epyt_flow/rest_api/base_handler.py,sha256=Te70M40_oGCAE9zK2EdcUbQZQi7ti5_bGpxvublKvB0,1886
100
100
  epyt_flow/rest_api/res_manager.py,sha256=j6-3FUBZNLKM9bCsIDZzSytfDYJbDLRwjn1mIPstTqI,2342
101
- epyt_flow/rest_api/scada_data_handler.py,sha256=hF1WZ1M8LUnULcaSIVh-F3qwEX4LNHX4FMOc3k_u4lU,16115
102
- epyt_flow/rest_api/scenario_handler.py,sha256=N6cBNWf9ehucVTzJOOr4yDL2QLJDZtI8jrfmhXmlJHM,11471
103
- epyt_flow/rest_api/server.py,sha256=C9fmVdA425hfLr-KuA1rIfC1XUy_McZ4CYs0P4gLha4,4928
101
+ epyt_flow/rest_api/server.py,sha256=EeywjhHkqk0PU1vaDTBC1dy6ROROg9sOmRCdp4bphks,7589
102
+ epyt_flow/rest_api/scada_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
103
+ epyt_flow/rest_api/scada_data/data_handlers.py,sha256=VpOQq_jb2d7CuZbPQ1lKfb5dd5UAkBp7H0mEtlDJMzo,10938
104
+ epyt_flow/rest_api/scada_data/export_handlers.py,sha256=m5gM1u7z-KFZ5SCSS0f2Fs6PpAT8FX3FvCS2mp7DmTA,4450
105
+ epyt_flow/rest_api/scada_data/handlers.py,sha256=zX-0kgCwp4F3gQ1oSd4vvNjbc4lJUBvbm3icUlvI1Ls,5391
106
+ epyt_flow/rest_api/scenario/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
107
+ epyt_flow/rest_api/scenario/event_handlers.py,sha256=oIqbXWQVqJp0MzE9V4UhGF4fXPF03oWbKEyLhC6g_Ko,3842
108
+ epyt_flow/rest_api/scenario/handlers.py,sha256=bDqMa-jM4hOMVqs0XvQJtHbQDZx9FP40GiEGwW38fGk,12353
109
+ epyt_flow/rest_api/scenario/simulation_handlers.py,sha256=oY1Ch6ZQgYT_5WeE1I7tvGqpDKlT664GHLdmcVKP7ek,5905
110
+ epyt_flow/rest_api/scenario/uncertainty_handlers.py,sha256=uuu6AP11ZZUp2P3Dnukjg5ZTjyYKljlubg1xLN1GnXY,4048
104
111
  epyt_flow/simulation/__init__.py,sha256=VGGJqJRUoXZjKJ0-m6KPp3JQqD_1TFW0pofLgkwZJ8M,164
105
112
  epyt_flow/simulation/parallel_simulation.py,sha256=mMevycgtnMjV2FDq50WS4HjAdcOlI72Aj6FBX4HZDtc,6508
106
- epyt_flow/simulation/scenario_config.py,sha256=vkAslXsnJIPZnaSDxe6gUhVuPUm58qwgXTkprmI4fq0,27168
107
- epyt_flow/simulation/scenario_simulator.py,sha256=nuepi82IidgsyLFCKCDNliCmSBgPqKqYmgTIWrt0XW4,80517
113
+ epyt_flow/simulation/scenario_config.py,sha256=6FUo49qUtWgM0nRJ10-v08Iq9t7pHiYpWW2rtl_1558,26531
114
+ epyt_flow/simulation/scenario_simulator.py,sha256=XAo2f_qV-oaRZ4ysEDUmvL7pWi8BN3a6W_x3P4T-5BI,91659
108
115
  epyt_flow/simulation/scenario_visualizer.py,sha256=2gr1o731VLlhA8wQKgrLT94M43FsBNKjG_eucZPHy9A,2186
109
- epyt_flow/simulation/sensor_config.py,sha256=pCxlkrj-y1Q9TqWAerPctdWvPHWYeWJh0sVLuXoFIDM,58161
116
+ epyt_flow/simulation/sensor_config.py,sha256=qvDK1nYpoDa_k4ahQNV7gkAlKw7y58s_Dn0gCQl-IFQ,71015
110
117
  epyt_flow/simulation/events/__init__.py,sha256=tIdqzs7_Cus4X2kbZG4Jl2zs-zsk_4rnajFOCvL0zlI,185
111
118
  epyt_flow/simulation/events/actuator_events.py,sha256=2_MPYbYO9As6fMkm5Oy9pjSB9kCvFuKpGu8ykYDAydg,7903
112
119
  epyt_flow/simulation/events/event.py,sha256=kARPV20XCAl6zxnJwI9U7ICtZUPACO_rgAmtHm1mGCs,2603
@@ -117,15 +124,15 @@ epyt_flow/simulation/events/sensor_reading_event.py,sha256=rQ-CmdpSUyZzDFYwNUGH2
117
124
  epyt_flow/simulation/events/system_event.py,sha256=0KI2iaAaOyC9Y-FIfFVazeKT_4ORQRp26gWyMBUu_3c,2396
118
125
  epyt_flow/simulation/scada/__init__.py,sha256=ZFAxJVqwEVsgiyFilFetnb13gPhZg1JEOPWYvKIJT4c,90
119
126
  epyt_flow/simulation/scada/advanced_control.py,sha256=Enox02ggt36HdFLX7ZNxgxuqsTEeu9AACHrzU8CXGrg,4489
120
- epyt_flow/simulation/scada/scada_data.py,sha256=n0tNtVlOBFO7S5y4VvUrg37CD8ApiGsn1o4swnDQYtg,76694
121
- epyt_flow/simulation/scada/scada_data_export.py,sha256=zDWtDIpkKCwgVxj1FcAcsgXBVu3u5_KlElRaORQ9vJo,9860
127
+ epyt_flow/simulation/scada/scada_data.py,sha256=oNUT10QRd-iTkMG8GMF4PeI0n32eb1-ncId02GWLHhA,76710
128
+ epyt_flow/simulation/scada/scada_data_export.py,sha256=I2ZIsDo5PK-xInTtftmma9c-KfdCWmAP1N_tk2yaNRE,9431
122
129
  epyt_flow/uncertainty/__init__.py,sha256=ZRjuJL9rDpWVSdPwObPxFpEmMTcgAl3VmPOsS6cIyGg,89
123
130
  epyt_flow/uncertainty/model_uncertainty.py,sha256=DAgyfvdTQvOVMyduuPIpPB_8e3GIMNpehu6kh0jFg0s,13592
124
131
  epyt_flow/uncertainty/sensor_noise.py,sha256=zJVULxnxVPSSqc6UW0iwZ9O-HGf9dn4CwScPqf4yCY0,2324
125
132
  epyt_flow/uncertainty/uncertainties.py,sha256=X-o7GZUC0HELtzpoXIAJaAeYOw35N05TuRoSmStcCpI,17669
126
133
  epyt_flow/uncertainty/utils.py,sha256=gq66c9-QMOxOqI6wgWLyFxjVV0fbG0_8Yzd6mQjNYNo,5315
127
- epyt_flow-0.1.0.dist-info/LICENSE,sha256=-4hYIY2BLmCkdOv2_PehEwlnMKTCes8_oyIUXjKtkug,1076
128
- epyt_flow-0.1.0.dist-info/METADATA,sha256=HrTB03cTXnAp8rNwwwiqGYuV-v6GUvBFFbYPSAqIRe0,5103
129
- epyt_flow-0.1.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
130
- epyt_flow-0.1.0.dist-info/top_level.txt,sha256=Wh_kd7TRL8ownCw3Y3dxx-9C0iTSk6wNauv_NX9JcrY,10
131
- epyt_flow-0.1.0.dist-info/RECORD,,
134
+ epyt_flow-0.2.0.dist-info/LICENSE,sha256=-4hYIY2BLmCkdOv2_PehEwlnMKTCes8_oyIUXjKtkug,1076
135
+ epyt_flow-0.2.0.dist-info/METADATA,sha256=ysOkPkLty2m6glBTDJawg-drJN1Ei1BJb3kX4td7mJo,6619
136
+ epyt_flow-0.2.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
137
+ epyt_flow-0.2.0.dist-info/top_level.txt,sha256=Wh_kd7TRL8ownCw3Y3dxx-9C0iTSk6wNauv_NX9JcrY,10
138
+ epyt_flow-0.2.0.dist-info/RECORD,,
@@ -1,4 +0,0 @@
1
- #!/bin/bash
2
- mkdir -p "../customlibs/"
3
- gcc -w -shared -Wl,-soname,libepanet2_2.so -fPIC -o "../customlibs/libepanet2_2.so" EPANET/SRC_engines/*.c -IEPANET/SRC_engines/include -lc -lm -pthread
4
- gcc -w -fPIC -shared -Wl,-soname,libepanetmsx2_2_0.so -o "../customlibs/libepanetmsx2_2_0.so" -fopenmp -Depanetmsx_EXPORTS -IEPANET-MSX/Src/include -IEPANET/SRC_engines/include EPANET-MSX/Src/*.c -Wl,-rpath=. "../customlibs/libepanet2_2.so" -lm -lgomp -lpthread