Ask Your Question

Fagundes's profile - activity

2012-06-21 16:22:13 -0500 received badge  Famous Question (source)
2012-06-14 02:50:08 -0500 received badge  Teacher (source)
2012-05-16 13:55:53 -0500 commented answer Python 2.3 on PSSE 30

It work perfectly with PSS/E V32. If i find how to do the same with PSS/E V30 I will post here in case anyone have the same problem.

2012-05-14 12:33:02 -0500 answered a question Python 2.3 on PSSE 30

Well, in my file PSSBIN there isn't any psspyc.pyd so i guess some files are missing in my PSS30. I will check it out with my friends and see if they have those files. Meanwhile, i try python 2.5 with PSS32 student version. Another error appears, i run the code and the follow message appears:

"Messages for api LIST

PSS(R)E not properly initialized"

Thus anyone knows how to solve this problem?

My code was:

import os,sys

sys.path.append(r"D:\COMPONENTE_LOGICA\PTI\PSSEUniversity32\PSSBIN")

os.environ['PATH'] = (r"D:\COMPONENTE_LOGICA\PTI\PSSEUniversity32\PSSBIN"+";"
                      + os.environ['PATH'])


import psspy

import redirect

redirect.psse2py()


psspy.fdns([0,0,0,1,1,0,99,0])
2012-05-14 12:24:48 -0500 commented answer Python 2.3 on PSSE 30

Well, in my file PSSBIN there isn't any psspyc.pyd so i guess some file are missing in my PSS30. I will check it out with my friends and see if they have those files.

2012-05-03 12:04:03 -0500 received badge  Notable Question (source)
2012-05-03 12:00:50 -0500 commented answer How do I import the psspy module in a Python script?

No, there is not that file in PSSBIN paste. I have the student version of PSS/E 32 wich has the psspy.pyc. I tried to copy that file to the PSSBIN of PSSE 30 but the same error occurs. If I run the file from inside PSSE 30 it works properly with no error.

2012-05-02 13:29:35 -0500 answered a question How do I import the psspy module in a Python script?

Answer has been migrated to become its own question http://forum.whit.com.au/psse-help-forum/question/265/python-23-on-psse-30

Question was relating to running PSSE v 30 with Python 2.3. Importing psspy caused a missing dll error.

2012-05-02 09:15:26 -0500 received badge  Nice Question (source)
2012-05-02 09:07:16 -0500 commented answer Loading data from .txt file

Thanks for your help.

2012-05-02 02:19:51 -0500 received badge  Student (source)
2012-05-01 21:21:17 -0500 received badge  Popular Question (source)
2012-05-01 12:48:52 -0500 received badge  Editor (source)
2012-05-01 12:45:32 -0500 received badge  Scholar (source)
2012-05-01 12:45:17 -0500 answered a question Loading data from .txt file

Thank you for your help!!

I got there very easy. I know how to work with PSS/E, although programming PSS/E with python it's new to me.

My code stayed like this:

import csv

z=r'D:\ISEL\TESE\zTestes_python\hora'

w=".txt"

hora = 1

while(hora != 4):   
    direct=''

    number=str(hora)

    direct += z
    direct += number
    direct += w

    reader=csv.reader(open(direct))
    header = reader.next()
    data = list(reader)

    hora = hora + 1
    validade=0
    aux=0
    while(validade != 3):
        barr, pot=data[aux]
        barr1=int(barr)
        pot1=int(pot)
        psspy.load_data(barr1,r"""1""",[_i,_i,_i,_i],[ pot1,_f,_f,_f,_f,_f])
        aux=aux+1
        validade=validade+1

The barr1=int(barr) statement was necessary do to PSSE interpret barr as a string and not as integer ou float number. Do you know any doc that could help me get all the functions of psspy library?

By the way, the txt file had this written inside:

barr Pot

2 , 10

3 , 20

4 , 30
2012-04-30 10:41:35 -0500 asked a question Loading data from .txt file

Hi,

My question is how to get data from a file and use it in PSSE. I´m using python, and i would like to extract information from a file, values, to alter, i.e, the load values.

I can make this but only if i run the code on a console. When i try to run the python file in PSSE it says that does not recognize some of the code lines.

The idea is to make a cicle of 24 hours, varying the values of the load and generation. I have the data stored on a .txt file. So if i could do this it would save me a lot of time. But i'm incapable to extract the values from the files when i run the python file in psse.

Thanks for your time and help.