Help Refining Multiple ACCC Excel Report
I Determined that the opening and closing of pssarrays.accc_solution() for each contingency across multiple cases takes a lot of time. Even had memory leak problem when analyzing N-2 contingencies. I think version 34 has resolved the memory leak problem, but still need to break up the analysis into 'chunks' based on the number of cases, monitored elements and contingencies to keep from hitting the 2GB limit per process. I ultimately used this logic:
GroupFactor=10 #Split Very Large Analysis Into Smaller Chuncks to Avoid Memory Limitations
GFactor=GroupFactor*1e6 #Decrease GroupFactor for More Groups (Smaller Steps)
numberofcons=len(alllabels) #Assign how many contingencies will be processed
NumBuses=sum([len(casebuses[x]) for x in xrange(numcases)])
NumBranches=sum([len(casebranches[x]) for x in xrange(numcases)])
numgroups=int(ceil(1.0*numberofcons*(NumBuses+NumBranches)/GFactor))
groupsize=int(ceil(1.0*numberofcons/numgroups))