Ask Your Question

L0r3als's profile - activity

2024-03-09 16:16:27 -0500 received badge  Taxonomist
2022-02-18 05:31:59 -0500 received badge  Famous Question (source)
2021-10-23 02:02:56 -0500 received badge  Student (source)
2021-02-15 08:32:58 -0500 received badge  Notable Question (source)
2021-02-14 15:02:45 -0500 received badge  Popular Question (source)
2021-02-12 02:52:31 -0500 commented answer AttributeError: tuple object has no attribute 'realari' when I tried to print the tap position

Thank you but it does not work. Now it says that this property is a float, so I tried to convert to string but it does not work. AttributeError: 'float' object has no attribute 'realari'

2021-02-11 11:22:20 -0500 asked a question AttributeError: tuple object has no attribute 'realari' when I tried to print the tap position

Hello;

I did a program which increases a TAPs position in an OLTC transformer. However, when I want to see the tap position I have an Error. Someone knows how could I obtain the TAP position with print command? or maybe I need to use another, What do you think?

Set the TAP position

TAP=1.000+Tap_pos
ierr, TRF = psspy.two_winding_data_6(ibus_trafo, jbus_trafo, '1', realari4=TAP)

For obtaining the value I used the next command:

print("TAP = " TRF.realari[3])
print("TAP = " TRF.realari4)

I obtained the next error message depending on the print used:

AttributeError: 'tuple' object has no attribute 'realari'
attributeError: tuple object has no attribute 'realari4'
2020-05-16 00:53:23 -0500 received badge  Famous Question (source)
2020-03-04 04:48:35 -0500 asked a question PLNTBU1 and REAX3BU1

I am writing because I am testing a Wind Farm with 2 aggregated branches. In each branch, I have a different number of WTGs. I would like to do a P set point test with the Plant controller in the PCC. For that issue, I designed the 2 aggregated WF with a second-generation WECC Model according to the type 3 model described in the model library and for the PLANT Controller, I used the PLANBU1 + 2 auxiliary model REAX3BU1 for representing each WT branch. For checking any bug in the WF Controller model I did a Qstep test, PFstep and V steps and I obtained a suitable response of each study. However, when I did the Pstep study I have not any response at the WECC PI. The PI active Power is not reacting, it is equal 0. Also, the l REAX3BU1 has not seen the P set point. Does someone know if P test study performed by PLNTBU1 + Auxiliary control work with 2 aggregated branches work? Are These library models work in PSSe 33 and 34?

2019-03-01 11:35:36 -0500 received badge  Famous Question (source)
2019-02-25 05:05:46 -0500 commented answer Export all channels of a .out (Dyntools) to excel file

Finally, the problem was in the definition of the .out file, I will write the solution. Thank you!!

2019-02-25 04:40:22 -0500 received badge  Associate Editor (source)
2019-02-24 10:14:47 -0500 received badge  Notable Question (source)
2019-02-22 04:14:03 -0500 commented answer Export all channels of a .out (Dyntools) to excel file

I followed your advice, but now PSSe told me --> Error - Reading channel data error. I re-made the code in the post, but I PSSe does not achieve to read the out_file. Do you know what could it is happen?

2019-02-22 01:58:58 -0500 received badge  Popular Question (source)
2019-02-21 05:12:18 -0500 received badge  Editor (source)
2019-02-21 03:49:36 -0500 asked a question Export all channels of a .out (Dyntools) to excel file

Hello, I am writing because I have around 50 .out files. Inside each simulation, I have several channels. I would like to export all of them into an excel file or a txt. I tried to export with a function named " dyntools" and also with "excelpy" but it does not work. Someone knows, How could create an excel file? Could I create a TXT instead and EXCEL file with all the channels info to avoid the overflow error? Could I do a txt file with all the channels without created a graph in python?

    import excelpy
    import dyntools

# LF process

# Channels identification

#LVRT TEST: out_file11

#PROBLEM: EXPORT ALL OUT CHANNELS TO AN EXCEL/TXT FILE

According to the information which I read in the forum, I did several tests in order to find the best way for exporting the .out channels to and text or excel file. However, I have not any psse reply, The excel is not created and no answer is written in the alert/progress output file. After doing several tests, the problem was in the definition of the Output file it was fixed thanks to the post "Using api "pssplot.channelfileexcelexport()" rasise error" , I write the solution and the tests which I did:

SOLUTION*

In the dynamic simulation test the .out should be defined:

psspy.set_chnfil_type(0)  
psspy.strt_2([0,1],out_file11)
psspy.run(0,3.0,L1,L2,L3)


#############=======================TEST 01 ================================

#out_file11 = 'case5_1.out'
txt_file='Case5_1.xlsx'
out_file11 = os.path.join(Root,'case5_1.out')
# txt_file= os.path.join(Root,'Case5_1.xlsx')
#pn, x = os.path.splitext(out_file11)


out_list=[]
# out_list.append.os.path.join(Root,'case5_1.out')
out_list = [out_file11]


#####FOUR OPTIONS

chnfobj = dyntools.CHNF(out_list,0) 
#chnfobj = dyntools.CHNF(out_file11,0) 
#chnfobj = dyntools.CHNF(out_file11,outvrsn=0) 
#chnfobj = dyntools.CHNF(out_list,outvrsn=0) 

##### OPTIONS #############

#chnfobj.xlsout(channels=[1,4], show=true, xlsfile=pn, sheet ='', overwritesheet=True)
chnfobj.xlsout(channels=[1,4], show=True, xlsfile=txt_file, sheet ='', overwritesheet=True)
#chnfobj.xlsout(channels=[1,4], show=True, xlsfile=txt_file, outfile='case5_1.out', sheet ='', overwritesheet=True)
#chnfobj.xlsout(outfile=out_file11,channels=[1,4], show = True, xlsfile=txt_file)

#############=======================TEST 02================================

# Root=os.getcwd()
# #out_file11 = 'case5_1.out'
# #txt_file='Case5_1.xlsx'
# out_file11 = os.path.join(Root,'case5_1.out')
# #txt_file=os.path.join(Root,'Case5_1.xlsx')

#chnfobj = dyntools.CHNF(out_list,0) 
# #chnfobj = dyntools.CHNF(out_file11,0) 
# #chnfobj = dyntools.CHNF(out_file11,outvrsn=0) 
# #chnfobj = dyntools.CHNF(out_list,outvrsn=0) 


# short_title, chanid, chandata = chnfobj.get_data()
# xl = excelpy.workbook(xlsfile='Case5_1.xlsx', mode='w')
# xl.set_range(1, 'a', [short_title])
# xl.save()
# xl.close()

#############=======================TEST 03================================

######====================Test_03.A===============
# # import win32com
# #xl = win32com.client.Dispatch("Excel.Application")
# #xl.DisplayAlerts = False

######=======================Test_03.B===============
# xl = excelpy.workbook(xlsfile, mode='w')

# name='case5.1';

# outfile = dyntools.CHNF(name+'.out')
# shorttitle, chaniddict, chandatadict = outfile.getdata()
# xlsfile=name+'.xlsx';
# xl = excelpy.workbook(xlsfile, mode='w')
# outfile.xlsout(sheet=name,overwritesheet=True)
# xl.save();
# xl.close()
2019-02-19 10:50:21 -0500 received badge  Famous Question (source)
2019-02-12 23:44:01 -0500 received badge  Notable Question (source)
2019-01-30 01:59:23 -0500 received badge  Enthusiast
2019-01-30 01:59:23 -0500 received badge  Enthusiast
2019-01-28 05:32:33 -0500 received badge  Notable Question (source)
2019-01-28 05:25:34 -0500 received badge  Popular Question (source)
2019-01-24 02:34:47 -0500 marked best answer Complex generation: get the Real par and Imagine part

Hi!

I try to obtain the plant total power output from the Bus WF

CMPVAL2 =psspy.gendat(Bus_WF)
psspy.progress('  REAL_SCMPVAL  ' +str(CMPVAL2[1].real)+'\n')
psspy.progress('  IMA_SCMPVAL  ' +str(CMPVAL2[1].imag)+'\n')

I have the following error AttributeError: 'NoneType' object has no attribute 'real'

Also, I created a variable for keeping the REAL_MW = CMPVAL2[1].real but I received the same error.

I don´t know what is happening, Somebody can help me?

Thank you a lot!