<jupyter_start><jupyter_text>Querying simulation data. Change dates if needed.<jupyter_code>model_cella = pd.read_csv('model_cella.csv', index_col = 0, parse_dates = True)
st = datetime.datetime(2021,8,12,23,45,0)
en = datetime.datetime(2021,8,15,23,45,0)

mask = ((model_cella.index >= st) & (model_cella.index <= en))
model_cella = model_cella[mask]<jupyter_output><empty_output><jupyter_text>gets test data<jupyter_code>test_cella = pd.read_csv('test_cella_revised.csv', index_col = 0, parse_dates = True)
test_cellb = pd.read_csv('test_cellb_revised.csv', index_col = 0, parse_dates = True)
test_cella['datetime'] = pd.to_datetime(test_cella['datetime'])
test_cellb['datetime'] = pd.to_datetime(test_cellb['datetime'])
model_cella = model_cella.interpolate(method = 'linear', limit_direction='both', axis = 0)
test_cella = test_cella.interpolate(method = 'linear', limit_direction='both', axis = 0)

print(len(model_cella.index))
#chwel_df['/x1ab_all/Processed Data/X1/X1-El-Chiller'].interpolate(method = 'linear', limit_direction='forward', axis = 0)
#model_cella = model_cella.dropna()
#test_cella =test_cella.dropna()

#print(len(model_cella[0].values))
test_cella['date'] = test_cella['datetime'].apply(lambda x: datetime.date(x.year, x.month, x.day))
test_cella['time'] = test_cella['datetime'].apply(lambda x: datetime.time(x.hour, x.minute, x.second))

