Explorar el Código

don not set command if season is Transition

chenhaiyang hace 4 años
padre
commit
bd3feb0043
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  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