|
@@ -45,7 +45,7 @@ class SafetyWarning:
|
|
df_short1.reset_index(drop=True,inplace=True)
|
|
df_short1.reset_index(drop=True,inplace=True)
|
|
self.df_short=self.df_short.drop(self.df_short[self.df_short['method']==4].index)
|
|
self.df_short=self.df_short.drop(self.df_short[self.df_short['method']==4].index)
|
|
self.df_short.reset_index(drop=True,inplace=True)
|
|
self.df_short.reset_index(drop=True,inplace=True)
|
|
- short_name=['cellshort'+str(i) for i in range(1,self.CellVoltNums+1)]
|
|
|
|
|
|
+ short_name=['cellshort'+str(i) for i in range(1,self.param.CellVoltNums+1)]
|
|
df_short_current=pd.DataFrame(columns=short_name)
|
|
df_short_current=pd.DataFrame(columns=short_name)
|
|
self.df_short['cellshort_sigma']=0
|
|
self.df_short['cellshort_sigma']=0
|
|
for i in range(len(self.df_short)):
|
|
for i in range(len(self.df_short)):
|
|
@@ -60,7 +60,7 @@ class SafetyWarning:
|
|
self.df_uniform=self.df_uniform.drop(self.df_uniform[self.df_uniform['cellvolt_rank']=='0'].index)
|
|
self.df_uniform=self.df_uniform.drop(self.df_uniform[self.df_uniform['cellvolt_rank']=='0'].index)
|
|
self.df_uniform.reset_index(inplace=True,drop=True)
|
|
self.df_uniform.reset_index(inplace=True,drop=True)
|
|
if not self.df_uniform.empty:
|
|
if not self.df_uniform.empty:
|
|
- rank_name=['cellvolt_rank'+str(i) for i in range(1,self.CellVoltNums+1)]
|
|
|
|
|
|
+ rank_name=['cellvolt_rank'+str(i) for i in range(1,self.param.CellVoltNums+1)]
|
|
df_rank=pd.DataFrame(columns=rank_name)
|
|
df_rank=pd.DataFrame(columns=rank_name)
|
|
for i in range(len(self.df_uniform)):
|
|
for i in range(len(self.df_uniform)):
|
|
df_rank.loc[i]=eval(self.df_uniform.loc[i,'cellvolt_rank'])
|
|
df_rank.loc[i]=eval(self.df_uniform.loc[i,'cellvolt_rank'])
|
|
@@ -68,7 +68,7 @@ class SafetyWarning:
|
|
|
|
|
|
if len(df_short)>1.5: #超过2行
|
|
if len(df_short)>1.5: #超过2行
|
|
#出现两次漏电流<阈值...........................................................................
|
|
#出现两次漏电流<阈值...........................................................................
|
|
- for i in range(self.CellVoltNums):
|
|
|
|
|
|
+ for i in range(self.param.CellVoltNums):
|
|
cellshort=df_short['cellshort'+str(i+1)]
|
|
cellshort=df_short['cellshort'+str(i+1)]
|
|
index_list=cellshort[cellshort<self.param.LeakCurrentLv2].index
|
|
index_list=cellshort[cellshort<self.param.LeakCurrentLv2].index
|
|
if len(index_list)>1:
|
|
if len(index_list)>1:
|
|
@@ -92,7 +92,7 @@ class SafetyWarning:
|
|
cellshort_num=cellshort_sum.index(min(cellshort_sum))+1
|
|
cellshort_num=cellshort_sum.index(min(cellshort_sum))+1
|
|
cellshort=df_short_current['cellshort'+str(cellshort_num)] #获取内短路电芯的所有漏电流值,且最小值<阈值
|
|
cellshort=df_short_current['cellshort'+str(cellshort_num)] #获取内短路电芯的所有漏电流值,且最小值<阈值
|
|
cellshort_sum.remove(min(cellshort_sum)) #删除最小值,并判断其他所有电芯内短路电流>阈值
|
|
cellshort_sum.remove(min(cellshort_sum)) #删除最小值,并判断其他所有电芯内短路电流>阈值
|
|
- if min(cellshort)<self.df_adjust_param.loc[24,'threshold'] and min(cellshort_sum)>self.df_adjust_param.loc[24,'threshold']:
|
|
|
|
|
|
+ if min(cellshort)<self.param.LeakCurrentLv2 and min(cellshort_sum)>self.param.LeakCurrentLv2:
|
|
cellshortfault=1
|
|
cellshortfault=1
|
|
else:
|
|
else:
|
|
cellshortfault=0
|
|
cellshortfault=0
|