Ask Your Question

Revision history [back]

Hi Fagundes,

What does your text file look like? Are you able to write a short example?

For a text file that looks like this:

date, load (MW)
02-03-12, 100
03-03-12, 110
04-03-12, 105

We would use the csv module to read the values in:

import csv
reader - csv.reader(open('fagundes.csv'))
header = reader.next()
data = list(reader)

Now you could apply the load in your saved case:

import psspy
psspy.case('fagundes.sav')

# set the load on the first day
day, load = data[0]

psspy.load_data_3(101, '1 ',
                  realar1=load) # Constant Power MW

Does your code look like this example?