wenjia Li 6 ماه پیش
والد
کامیت
a8b5a9d7e9

+ 2 - 0
dataAnalysisBusiness/algorithm/faultAnalyst.py

@@ -64,6 +64,7 @@ class FaultAnalyst(AnalystNotFilter):
             Field_PowerFarmCode: conf.dataContract.dataFilter.powerFarmID,
             Field_Return_BatchCode: conf.dataContract.dataFilter.dataBatchNum,
             Field_CodeOfTurbine: "total",
+            Field_MillTypeCode:"total",
             Field_Return_FilePath: filePathOfturbinefault,
             Field_Return_IsSaveDatabase: True
         })
@@ -76,6 +77,7 @@ class FaultAnalyst(AnalystNotFilter):
             Field_PowerFarmCode: conf.dataContract.dataFilter.powerFarmID,
             Field_Return_BatchCode: conf.dataContract.dataFilter.dataBatchNum,
             Field_CodeOfTurbine: "total",
+            Field_MillTypeCode:"total",
             Field_Return_FilePath: filePathOftotalfault,
             Field_Return_IsSaveDatabase: True
         })

+ 6 - 5
dataAnalysisBusiness/algorithm/productionIndicatorAnalyst.py

@@ -89,8 +89,6 @@ class ProductionIndicatorAnalyst(AnalystNotFilter):
         nShouldGP = (df[Field_WindSpeed] >= cut_in_ws).sum()
         nRealGP = ((df[Field_WindSpeed] >= cut_in_ws) & (df[Field_ActiverPower] > 0)).sum()
         TurbineRunRate = (nRealGP / nShouldGP) * 100 if nShouldGP > 0 else 0
-        print("风机可利用率:", TurbineRunRate)
-        print(df[Field_WindSpeed].max())
 
         df.dropna(subset=[Field_WindSpeed], inplace=True)
         df.reset_index(drop=True, inplace=True)
@@ -211,7 +209,7 @@ class ProductionIndicatorAnalyst(AnalystNotFilter):
         '''
         # 风场发电量
         Qp=sum(result_df['EPActualTotal'])
-        print("Qp:",Qp)
+
         # 计划发电量完成率(Qj为计划发电量)
         # Rj=Qp/Qj
         # 风场等效利用小时
@@ -220,7 +218,7 @@ class ProductionIndicatorAnalyst(AnalystNotFilter):
         Qdr=sum(result_df['Qdl'])-Qp
         # 电网弃风率
         if Qp+Qdr==0:
-            Rdr=None
+            Rdr=0
         else:
             Rdr=Qdr/(Qp+Qdr)
         return Qp,Thc,Qdr,Rdr
@@ -296,6 +294,7 @@ class ProductionIndicatorAnalyst(AnalystNotFilter):
             Field_PowerFarmCode: conf.dataContract.dataFilter.powerFarmID,
             Field_Return_BatchCode: conf.dataContract.dataFilter.dataBatchNum,
             Field_CodeOfTurbine: "total",
+            Field_MillTypeCode:"total",
             Field_Return_FilePath: filePathOfproductionindicator,
                     Field_Return_IsSaveDatabase: True
         })
@@ -311,8 +310,9 @@ class ProductionIndicatorAnalyst(AnalystNotFilter):
         Qp, Thc, Qdr,Rdr = self.Production_indicators(dataFrameresults)
         Qp=round(Qp,2)
         Thc=round(Thc,2)
+        Rdr = Rdr if Rdr is not None else 0
+        print("Rdr:",Rdr)
         Qdr=round(Qdr,2)
-        Rdr=round(Rdr,2)
         # 将Qp, Thc, Rdr添加到results_df中
         dataFrameResult_total['Qp'] = [Qp]#风场总发电量
         dataFrameResult_total['Thc'] = [Thc]#风场等效利用小时
@@ -331,6 +331,7 @@ class ProductionIndicatorAnalyst(AnalystNotFilter):
             Field_PowerFarmCode: conf.dataContract.dataFilter.powerFarmID,
             Field_Return_BatchCode: conf.dataContract.dataFilter.dataBatchNum,
             Field_CodeOfTurbine: "total",
+            Field_MillTypeCode:"total",
             Field_Return_FilePath: filePathOfproductionindicator_total,
                     Field_Return_IsSaveDatabase: True
         })

+ 1 - 0
dataAnalysisBusiness/algorithm/yawErrorAnalyst.py

@@ -330,6 +330,7 @@ class YawErrorAnalyst(AnalystWithGoodPoint):
             Field_PowerFarmCode: conf.dataContract.dataFilter.powerFarmID,
             Field_Return_BatchCode: conf.dataContract.dataFilter.dataBatchNum,
             Field_CodeOfTurbine: "total",
+            Field_MillTypeCode:"total",
             Field_Return_FilePath: filePathOfYawError,
                     Field_Return_IsSaveDatabase: True
         })