SAIFI and SAIDI end-of-year forecasts

SAIFI to date (not annualized)

SAIDI to date (not annualized)



Month:
if (!exists("ints")) {
    load(RpadBaseFile("interruptions.RData"))
    ints$month = as.integer(substring(as.character(ints$intdate),5,6))
    allmonths = c("January", "February", "March", "April", "May",
      "June", "July", "August", "September", "October", "November",
      "December")
}
if (includeStorms) {
    ints.subset = ints
} else {
    ints.subset = subset(ints, weather != "Major Storm")
}
count = xtabs(~ year + month, ints.subset)/ncust
custcount = xtabs(restmeters ~ year + month, ints.subset)
custmin = xtabs(restmeters*duratnminutes ~ year + month, ints.subset)
hsaifi = custcount/ncust
hsaidi = custmin/ncust
nmonth = which(allmonths == month)
newsaifi = newsaidi = 0

# do a summary
cat('SAIFI prediction probabilities\n')
summary.saifi = cumsaifi + quantile(rowSums(as.matrix(hsaifi[,nmonth:12])), 
                                    probs = c(.1,.25,.5,.75,.9))
print(summary.saifi,digits=3)
cat('\nSAIDI prediction probabilities\n')
summary.saidi = cumsaidi + quantile(rowSums(as.matrix(hsaidi[,nmonth:12])), 
                                    probs = c(.1,.25,.5,.75,.9))
print(summary.saidi,digits=3)
cat('\n\n')
saifi=array(cumsaifi,c(13-nmonth,3))
saidi=array(cumsaidi,c(13-nmonth,3))
for (m in (nmonth+1):12) {
    saifi[m-nmonth+1,] = cumsaifi + 
                         quantile(rowSums(as.matrix(hsaifi[,nmonth:m])), 
                                  probs = c(.1,.5,.9))
    saidi[m-nmonth+1,] = cumsaidi + 
                         quantile(rowSums(as.matrix(hsaidi[,nmonth:m])), 
                                  probs = c(.1,.5,.9))
}

graphoptions(width = 4, toplines = 1)
newgraph()
plot(nmonth:12, saifi[,2], main = "SAIFI", 
     xlim = c(1,12), xlab = "month",
     ylim = c(0,max(saifi)), ylab = "", 
     type = "b", pch = 20)
lines(nmonth:12,saifi[,1], type = "b", pch = ".")
lines(nmonth:12,saifi[,3], type = "b", pch = ".")
HTMLon()
showgraph()
plot(nmonth:12, saidi[,2], main = "SAIDI",
     xlim = c(1,12), xlab = "month",
     ylim = c(0,max(saidi)), ylab = "",
     type = "b", pch = 20)
lines(nmonth:12, saidi[,1], type = "b", pch = ".")
lines(nmonth:12, saidi[,3], type = "b", pch = ".")
showgraph()
HTMLoff()



by Tom Short, tshort@epri.com, Copyright 2005. EPRI, license: GNU GPL v2 or greater