Browse Source

添加晋能实时计算

shilin 2 years ago
parent
commit
286eb91e8c

+ 6 - 6
realtime/datatraining-server-cph/src/main/java/com/gyee/datatraining/service/DatatrainingService.java

@@ -299,13 +299,13 @@ public class DatatrainingService {
                 temp++;
                 map.put(type, temp);
             } else {
-                map.put(type, 0);
+                map.put(type, 1);
             }
 
             wpmap.put(wt.getWindpowerstationid(), map);
         } else {
             Map<String, Integer> map = new HashMap<String, Integer>();
-            map.put(type, 0);
+            map.put(type, 1);
             wpmap.put(wt.getWindpowerstationid(), map);
         }
     }
@@ -318,12 +318,12 @@ public class DatatrainingService {
                 temp++;
                 map.put(type, temp);
             } else {
-                map.put(type, 0);
+                map.put(type, 1);
             }
             pjmap.put(wt.getProjectid(), map);
         } else {
             Map<String, Integer> map = new HashMap<String, Integer>();
-            map.put(type, 0);
+            map.put(type, 1);
             pjmap.put(wt.getProjectid(), map);
         }
     }
@@ -336,12 +336,12 @@ public class DatatrainingService {
                 temp++;
                 map.put(type, temp);
             } else {
-                map.put(type, 0);
+                map.put(type, 1);
             }
             lnmap.put(wt.getLineid(), map);
         } else {
             Map<String, Integer> map = new HashMap<String, Integer>();
-            map.put(type, 0);
+            map.put(type, 1);
             lnmap.put(wt.getLineid(), map);
         }
     }

+ 2 - 1
realtime/datatraining-server-cph/src/main/java/com/gyee/datatraining/util/dd/LstmModelWt.java

@@ -184,6 +184,7 @@ public class LstmModelWt {
 		if (day == 0) {
 			day = 1;
 		}
+
 		int number = day * 24 * 60 / step;
 
 		for (int j = 0; j < number; j++) {
@@ -226,7 +227,7 @@ public class LstmModelWt {
 			point.setEdnaId(ai.getCode());
 			point.setPointValueInDouble(value);
 			point.setPointTime(new BigDecimal(now.getTime()).divide(new BigDecimal(1000), 0, RoundingMode.HALF_EVEN).longValue());
-			 ednaApiUtil.sendSinglePoint(point);
+//			 ednaApiUtil.sendSinglePoint(point);
 			ednaApiUtil.updatePoint(point);
 		}
 	}