Просмотр исходного кода

don not set command if season is Transition

chenhaiyang 4 лет назад
Родитель
Сommit
bd3feb0043
1 измененных файлов с 5 добавлено и 2 удалено
  1. 5 2
      app/controllers/equipment/fcu/q_learning.py

+ 5 - 2
app/controllers/equipment/fcu/q_learning.py

@@ -117,7 +117,10 @@ async def get_fcu_q_learning_control_result(project_id: str, equipment_id: str)
         f'pre Tdb: {past_temperature} - '
         f'target: {current_target}'
     )
-    builder = QLearningCommandBuilder(season)
-    command = await builder.get_command(realtime_temperature, past_temperature, current_target)
+    if season == Season.transition:
+        command = {}
+    else:
+        builder = QLearningCommandBuilder(season)
+        command = await builder.get_command(realtime_temperature, past_temperature, current_target)
 
     return command