Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Before you can open the case file, you'll need to add PSSE to your path and initialize it. You'll want to check the PSSBIN location in the code below (depending on your PSSE version and install location). I've given you a basic solve in the last line of code.

import os,sys

PSSE_LOCATION = r"C:\Program Files\PTI\PSSE32\PSSBIN"
sys.path.append(PSSE_LOCATION)
os.environ['PATH'] = os.environ['PATH'] + ';' +  PSSE_LOCATION 

import psspy

CASE = r"rede.sav"

psspy.psseinit(2000)
psspy.case(CASE)
psspy.fnsl()