chenhaiyang 4 роки тому
батько
коміт
b3cced6784
1 змінених файлів з 6 додано та 2 видалено
  1. 6 2
      app/controllers/equipment/fcu/on_ratio.py

+ 6 - 2
app/controllers/equipment/fcu/on_ratio.py

@@ -37,7 +37,7 @@ class OnRatioController:
     def select_speed(self, delta_all: float) -> str:
         mode = self.select_mode()
         if mode == 'off':
-            speed = 'off'
+            speed = 'medium'
         elif mode == 'normal':
             if delta_all > 0.00088889:
                 speed = 'medium'
@@ -66,7 +66,7 @@ class OnRatioController:
             elif last_mode == 'off':
                 ratio = 0.1
             else:
-                if self.return_air > self.target - 0.5:
+                if self.return_air > self.target - 0.75:
                     ratio = 0.1
                 else:
                     ratio = 0.9
@@ -75,7 +75,11 @@ class OnRatioController:
                 ratio = 0.9
             else:
                 try:
+                    if delta_off >= 0:
+                        delta_off = 0.0
                     ratio = (0.5 * (self.target - self.return_air) / period_time - delta_off) / (delta_on - delta_off)
+                    if delta_on <= 0:
+                        ratio = 0.5
                     logger.debug(f'delta target: {0.5 * (self.target - self.return_air)}')
                     if ratio > 0.9:
                         ratio = 0.9