优化:违停和拥堵 resolve 后清除冷却记录
车辆离开/拥堵消散确认后清冷却,新的违停/拥堵事件可正常触发。 15秒确认期+命中率阈值已能过滤路过车辆,不会误触发。
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user