Ask Your Question
0

Python shell restart while trying to run "psspy.strt" command

asked 2014-05-22 21:34:53 -0500

Hitech gravatar image

Hi,

I am trying to run simple dynamic simulation from python shell using following script.


import os,sys
import csv
import pssepath

pssepath.add_pssepath()

SaveFile="YPS_CONV.sav"
SnapFile="YPS_SNP.snp"
OutFile="Test_Line.out"
path=os.getcwd();
print path

import redirect
import psspy

redirect.psse2py();

ierr= psspy.psseinit(buses=150000);

psspy.case(os.path.join(path,SaveFile))
psspy.rstr(os.path.join(path,SnapFile))
psspy.strt(0,os.path.join(path,OutFile))
print os.path.join(path,Outfile)
psspy.run(0, 1.0,10,10,10)

Whenever I run this code it works fine up to "psspy.rstr" (load snap file) and try to do something for next command and shell "Restarts" itself.

If I run same code from "psse" itself, it works fine.

I have seen many of us have used the same code and it seems it is working fine for others.

can someone please help?

Following is the log output (sorry site didn't allow me to attache the file so have to copy it here).

---------- Code output-----------------------------

C:\Users\hbavarva\Desktop\Test_Dyn

PSS®E - NT Version 32 Copyright (c) 1976-2014 Siemens Energy, Inc., Power Technologies International (PTI) This program is a confidential unpublished work created and first licensed in 1976. It is a trade secret which is the property of PTI. All use, disclosure, and/or reproduction not specifically authorized by PTI is prohibited. This program is protected under copyright laws of non-U.S. countries and by application of international treaties. All Rights Reserved Under The Copyright Laws.

       SIEMENS POWER TECHNOLOGIES INTERNATIONAL

    150000 BUS POWER SYSTEM SIMULATOR--PSS®E-32.0.0

         INITIATED ON FRI, MAY 23 2014  12:35

VALID SOLUTION, COST FUNCTION:0.0000000000, QUALITY FACTOR:B THE SOLVED LOADFLOW OPTION HAS NOT BEEN SELECTED IN THIS LOA

CASE C:\Users\hbavarva\Desktop\TestDyn\YPSCONV.sav WAS SAVED ON THU, MAY 15 2014 9:01

DEFAULT OPTIONS MODIFIED: GRAPHICS TERMINAL TYPE: 26 NON-TRANSFORMER BRANCH PERCENT LOADINGS: MVA CHANNEL 239: BUS 0 NOT FOUND.......................... ...................................

SNAPSHOT C:\Users\hbavarva\Desktop\TestDyn\YPSSNP.snp WAS SAVED ON THU, MAY 15 2014 9:01

NUMBER OF ELEMENTS RESTORED: CONS STATES VARS ICONS CHANNELS 25189 7200 3893 1703 301

2007 DIAGONAL AND 3294 OFF-DIAGONAL ELEMENTS

================================ RESTART ================================

Thanks

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2014-05-23 23:25:02 -0500

jconto gravatar image

Change the line:

print os.path.join(path,Outfile) to

print os.path.join(path,OutFile)

edit flag offensive delete link more

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

Stats

Asked: 2014-05-22 21:34:53 -0500

Seen: 2,639 times

Last updated: May 23 '14