First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
Expanding on GaryB's advice, install PSSe on default directories. Search this forum for python and/or your topic of interest. Search the net for "PSSe python". Study the python code provided in the PSSe installation folder 'example'.
To run python scripts within PSSe GUI, load a case, then run the script (save below code as lf.py):
#lf.py - load flow solving a case
ier = psspy.fnsl() #use default parameters
if ier:
print('ier=',ier)
To run python scripts outside the PSSe GUI, open a command line window using the link created by PSSe during installation. Save the code below as lf2.py:
import psse34
import psspy
psspy.psseinit(150000)
savfile = r"C:\Program Files (x86)\PTI\PSSE34\EXAMPLE\savnw.sav"
psspy.case(savfile)
ier = psspy.fnsl()
To run it, enter in the command line window:
c:\..>python lf2.py