|
@@ -325,19 +325,19 @@ class BatUniform():
|
|
cellsoc_diff=eval(format(cellsoc_diff,'.1f'))
|
|
cellsoc_diff=eval(format(cellsoc_diff,'.1f'))
|
|
cellvolt_diff=eval(format(cellvolt_diff,'.0f'))
|
|
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)]
|
|
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:
|
|
elif standingtime2>3600*6:
|
|
standingtime2=0
|
|
standingtime2=0
|
|
cellvolt_now=self._cellvolt_get(i)
|
|
cellvolt_now=self._cellvolt_get(i)
|
|
@@ -358,19 +358,19 @@ class BatUniform():
|
|
cellsoc_diff=eval(format(cellsoc_diff,'.1f'))
|
|
cellsoc_diff=eval(format(cellsoc_diff,'.1f'))
|
|
cellvolt_diff=eval(format(cellvolt_diff,'.0f'))
|
|
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)]
|
|
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:
|
|
elif i>=len(self.df_bms)-3:
|
|
standingtime2=0
|
|
standingtime2=0
|
|
@@ -391,19 +391,19 @@ class BatUniform():
|
|
cellsoc_diff=eval(format(cellsoc_diff,'.1f'))
|
|
cellsoc_diff=eval(format(cellsoc_diff,'.1f'))
|
|
cellvolt_diff=eval(format(cellvolt_diff,'.0f'))
|
|
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)]
|
|
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:
|
|
else:
|
|
pass
|
|
pass
|
|
else:
|
|
else:
|