Browse Source

更新磷酸铁锂电芯电压排名

qingfeng 2 năm trước cách đây
mục cha
commit
3745a93102

+ 39 - 39
LIB/MIDDLE/CellStateEstimation/BatSafetyWarning/V1_0_1/CBMSBatUniform.py

@@ -325,19 +325,19 @@ class BatUniform():
                             cellsoc_diff=eval(format(cellsoc_diff,'.1f'))
                             cellvolt_diff=eval(format(cellvolt_diff,'.0f'))
                             df_res.loc[len(df_res)]=[self.bmstime[i], self.sn, cellsoc_diff, cellvolt_diff, cellmin_num, cellmax_num, str(cellvolt_rank)]
-                        elif 2<cellvolt_max<4.5 and 2<cellvolt_min<4.5 and deltvolt<0.005: 
-                            cellvolt_sort=np.argsort(cellvolt_now)
-                            cellvolt_rank=list(np.argsort(cellvolt_sort)+1)
-                            if not df_res.empty:
-                                df_res.loc[len(df_res)]=df_res.loc[len(df_res)-1]
-                                df_res.loc[len(df_res)-1,'cellvolt_rank']=str(cellvolt_rank)
-                                df_res.loc[len(df_res)-1,'time']=self.bmstime[i]
-                            elif not self.df_uniform.empty:
-                                df_res.loc[len(df_res)]=self.df_uniform.iloc[-1]
-                                df_res.loc[len(df_res)-1,'cellvolt_rank']=str(cellvolt_rank)
-                                df_res.loc[len(df_res)-1,'time']=self.bmstime[i]
-                            else:
-                                pass
+                        # elif 2<cellvolt_max<4.5 and 2<cellvolt_min<4.5 and deltvolt<0.005: 
+                        #     cellvolt_sort=np.argsort(cellvolt_now)
+                        #     cellvolt_rank=list(np.argsort(cellvolt_sort)+1)
+                        #     if not df_res.empty:
+                        #         df_res.loc[len(df_res)]=df_res.loc[len(df_res)-1]
+                        #         df_res.loc[len(df_res)-1,'cellvolt_rank']=str(cellvolt_rank)
+                        #         df_res.loc[len(df_res)-1,'time']=self.bmstime[i]
+                        #     elif not self.df_uniform.empty:
+                        #         df_res.loc[len(df_res)]=self.df_uniform.iloc[-1]
+                        #         df_res.loc[len(df_res)-1,'cellvolt_rank']=str(cellvolt_rank)
+                        #         df_res.loc[len(df_res)-1,'time']=self.bmstime[i]
+                        #     else:
+                        #         pass
                     elif standingtime2>3600*6:
                         standingtime2=0
                         cellvolt_now=self._cellvolt_get(i)
@@ -358,19 +358,19 @@ class BatUniform():
                             cellsoc_diff=eval(format(cellsoc_diff,'.1f'))
                             cellvolt_diff=eval(format(cellvolt_diff,'.0f'))
                             df_res.loc[len(df_res)]=[self.bmstime[i], self.sn, cellsoc_diff, cellvolt_diff, cellmin_num, cellmax_num, str(cellvolt_rank)]
-                        elif 2<cellvolt_max<4.5 and 2<cellvolt_min<4.5 and deltvolt<0.005: 
-                            cellvolt_sort=np.argsort(cellvolt_now)
-                            cellvolt_rank=list(np.argsort(cellvolt_sort)+1)
-                            if not df_res.empty:
-                                df_res.loc[len(df_res)]=df_res.loc[len(df_res)-1]
-                                df_res.loc[len(df_res)-1,'cellvolt_rank']=str(cellvolt_rank)
-                                df_res.loc[len(df_res)-1,'time']=self.bmstime[i]
-                            elif not self.df_uniform.empty:
-                                df_res.loc[len(df_res)]=self.df_uniform.iloc[-1]
-                                df_res.loc[len(df_res)-1,'cellvolt_rank']=str(cellvolt_rank)
-                                df_res.loc[len(df_res)-1,'time']=self.bmstime[i]
-                            else:
-                                pass
+                        # elif 2<cellvolt_max<4.5 and 2<cellvolt_min<4.5 and deltvolt<0.005: 
+                        #     cellvolt_sort=np.argsort(cellvolt_now)
+                        #     cellvolt_rank=list(np.argsort(cellvolt_sort)+1)
+                        #     if not df_res.empty:
+                        #         df_res.loc[len(df_res)]=df_res.loc[len(df_res)-1]
+                        #         df_res.loc[len(df_res)-1,'cellvolt_rank']=str(cellvolt_rank)
+                        #         df_res.loc[len(df_res)-1,'time']=self.bmstime[i]
+                        #     elif not self.df_uniform.empty:
+                        #         df_res.loc[len(df_res)]=self.df_uniform.iloc[-1]
+                        #         df_res.loc[len(df_res)-1,'cellvolt_rank']=str(cellvolt_rank)
+                        #         df_res.loc[len(df_res)-1,'time']=self.bmstime[i]
+                        #     else:
+                        #         pass
                     
                     elif i>=len(self.df_bms)-3:
                         standingtime2=0
@@ -391,19 +391,19 @@ class BatUniform():
                             cellsoc_diff=eval(format(cellsoc_diff,'.1f'))
                             cellvolt_diff=eval(format(cellvolt_diff,'.0f'))
                             df_res.loc[len(df_res)]=[self.bmstime[i], self.sn, cellsoc_diff, cellvolt_diff, cellmin_num, cellmax_num, str(cellvolt_rank)]
-                        elif 2<cellvolt_max<4.5 and 2<cellvolt_min<4.5 and deltvolt<0.005: 
-                            cellvolt_sort=np.argsort(cellvolt_now)
-                            cellvolt_rank=list(np.argsort(cellvolt_sort)+1)
-                            if not df_res.empty:
-                                df_res.loc[len(df_res)]=df_res.loc[len(df_res)-1]
-                                df_res.loc[len(df_res)-1,'cellvolt_rank']=str(cellvolt_rank)
-                                df_res.loc[len(df_res)-1,'time']=self.bmstime[i]
-                            elif not self.df_uniform.empty:
-                                df_res.loc[len(df_res)]=self.df_uniform.iloc[-1]
-                                df_res.loc[len(df_res)-1,'cellvolt_rank']=str(cellvolt_rank)
-                                df_res.loc[len(df_res)-1,'time']=self.bmstime[i]
-                            else:
-                                pass
+                        # elif 2<cellvolt_max<4.5 and 2<cellvolt_min<4.5 and deltvolt<0.005: 
+                        #     cellvolt_sort=np.argsort(cellvolt_now)
+                        #     cellvolt_rank=list(np.argsort(cellvolt_sort)+1)
+                        #     if not df_res.empty:
+                        #         df_res.loc[len(df_res)]=df_res.loc[len(df_res)-1]
+                        #         df_res.loc[len(df_res)-1,'cellvolt_rank']=str(cellvolt_rank)
+                        #         df_res.loc[len(df_res)-1,'time']=self.bmstime[i]
+                        #     elif not self.df_uniform.empty:
+                        #         df_res.loc[len(df_res)]=self.df_uniform.iloc[-1]
+                        #         df_res.loc[len(df_res)-1,'cellvolt_rank']=str(cellvolt_rank)
+                        #         df_res.loc[len(df_res)-1,'time']=self.bmstime[i]
+                        #     else:
+                        #         pass
                     else:
                         pass
                 else: