From 8fc27dba6719041402e3e3c099e2f3e01d9d52c7 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期三, 16 七月 2025 17:30:56 +0800
Subject: [PATCH] 2025.7.16 1. 修改动态溯源异常判断逻辑

---
 src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/config/RTExcWindLevelConfig.kt |  156 +++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 117 insertions(+), 39 deletions(-)

diff --git a/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/config/RTExcWindLevelConfig.kt b/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/config/RTExcWindLevelConfig.kt
index d5fbbe0..e855a98 100644
--- a/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/config/RTExcWindLevelConfig.kt
+++ b/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/config/RTExcWindLevelConfig.kt
@@ -3,6 +3,7 @@
 import com.flightfeather.uav.biz.FactorFilter
 import com.flightfeather.uav.biz.dataanalysis.BaseAnalysisConfig
 import com.flightfeather.uav.biz.sourcetrace.model.DistanceType
+import com.flightfeather.uav.socket.eunm.FactorType
 
 /**
  *
@@ -16,13 +17,21 @@
         val mutationRate: Pair<Double, Double>,
         val distanceType: DistanceType,
         val countLimit: Int,
-    )
+    ){
+}
 
     // 闄愬畾璺濈鍐咃紙鍗曚綅锛氱背锛�
     var distanceLimit = 3000
     // 闄愬畾鏃堕棿鍐咃紙鍗曚綅锛氬垎閽燂級
     var timeLimit = 3
+    // 婧簮鎵╂暎鍋忕Щ瑙掑害锛堝崟浣嶏細搴︼級
+    var sourceTraceDegOffset = 120.0
+    // 瀹氭椂绾跨储鍒嗘瀽鏃堕棿闂撮殧(鍗曚綅锛氬垎閽�)
+    var analysisPeriod = 15
+    // 瀹氭椂鍒嗘瀽闂撮殧涓紝绔嬪嵆杩涜绾跨储鍒嗘瀽鐨勬渶灏忕嚎绱㈤噺(鍗曚綅锛氫釜)
+    var analysisCount = 4
 
+    /****鏁版嵁绐佸彉*****************************************************************************/
     // 0 - 1绾ч
     var windLevelCondition1 = WindLevelCondition(
         .0 to 1.5,
@@ -44,8 +53,8 @@
         1.6 to 7.9,
         0.2 to Double.MAX_VALUE,
         DistanceType.TYPE3,
-//        3
-        1
+        3
+//        1
     )
 
     // 5 - 6绾ч
@@ -56,42 +65,111 @@
         3
     )
 
-    // 婧簮鎵╂暎鍋忕Щ瑙掑害锛堝崟浣嶏細搴︼級
-    var sourceTraceDegOffset = 120.0
+    /****鏁版嵁蹇�熶笂鍗�*****************************************************************************/
+    // 鐩戞祴鍥犲瓙鍦ㄤ竴涓洃娴嬪懆鏈燂紙4绉掞級鍐呮甯稿彉鍖栫殑閲忕骇鑼冨洿
+    var changeRateUp1 = mutableMapOf(
+        FactorType.PM25 to WindLevelCondition(
+            .0 to 1.5,
+            4.0 to Double.MAX_VALUE,
+            DistanceType.TYPE1,
+            3
+        ),
+        FactorType.PM10 to WindLevelCondition(
+            .0 to 1.5,
+            4.0 to Double.MAX_VALUE,
+            DistanceType.TYPE1,
+            3
+        ),
+        FactorType.VOC to WindLevelCondition(
+            .0 to 1.5,
+            6.0 to Double.MAX_VALUE,
+            DistanceType.TYPE1,
+            1
+        ),
+    )
+    var changeRateUp2 = mutableMapOf(
+        FactorType.PM25 to WindLevelCondition(
+            1.6 to 7.9,
+            4.0 to Double.MAX_VALUE,
+            DistanceType.TYPE3,
+            3
+        ),
+        FactorType.PM10 to WindLevelCondition(
+            1.6 to 7.9,
+            4.0 to Double.MAX_VALUE,
+            DistanceType.TYPE3,
+            3
+        ),
+        FactorType.VOC to WindLevelCondition(
+            1.6 to 7.9,
+            6.0 to Double.MAX_VALUE,
+            DistanceType.TYPE3,
+            1
+        ),
+    )
+    var changeRateUp3 = mutableMapOf(
+        FactorType.PM25 to WindLevelCondition(
+            8.0 to 13.8,
+            4.0 to Double.MAX_VALUE,
+            DistanceType.TYPE4,
+            3
+        ),
+        FactorType.PM10 to WindLevelCondition(
+            8.0 to 13.8,
+            4.0 to Double.MAX_VALUE,
+            DistanceType.TYPE4,
+            3
+        ),
+        FactorType.VOC to WindLevelCondition(
+            8.0 to 13.8,
+            6.0 to Double.MAX_VALUE,
+            DistanceType.TYPE4,
+            1
+        ),
+    )
 
