Spaces:
Sleeping
Sleeping
akshayballal
commited on
Commit
•
dbd7ac0
1
Parent(s):
e8d4213
Edit rtu pipeline
Browse files- src/main.py +3 -2
- src/rtu/RTUPipeline.py +15 -29
src/main.py
CHANGED
@@ -2,12 +2,12 @@ import json
|
|
2 |
from rtu.RTUAnomalizer import RTUAnomalizer
|
3 |
from rtu.RTUPipeline import RTUPipeline
|
4 |
from vav.VAVPipeline import VAVPipeline
|
|
|
5 |
import paho.mqtt.client as mqtt
|
6 |
|
7 |
|
8 |
def main():
|
9 |
rtu_data_pipeline = RTUPipeline(scaler_path="src/rtu/models/scaler_1.pkl")
|
10 |
-
print(rtu_data_pipeline.scaler)
|
11 |
rtu_anomalizer = RTUAnomalizer(
|
12 |
prediction_model_path="src/rtu/models/lstm_4rtu_smooth_02.keras",
|
13 |
clustering_model_paths=[
|
@@ -20,8 +20,9 @@ def main():
|
|
20 |
num_outputs=rtu_data_pipeline.num_outputs,
|
21 |
)
|
22 |
|
23 |
-
|
24 |
|
|
|
25 |
# print(vav_pipeline.input_col_names)
|
26 |
|
27 |
# print(len(vav_pipeline.output_col_names))
|
|
|
2 |
from rtu.RTUAnomalizer import RTUAnomalizer
|
3 |
from rtu.RTUPipeline import RTUPipeline
|
4 |
from vav.VAVPipeline import VAVPipeline
|
5 |
+
from vav.VAVAnomalizer import VAVAnomalizer
|
6 |
import paho.mqtt.client as mqtt
|
7 |
|
8 |
|
9 |
def main():
|
10 |
rtu_data_pipeline = RTUPipeline(scaler_path="src/rtu/models/scaler_1.pkl")
|
|
|
11 |
rtu_anomalizer = RTUAnomalizer(
|
12 |
prediction_model_path="src/rtu/models/lstm_4rtu_smooth_02.keras",
|
13 |
clustering_model_paths=[
|
|
|
20 |
num_outputs=rtu_data_pipeline.num_outputs,
|
21 |
)
|
22 |
|
23 |
+
vav_pipeline = VAVPipeline(rtu_id=1, scaler_path="src/vav/models/scaler_vav_1.pkl")
|
24 |
|
25 |
+
vav_anomalizer = VAVAnomalizer(prediction_model_path="src/vav/models/lstm__vav_01")
|
26 |
# print(vav_pipeline.input_col_names)
|
27 |
|
28 |
# print(len(vav_pipeline.output_col_names))
|
src/rtu/RTUPipeline.py
CHANGED
@@ -9,39 +9,25 @@ import numpy as np
|
|
9 |
class RTUPipeline:
|
10 |
scaler = None
|
11 |
|
12 |
-
def __init__(self, scaler_path=None):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
self.output_col_names = [
|
14 |
"hp_hws_temp",
|
15 |
-
"rtu_003_sa_temp",
|
16 |
-
"rtu_003_oadmpr_pct",
|
17 |
-
"rtu_003_ra_temp",
|
18 |
-
"rtu_003_oa_temp",
|
19 |
-
"rtu_003_ma_temp",
|
20 |
-
"rtu_003_sf_vfd_spd_fbk_tn",
|
21 |
-
"rtu_003_rf_vfd_spd_fbk_tn",
|
22 |
-
"rtu_004_sa_temp",
|
23 |
-
"rtu_004_oadmpr_pct",
|
24 |
-
"rtu_004_ra_temp",
|
25 |
-
"rtu_004_oa_temp",
|
26 |
-
"rtu_004_ma_temp",
|
27 |
-
"rtu_004_sf_vfd_spd_fbk_tn",
|
28 |
-
"rtu_004_rf_vfd_spd_fbk_tn",
|
29 |
-
"rtu_001_sa_temp",
|
30 |
-
"rtu_001_oadmpr_pct",
|
31 |
-
"rtu_001_ra_temp",
|
32 |
-
"rtu_001_oa_temp",
|
33 |
-
"rtu_001_ma_temp",
|
34 |
-
"rtu_001_sf_vfd_spd_fbk_tn",
|
35 |
-
"rtu_001_rf_vfd_spd_fbk_tn",
|
36 |
-
"rtu_002_sa_temp",
|
37 |
-
"rtu_002_oadmpr_pct",
|
38 |
-
"rtu_002_ra_temp",
|
39 |
-
"rtu_002_oa_temp",
|
40 |
-
"rtu_002_ma_temp",
|
41 |
-
"rtu_002_sf_vfd_spd_fbk_tn",
|
42 |
-
"rtu_002_rf_vfd_spd_fbk_tn",
|
43 |
]
|
44 |
|
|
|
|
|
|
|
|
|
45 |
self.input_col_names = [
|
46 |
"air_temp_set_1",
|
47 |
"air_temp_set_2",
|
|
|
9 |
class RTUPipeline:
|
10 |
scaler = None
|
11 |
|
12 |
+
def __init__(self, rtus=[1, 2], scaler_path=None):
|
13 |
+
|
14 |
+
outputs = [
|
15 |
+
"sa_temp",
|
16 |
+
"oadmpr_pct",
|
17 |
+
"ra_temp",
|
18 |
+
"oa_temp",
|
19 |
+
"ma_temp",
|
20 |
+
"sf_vfd_spd_fbk_tn",
|
21 |
+
"rf_vfd_spd_fbk_tn",
|
22 |
+
]
|
23 |
self.output_col_names = [
|
24 |
"hp_hws_temp",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
]
|
26 |
|
27 |
+
for rtu in rtus:
|
28 |
+
for output in outputs:
|
29 |
+
self.output_col_names.append(f"rtu_00{rtu}_{output}")
|
30 |
+
|
31 |
self.input_col_names = [
|
32 |
"air_temp_set_1",
|
33 |
"air_temp_set_2",
|