Ask Your Question

jeremy.harris.ee's profile - activity

2021-04-18 21:22:00 -0500 received badge  Famous Question (source)
2021-04-18 21:10:10 -0500 commented question Tap positions

To simulate a tap position change you would need to change the winding voltage for the transformer winding that has the tap.

2020-07-14 08:30:40 -0500 commented answer NEVA - PSS/E - Eigenvalue analysis

Do you have python 2.7 installed? If not, try installing and the "There may have been an issue running Python file..." issue may be fixed.

2020-07-14 08:25:33 -0500 received badge  Enthusiast
2019-05-20 17:54:29 -0500 received badge  Notable Question (source)
2018-12-17 16:02:18 -0500 received badge  Popular Question (source)
2018-12-10 03:09:27 -0500 received badge  Popular Question (source)
2018-12-10 03:09:27 -0500 received badge  Famous Question (source)
2018-12-10 03:09:27 -0500 received badge  Notable Question (source)
2018-12-06 15:52:12 -0500 asked a question Retrieve Inter-Area Transfer data by Area

Is anyone aware of an API function to retrieve a list of all Inter-Area transfer data (From Area, To Area, ID, MW) by area? I can retrieve inter-area transfer MW by using TRXDAT, but I have to know the from area, to area, and transfer identifier. But I wasn't able to find anything in the PSSE Documentation for subsystem data retrieval.

2018-11-14 07:24:49 -0500 received badge  Famous Question (source)
2018-09-06 17:13:35 -0500 asked a question PV Transfer implement_transfer subsystem issue

I'm trying to create a wind transfer sensitivity to increase wind in one region and decrease generation in another region (i.e. Kansas/Oklahoma/Texas to East Coast). To do this, I setup a subsystem with a few areas in Kansas/Oklahoma/Texas, pull area machine data using amachchar() and amachint(), determine which buses have a wind machine, and build a SUB file with these buses in a specified subsystem, as well as a specified subsystem with areas on the East Coast. I then run DFAX with this new SUB file, and run implementtransfer2() to create the wind transfer sensitivity.

My issue is that when I run the implementtransfer2() function, it does not limit the 'source' to the specified buses in the subsystem. It also increases other machines that are not located on wind machine buses, but are in the areas that these buses are located in.

Any help would be appreciated. I'm not very familiar with the implementtransfer2() function or the PV transfer analysis that is run in PSSE, so I may be missing something here.

Some excerpts of my script are as follows:

spp_areas = [524,525,526,531,534,536]
windfarm_data = ["SUBSYSTEM 'SPP-WIND'\n"]
psspy.bsys(1,0,[ 0.2, 999.],len(spp_areas),spp_areas,0,[],0,[],0,[])
ierr, (mach_ids,mach_names) = psspy.amachchar(1, 4, string=['ID','NAME'])
ierr, (mach_buses,mach_winds) = psspy.amachint(1, 4, string=['NUMBER','WMOD'])
for mach_id,mach_name,mach_bus,mach_wind in zip(mach_ids,mach_names,mach_buses,mach_winds):
    if mach_wind != 0:
        windfarm_data.append('  BUS %i\t\t\t/* %s %s\n' % (mach_bus, mach_name, mach_id) )
windfarm_data.append('END\n')

