Ask Your Question

Hitech's profile - activity

2020-05-11 10:08:46 -0500 received badge  Taxonomist
2015-05-11 11:21:09 -0500 received badge  Teacher (source)
2015-05-07 21:03:41 -0500 answered a question Is it possible to run the 'compile' and 'cload4' in Python with PSS/E?

Hi, There

may be bit late but following also works for complie and cload4 for V32 of PSSE.

import pssepath
from subprocess import Popen

pssepath.add_pssepath()

p = Popen("compile.bat",cwd=r"C:\Users\hbavarva\Desktop\Test_Dyn")
stdout, stderr = p.communicate()
print "compile.bat executed"
q = Popen("cload4.bat",cwd=r"C:\Users\hbavarva\Desktop\Test_Dyn")
stdout, stderr = q.communicate()
print "claod4.bat executed"

Hope this helps.

Thanks

2015-05-07 19:52:20 -0500 answered a question p.u. to MW

You can achieve this by using PSSPLT from command prompt. follow the steps as below.

  1. select .out file

  2. under EDIT select FUNC

  3. on FUNC window select User defined arithmetic function (2nd option)
  4. in next window type A*100 then click OK
  5. click SLCT to select the channel (i.e. Power channel from y6. our output file).
  6. PLOT your results and it should be in MWs now.

Hope this helps.

Thanks

2014-09-04 23:11:16 -0500 received badge  Famous Question (source)
2014-08-25 20:40:19 -0500 received badge  Notable Question (source)
2014-08-25 20:40:19 -0500 received badge  Popular Question (source)
2014-08-25 20:16:02 -0500 answered a question Why does ACCC restart python?

I had similar problem while running dynamic studies where it was stopping the script and restarting the IDLE. I ran the same script suing Notepad++ plugin and it worked fine without any issue. I assume you are using python IDLE as well. It may be worth running your script using other editors and see if you have same issue. I recommend Notepad++ and PyNPP plugin (sourceforge.net/projects/npp-plugins/files/PyNpp/). Hope that helps.

cheers:)

2014-08-14 21:20:16 -0500 asked a question Running "Compile" and "Cload4" from python

Hi, Everyone

I am wondering if anyone have worked out how to run "Compile" and "Cload4" from python with pss/e 32. I understand there is environment manager that can be used but I am trying to automate entire dynamic study run including these commands. I used to use batch file with Pss/e 29 and it was working fine but I am migrating all my scripts to python thinking it would be efficient.

I have tried using "subprocess" module to pass commands to "cmd" prompt but it does not quite work.


import sys,os,subprocess

def open_app():
    p=subprocess.Popen([r"C:\Windows\SysWOW64\cmd.exe"],shell=True)
    q=subprocess.Popen([r"C:\Program Files (x86)\PTI\PSSE32\SET_PSSE_PATH.BAT"],shell=True)
    subprocess.Popen(["dir/b"],shell=True)
    subprocess.Popen(['psse'])
open_app()

The above code set path for pss/e and works fine upto "dir/b" command but does not recognize "psse" as a command.

It would be great if someone can help me with this part of the code and bridge the gap in my dynamic study automation.

Thanks

2014-07-08 03:38:31 -0500 received badge  Notable Question (source)
2014-07-08 03:38:31 -0500 received badge  Famous Question (source)
2014-05-28 11:13:29 -0500 received badge  Popular Question (source)
2014-05-22 21:34:53 -0500 asked a question Python shell restart while trying to run "psspy.strt" command

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