test_cellb['date'] = test_cellb['datetime'].apply(lambda x: datetime.date(x.year, x.month, x.day))
test_cellb['time'] = test_cellb['datetime'].apply(lambda x: datetime.time(x.hour, x.minute, x.second))
print(test_cella.columns)<jupyter_output>Index(['desk1_plug_power', 'desk2_plug_power', 'desk3_plug_power',
       'desk4_plug_power', 'desk5_plug_power', 'desk6_plug_power',
       'desk3_light_power', 'desk4_light_power', 'desk2_light_power',
       'desk1_6_light_power', 'desk5_light_power', '1A-VAV1-Zn_Temp',
       '1A-VAV2-Zn_Temp', '1A-VAV3-Zn_Temp', '1A-VAV1-OccupiedCoolingSetpt',
       '1A-VAV1-UnoccupiedCoolingSetpt', '1A-VAV1-OccupiedHeatingSetpt',
       '1A-VAV1-UnoccupiedHeatingSetpt', '1A-VAV2-OccupiedCoolingSetpt',
       '1A-VAV2-UnoccupiedHeatingSetpt', '1A-VAV2-UnoccupiedCoolingSetpt',
       '1A-VAV2-OccupiedHeatingSetpt', '1A-VAV3-OccupiedCoolingSetpt',
       '1A-VAV3-UnoccupiedHeatingSetpt', '1A-VAV3-UnoccupiedCoolingSetpt',
       '1A-VAV3-OccupiedHeatingSetpt', '1A-El-AHU', '1A-El-CHWP', '1A-El-HWP',
       '1A-El-Exhaust Fan', '1A-Th-Chilled Water', '1B-OAT-1',
       '1A-MidZone-TCS6-DBT', '1A-NorthZone-DBT', '1A-WindowZone-TCS7-DBT',
       '1A-VAV1-DischargeAirTemp', '1A-VAV2-DischargeAirTemp',
 [...]<jupyter_text>Metrics<jupyter_code>test_cella = test_cella.assign(COP='COP') 
test_cella['COP'] = 2.9

test_cellb = test_cellb.assign(COP='COP') 
test_cellb['COP'] = 2.9
test_cella = test_cella.assign(chiller = 'Chiller_load') 
test_cella['CellA_Chiller_load'] = (test_cella['1A-Th-Chilled Water']/test_cella['COP']) *-1

test_cellb = test_cellb.assign(chiller = 'Chiller_load') 
test_cellb['Chiller_load'] = (test_cellb['1B-Th-Chilled Water']/test_cellb['COP']) *-1
test_cella['1A-SAT-1'] = test_cella['1A-SAT-1'].apply(lambda x: (1.8*x + 32))

model_cella['AHU: Supply Fan Airflow Rate m3/s'] = model_cella['AHU: Supply Fan Airflow Rate'].apply(lambda x: (x/2118.8))
model_cella['AHU: Supply Fan Calc Power'] = model_cella['AHU: Supply Fan Airflow Rate m3/s'].apply(lambda x: (-391*x**2+687*x+140))<jupyter_output><empty_output><jupyter_text>Convert temp to deg F<jupyter_code>#model_cella['VAV North Zone Cooling SP'] = model_cella['VAV North Zone Cooling SP'].apply(lambda x: ((x- 273)*1.8)+32)
#model_cella['VAV Core Zone Cooling SP'] = model_cella['VAV Core Zone Cooling SP'].apply(lambda x: ((x- 273)*1.8)+32)
#model_cella['VAV South Zone Cooling SP'] = model_cella['VAV South Zone Cooling SP'].apply(lambda x: ((x- 273)*1.8)+32)<jupyter_output><empty_output><jupyter_text>Resample to 1 hour for 1 hour metrics<jupyter_code>model_cella=model_cella.resample('60min').mean()
test_cella=test_cella.resample('60min').mean()
def calibration_metrics(model, test):
    mse = skl.mean_squared_error(test, model)
    rmse = math.sqrt(mse)
    
    cv_rmse = rmse/(test.mean())
    
    nmbe = np.mean(model.values - test.values) /(test.mean())
    
    mae = skl.mean_absolute_error(test, model)
    cv_test = scipy.stats.variation(test)
    cv_model= scipy.stats.variation(model)
    
    print(nmbe,cv_rmse)
    r2_value = skl.r2_score(test, model)
    
    #return(mse, rmse, cv_rmse, nmbe, mae, cv_test, cv_model, r2_value)
    #return(nmbe,cv_rmse,)
#print(np.any(np.isnan(model_cella['AHU: Supply Fan Airflow Rate'])))
#print(np.all(np.isfinite(model_cella['AHU: Supply Fan Airflow Rate'])))

#print(type(model_cella['AHU: Supply Fan Airflow Rate'].values[0]))
#print(np.any(np.isnan(test_cella['1A-ASAM-1'])))
#print(np.all(np.isfinite(test_cella['1A-ASAM-1'])))

#print((test_cella['1A-ASAM-1'].values))<jupyter_output><empty_output><jupyter_text>Cell A metrics + plots for baseline model<jupyter_code>AHU_A_power_error = calibration_metrics(model_cella['AHU: Supply Fan Power'], test_cella['1A-El-AHU'])

VAV1_A_dat_error = calibration_metrics(model_cella['VAV: North Zone Discharge Air Temperature'], test_cella['1A-VAV1-DischargeAirTemp'])
VAV2_A_dat_error = calibration_metrics(model_cella['VAV: Core Zone Discharge Air Temperature'], test_cella['1A-VAV2-DischargeAirTemp'])
VAV3_A_dat_error = calibration_metrics(model_cella['VAV: South Zone Discharge Air Temperature'], test_cella['1A-VAV3-DischargeAirTemp'])

VAV_A_airflow_sup_error = calibration_metrics(model_cella['AHU: Supply Fan Airflow Rate'], test_cella['1A-ASAM-1'])
VAV1_A_airflow_sup_error = calibration_metrics(model_cella['VAV: North Zone Airflow Rate'], test_cella['1A-VAV1-DischargeAirflow'])
VAV2_A_airflow_sup_error = calibration_metrics(model_cella['VAV: Core Zone Airflow Rate'], test_cella['1A-VAV2-DischargeAirflow'])
VAV3_A_airflow_sup_error = calibration_metrics(model_cella['VAV: South Zone Airflow Rate'], test_cella['1A-VAV3-DischargeAirflow'])

chw_load_A_error = calibration_metrics(model_cella['AHU: Cooling coil Load'], test_cella['1A-Th-Chilled Water']*-1)

core_temp_A_error = calibration_metrics(model_cella['VAV: Core Zone Room Air Temperature'], test_cella['1A-VAV2-Zn_Temp'])
north_temp_A_error = calibration_metrics(model_cella['VAV: North Zone Room Air Temperature'], test_cella['1A-VAV1-Zn_Temp'])
south_temp_A_error = calibration_metrics(model_cella['VAV: South Zone Room Air Temperature'], test_cella['1A-VAV3-Zn_Temp'])

AHU_A_supply_airtemp_error = calibration_metrics(model_cella['AHU: Supply Air Temperature'], test_cella['1A-SAT-1']*1.8+32)
AHU_A_OADA_error = calibration_metrics(model_cella['AHU: Outdoor Air Damper Position']*100, test_cella['1A-OADA-1-POSN'])
AHU_A_RADA_error = calibration_metrics(model_cella['AHU: Return Air Damper Position']*100, test_cella['1A-RADA-1-POSN'])<jupyter_output>-0.6646811910852494 0.6735572670365317
-0.01769156055495182 0.1031628903603274
0.015497147708337235 0.06924740422316865
0.010006139623720238 0.0850154152845205
-0.23851800159506262 0.3637903657149076
-0.14968789755160097 0.5226375038908214
-0.05550096461016908 0.3282977626036553
-0.11296771602763266 0.3058992136805948
-0.21714973592507955 0.36870351285788616
-0.027719495393131774 0.03233119695003406
-0.0153598635905896 0.024599146783420154
-0.021215658656526894 0.04006990032874805
-0.5674353927803938 0.5676813754093123
0.006043651436012835 0.16212092397966657
0.15516463451477017 0.45648386426947274<jupyter_text>choose whichever variable's error you want to print<jupyter_code>#print(AHU_A_power_error)
#print(VAV1_A_dat_error, VAV2_A_dat_error, VAV3_A_dat_error)
#print(VAV1_A_airflow_sup_error, VAV2_A_airflow_sup_error, VAV3_A_airflow_sup_error)
#print(chw_load_A_error)
#print(AHU_A_supply_airtemp_error)
#print(VAV_A_airflow_sup_error)
#print(AHU_A_OADA_error)
#print(AHU_A_RADA_error)
#print(chw_load_A_error)
#print(core_temp_A_error, north_temp_A_error, south_temp_A_error)
VAV3_A_airflow_sup_error
#test_cella.index<jupyter_output><empty_output><jupyter_text>plots for VAV  Current set up plots Cooling set point. Uncomment yabel and titles to plot for relent variables Add the dataframe that you want to plot. You can refer to cell titled ('Cell A metrics + plot for baseline model') to get the correct variable names for model and test data frame.<jupyter_code>fig, (ax, ax1, ax2) = plt.subplots(nrows = 3, ncols = 1, constrained_layout=True, facecolor='w', edgecolor='k',figsize = (16,10))
fig.subplots_adjust(hspace = .2, wspace=.15)

#ax.plot(model_cella['VAV North Zone Cooling SP'], label = 'Model - North zone')
#ax1.plot(model_cella['VAV Core Zone Cooling SP'], label = 'Model - Core zone')
#ax2.plot(model_cella['VAV South Zone Cooling SP'], label = 'Model - South zone')

ax.plot(test_cella['desk1_6_light_power'], label = 'Test - North zone')
ax1.plot(test_cella['desk2_light_power'], label = 'Test - Core zone')
ax2.plot(test_cella['desk3_light_power'], label = 'Test - South zone')


#ax.plot(test_cella['desk2_light_power'], label = 'Test - North zone')
ax1.plot(test_cella['desk4_light_power'], label = 'Test - Core zone')
ax2.plot(test_cella['desk5_light_power'], label = 'Test - South zone')


ax.set_ylabel('Gains Level (W)', fontsize = 10)
ax1.set_ylabel('Gains Level (W)', fontsize = 10)
ax2.set_ylabel('Gains Level (W)', fontsize = 10)

#ax.set_ylabel('Airflow (cfm)', fontsize = 10)
#ax1.set_ylabel('Airflow (cfm)', fontsize = 10)
#ax2.set_ylabel('Airflow (cfm)', fontsize = 10)

#ax.set_ylim(70,90)
#ax1.set_ylim(70,90)
#ax2.set_ylim(70,90)
ax.legend(fontsize = 7, loc = 2)
ax1.legend(fontsize = 7, loc = 2)
ax2.legend(fontsize = 7, loc = 2)
#ax.set_title('VAV zone air flowrate (cfm)', fontsize = 18)
#ax.set_title('VAV zone discharge air temperature (deg F)', fontsize = 18)
ax.set_title('Lighting Level (W))', fontsize = 18)
sns.set_style('darkgrid')
sns.set_context('paper')
sns.set_context('notebook')

fig, (ax, ax1, ax2) = plt.subplots(nrows = 3, ncols = 1, constrained_layout=True, facecolor='w', edgecolor='k',figsize = (16,10))
fig.subplots_adjust(hspace = .2, wspace=.15)

ax.plot(model_cella['VAV: North Zone Room Air Temperature'], label = 'Model - North zone')
ax1.plot(model_cella['VAV: Core Zone Room Air Temperature'], label = 'Model - Core zone')
ax2.plot(model_cella['VAV: South Zone Room Air Temperature'], label = 'Model - South zone')

ax.plot(test_cella['1A-VAV1-Zn_Temp'], label = 'Test - North zone')
ax1.plot(test_cella['1A-VAV2-Zn_Temp'], label = 'Test - Core zone')
ax2.plot(test_cella['1A-VAV3-Zn_Temp'], label = 'Test - South zone')

ax.plot(model_cella['VAV North Zone Cooling SP'], label = 'Model Cool SP - North zone')
ax1.plot(model_cella['VAV Core Zone Cooling SP'], label = 'Model Cool SP - Core zone')
ax2.plot(model_cella['VAV South Zone Cooling SP'], label = 'Model Cool SP - South zone')

ax.plot(test_cella['1A-VAV1-OccupiedCoolingSetpt'], label = 'Test Cool SP - North zone')
ax1.plot(test_cella['1A-VAV2-OccupiedCoolingSetpt'], label = 'Test Cool SP - Core zone')
ax2.plot(test_cella['1A-VAV3-OccupiedCoolingSetpt'], label = 'Test Cool SP - South zone')

ax.plot(model_cella['VAV North Zone Heating SP'], label = 'Model Heat SP - North zone')
ax1.plot(model_cella['VAV North Zone Heating SP'], label = 'Model Heat SP - Core zone')
ax2.plot(model_cella['VAV North Zone Heating SP'], label = 'Model Heat SP - South zone')

ax.plot(test_cella['1A-VAV1-OccupiedHeatingSetpt'], label = 'Test Heat SP - North zone')
ax1.plot(test_cella['1A-VAV2-OccupiedHeatingSetpt'], label = 'Test Heat SP - Core zone')
ax2.plot(test_cella['1A-VAV3-OccupiedHeatingSetpt'], label = 'Test Heat SP - South zone')


ax.set_ylabel('Temperature (deg F)', fontsize = 10)
ax1.set_ylabel('Temperature (deg F)', fontsize = 10)
ax2.set_ylabel('Temperature (deg F)', fontsize = 10)

#ax.set_ylabel('Airflow (cfm)', fontsize = 10)
#ax1.set_ylabel('Airflow (cfm)', fontsize = 10)
#ax2.set_ylabel('Airflow (cfm)', fontsize = 10)

#ax.set_ylim(70,90)
#ax1.set_ylim(70,90)
#ax2.set_ylim(70,90)
ax.legend(fontsize = 7, loc = 2)
ax1.legend(fontsize = 7, loc = 2)
ax2.legend(fontsize = 7, loc = 2)
#ax.set_title('VAV zone air flowrate (cfm)', fontsize = 18)
#ax.set_title('VAV zone discharge air temperature (deg F)', fontsize = 18)
ax.set_title('VAV zone temperature SP (deg F)', fontsize = 18)
pd.set_option('display.max_columns', None)  


print(model_cella['VAV North Zone Cooling SP'])


print(test_cella['1A-VAV1-OccupiedCoolingSetpt'])

pd.set_option('display.max_rows', 500)<jupyter_output>datetime
2021-08-12 23:45:00    80.060020
2021-08-13 00:00:00    80.060020
2021-08-13 00:15:00    80.060020
2021-08-13 00:30:00    80.060020
2021-08-13 00:45:00    80.060020
2021-08-13 01:00:00    80.060020
2021-08-13 01:15:00    80.060020
2021-08-13 01:30:00    80.060020
2021-08-13 01:45:00    80.060020
2021-08-13 02:00:00    80.060020
2021-08-13 02:15:00    80.060020
2021-08-13 02:30:00    80.060020
2021-08-13 02:45:00    80.060020
2021-08-13 03:00:00    80.060020
2021-08-13 03:15:00    80.060020
2021-08-13 03:30:00    80.060020
2021-08-13 03:45:00    80.060020
2021-08-13 04:00:00    80.060020
2021-08-13 04:15:00    80.060020
2021-08-13 04:30:00    80.060020
2021-08-13 04:45:00    80.060020
2021-08-13 05:00:00    80.060020
2021-08-13 05:15:00    77.899994
2021-08-13 05:30:00    77.899994
2021-08-13 05:45:00    77.899994
2021-08-13 06:00:00    77.899994
2021-08-13 06:15:00    77.000000
2021-08-13 06:30:00    77.000000
2021-08-13 06:45:00    77.000000
2021-08-13 07:00:00    77.000000
2[...]<jupyter_text>Plot for AHU  Current set up plots AHU air flow rate. Uncomment yabel and titles to plot for relent variables Add the dataframe that you want to plot. You can refer to cell titled ('Cell A metrics + plot for baseline model') to get the correct variable names for model and test data frame.<jupyter_code>sns.set_style('darkgrid')
sns.set_context('paper')
sns.set_context('notebook')

fig, (ax) = plt.subplots(nrows = 1, ncols = 1, constrained_layout=True, facecolor='w', edgecolor='k',figsize = (16,10))
fig.subplots_adjust(hspace = .2, wspace=.15)
#x = [y.strftime("%D:%H") for y in test_cella.index]

ax.plot(model_cella['AHU: Return Air Damper Position']*100, label = 'Model')
ax.plot(test_cella['1A-RADA-1-POSN'], label = 'Test')

#ax.plot(model_cella['AHU: Outdoor Air Damper Position']*100, label = 'Model')
#ax.plot(test_cella['1A-OADA-1-POSN'], label = 'Test')


ax.set_ylabel('Position (%)', fontsize = 10)

#ax.set_ylabel('Power (W)', fontsize = 10)
ax.legend(fontsize = 10, loc = 2)
#ax.set_ylim(0,400)
#ax.set_title('Fan Power (W)', fontsize = 18)
#ax.set_title('Chiller Cooling Load (W)', fontsize = 18)
#ax.set_title('AHU Supply Air flowrate (cfm)', fontsize = 18)
#ax.set_title('AHU Supply Air Temperature (deg F)', fontsize = 18)


ax.set_title('Return Air damper position (%)', fontsize = 18)
#ax.set_title('Outdoor Air damper position (%)', fontsize = 18)
#ax.set_title('Return Air damper position', fontsize = 18)<jupyter_output><ipython-input-299-00206ad31e64>:6: UserWarning: This figure was using constrained_layout==True, but that is incompatible with subplots_adjust and or tight_layout: setting constrained_layout==False. 
  fig.subplots_adjust(hspace = .2, wspace=.15)<jupyter_text>Cell B metrics + plots for G36<jupyter_code>AHU_B_power_error = calibration_metrics(model_cellb['AHU: Supply Fan Power'], test_cellb['1B-El-AHU'])

VAV1_B_discharge_air_temp = calibration_metrics(model_cellb['VAV: North Zone Discharge Air Temperature'], test_cellb['1B-VAV1-DischargeAirTemp'])
VAV2_B_discharge_air_temp = calibration_metrics(model_cellb['VAV: Core Zone Discharge Air Temperature'], test_cellb['1B-VAV2-DischargeAirTemp'])
VAV3_B_discharge_air_temp = calibration_metrics(model_cellb['VAV: South Zone Discharge Air Temperature'], test_cellb['1B-VAV3-DischargeAirTemp'])

VAV_B_airflow_s_error = calibration_metrics(model_cellb['AHU: Supply Fan Airflow Rate'], test_cellb['1B-ASAM-1'])
VAV1_B_airflow_s_error = calibration_metrics(model_cellb['VAV: North Zone Airflow Rate'], test_cellb['1B-VAV1-DischargeAirflow'])
VAV2_B_airflow_s_error = calibration_metrics(model_cellb['VAV: Core Zone Airflow Rate'], test_cellb['1B-VAV2-DischargeAirflow'])
VAV3_B_airflow_s_error = calibration_metrics(model_cellb['VAV: South Zone Airflow Rate'], test_cellb['1B-VAV3-DischargeAirflow'])

chw_load_B_error = calibration_metrics(model_cellb['AHU: Cooling coil Load'], test_cellb['1B-Th-Chilled Water'])

cor_temp_B_error = calibration_metrics(model_cellb['VAV: Core Zone Room Air Temperature'], test_cellb['1B-VAV2-Zn_Temp'])
nor_temp_B_error = calibration_metrics(model_cellb['VAV: North Zone Room Air Temperature'], test_cellb['1B-VAV1-Zn_Temp'])
sou_temp_B_error = calibration_metrics(model_cellb['VAV: South Zone Room Air Temperature'], test_cellb['1B-VAV3-Zn_Temp'])

AHU_B_supply_airtemp_error = calibration_metrics(model_cellb['AHU: Supply Air Temperature'], test_cellb['1B-SAT-1'])
AHU_B_OADA_error = calibration_metrics(model_cellb['AHU: Outdoor Air Damper Position'], test_cellb['1B-OADA-1-POSN'])
AHU_B_RADA_error = calibration_metrics(model_cellb['AHU: Return Air Damper Position'], test_cellb['1B-RADA-1-POSN'])<jupyter_output><empty_output><jupyter_text>choose whichever variable's error you want to print<jupyter_code>#print(AHU_B_power_error)
#print(VAV1_B_dat_error, VAV2_B_dat_error, VAV3_B_dat_error)
#print(VAV1_B_airflow_sup_error, VAV2_B_airflow_sup_error, VAV3_B_airflow_sup_error)
#print(chw_load_B_error)
#print(AHU_B_supply_airtemp_error)
print(VAV_B_airflow_sup_error)
#print(AHU_B_OADA_error)
#print(AHU_B_RADA_error)
#print(chw_load_B_error)
#print(core_temp_B_error, north_temp_B_error, south_temp_B_error)<jupyter_output><empty_output><jupyter_text>Plot for VAV  Current set up plots zone temperature SP. Uncomment yabel and titles to plot for relent variables Add the dataframe that you want to plot. You can refer to cell titled ('Cell B metrics + plot for G36 model') to get the correct variable names for model and test data frame.<jupyter_code>fig, (ax, ax1, ax2) = plt.subplots(nrows = 3, ncols = 1, constrained_layout=True, facecolor='w', edgecolor='k',figsize = (16,10))
fig.subplots_adjust(hspace = .2, wspace=.15)

ax.plot(model_cellb['VAV North Zone Cooling SP'], label = 'Model - North zone')
ax1.plot(model_cellb['VAV Core Zone Cooling SP'], label = 'Model - Core zone')
ax2.plot(model_cellb['VAV South Zone Cooling SP'], label = 'Model - South zone')

ax.plot(test_cellb['1B-VAV1-OccupiedCoolingSetpt'], label = 'Test - North zone')
ax1.plot(test_cellb['1B-VAV2-OccupiedCoolingSetpt'], label = 'Test - Core zone')
ax2.plot(test_cellb['1B-VAV3-OccupiedCoolingSetpt'], label = 'Test - South zone')


ax.set_ylabel('Temperature (deg F)', fontsize = 10)
ax1.set_ylabel('Temperature (deg F)', fontsize = 10)
ax2.set_ylabel('Temperature (deg F)', fontsize = 10)

#ax.set_ylabel('Airflow (cfm)', fontsize = 10)
#ax1.set_ylabel('Airflow (cfm)', fontsize = 10)
#ax2.set_ylabel('Airflow (cfm)', fontsize = 10)

ax.set_ylim(70,90)
ax1.set_ylim(70,90)
ax2.set_ylim(70,90)
ax.legend(fontsize = 7, loc = 2)
ax1.legend(fontsize = 7, loc = 2)
ax2.legend(fontsize = 7, loc = 2)
#ax.set_title('VAV zone air flowrate (cfm)', fontsize = 18)
#ax.set_title('VAV zone discharge air temperature (deg F)', fontsize = 18)
ax.set_title('VAV zone temperature SP (deg F)', fontsize = 18)<jupyter_output><ipython-input-23-910dcc819c47>:2: UserWarning: This figure was using constrained_layout==True, but that is incompatible with subplots_adjust and or tight_layout: setting constrained_layout==False. 
  fig.subplots_adjust(hspace = .2, wspace=.15)<jupyter_text>Plot for AHU  Current set up plots AHU air flow rate. Uncomment yabel and titles to plot for relent variables Add the dataframe that you want to plot. You can refer to cell titled ('Cell A metrics + plot for baseline model') to get the correct variable names for model and test data frame.<jupyter_code>fig, (ax) = plt.subplots(nrows = 1, ncols = 1, constrained_layout=True, facecolor='w', edgecolor='k',figsize = (16,10))
fig.subplots_adjust(hspace = .2, wspace=.15)
#x = [y.strftime("%D:%H") for y in test_cella.index]
ax.plot(model_cellb['AHU: Supply Fan Airflow Rate'], label = 'Model')
ax.plot(test_cellb['1B-ASAM-1'], label = 'Test')

ax.set_ylabel('Air flowrate(cfm)', fontsize = 10)
ax.legend(fontsize = 10, loc = 2)
#ax.set_ylim(45,65)
#ax.set_title('Fan Power (W)', fontsize = 18)
#ax.set_title('Chiller Cooling Load (W)', fontsize = 18)
ax.set_title('AHU Supply Air flowrate (cfm)', fontsize = 18)
#ax.set_title('Return Air damper position (%)', fontsize = 18)
#ax.set_title('Outdoor Air damper position (%)', fontsize = 18)
#ax.set_title('Return Air damper position', fontsize = 18)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14502862090528645, 'fraction_numerical': 0.08576651113569676, 'mean_word_length': 6.448943031171623, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '13', 'dir': 'jupyter-structured-clean-dedup', 'id': '466704', 'license': 'MIT', 'n_tokens_mistral': 9389, 'n_tokens_neox': 8182, 'n_words': 1594, 'path': 'data/Flexlab_HIL_calibration_test.ipynb', 'repo_name': 'rongxinyin/HIL-Sim', 'size': '20789'}