#The formulas below are taken from the CPI DOCUMENT: 37/1553-HSC10550/1 and 47/1553-HSC10550/1.
#Also the document http://cdmweb.ericsson.se/WEBLINK/ViewDocs?DocumentName=EAB%2FFJL-10%3A0850&Latest=true
#0) More information on formula syntax: http://utran01.epa.ericsson.se/itkwiki/ViewWritersGuide/AppendixII
#1) Any text starting with a '#' is treated as a comment and discarded
#2) Each formula is split into the formula result variable name (part before the '=' sign) and the formula expression (the part after the '=' sign).
#3) Any reference in the formula expression to a counter name of other formula name is replaced by a perl variable reference
#4) The special names sum_<countername>, sum_time_<countername> and sum_mo_<countername> are replaced by a perl reference to variable containing counter aggregates
#5) Each formula expression is then evaluated using perl 'eval'. This means that the syntax of the expressions is the same as that of perl - you can use any perl operators & functions.
#6) The order in which the formulas are defined does not have any importance, a formula can refer to other formulas defined further down in the file
#7) The formula names should not start with "pm"

# 2.1 Accessibility (EUtranCellFDD/TDD)
Acc_RrcConnSetupSuccRate = 100 * pmRrcConnEstabSucc / (pmRrcConnEstabAtt - pmRrcConnEstabAttReatt)
Acc_S1SigEstabSuccRate = 100 * pmS1SigConnEstabSucc / pmS1SigConnEstabAtt
Acc_InitialErabSetupSuccRate = 100 * pmErabEstabSuccInit / pmErabEstabAttInit
Acc_InitialERabEstabSuccRate = Acc_RrcConnSetupSuccRate * Acc_S1SigEstabSuccRate  * Acc_InitialErabSetupSuccRate / 10000
Acc_AddedERabEstabSuccRate = 100 * pmErabEstabSuccAdded / pmErabEstabAttAdded
Acc_AddedERabEstabFailRateDueToMultipleLicense =  100 * pmErabEstabFailAddedLic / pmErabEstabAttAdded 
Acc_RrcConnSetupFailureRateDueToLackOfConnectedUsersLicense = 100 * pmRrcConnEstabFailLic / pmRrcConnEstabAtt 
Acc_RrcConnSetupRatioForMOData = 100 * pmRrcConnEstabAttMod/ pmRrcConnEstabAtt 
Acc_RrcConnSetupRatioForMOSignalling = 100 * pmRrcConnEstabAttMos/ pmRrcConnEstabAtt 
Acc_RrcConnSetupRatioForEmergency = 100 * pmRrcConnEstabAttEm/ pmRrcConnEstabAtt 
Acc_RrcConnSetupRatioForMobileTerminating = 100 * pmRrcConnEstabAttMta/ pmRrcConnEstabAtt 
Acc_RrcConnSetupRatioForHighPrioAccess = 100 * pmRrcConnEstabAttHpa/ pmRrcConnEstabAtt 
Acc_InitialERabEstabFailureRateDueToMultipleLicense = 100 * pmErabEstabFailInitLic / pmErabEstabAttInit 
Acc_InitialUEContextEstabSuccRate = 100 * pmUeCtxtEstabSucc/ pmUeCtxtEstabAtt 
Acc_PagingDiscardRate = 100 * pmPagDiscarded / pmPagReceived 
Acc_RandomAccessDecodingRate = 100 * pmRaSuccCbra / pmRaAttCbra 
Acc_RandomAccessMSG2Congestion = 100 * pmRaFailCbraMsg2Disc / pmRaAttCbra 