f=open(new_subfile,'w')
f.write(windfarm_data + "SUBSYSTEM 'EAST-SINK' blah blah blah" + "\nEND"
psspy.dfax_2([0, 1, 0],new_subfile, r'MON_file.mon', r'CON_file.con', r'DFX_file.dfx')
ierr = psspy.implement_transfer_2([5, 5, 1, 1], [500, 0.98], ['SPP-WIND', 'EAST-SINK'], r'DFX_file.dfx', "")

2018-08-21 14:29:07 -0500 received badge  Taxonomist
2018-04-20 01:47:40 -0500 received badge  Notable Question (source)
2018-04-20 01:47:40 -0500 received badge  Popular Question (source)
2018-02-27 15:50:23 -0500 asked a question Creating a CON file from ACC results?

I have a script that runs ACC on my .sav files, then with the use of pssarrays.accc_summary() is able to loop through the contingencies, bus and branch information, etc, to check for thermal loading and voltage issues. It then spits all the results nicely into Excel.

I'm wanting to take this a step further and do some cascading checks. Assuming a branch (line or transformer) with loading above 120% may trip on instantaneous overcurrent, and/or load on a bus with less than 85% voltage would trip, I want to identify any branches or buses that meet this criteria, then have my script develop a new CON file from the original contingency event and add steps for tripping the branches and/or load on the buses. It actually works quite nicely to pull the overloaded line or two-winding transformer data, and write a new step to trip the element. Also, works nicely to pull the bus data and write a new step to set the load at the bus to 0%.

However, my issue is when I have a three-winding transformer that overloads above the threshold. The branch label data is in the form "AAAAAA BBBBBBBBBBBBCCCCCC XXXXXX YYYYYYYYYYYYZZZZZZ DD", where: AAAAAA = frombusnumber, BBBBBBBBBBBB = frombusname, CCCCCC = frombusvoltage, XXXXXX = tobusnumber, YYYYYYYYYYYY = tobusname, ZZZZZZ = tobusvoltage, DD = circuitid. The tobusnumber is set as "3WNDTR", the tobusname is set as the transformer name, and the tobusvoltage is set as "WND 1" or "WND 2" depending on the winding. So I am unable to get the other two winding bus numbers from using pssarrays.acccsummary().

My questions/thoughts are: Does anyone have any experience with getting three-winding transformer bus data from ACC results? Does anyone know how to get three-winding transformer bus data when only given the transformer name? Is anyone aware of another option in setting up the CON file to specify a three-winding transformer without having all three bus numbers?

I'm thinking that my best option might be to setup a table of all of my three-winding transformers by name to refer to in order to grab the bus numbers for each winding.

Thanks in advance.

2018-01-05 10:23:49 -0500 commented answer Convert python to idv.

Nevermind, I was able to determine a fix for my issue of running python files.

2018-01-05 10:19:03 -0500 commented answer Running a separate .py file from python script

Thanks! It works great!

2018-01-04 11:26:58 -0500 commented answer Running a separate .py file from python script

Follow-up question to the execfile(). In my second.py, let's say I'm using the API for psspy.bus_data_2() and I have some data that I want to use the default data (i.e. _i, _f). I'm getting the NameError that '_i' and '_f' are not defined. What's my work around to get this data to set to defaults?

2018-01-04 10:54:16 -0500 commented answer Convert python to idv.

I've found an API for PSEB and PSAS, which convert PSEB and PSAS files to idv, but can't seem to find anything for python.

2018-01-04 10:42:00 -0500 answered a question Convert python to idv.

Is there an API to record an IDV and run a separate PY script? I have multiple PY files that make various changes to my case, and I would like to convert each of them to IDV. It would be a whole lot easier to write a script to convert all of these, rather than manually converting each.

2017-11-05 21:38:15 -0500 answered a question ImportError: DLL Load failed:...

I had a similar problem recently, I'd be interested if this got resolved. I was getting this same error when trying to "import excelpy". I was able to get it to run from pythonwin.exe, but not from inside PSSE.

2016-12-27 01:27:08 -0500 received badge  Famous Question (source)
2016-12-19 09:18:25 -0500 commented answer Multiple ACCC results to Excel

Thanks for the feedback. I'm not concerned with finding all of my cases and running ACCC. I've got python files that do that already. What I'm most interested in is how to do #2: go through the ACCC files and output the results in the format I want.

2016-12-19 09:02:35 -0500 received badge  Notable Question (source)
2016-12-17 19:00:25 -0500 received badge  Popular Question (source)
2016-12-16 15:33:03 -0500 asked a question Multiple ACCC results to Excel

For reference, I'm using PSSE v33, but have access to v34.

I've been trying to refine some processes and use some of the API functions that PSSE offers to send ACCC results to an Excel spreadsheet. I typically run multiple cases (various seasons/years) and would like to be able to run one python file and have it spit out all of my branch overload violations to a single worksheet, all of my voltage violations to a second worksheet, and all of my non-converged contingencies to a third worksheet. In each of these worksheets I would want to insert a column on the left that specifies what case the results came from. Setting up the spreadsheet doesn't seem to be very difficult, but I'm struggling to find a way to pull all of my violations from the .acc files.

The psssexcel.accc function is very brute and does not give very many options for customizing the information the user would want to see as well as the placement. In my case, I don't need the column headers, or some of the fields that are reported, and I would want to append it to the end of my worksheets. In the interim, I am using this method and using copy and paste to put all of my results into one spreadsheet. However, this does not report non-converged contingencies.

The pssarrays module seems to be lacking in order to pull all violations into an array, and be able to append them to a single file with other results.

The problem with the accc_violations_report is that it only reports the worst violation and associated contingency. I want to do my due diligence and make sure that I'm reviewing all potential violations. Another problem is that it spits the results to a report file, rather than an array.

I can use the accc_solution function, but I would have to specify each contingency, which could be completed through a loop of all my contingencies. The problem here is I have 1000+ contingencies to look through for N-1, and many more (on the order of 60k+) if I'm considering the multi-level AC contingency analysis. Not only that, this would return every monitored branch and bus voltage, where I'm only interested in the violations. In my mind this is overkill for what I am trying to do.

For those of you familiar with NERC Reliability Standard TPL-001-4, I am also running analysis on our "long-lead time equipment" gaps by: 1) taking an outage to a specific transformer 2) running ACCC analysis 3) looking at results I have 7 cases (4 seasonal cases, as well as 3 sensitivity cases), and am performing these 3 steps for 20+ equipment gaps. That's 140 acc files! It would be amazing if I could get some functions such as accc_branch_violations, accc_voltage_violations, and accc_non-converged to be able to return different arrays of violations with associated information: Branch overloads: From Bus #, From Bus Name, To ... (more)