Revision history  [back]

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)... from_bus_num = v['Mon'][:6].strip() from_bus_name = v['Mon'][6:23].strip().replace('*', '') from_bus_kv = v['Mon'][23:29] to_bus_num = v['Mon'][29:36].strip() to_bus_name = v['Mon'][36:53].strip() to_bus_kv = v['Mon'][53:59] mon_ckt = v['Mon'][-2:]

From here, create a lookup key to match actual model data... to_bus_kv = winding number k=from_bus_name, mon_ckt, to_bus_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']) xfmr_wnd1_key = zip(iarray[0], carray[0], map(str.strip, carray[1])) xfmr_wnd1_val = zip(iarray[1], iarray[2], iarray[3]) model_xfmr_winding1_info = dict(zip(xfmr_wnd1_key, xfmr_wnd1_val))

Then... if mon_wind_num == 1: wnd1num = int(from_bus_num) wnd2num = int(model_xfmr_winding1_info[key][0]) wnd3num = int(model_xfmr_winding1_info[key][1]) owner = model_xfmr_winding1_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'