我是电力工程师,我经常在 PSS/E 程序中使用 python。我很累,我希望你作为程序员的帮助。我有这个小代码:
import os,sys
PSSE_LOCATION = r"C:\Program Files\PTI\PSSE33\PSSBIN"
sys.path.append(PSSE_LOCATION)
os.environ['PATH'] = os.environ['PATH'] + ';' + PSSE_LOCATION
import psspy
import redirect
redirect.psse2py()
#--------------------------------
# PSS/E Saved case
CASE = r"""D:\xxx\Desktop\TESTING\SUMMAX.sav"""
if __name__ == '__main__':
psspy.psseinit(2000)
psspy.case(CASE)
psspy.fnsl(
options1=0, # disable tap stepping adjustment.
options5=0, # disable switched shunt adjustment.
)
psspy.fdns([0,0,0,1,1,0,99,0])
psspy.area_2(0,1,1)
代码redirect.psse2py()
在控制台中打印程序报告。你能帮我把这些输出作为变量吗?