# 2.2 Retainability (EUtranCellFDD/TDD)
Ret_ERabRelNormalENB         = pmErabRelNormalEnbAct / pmSessionTimeUe 
Ret_ERabRelMME               = pmErabRelMmeAct / pmSessionTimeUe 
Ret_ERabRelAbnormalENB       = pmErabRelAbnormalEnbAct / pmSessionTimeUe 
Ret_ERabRelAbnormalENBHoExec = pmErabRelAbnormalEnbActHo / pmSessionTimeUe 
Ret_ERabRelAbnormalENBHoPrep = pmErabRelAbnormalEnbActHpr / pmSessionTimeUe 
Ret_ERabRelAbnormalENBUeLost = pmErabRelAbnormalEnbActUeLost / pmSessionTimeUe 
Ret_ERabRelAbnormalENBTnFail = pmErabRelAbnormalEnbActTnFail / pmSessionTimeUe 
Ret_ERabRelAbnormalENBCdt    = pmErabRelAbnormalEnbActCdt / pmSessionTimeUe 
Ret_ErabRelAbnormal          = Ret_ERabRelMME + Ret_ERabRelAbnormalENB
Ret_ERabRetainability        = Ret_ERabRelAbnormalENB + Ret_ERabRelMME + Ret_ERabRelNormalENB
Ret_MinPerDrop               = 60 / Ret_ERabRetainability
Ret_ERabRetainabilityRate    = 100 * (pmErabRelAbnormalEnbAct + pmErabRelAbnormalMmeAct) / (pmErabRelMme + pmErabRelNormalEnb + pmErabRelAbnormalEnb) 

Ret_UeCtxtRelAbnormal          = (pmUeCtxtRelAbnormalEnbAct + pmUeCtxtRelMmeAct) / pmSessionTimeUe
Ret_UeCtxtRelAbnormal_2        = 100 * pmUeCtxtRelAbnormalEnbAct / (pmUeCtxtRelMme + pmUeCtxtRelNormalEnb + pmUeCtxtRelAbnormalEnb)
Ret_UeCtxtRelMME               = pmUeCtxtRelMmeAct / pmSessionTimeUe
Ret_UeCtxtRelAbnormalENB       = pmUeCtxtRelAbnormalEnbAct / pmSessionTimeUe 
Ret_UeCtxtRelAbnormalENBHoExec = pmUeCtxtRelAbnormalEnbActHo / pmSessionTimeUe 
Ret_UeCtxtRelAbnormalENBUeLost = pmUeCtxtRelAbnormalEnbActUeLost / pmSessionTimeUe 
Ret_UeCtxtRelAbnormalENBTnFail = pmUeCtxtRelAbnormalEnbActTnFail / pmSessionTimeUe 
Ret_UeCtxtRelAbnormalENBCdt    = pmUeCtxtRelAbnormalEnbActCdt / pmSessionTimeUe 

Ret_ERabDrop = 100 * (pmErabRelAbnormalEnbAct + pmErabRelAbnormalMmeAct) / (pmErabEstabSuccInit + pmErabEstabSuccAdded)
Ret_ERabDropENB = 100 * pmErabRelAbnormalEnbAct / (pmErabEstabSuccInit + pmErabEstabSuccAdded)
Ret_ERabDropMME = 100 * pmErabRelAbnormalMmeAct / (pmErabEstabSuccInit + pmErabEstabSuccAdded)

#Ratio of UE Ctxt Drop per Handover failures pmUeCtxtRelAbnormalEnbActHo/(pmHoExecAttLteIntraF - pmHoExecSuccLteIntraF) How many of the failed handovers lead to a UE Context drop. 
#Ratio of  UE Context drops and Abnormal UE Context Releases (pmUeCtxtRelAbnormalEnbAct+pmUeCtxtMmeAct)/(pmUeCtxtRelAbnormalEnb+pmUeCtxtMme) 
#Ratio of  eNB initated UE Context drops and Abnormal UE Context Releases (pmUeCtxtRelAbnormalEnbAct)/(pmUeCtxtRelAbnormalEnb) 
#Ratio of  MME initated UE Context drops and Abnormal UE Context Releases (pmUeCtxtMmeAct)/(pmUeCtxtMme) 


