diff --git a/algorithms.py b/algorithms.py index 69c6e83..770ebfe 100644 --- a/algorithms.py +++ b/algorithms.py @@ -939,6 +939,7 @@ class IllegalParkingAlgorithm: self.state_start_time = None self._last_alarm_id = None self._parking_start_time = None + self.alert_cooldowns.clear() # 车辆离开后清冷却,新车违停可正常告警 logger.debug(f"ROI {roi_id}: CONFIRMING_CLEAR → IDLE") return alerts @@ -1175,6 +1176,7 @@ class VehicleCongestionAlgorithm: self.state_start_time = None self._last_alarm_id = None self._congestion_start_time = None + self.alert_cooldowns.clear() # 拥堵消散后清冷却,再次拥堵可正常告警 logger.debug(f"ROI {roi_id}: CONFIRMING_CLEAR → NORMAL") return alerts