|
@@ -15,6 +15,7 @@ def count_vav_box_weight(
|
|
|
upper_limit_flow: float,
|
|
|
lower_limit_flow: float,
|
|
|
current_flow_set: float,
|
|
|
+ valve_opening: float,
|
|
|
season: Season
|
|
|
) -> float:
|
|
|
diff = realtime - target
|
|
@@ -27,15 +28,19 @@ def count_vav_box_weight(
|
|
|
if diff > 0:
|
|
|
flag = True
|
|
|
elif current_flow_set > upper_limit_flow * 0.9:
|
|
|
- if season == Season.cooling:
|
|
|
- if diff > 0:
|
|
|
- flag = True
|
|
|
- if season == Season.heating:
|
|
|
- if diff < 0:
|
|
|
- flag = True
|
|
|
+ if valve_opening > 90.0:
|
|
|
+ if season == Season.cooling:
|
|
|
+ if diff > 0:
|
|
|
+ flag = True
|
|
|
+ if season == Season.heating:
|
|
|
+ if diff < 0:
|
|
|
+ flag = True
|
|
|
|
|
|
if flag:
|
|
|
- weight = round(diff, 0)
|
|
|
+ if abs(diff) < 1:
|
|
|
+ weight = 0.0
|
|
|
+ else:
|
|
|
+ weight = diff
|
|
|
weight = max(-4.0, min(4.0, weight))
|
|
|
else:
|
|
|
weight = 0
|
|
@@ -63,6 +68,7 @@ class ACATAHThermalModeController:
|
|
|
box.supply_air_flow_upper_limit,
|
|
|
box.supply_air_flow_lower_limit,
|
|
|
box.supply_air_flow_set,
|
|
|
+ box.valve_opening,
|
|
|
self.season
|
|
|
)
|
|
|
|
|
@@ -93,13 +99,15 @@ async def fetch_status_params(project_id: str, device_id: str) -> Dict:
|
|
|
virtual_temperature_target = await duoduo.query_device_virtual_data(vav_id, 'TargetTemperatureSet')
|
|
|
lower_limit_flow, upper_limit_flow = await platform.get_air_flow_limit(vav_id)
|
|
|
current_flow_set = await platform.get_realtime_data(InfoCode.supply_air_flow_set, vav_id)
|
|
|
+ valve_opening = await platform.get_realtime_data(InfoCode.valve_opening, vav_id)
|
|
|
vav_params = {
|
|
|
'id': vav_id,
|
|
|
'virtual_realtime_temperature': virtual_realtime_temperature,
|
|
|
'virtual_target_temperature': virtual_temperature_target,
|
|
|
'supply_air_flow_lower_limit': lower_limit_flow,
|
|
|
'supply_air_flow_upper_limit': upper_limit_flow,
|
|
|
- 'supply_air_flow_set': current_flow_set
|
|
|
+ 'supply_air_flow_set': current_flow_set,
|
|
|
+ 'valve_opening': valve_opening
|
|
|
}
|
|
|
vav = VAVBox(**vav_params)
|
|
|
vav_boxes_list.append(vav)
|