|
@@ -8,6 +8,7 @@ from app.controllers.equipment.ahu.thermal_mode import count_vav_box_weight, fet
|
|
|
from app.models.domain.devices import ThermalMode
|
|
|
from app.schemas.equipment import VAVBox
|
|
|
from app.services.platform import DataPlatformService, InfoCode
|
|
|
+from app.services.transfer import Duoduo, Season
|
|
|
from app.services.weather import WeatherService
|
|
|
from app.utils.date import get_time_str, TIME_FMT
|
|
|
|
|
@@ -24,7 +25,8 @@ class ACATAHSupplyAirTemperatureController:
|
|
|
return_air: float,
|
|
|
thermal_mode: ThermalMode,
|
|
|
is_off_to_on: bool,
|
|
|
- is_thermal_mode_switched: bool
|
|
|
+ is_thermal_mode_switched: bool,
|
|
|
+ season: Season
|
|
|
):
|
|
|
super(ACATAHSupplyAirTemperatureController, self).__init__()
|
|
|
self.vav_boxes_list = vav_boxes_list
|
|
@@ -33,6 +35,7 @@ class ACATAHSupplyAirTemperatureController:
|
|
|
self.thermal_mode = thermal_mode
|
|
|
self.is_off_to_on = is_off_to_on
|
|
|
self.is_thermal_mode_switched = is_thermal_mode_switched
|
|
|
+ self.season = season
|
|
|
|
|
|
def calculate_by_cold_vav(self, cold_ratio: float) -> float:
|
|
|
if self.thermal_mode == ThermalMode.cooling:
|
|
@@ -80,9 +83,17 @@ class ACATAHSupplyAirTemperatureController:
|
|
|
cold_ratio = self.get_cold_ratio()
|
|
|
temperature = self.calculate_by_cold_vav(cold_ratio)
|
|
|
else:
|
|
|
- temperature = 25.0
|
|
|
+ if self.season == Season.heating:
|
|
|
+ temperature = 27.0
|
|
|
+ elif self.season == Season.cooling:
|
|
|
+ temperature = 20.0
|
|
|
+ else:
|
|
|
+ temperature = 25.0
|
|
|
|
|
|
- temperature = max(20.0, min(30.0, temperature))
|
|
|
+ if self.season == Season.heating:
|
|
|
+ temperature = max(20.0, min(30.0, temperature))
|
|
|
+ else:
|
|
|
+ temperature = max(16.0, min(30.0, temperature))
|
|
|
|
|
|
return temperature
|
|
|
|