# 2.3 Integrity (EUtranCellFDD/TDD)
Int_DlThroughput_kbps      = 1000 * (pmPdcpVolDlDrb - pmPdcpVolDlDrbLastTTI + pmPdcpVolDlDrbTransUm) / pmUeThpTimeDl
Int_UlThroughput_kbps      = 1000 * pmUeThpVolUl / pmUeThpTimeUl
Int_DlLatency         = pmPdcpLatTimeDl / pmPdcpLatPktTransDl
Int_DlPacketErrorLoss = 100 * (pmPdcpPktDiscDlPelr + pmPdcpPktDiscDlPelrUu + pmPdcpPktDiscDlHo + pmPdcpPktDiscDlEth) / (pmPdcpPktReceivedDl - pmPdcpPktFwdDl + pmPdcpPktDiscDlEth)
Int_UlPacketLoss      = 100 * pmPdcpPktLostUl / ( pmPdcpPktLostUl + pmPdcpPktReceivedUl)

Int_ActiveUEsDl                      = pmActiveUeDlSum / pmSchedActivityCellDl 
Int_ActiveDRBsDl                     = pmActiveDrbDlSum / pmSchedActivityCellDl 
Int_ActiveUEsUl                      = pmActiveUeUlSum / pmSchedActivityCellUl 
Int_ActiveDRBsUl                     = pmActiveDrbUlSum / pmSchedActivityCellUl 
Int_MacHarqDlSuccRate                = 100 * (pmMacHarqDlAckQpsk + pmMacHarqDlAck16qam + pmMacHarqDlAck64qam) / (pmMacHarqDlAckQpsk + pmMacHarqDlNackQpsk + pmMacHarqDlAck16qam + pmMacHarqDlNack16qam + pmMacHarqDlAck64qam + pmMacHarqDlNack64qam ) 
Int_MacHarqUlSuccRate                = 100 * (pmMacHarqUlSuccQpsk + pmMacHarqUlSucc16qam ) / (pmMacHarqUlSuccQpsk + pmMacHarqUlSucc16qam + pmMacHarqUlFailQpsk + pmMacHarqUlFail16qam) 
Int_RlcArqDlSuccRate                 = 100 * pmRlcArqDlAck / (pmRlcArqDlAck + pmRlcArqDlNack)
Int_RlcArqUlSuccRate                 = 100 * pmRlcArqUlAck / (pmRlcArqUlAck+pmRlcArqUlNack)
Int_DlRadioThroughput                = pmRadioThpVolDl / pmRadioThpResDl 
Int_UlRadioThroughput                = pmRadioThpVolUl / pmRadioThpResUl 
Int_DlRadioMeasCqiDistr              = pmRadioUeRepCqiDistr 
Int_DlRadioMeasTxRankDistr           = pmRadioTxRankDistr 
Int_DlRadioMeasUeReportedTxRankDistr = pmRadioUeRepRankDistr   
Int_AverageDlRlcDelay                = pmRlcDelayTimeDl / pmRlcDelayPktTransDl 
Int_AverageDlMacDelay                = pmMacDelayTimeDl / (pmMacHarqDlAckQpsk + pmMacHarqDlAck16qam + pmMacHarqDlAck64qam) 
Int_DlPacketLossDueToHo              = pmPdcpPktDiscDlHo/ pmPdcpPktReceivedDl 
Int_RadioRecInterferencePwr_fW =  WeightedAverage(pmRadioRecInterferencePwr,[0.79432,0.89716,1.12946,1.42191,1.79008,2.25357,2.83708,3.57167,4.49647,5.66072,11.07925,27.82982,69.90536,175.59432,441.07,630.95])
Int_RadioRecInterferencePwr = 10*log10(Int_RadioRecInterferencePwr_fW / 1000000000000)
Int_RadioRecInterferencePucchPwr_fW =  WeightedAverage(pmRadioRecInterferencePwrPucch,[0.79432,0.89716,1.12946,1.42191,1.79008,2.25357,2.83708,3.57167,4.49647,5.66072,11.07925,27.82982,69.90536,175.59432,441.07,630.95])
Int_RadioRecInterferencePucchPwr = 10*log10(Int_RadioRecInterferencePucchPwr_fW / 1000000000000)
Int_RadioUeRepCqiDistr = WeightedAverage(pmRadioUeRepCqiDistr,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])
Int_SinrPucchDistr = WeightedAverage(pmSinrPucchDistr,[-15,-13.5,-10.5,-7.5,-4.5,-1.5,1.5,3])
Int_SinrPuschDistr = WeightedAverage(pmSinrPuschDistr,[-5,-3.5,0,4,8,12,15.5,17])

