Ver código fonte

soh值取小数点后1位

qingfeng 3 anos atrás
pai
commit
a380adf50d

+ 2 - 0
LIB/MIDDLE/CellStateEstimation/SOH/V1_0_0/CBMSBatSoh.py

@@ -711,6 +711,7 @@ class BatSoh:
                                 cellsoh_cal=cellsoh_init*soh_weight + cellsoh_last*(1-soh_weight)
                         else:
                             cellsoh_cal=cellsoh_init*soh_weight+100*(1-soh_weight)
+                        cellsoh_cal=eval(format(cellsoh_cal,'.1f'))
                         if 60<cellsoh_cal<115:
                             df_res.loc[i,'soh']=cellsoh_cal
                             df_res.loc[i,'cellsoh']=str(cellsoh_cal)
@@ -723,6 +724,7 @@ class BatSoh:
                             cellsoh_cal=cellsoh_init*soh_weight + cellsoh_last*(1-soh_weight)
                         else:
                             cellsoh_cal=cellsoh_init*soh_weight + cellsoh_last*(1-soh_weight)
+                        cellsoh_cal=eval(format(cellsoh_cal,'.1f'))
                         if 60<cellsoh_cal<115:
                             df_res.loc[i,'soh']=cellsoh_cal
                             df_res.loc[i,'cellsoh']=str(cellsoh_cal)