2020-06-12 00:58:05 -0500
| received badge | ● Famous Question
(source)
|
2019-02-25 01:08:00 -0500
| received badge | ● Famous Question
(source)
|
2019-01-24 08:08:52 -0500
| received badge | ● Famous Question
(source)
|
2019-01-14 10:07:19 -0500
| received badge | ● Famous Question
(source)
|
2018-12-25 22:22:11 -0500
| received badge | ● Notable Question
(source)
|
2018-09-18 07:56:33 -0500
| received badge | ● Popular Question
(source)
|
2018-09-13 08:19:24 -0500
| asked a question | How to retrieve generation data from Dynamic studies? Hello everyone, im trying to retrieve both load data and generation data when running dymanics. And the code is running in increments with accordance to time delay. So every 0.017 seconds, it outputs generation and load. My load data retrieval is working in that the load is changing with response to tripped lines in the system. My generation stays constant which should not be the case. Anyway to retrieve generation in response to time in dynamics, is there any API out there and I want it so i can look at every generator in a particular area of the system instead of pre definig each generator. [ierr, rval_C] = psspy.chnval(GL_C)
[ierr, rval_L] = psspy.chnval(GL_L)
C_freq = 60*(1 + rval_C)
L_freq = 60*(1 + rval_L)
[ierr, sysload_LI = psspy.ardat(#, 'LOAD')
[ierr, sysload_N] = psspy.ardat(#, 'LOAD')
[ierr, sysload_D] = psspy.ardat(#, 'LOAD')
[ierr, sysgen_N] = psspy.ardat(#, 'GEN')
[ierr, sysgen_L] = psspy.ardat(#, 'GEN')
sysgen_TOT = sysgen_N.real+sysgen_L.real
sysload_TOT = sysload_N.real+sysload_D.real+sysload_L.real
my_print(print_file, 'TIME NOW: {:.3f} SEC FREQ (HZ): [ {:.2f} IN C {:.2f} IN L {:.2f} GENERATION ] LOAD (MW): [ {:.2f} ]' , [tm_runto, C_freq, L_freq, sysgen_TOT, sysload_TOT])
TIME NOW: 0.017 SEC FREQ (HZ): [ 59.98 IN C 59.98 IN L 11921.08 GENERATION ] LOAD (MW): [ 15647.25 ]
TIME NOW: 0.033 SEC FREQ (HZ): [ 59.95 IN C 59.96 IN L 11921.08 GENERATION ] LOAD (MW): [ 15609.39 ]
TIME NOW: 0.050 SEC FREQ (HZ): [ 59.93 IN C 59.93 IN L 11921.08 GENERATION ] LOAD (MW): [ 15572.50 ]
TIME NOW: 0.067 SEC FREQ (HZ): [ 59.92 IN C 59.90 IN L 11921.08 GENERATION ] LOAD (MW): [ 15528.23 ]
TIME NOW: 0.083 SEC FREQ (HZ): [ 59.90 IN C 59.88 IN L 11921.08 GENERATION ] LOAD (MW): [ 15474.71 ]
TIME NOW: 0.100 SEC FREQ (HZ): [ 59.88 IN C 59.85 IN L 11921.08 GENERATION ] LOAD (MW): [ 15411.50 ]
TIME NOW: 0.117 SEC FREQ (HZ): [ 59.87 IN C 59.83 IN L 11921.08 GENERATION ] LOAD (MW): [ 15340.69 ]
TIME NOW: 0.133 SEC FREQ (HZ): [ 59.86 IN C 59.81 IN L 11921.08 GENERATION ] LOAD (MW): [ 15265.59 ]
TIME NOW: 0.150 SEC FREQ (HZ): [ 59.85 IN C 59.79 IN L 11921.08 GENERATION ] LOAD (MW): [ 15189.46 ]
TIME NOW: 0.167 SEC FREQ (HZ): [ 59.85 IN C 59.77 IN L 11921.08 GENERATION ] LOAD (MW): [ 15114.50 ]
TIME NOW: 0.183 SEC FREQ (HZ): [ 59.84 IN C 59.75 IN L 11921.08 GENERATION ] LOAD (MW): [ 15041.96 ]
TIME NOW: 0.200 SEC FREQ (HZ): [ 59.84 IN C 59.74 IN L 11921.08 GENERATION ] LOAD (MW): [ 14972.00 ]
TIME NOW: 0.217 SEC FREQ (HZ): [ 59.84 IN C 59.73 IN L 11921.08 GENERATION ] LOAD (MW): [ 14903.87 ]
|
2018-09-11 12:34:29 -0500
| received badge | ● Notable Question
(source)
|
2018-09-10 03:36:51 -0500
| received badge | ● Popular Question
(source)
|
2018-09-06 15:05:19 -0500
| received badge | ● Editor
(source)
|
2018-09-06 15:04:16 -0500
| asked a question | How to retrieve data from Dynamic studies? Hello everyone, I am trying to run a code where if the feeder has an MVA of a 2000, it will run a .idev file to trip lines in the system. The thing is I need to do this with Dynamic simulation, so when it is running the simulation, i want to code to see if the feeder goes to 2000 or higher, it will automatically trip those lines in dynamics? is there any way to do that? like an if statement, but i don't know the data retrieval information for retrieving the MVA of a feeder on dynamics. so any help would be appreciated. |
2018-08-17 03:49:40 -0500
| received badge | ● Notable Question
(source)
|
2018-08-11 23:20:25 -0500
| received badge | ● Popular Question
(source)
|
2018-08-07 13:57:59 -0500
| asked a question | How do you output the load of the bus and store it as a variable In the API manual, psspy.scal_2 controls the scalable load option in PSSE. I don't know how to output the value and store it as a variable? Like using an object/array totals.real . In the manual it says TOTALS(2) is associated with the load MW total. Is this right or is there another code that returns the value of the scabale load. Thank you. The error output is displayed below:
AttributeError: 'list' object has no attribute 'real' psspy.bsys(1,0,[0.0,0.0],0,[],1,[126389],0,[],0,[])
[ierr,totals,moto]=psspy.scal_2(1,0,1,[0,0,0,0,0],[0.0,0.0,0.0,0.0,0.0,0.0,0.0])
totals=[0,1,0,0,0,0,0,0,0,0,0]
totalz=totals.real
output='LOAD: {} MW'.format(round(totalz,0))
print(output)
|
2018-07-30 09:15:54 -0500
| received badge | ● Notable Question
(source)
|
2018-07-25 13:43:39 -0500
| received badge | ● Popular Question
(source)
|
2018-07-23 08:21:29 -0500
| asked a question | How to find attributes for specific psspy code? Hello everyone, I am receiving an error when trying to find total load and generation in an area. I keep getting an attribute error. WHere can i find specific attributes for the psspy.ardat code. Because i keep getting this error:
AttributeError: 'NoneType' object has no attribute 'real' psspy.asys(0,3,[10,8,9])
psspy.asys(0,3,[10,8,9])
psspy.area_zone(0,0)
[ierr, sysload_Ni] = psspy.ardat(1, 'LOAD')
[ierr, sysload_Di] = psspy.ardat(2, 'LOAD')
[ierr, sysload_Mi] = psspy.ardat(3, 'LOAD')
[ierr, sysgen_N] = psspy.ardat(1, 'GEN')
[ierr, sysgen_D] = psspy.ardat(2, 'GEN')
[ierr, sysgen_M] = psspy.ardat(3, 'GEN')
sysgen_TOT = sysgen_N.real + sysgen_D.real+sysgen_M.real
output2 = 'Total Generation is #: {} MW\t'
formatted2 = output2.format(sysgen_TOT)
sysload_TOT = sysload_Ni.real + sysload_Di.real+sysload_Mi.real
output = 'Total Load is #: {} MW\t'
formatted = output.format(sysload_TOT)
output.append(formatted)
output2.append(formatted2)
sysLG_TOT=(sysload_TOT-sysgen_TOT)/(sysload_TOT)*100
output3 = 'Total Imports is #: {}%\t'
formatted3 = output3.format(sysLG_TOT)
print(output)
print(output2)
print(output3)
|
2018-07-23 08:11:45 -0500
| asked a question | How to fix attribute error? I can not figure out how to fix this error. where can i find the attributes on psspy.ardat AttributeError: 'NoneType' object has no attribute 'real' psspy.asys(0,3,[10,8,9])
psspy.asys(0,3,[10,8,9])
psspy.area_zone(0,0)
[ierr, sysload_NYC] = psspy.ardat(10, 'LOAD')
[ierr, sysload_DUN] = psspy.ardat(9, 'LOAD')
[ierr, sysload_MIL] = psspy.ardat(8, 'LOAD')
[ierr, sysgen_NYC] = psspy.ardat(10, 'GEN')
[ierr, sysgen_DUN] = psspy.ardat(9, 'GEN')
[ierr, sysgen_MIL] = psspy.ardat(8, 'GEN')
sysgen_TOT = sysgen_NYC.real + sysgen_DUN.real+sysgen_MIL.real
output2 = 'Total Generation in ConED #: {} MW\t'
sysload_TOT = sysload_NYC.real + sysload_DUN.real+sysload_MIL.real
sysgen_TOT = sysgen_NYC.gen + sysgen_DUN.gen+sysgen_MIL.gen
output = 'Total Load in ConED #: {} MW\t'
formatted = output.format(sysload_TOT)
output2 = 'Total Generation in ConED #: {} MW\t'
formatted2 = output2.format(sysgen_TOT)
output.append(formatted)
output2.append(formatted2)
sysLG_TOT=(sysload_TOT-sysgen_TOT)/(sysload_TOT)
output3 = 'Total Imports in ConED #: {}%\t'
formatted3 = output3.format(sysLG_TOT)
print(output)
print(output2)
print(output3)
|
2017-10-04 08:38:25 -0500
| received badge | ● Famous Question
(source)
|
2017-10-04 08:38:25 -0500
| received badge | ● Notable Question
(source)
|
2017-08-30 14:51:17 -0500
| commented answer | Removing "Terminal Read" on PSSE. User input on output bar So is there a way to remove the `Terminal Read window`. |
2017-08-28 15:08:11 -0500
| received badge | ● Popular Question
(source)
|
2017-08-21 10:52:33 -0500
| commented question | Read keyboard input directly in progress window, not terminal read Did anyone figure this out? |
2017-08-21 09:03:21 -0500
| asked a question | Removing "Terminal Read" on PSSE. User input on output bar Is it possible to remove the "Terminal Read" dialog on PSSE ? Is there a way for the user to input desired value on output bar or somewhere else? Traceback (most recent call last):
File "C:\Users\RoszkowskiM\Desktop\win4.py", line 133, in <module>
psspy.two_winding_chng_4(from_,to,'%s'%digit,[_i,_i,_i,_i,_i,_i,_i,_i,_i,_i,_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f, max_value, min_value,_f,_f,_f],[])
File ".\psspy.py", line 25578, in two_winding_chng_4
TypeError: an integer is required
ValueError: invalid literal for int() with base 10: 'T1'
for row in data:
data_location, year_link, from_, to, min_value,max_value,name2,tla_2,digit = row[5:14]
output = 'From Bus #: {}\tTo Bus #: {}\tVMAX: {} pu\tVMIN: {} pu\t'
if year_link == year and data_location == location and tla_2==location:
from_=int(from_)
to=int(to)
min_value=float(min_value)
max_value=float(max_value)
digit=int(digit)
print(output.format(from_, to, max_value, min_value))
_i=psspy.getdefaultint()
_f=psspy.getdefaultreal()
psspy.two_winding_chng_4(from_,to,'%s'%digit,[_i,_i,_i,_i,_i,_i,_i,_i,_i,_i,_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f, max_value, min_value,_f,_f,_f],[])
|
2017-08-21 07:52:24 -0500
| commented answer | Reading a String value from CSV Sheet I tried that. It still gave me the same error |
2017-07-25 00:11:31 -0500
| received badge | ● Notable Question
(source)
|
2017-07-20 16:01:39 -0500
| received badge | ● Popular Question
(source)
|
2017-07-19 14:50:11 -0500
| answered a question | AttributeError: 'module' object has no attribute 'workbook' Now I am receiving aother error. ValueError: need more than 1 value to unpack
import psspy
import excelpy
xlsfile=r'C:\Users\RoszkowskiM\Documents\PSSEEXPORT.xlsx'
testxls=excelpy.workbook(xlsfile,mode='r')
mydict = {}
for row in xlsfile:
year,busnum,busname,change,tla,location = row[0:760]
# convert the types from string to Python numbers
change= float(change)
bus = int(busnum)
#If this is a year not seen before, add it to the dictionary
if year not in mydict:
mydict[year] = {}
busses_in_year = mydict[year]
if location not in busses_in_year:
busses_in_year[location] = []
#Add the bus to the list of busses that stop at this location
busses_in_year[location].append((busnum,busname,change))
|
2017-07-19 14:31:39 -0500
| commented answer | AttributeError: 'module' object has no attribute 'workbook' ok that works now. But I have multiple sheets on one excel workbook. How do I access that |
2017-07-19 13:31:58 -0500
| commented answer | AttributeError: 'module' object has no attribute 'workbook' I am trying to a read a file. I don't what assigning a value is. |
2017-07-19 08:26:53 -0500
| asked a question | AttributeError: 'module' object has no attribute 'workbook' Hello all, I am receiving an error when trying to read an Excel document. I am not sure why. import os, sys
PSSE_LOCATION = r"C:\Program Files (x86)\PTI\PSSE33\PSSBIN"
sys.path.append(PSSE_LOCATION)
import excelpy
testxls = excelpy.workbook(xlsfile, mode='r')
|