Skip to content

Commit

Permalink
slight fixed in the ipynb for the new BRICK example
Browse files Browse the repository at this point in the history
  • Loading branch information
bbartling committed Aug 13, 2024
1 parent 75a6ebc commit 6e2e71b
Showing 1 changed file with 23 additions and 63 deletions.
86 changes: 23 additions & 63 deletions examples/ahu_fault_one_brick.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
{
"data": {
"text/plain": [
"<Graph identifier=Nd06a07c33b574222ba48b71b4c9c1d07 (<class 'rdflib.graph.Graph'>)>"
"<Graph identifier=N38502715d14a4e5ca869e0367d4b1cd9 (<class 'rdflib.graph.Graph'>)>"
]
},
"execution_count": 3,
Expand Down Expand Up @@ -133,16 +133,16 @@
"output_type": "stream",
"text": [
"Subject: http://example.com/building/Supply_Air_Static_Pressure_Sensor, Predicate: http://www.w3.org/1999/02/22-rdf-syntax-ns#type, Object: https://brickschema.org/schema/1.1/Brick#Supply_Air_Static_Pressure_Sensor\n",
"Subject: http://example.com/building/AHU1, Predicate: http://www.w3.org/2000/01/rdf-schema#label, Object: Air Handling Unit 1\n",
"Subject: http://example.com/building/AHU1, Predicate: https://brickschema.org/schema/1.1/BrickFrame#hasPoint, Object: http://example.com/building/Supply_Fan_VFD_Speed_Sensor\n",
"Subject: http://example.com/building/Supply_Fan_VFD_Speed_Sensor, Predicate: http://www.w3.org/2000/01/rdf-schema#label, Object: Supply Fan VFD Speed Sensor\n",
"Subject: http://example.com/building/Static_Pressure_Setpoint, Predicate: http://www.w3.org/1999/02/22-rdf-syntax-ns#type, Object: https://brickschema.org/schema/1.1/Brick#Static_Pressure_Setpoint\n",
"Subject: http://example.com/building/AHU1, Predicate: http://www.w3.org/1999/02/22-rdf-syntax-ns#type, Object: https://brickschema.org/schema/1.1/Brick#Air_Handler_Unit\n",
"Subject: http://example.com/building/Static_Pressure_Setpoint, Predicate: http://www.w3.org/2000/01/rdf-schema#label, Object: Static Pressure Setpoint\n",
"Subject: http://example.com/building/AHU1, Predicate: https://brickschema.org/schema/1.1/BrickFrame#hasPoint, Object: http://example.com/building/Static_Pressure_Setpoint\n",
"Subject: http://example.com/building/Supply_Air_Static_Pressure_Sensor, Predicate: http://www.w3.org/2000/01/rdf-schema#label, Object: Supply Air Static Pressure Sensor\n",
"Subject: http://example.com/building/AHU1, Predicate: https://brickschema.org/schema/1.1/BrickFrame#hasPoint, Object: http://example.com/building/Supply_Air_Static_Pressure_Sensor\n",
"Subject: http://example.com/building/AHU1, Predicate: http://www.w3.org/2000/01/rdf-schema#label, Object: Air Handling Unit 1\n",
"Subject: http://example.com/building/AHU1, Predicate: http://www.w3.org/1999/02/22-rdf-syntax-ns#type, Object: https://brickschema.org/schema/1.1/Brick#Air_Handler_Unit\n",
"Subject: http://example.com/building/Supply_Fan_VFD_Speed_Sensor, Predicate: http://www.w3.org/1999/02/22-rdf-syntax-ns#type, Object: https://brickschema.org/schema/1.1/Brick#Supply_Fan_VFD_Speed_Sensor\n",
"Subject: http://example.com/building/AHU1, Predicate: https://brickschema.org/schema/1.1/BrickFrame#hasPoint, Object: http://example.com/building/Static_Pressure_Setpoint\n",
"Subject: http://example.com/building/Supply_Air_Static_Pressure_Sensor, Predicate: http://www.w3.org/2000/01/rdf-schema#label, Object: Supply Air Static Pressure Sensor\n"
"Subject: http://example.com/building/Static_Pressure_Setpoint, Predicate: http://www.w3.org/2000/01/rdf-schema#label, Object: Static Pressure Setpoint\n",
"Subject: http://example.com/building/Static_Pressure_Setpoint, Predicate: http://www.w3.org/1999/02/22-rdf-syntax-ns#type, Object: https://brickschema.org/schema/1.1/Brick#Static_Pressure_Setpoint\n"
]
}
],
Expand All @@ -153,7 +153,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -185,7 +185,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 6,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -390,7 +390,7 @@
"[5 rows x 44 columns]"
]
},
"execution_count": 7,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -408,7 +408,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 7,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -472,7 +472,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 8,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -550,7 +550,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 9,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -755,7 +755,7 @@
"[5 rows x 44 columns]"
]
},
"execution_count": 10,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -777,7 +777,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 10,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1018,7 +1018,7 @@
"[5 rows x 43 columns]"
]
},
"execution_count": 11,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -1033,7 +1033,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 11,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1155,36 +1155,6 @@
"print(df_fc1.head())\n"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Index(['HWR_value', 'HWS_value', 'Heat_Calls', 'Oa_Temp', 'OaTemp_Enable',\n",
" 'CWR_Temp', 'CWS_Temp', 'CWS_Freeze_SPt', 'CW_Valve', 'HW_Valve',\n",
" 'DischargeTemp', 'Eff_DaSP', 'RaHumidity', 'Ra_Temp', 'Ra_FanSpeed',\n",
" 'OaTemp', 'Ma_Dampers', 'Ma_Temp', 'SaStaticSPt', 'Sa_FanSpeed',\n",
" 'SaTempSP', 'RaCO2', 'SaStatic', 'CurrentKWHrs', 'CurrentKW',\n",
" 'Eff_DaSPt', 'RaTemp', 'MaLowSPt', 'MaDampers', 'SaStatic_SPt',\n",
" 'SaTempSPt', 'CoolValve', 'OA_Damper', 'MA_Temp', 'EffSetpoint',\n",
" 'EaDamper', 'SpaceTemp', 'RA_CO2', 'RA_Temp', 'VAV2_6_SpaceTemp',\n",
" 'VAV2_7_SpaceTemp', 'VAV3_2_SpaceTemp', 'VAV3_5_SpaceTemp',\n",
" 'static_check_', 'fan_check_', 'combined_check', 'fc1_flag'],\n",
" dtype='object')"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_fc1.columns"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -1199,7 +1169,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 12,
"metadata": {},
"outputs": [
{
Expand All @@ -1218,7 +1188,7 @@
" dtype='object')"
]
},
"execution_count": 14,
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -1229,7 +1199,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 13,
"metadata": {},
"outputs": [
{
Expand All @@ -1238,7 +1208,7 @@
"np.int64(0)"
]
},
"execution_count": 15,
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -1258,19 +1228,13 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 14,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Duct Static Sensors found: [rdflib.term.URIRef('http://example.com/building/Supply_Air_Static_Pressure_Sensor')]\n",
"VFD Speed Sensors found: [rdflib.term.URIRef('http://example.com/building/Supply_Fan_VFD_Speed_Sensor')]\n",
"Static Pressure Setpoints found: [rdflib.term.URIRef('http://example.com/building/Static_Pressure_Setpoint')]\n",
"Mapped duct_static_col: SaStatic\n",
"Mapped supply_vfd_speed_col: Sa_FanSpeed\n",
"Mapped duct_static_setpoint_col: SaStaticSPt\n",
"Fault Condition 1: Duct static too low at fan at full speed\n"
]
},
Expand Down Expand Up @@ -1304,13 +1268,9 @@
"source": [
"from open_fdd.air_handling_unit.reports.report_fc1 import FaultCodeOneReport\n",
"\n",
"# Create an instance of FaultCodeFourReport\n",
"# Assuming you have already created an instance of FaultConditionOne\n",
"fc1 = FaultConditionOne(brick_graph, column_mapping, troubleshoot_mode=True, rolling_window_size=10)\n",
"\n",
"# Generate a report using the updated FaultCodeOneReport class\n",
"fc1_report = FaultCodeOneReport(fc1)\n",
"fc1_report.display_report_in_ipython(df_fc1)\n"
"fc1_report.display_report_in_ipython(df_fc1)"
]
}
],
Expand Down

0 comments on commit 6e2e71b

Please sign in to comment.