|
|
@@ -26,6 +26,8 @@ class DHU_AB(BaseDevice):
|
|
|
def __init__(
|
|
|
self,
|
|
|
DHU_type = 'A',
|
|
|
+ exist_Fa_H = True,
|
|
|
+ exist_Fa_B = True,
|
|
|
wheel_1 = None,
|
|
|
wheel_2 = 'WheelS3',
|
|
|
coolingcoil_2 = 'CoolingCoil2',
|
|
|
@@ -38,7 +40,6 @@ class DHU_AB(BaseDevice):
|
|
|
) -> None:
|
|
|
super().__init__()
|
|
|
self.DHU_type = DHU_type.replace('DHU_','')
|
|
|
-
|
|
|
if self.DHU_type == 'A':
|
|
|
wheel_1 = wheel_1 if wheel_1 is not None else 'WheelS3'
|
|
|
elif self.DHU_type == 'B':
|
|
|
@@ -59,7 +60,14 @@ class DHU_AB(BaseDevice):
|
|
|
'mixed_1' : mixed_1,
|
|
|
'mixed_2' : mixed_2
|
|
|
}
|
|
|
- self.record_load_info(components=self.components,DHU_type=DHU_type)
|
|
|
+ self.exist_Fa_H = exist_Fa_H
|
|
|
+ self.exist_Fa_B = exist_Fa_B
|
|
|
+ self.record_load_info(
|
|
|
+ components = self.components,
|
|
|
+ DHU_type = self.DHU_type,
|
|
|
+ exist_Fa_H = self.exist_Fa_H,
|
|
|
+ exist_Fa_B = self.exist_Fa_B
|
|
|
+ )
|
|
|
self.components = {k:eval(v)(k) for k,v in self.components.items()}
|
|
|
|
|
|
for idx in [1,2]:
|
|
|
@@ -89,11 +97,13 @@ class DHU_AB(BaseDevice):
|
|
|
'coil_3_Val' : 'coil_3_Val',
|
|
|
'wheel_1_TinR': 'wheel_1_TinR',
|
|
|
'wheel_2_TinR': 'wheel_2_TinR',
|
|
|
- 'mixed_1_TinM': 'mixed_1_TinM',
|
|
|
- 'mixed_2_TinM': 'mixed_2_TinM',
|
|
|
- 'mixed_1_HinM': 'mixed_1_HinM',
|
|
|
- 'mixed_2_HinM': 'mixed_2_HinM',
|
|
|
}
|
|
|
+ if self.exist_Fa_H:
|
|
|
+ columns['mixed_1_TinM'] = 'mixed_1_TinM'
|
|
|
+ columns['mixed_1_HinM'] = 'mixed_1_HinM'
|
|
|
+ if self.exist_Fa_B:
|
|
|
+ columns['mixed_2_TinM'] = 'mixed_2_TinM'
|
|
|
+ columns['mixed_2_HinM'] = 'mixed_2_HinM'
|
|
|
return columns
|
|
|
|
|
|
@property
|
|
|
@@ -116,8 +126,6 @@ class DHU_AB(BaseDevice):
|
|
|
self,
|
|
|
input_data : pd.DataFrame,
|
|
|
observed_data: pd.DataFrame,
|
|
|
- exist_Fa_H : bool,
|
|
|
- exist_Fa_B : bool,
|
|
|
rw_FA_val : bool = False,
|
|
|
plot_TVP : bool = True,
|
|
|
):
|
|
|
@@ -129,8 +137,8 @@ class DHU_AB(BaseDevice):
|
|
|
param_prior['F_air'] = AirFlow_DHU_AB.prior(
|
|
|
rw_FA_val = rw_FA_val,
|
|
|
N = len(input_data),
|
|
|
- exist_Fa_H = exist_Fa_H,
|
|
|
- exist_Fa_B = exist_Fa_B
|
|
|
+ exist_Fa_H = self.exist_Fa_H,
|
|
|
+ exist_Fa_B = self.exist_Fa_B
|
|
|
)
|
|
|
|
|
|
res = self.model(
|
|
|
@@ -279,13 +287,13 @@ def model_A(
|
|
|
coil_3_Val, # 后表冷阀门开度
|
|
|
wheel_1_TinR, # 前转轮再生侧温度
|
|
|
wheel_2_TinR, # 后转轮再生侧温度
|
|
|
- mixed_1_TinM, # 回风温度(处理侧)
|
|
|
- mixed_1_HinM, # 回风湿度(处理侧)
|
|
|
- mixed_2_TinM, # 补风温度(再生侧)
|
|
|
- mixed_2_HinM, # 补风湿度(再生侧)
|
|
|
engine : str,
|
|
|
components: dict,
|
|
|
param : dict,
|
|
|
+ mixed_1_TinM = 0, # 回风温度(处理侧)
|
|
|
+ mixed_1_HinM = 0, # 回风湿度(处理侧)
|
|
|
+ mixed_2_TinM = 0, # 补风温度(再生侧)
|
|
|
+ mixed_2_HinM = 0, # 补风湿度(再生侧)
|
|
|
) -> dict:
|
|
|
|
|
|
# 水的质量流量
|
|
|
@@ -444,13 +452,13 @@ def model_B(
|
|
|
coil_3_Val, # 后表冷阀门开度
|
|
|
wheel_1_TinR, # 前转轮再生侧温度
|
|
|
wheel_2_TinR, # 后转轮再生侧温度
|
|
|
- mixed_1_TinM, # 回风温度(处理侧)
|
|
|
- mixed_1_HinM, # 回风湿度(处理侧)
|
|
|
- mixed_2_TinM, # 补风温度(再生侧)
|
|
|
- mixed_2_HinM, # 补风湿度(再生侧)
|
|
|
engine : str,
|
|
|
components: dict,
|
|
|
param : dict,
|
|
|
+ mixed_1_TinM = 0, # 回风温度(处理侧)
|
|
|
+ mixed_1_HinM = 0, # 回风湿度(处理侧)
|
|
|
+ mixed_2_TinM = 0, # 补风温度(再生侧)
|
|
|
+ mixed_2_HinM = 0, # 补风湿度(再生侧)
|
|
|
) -> dict:
|
|
|
|
|
|
# 水的质量流量
|
|
|
@@ -468,7 +476,7 @@ def model_B(
|
|
|
HinR = 0,
|
|
|
FR = air_flow['wheel_1_FaR'],
|
|
|
engine = engine,
|
|
|
- param = param,
|
|
|
+ param = param['wheel_1'],
|
|
|
)
|
|
|
|
|
|
# 处理侧混风(回风)
|
|
|
@@ -555,39 +563,39 @@ def model_B(
|
|
|
HinR = mixed_2_res['HoutA'],
|
|
|
FR = air_flow['wheel_1_FaR'],
|
|
|
engine = engine,
|
|
|
- param = param,
|
|
|
+ param = param['wheel_1'],
|
|
|
)
|
|
|
|
|
|
# 前蒸气盘管
|
|
|
- steamcoil_1_res = components['steamcoil_1'].model(
|
|
|
+ heatingcoil_1_res = components['heatingcoil_1'].model(
|
|
|
TinA = mixed_2_res['ToutA'],
|
|
|
ToutA = wheel_1_TinR,
|
|
|
- FA = air_flow['steamcoil_1_Fa'],
|
|
|
- param = param['steamcoil_1'],
|
|
|
+ FA = air_flow['heatingcoil_1_Fa'],
|
|
|
+ param = param['heatingcoil_1'],
|
|
|
engine = engine
|
|
|
)
|
|
|
|
|
|
# 后蒸气盘管
|
|
|
- steamcoil_2_res = components['steamcoil_2'].model(
|
|
|
+ heatingcoil_2_res = components['heatingcoil_2'].model(
|
|
|
TinA = wheel_2_res_adj['ToutC'],
|
|
|
ToutA = wheel_2_TinR,
|
|
|
- FA = air_flow['steamcoil_2_Fa'],
|
|
|
- param = param['steamcoil_2'],
|
|
|
+ FA = air_flow['heatingcoil_2_Fa'],
|
|
|
+ param = param['heatingcoil_2'],
|
|
|
engine = engine
|
|
|
)
|
|
|
|
|
|
return {
|
|
|
- 'coil_2' : coil_2_res,
|
|
|
- 'coil_3' : coil_3_res,
|
|
|
- 'wheel_1' : wheel_1_res_adj,
|
|
|
- 'wheel_2' : wheel_2_res_adj,
|
|
|
- 'mixed_1' : mixed_1_res,
|
|
|
- 'mixed_2' : mixed_2_res,
|
|
|
- 'steamcoil_1': steamcoil_1_res,
|
|
|
- 'steamcoil_2': steamcoil_2_res,
|
|
|
- 'Fa' : air_flow,
|
|
|
- 'summary' : {
|
|
|
- 'Fs':steamcoil_1_res['Fs'] + steamcoil_2_res['Fs'],
|
|
|
+ 'coil_2' : coil_2_res,
|
|
|
+ 'coil_3' : coil_3_res,
|
|
|
+ 'wheel_1' : wheel_1_res_adj,
|
|
|
+ 'wheel_2' : wheel_2_res_adj,
|
|
|
+ 'mixed_1' : mixed_1_res,
|
|
|
+ 'mixed_2' : mixed_2_res,
|
|
|
+ 'heatingcoil_1': heatingcoil_1_res,
|
|
|
+ 'heatingcoil_2': heatingcoil_2_res,
|
|
|
+ 'Fa' : air_flow,
|
|
|
+ 'summary' : {
|
|
|
+ 'Fs':heatingcoil_1_res['Fs'] + heatingcoil_2_res['Fs'],
|
|
|
}
|
|
|
}
|
|
|
|