Ask Your Question

Allocating only MW loads using psspy.scal_2

asked 2020-02-24 08:45:57 -0500

yassinem gravatar image

updated 2020-02-24 08:46:30 -0500

Hi, I'm experimenting with interfacing Excel and PSSE V33, I'm trying to change only MW load of a specific region without changing the pre-assigned generation. I've tried different combinations for psspy.scal2 arguments but still not being able to change MW loads only. Is there a way to read off an excel sheet and assign that value as a new total of Load-MW? The excel import piece is working fine, just need the proper arguments for psspy.scal2 and PSSE documentation dos not provide any examples. Below is my code, please help:

______Importing Load Data________

import excelpy xlsfile = r"C:\Users\mhandy\OneDrive - Eversource Energy\Desktop\Loads.xlsx" testxls = excelpy.workbook(xlsfile,"test",mode='r') row=1 col=1 region1 = testxls.get_cell((row,col));

______Allocating Load - PSSE Recording________

psspy.bsys(0,0,[0.0, 765.],0,[],0,[],0,[],1,[101]) psspy.scal2(0,0,1,[0,0,0,0,0],[0.0,0.0,0.0,0.0,0.0,0.0,0.0]) psspy.scal2(0,1,2,[0,1,0,1,0],[region1,0,0,0,0,0,0]) # I want to use the preassigned generation without modifying it.



edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2020-02-24 09:44:58 -0500

perolofl gravatar image

Just record a python script while performing the scaling manually in the GUI!

edit flag offensive delete link more


Thanks for your response! It does record also the pre-assigned generation and show that in the code. Ultimately, I'm trying to run a for loop to change all MW loads one-by-one without editing generation.

yassinem gravatar imageyassinem ( 2020-02-24 09:53:39 -0500 )edit

You must enter the default value with _f in the call, i.e.: psspy.scal_2(0,1,2,[0,1,0,1,0],[region1,_f,_f,_f,_f,_f,_f]) . Now only the load will be changed.

perolofl gravatar imageperolofl ( 2020-02-25 00:38:56 -0500 )edit

This worked. Thanks a lot for your help.

yassinem gravatar imageyassinem ( 2020-02-26 09:31:53 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower


Asked: 2020-02-24 08:45:57 -0500

Seen: 57 times

Last updated: Feb 24