-    // 瀹氭椂绾跨储鍒嗘瀽鏃堕棿闂撮殧(鍗曚綅锛氬垎閽�)
-    var analysisPeriod = 15
-    // 瀹氭椂鍒嗘瀽闂撮殧涓紝绔嬪嵆杩涜绾跨储鍒嗘瀽鐨勬渶灏忕嚎绱㈤噺(鍗曚綅锛氫釜)
-    var analysisCount = 3
+    /****鏁版嵁蹇�熶笅闄嶆彁閱�*****************************************************************************/
+    // 鐩戞祴鍥犲瓙鍦ㄤ竴涓洃娴嬪懆鏈燂紙4绉掞級鍐呮甯稿彉鍖栫殑閲忕骇鑼冨洿
+    var changeRateWarnDown = mutableMapOf(
+        FactorType.PM25 to WindLevelCondition(
+            .0 to Double.MAX_VALUE,
+            -Double.MAX_VALUE to -2.0,
+            DistanceType.TYPE1,
+            3
+        ),
+        FactorType.PM10 to WindLevelCondition(
+            .0 to Double.MAX_VALUE,
+            -Double.MAX_VALUE to -2.0,
+            DistanceType.TYPE1,
+            3
+        ),
+        FactorType.VOC to WindLevelCondition(
+            .0 to Double.MAX_VALUE,
+            -Double.MAX_VALUE to -3.0,
+            DistanceType.TYPE1,
+            3
+        ),
+    )
 
-
-
-//    // 0 - 1绾ч
-//    var windLevelCondition1 = WindLevelCondition(
-//        .0 to 1.5,
-//        listOf(0.5 to DistanceType.TYPE1, 0.2 to DistanceType.TYPE2,),
-//        listOf(1, 1)
-//    )
-//
-//    // 0 - 1绾ч
-//    var windLevelCondition1_1 = WindLevelCondition(
-//        .0 to 1.5,
-//        0.2 to DistanceType.TYPE2,
-//        1
-//    )
-//
-//    // 2 - 4绾ч
-//    var windLevelCondition2 = WindLevelCondition(
-//        1.6 to 7.9,
-//        listOf(0.2 to DistanceType.TYPE3),
-////        listOf(3)
-//        listOf(1)
-//    )
-//
-//    // 5 - 6绾ч
-//    var windLevelCondition3 = WindLevelCondition(
-//        8.0 to 13.8,
-//        listOf(0.1 to DistanceType.TYPE4),
-//        listOf(3)
-//    )
+    /****鏁版嵁鏈変笂鍗囪秼鍔挎彁閱�*****************************************************************************/
+    var changeRateWarnUp = mutableMapOf(
+        FactorType.PM25 to WindLevelCondition(
+            .0 to Double.MAX_VALUE,
+            2.0 to 4.0,
+            DistanceType.TYPE1,
+            3
+        ),
+        FactorType.PM10 to WindLevelCondition(
+            .0 to Double.MAX_VALUE,
+            2.0 to 4.0,
+            DistanceType.TYPE1,
+            3
+        ),
+        FactorType.VOC to WindLevelCondition(
+            .0 to Double.MAX_VALUE,
+            3.0 to 6.0,
+            DistanceType.TYPE1,
+            1
+        ),
+    )
 }
\ No newline at end of file

--
Gitblit v1.9.3