Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Late to the show, sorry. Can't offer much on your other questions, but the way we get three-winding transformer data from accc reports (txt files--definitely not the best or easiest way but you will get the idea):

Bunch of parsing...first to get the report into chunks.. mon = line[:63].strip() con = line[63:96].strip() rating = line[96:105].lstrip().strip() mw = line[105:114] flow = line[122:132].lstrip().strip() loading = line[131:].lstrip().strip()

Then smaller chunks (monitored portion broken down below)... frombusnum = v['Mon'][:6].strip() frombusname = v['Mon'][6:23].strip().replace('*', '') frombuskv = v['Mon'][23:29] tobusnum = v['Mon'][29:36].strip() tobusname = v['Mon'][36:53].strip() tobuskv = v['Mon'][53:59] mon_ckt = v['Mon'][-2:]

From here, create a lookup key to match actual model data... tobuskv = winding number k=frombusname, monckt, tobus_name

Model data dict with example of winding 1 data..... ierr, iarray = psspy.awndint(sid=0, flag=1, string=['WIND1NUMBER', 'WIND2NUMBER', 'WIND3NUMBER', 'OWN1']) ierr, carray = psspy.awndchar(sid=0, flag=1, string=['ID', 'XFRNAME']) xfmrwnd1key = zip(iarray[0], carray[0], map(str.strip, carray[1])) xfmrwnd1val = zip(iarray[1], iarray[2], iarray[3]) modelxfmrwinding1info = dict(zip(xfmrwnd1key, xfmrwnd1_val))

Then... if monwindnum == 1: wnd1num = int(frombusnum) wnd2num = int(modelxfmrwinding1info[key][0]) wnd3num = int(modelxfmrwinding1info[key][1]) owner = modelxfmrwinding1_info[key][2]

Issue with the above: PSSE 34 increased the max allowable characters for transformer/line names to 40 chars but only allow 16 in the ACCC reports (well, 14 actual characters and 2 periods). Essentially the scraped key can't match the model's key... '12345678901234..' != '1234567890123456789_1'