#Packet Error Loss rate in RLC/PDCP for packets where no transmission have started    pmPdcpPktDiscDlPelr/ pmPdcpPktReceivedDl 
#Packet Uu Loss rate in RLC/PDCP for packets where transmission have started    pmPdcpPktDiscDlPelrUu/ pmPdcpPktReceivedDl 
#UL radio measurement, N+I distribution   pmRadioRecInterferencePwr 
#UL radio measurement, Power restriction ratio for uplink transport blocks   pmRadioTbsPwrRestricted /pmRadioTbsPwrUnrestricted 

#Interference per PRB in dBm
Int_RadioRecInterferencePwrPrb1 = 10*log10(pmRadioRecInterferencePwrPrb1 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb2 = 10*log10(pmRadioRecInterferencePwrPrb2 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb3 = 10*log10(pmRadioRecInterferencePwrPrb3 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb4 = 10*log10(pmRadioRecInterferencePwrPrb4 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb5 = 10*log10(pmRadioRecInterferencePwrPrb5 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb6 = 10*log10(pmRadioRecInterferencePwrPrb6 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb7 = 10*log10(pmRadioRecInterferencePwrPrb7 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb8 = 10*log10(pmRadioRecInterferencePwrPrb8 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb9 = 10*log10(pmRadioRecInterferencePwrPrb9 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb10 = 10*log10(pmRadioRecInterferencePwrPrb10 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb11 = 10*log10(pmRadioRecInterferencePwrPrb11 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb12 = 10*log10(pmRadioRecInterferencePwrPrb12 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb13 = 10*log10(pmRadioRecInterferencePwrPrb13 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb14 = 10*log10(pmRadioRecInterferencePwrPrb14 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb15 = 10*log10(pmRadioRecInterferencePwrPrb15 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb16 = 10*log10(pmRadioRecInterferencePwrPrb16 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb17 = 10*log10(pmRadioRecInterferencePwrPrb17 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb18 = 10*log10(pmRadioRecInterferencePwrPrb18 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb19 = 10*log10(pmRadioRecInterferencePwrPrb19 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb20 = 10*log10(pmRadioRecInterferencePwrPrb20 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb21 = 10*log10(pmRadioRecInterferencePwrPrb21 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb22 = 10*log10(pmRadioRecInterferencePwrPrb22 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb23 = 10*log10(pmRadioRecInterferencePwrPrb23 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb24 = 10*log10(pmRadioRecInterferencePwrPrb24 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb25 = 10*log10(pmRadioRecInterferencePwrPrb25 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb26 = 10*log10(pmRadioRecInterferencePwrPrb26 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb27 = 10*log10(pmRadioRecInterferencePwrPrb27 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb28 = 10*log10(pmRadioRecInterferencePwrPrb28 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb29 = 10*log10(pmRadioRecInterferencePwrPrb29 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb30 = 10*log10(pmRadioRecInterferencePwrPrb30 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb31 = 10*log10(pmRadioRecInterferencePwrPrb31 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb32 = 10*log10(pmRadioRecInterferencePwrPrb32 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb33 = 10*log10(pmRadioRecInterferencePwrPrb33 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb34 = 10*log10(pmRadioRecInterferencePwrPrb34 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb35 = 10*log10(pmRadioRecInterferencePwrPrb35 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb36 = 10*log10(pmRadioRecInterferencePwrPrb36 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb37 = 10*log10(pmRadioRecInterferencePwrPrb37 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb38 = 10*log10(pmRadioRecInterferencePwrPrb38 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb39 = 10*log10(pmRadioRecInterferencePwrPrb39 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb40 = 10*log10(pmRadioRecInterferencePwrPrb40 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb41 = 10*log10(pmRadioRecInterferencePwrPrb41 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb42 = 10*log10(pmRadioRecInterferencePwrPrb42 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb43 = 10*log10(pmRadioRecInterferencePwrPrb43 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb44 = 10*log10(pmRadioRecInterferencePwrPrb44 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb45 = 10*log10(pmRadioRecInterferencePwrPrb45 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb46 = 10*log10(pmRadioRecInterferencePwrPrb46 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb47 = 10*log10(pmRadioRecInterferencePwrPrb47 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb48 = 10*log10(pmRadioRecInterferencePwrPrb48 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb49 = 10*log10(pmRadioRecInterferencePwrPrb49 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb50 = 10*log10(pmRadioRecInterferencePwrPrb50 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb51 = 10*log10(pmRadioRecInterferencePwrPrb51 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb52 = 10*log10(pmRadioRecInterferencePwrPrb52 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb53 = 10*log10(pmRadioRecInterferencePwrPrb53 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb54 = 10*log10(pmRadioRecInterferencePwrPrb54 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb55 = 10*log10(pmRadioRecInterferencePwrPrb55 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb56 = 10*log10(pmRadioRecInterferencePwrPrb56 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb57 = 10*log10(pmRadioRecInterferencePwrPrb57 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb58 = 10*log10(pmRadioRecInterferencePwrPrb58 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb59 = 10*log10(pmRadioRecInterferencePwrPrb59 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb60 = 10*log10(pmRadioRecInterferencePwrPrb60 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb61 = 10*log10(pmRadioRecInterferencePwrPrb61 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb62 = 10*log10(pmRadioRecInterferencePwrPrb62 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb63 = 10*log10(pmRadioRecInterferencePwrPrb63 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb64 = 10*log10(pmRadioRecInterferencePwrPrb64 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb65 = 10*log10(pmRadioRecInterferencePwrPrb65 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb66 = 10*log10(pmRadioRecInterferencePwrPrb66 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb67 = 10*log10(pmRadioRecInterferencePwrPrb67 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb68 = 10*log10(pmRadioRecInterferencePwrPrb68 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb69 = 10*log10(pmRadioRecInterferencePwrPrb69 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb70 = 10*log10(pmRadioRecInterferencePwrPrb70 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb71 = 10*log10(pmRadioRecInterferencePwrPrb71 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb72 = 10*log10(pmRadioRecInterferencePwrPrb72 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb73 = 10*log10(pmRadioRecInterferencePwrPrb73 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb74 = 10*log10(pmRadioRecInterferencePwrPrb74 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb75 = 10*log10(pmRadioRecInterferencePwrPrb75 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb76 = 10*log10(pmRadioRecInterferencePwrPrb76 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb77 = 10*log10(pmRadioRecInterferencePwrPrb77 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb78 = 10*log10(pmRadioRecInterferencePwrPrb78 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb79 = 10*log10(pmRadioRecInterferencePwrPrb79 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb80 = 10*log10(pmRadioRecInterferencePwrPrb80 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb81 = 10*log10(pmRadioRecInterferencePwrPrb81 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb82 = 10*log10(pmRadioRecInterferencePwrPrb82 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb83 = 10*log10(pmRadioRecInterferencePwrPrb83 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb84 = 10*log10(pmRadioRecInterferencePwrPrb84 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb85 = 10*log10(pmRadioRecInterferencePwrPrb85 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb86 = 10*log10(pmRadioRecInterferencePwrPrb86 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb87 = 10*log10(pmRadioRecInterferencePwrPrb87 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb88 = 10*log10(pmRadioRecInterferencePwrPrb88 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb89 = 10*log10(pmRadioRecInterferencePwrPrb89 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb90 = 10*log10(pmRadioRecInterferencePwrPrb90 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb91 = 10*log10(pmRadioRecInterferencePwrPrb91 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb92 = 10*log10(pmRadioRecInterferencePwrPrb92 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb93 = 10*log10(pmRadioRecInterferencePwrPrb93 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb94 = 10*log10(pmRadioRecInterferencePwrPrb94 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb95 = 10*log10(pmRadioRecInterferencePwrPrb95 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb96 = 10*log10(pmRadioRecInterferencePwrPrb96 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb97 = 10*log10(pmRadioRecInterferencePwrPrb97 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb98 = 10*log10(pmRadioRecInterferencePwrPrb98 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb99 = 10*log10(pmRadioRecInterferencePwrPrb99 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 
Int_RadioRecInterferencePwrPrb100 = 10*log10(pmRadioRecInterferencePwrPrb100 * .00000000000005684341886080801486968994140625 / (900000 / 40) ) 

# 2.4 Mobility (EUtranRelation)
Mob_HoPrepSuccRate   = 100 * (pmHoPrepSuccLteIntraF + pmHoPrepSuccLteInterF) / (pmHoPrepAttLteIntraF + pmHoPrepAttLteInterF)
Mob_HoExecSuccRate   = 100 * (pmHoExeSuccLteIntraF + pmHoExeSuccLteInterF) / (pmHoExeAttLteIntraF + pmHoExeAttLteInterF)
Mob_MobilitySuccRate = Mob_HoPrepSuccRate * Mob_HoExecSuccRate / 100
Mob_HoPrepRejInLicConnUsers = pmHoPrepRejInLicConnUsers    
Mob_HoPrepRejInLicMob = pmHoPrepRejInLicMob    
Mob_HoPrepRejInLicMultiErab = pmHoPrepRejInLicMultiErab  
Mob_AnrNeighbrelAdd = pmAnrNeighbrelAdd 
Mob_AnrNeighbrelRemove = pmAnrNeighbrelRem
Mob_SessionContinuityRel = pmUeCtxtRelSCCdma + pmUeCtxtRelSCEUtra + pmUeCtxtRelSCWcdma 
#Mob_RatioOfReceivedMeasurementReportsThatLeadToHandoverPreparation = pmBestCellEvalReport / pmHoPrepAttLteIntraF 

Mob_IRAT_Redirect = 100 * (pmUeCtxtRelSCCdma + pmUeCtxtRelSCGsm + pmUeCtxtRelSCWcdma) / pmUeCtxtEstabSucc

# 2.5 Availability (EUtranCellFDD/TDD)
Av_CellAvail = 100 * ( 900 - ( pmCellDowntimeAuto + pmCellDowntimeMan ) ) / 900
Av_CellDownMan = 100 * pmCellDowntimeMan / 900
Av_CellDownAuto = 100 * pmCellDowntimeAuto / 900

# Resource usage
Res_AvgNrOfRrcConnectedUsers = pmRrcConnLevSum / pmRrcConnLevSamp
Res_PeakNrOfRrcConnectedUsers = pmRrcConnMax / pmRopCounter
Res_LicConnectedUsersDistr = pmLicConnectedUsersDistr 
Res_AverageLicConnectedUsers = pmLicConnectedUsersActual 
Res_TimeCongestionLicConnectedUsers = pmLicConnectedUsersTimeCong 
Res_LicConnectedUsersCapacityRatio = pmLicConnectedUsersLicense / pmLicConnectedUsersHardLimit 
#Res_AvgDlVolPerCell = (pmPdcpVolDlDrb + pmPdcpVolDlSrb) / M 
#Res_AvgDlVolPerCell = (pmPdcpVolUlDrb + pmPdcpVolUlSrb) / M 
#Res_AvgNrERabs = pmErabLevSum / pmErabLevSamp 
#Res_AvgUeSessionTime = pmSessionTimeUe / M 
#Res_AvgDrbSessionTime = pmSessionTimeDrb / M

# Other
Oth_RrcSecFailIntegrity = pmRrcSecFailIntegrity
Oth_RrcSecFailUnexptectedMsg = pmRrcSecFailUnexpectedMsg
Oth_DrbVsUeSessionTimeRatio = pmSessionTimeDrb / pmSessionTimeUe
Oth_Msg3RachRrcConsistencyCheck = pmRrcConnEstabAtt / pmRaSuccCbra
Oth_UeCtxtEstablishmentAndReleaseConsistency = (pmUeCtxtRelMme + pmUeCtxtRelNormalEnb +  pmUeCtxtRelAbnormalEnb + pmUeCtxtRelSCCdma + pmUeCtxtRelSCEUtra + pmUeCtxtRelSCWcdma) / pmUeCtxtEstabSucc

#Ret_ErabDrop per QCI
De_ErabRelAbnormalEnbActQci = decompressArray(pmErabRelAbnormalEnbActQci)
De_ErabRelAbnormalEnbQci = decompressArray(pmErabRelAbnormalEnbQci)
De_ErabRelAbnormalMmeActQci = decompressArray(pmErabRelAbnormalMmeActQci)
De_ErabRelMmeQci = decompressArray(pmErabRelMmeQci)
De_ErabRelNormalEnbQci = decompressArray(pmErabRelNormalEnbQci)
Ret_ERabDrop_Qci_1 = 100 * ( @{De_ErabRelAbnormalEnbActQci}[1] + @{De_ErabRelAbnormalMmeActQci}[1] ) / ( @{De_ErabRelAbnormalEnbQci}[1] + @{De_ErabRelMmeQci}[1] + @{De_ErabRelNormalEnbQci}[1] )
Ret_ERabDrop_Qci_2 = 100 * ( @{De_ErabRelAbnormalEnbActQci}[2] + @{De_ErabRelAbnormalMmeActQci}[2] ) / ( @{De_ErabRelAbnormalEnbQci}[2] + @{De_ErabRelMmeQci}[2] + @{De_ErabRelNormalEnbQci}[2] )
Ret_ERabDrop_Qci_3 = 100 * ( @{De_ErabRelAbnormalEnbActQci}[3] + @{De_ErabRelAbnormalMmeActQci}[3] ) / ( @{De_ErabRelAbnormalEnbQci}[3] + @{De_ErabRelMmeQci}[3] + @{De_ErabRelNormalEnbQci}[3] )
Ret_ERabDrop_Qci_4 = 100 * ( @{De_ErabRelAbnormalEnbActQci}[4] + @{De_ErabRelAbnormalMmeActQci}[4] ) / ( @{De_ErabRelAbnormalEnbQci}[4] + @{De_ErabRelMmeQci}[4] + @{De_ErabRelNormalEnbQci}[4] )
Ret_ERabDrop_Qci_5 = 100 * ( @{De_ErabRelAbnormalEnbActQci}[5] + @{De_ErabRelAbnormalMmeActQci}[5] ) / ( @{De_ErabRelAbnormalEnbQci}[5] + @{De_ErabRelMmeQci}[5] + @{De_ErabRelNormalEnbQci}[5] )
Ret_ERabDrop_Qci_6 = 100 * ( @{De_ErabRelAbnormalEnbActQci}[6] + @{De_ErabRelAbnormalMmeActQci}[6] ) / ( @{De_ErabRelAbnormalEnbQci}[6] + @{De_ErabRelMmeQci}[6] + @{De_ErabRelNormalEnbQci}[6] )
Ret_ERabDrop_Qci_7 = 100 * ( @{De_ErabRelAbnormalEnbActQci}[7] + @{De_ErabRelAbnormalMmeActQci}[7] ) / ( @{De_ErabRelAbnormalEnbQci}[7] + @{De_ErabRelMmeQci}[7] + @{De_ErabRelNormalEnbQci}[7] )
Ret_ERabDrop_Qci_8 = 100 * ( @{De_ErabRelAbnormalEnbActQci}[8] + @{De_ErabRelAbnormalMmeActQci}[8] ) / ( @{De_ErabRelAbnormalEnbQci}[8] + @{De_ErabRelMmeQci}[8] + @{De_ErabRelNormalEnbQci}[8] )
Ret_ERabDrop_Qci_9 = 100 * ( @{De_ErabRelAbnormalEnbActQci}[9] + @{De_ErabRelAbnormalMmeActQci}[9] ) / ( @{De_ErabRelAbnormalEnbQci}[9] + @{De_ErabRelMmeQci}[9] + @{De_ErabRelNormalEnbQci}[9] )


