Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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?

click to hide/show revision 2
Text inside the 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

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 Pot

2 , 10 10

3 , 20 20

4 , 30

click to hide/show revision 4
Syntax highlighting for example

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"

csv z=r'D:\ISEL\TESE\zTestes_python\hora' w=".txt" hora = 1

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

  
    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

Pot 2 , 10

10 3 , 20

20 4 , 30

30