|
@@ -1,5 +1,7 @@
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
+from operator import attrgetter
|
|
|
+
|
|
|
import arrow
|
|
|
import numpy as np
|
|
|
|
|
@@ -139,6 +141,7 @@ class ASHPGroupController:
|
|
|
|
|
|
def build_up(self, diff: float, out_temp_set: float):
|
|
|
if diff > 0:
|
|
|
+ self._ashp_list = sorted(self._ashp_list, key=attrgetter("acc_run_time"))
|
|
|
for device in self._ashp_list:
|
|
|
if not device.running_status:
|
|
|
device.equip_switch_set = True
|
|
@@ -146,6 +149,7 @@ class ASHPGroupController:
|
|
|
if diff == 0:
|
|
|
break
|
|
|
elif diff < 0:
|
|
|
+ self._ashp_list = sorted(self._ashp_list, key=attrgetter("acc_run_time"), reverse=True)
|
|
|
for device in self._ashp_list:
|
|
|
if device.running_status:
|
|
|
device.equip_switch_set = False
|