Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Load data in a CSV file can be read as follow:

import csv
with open('loaddata.csv', 'r') as file:
     reader = csv.reader(file)
for row in reader:
    #format=node number, load MW, load Mvar
    #             10004,       5,         5
    loaddatalst = row.split(',')
    loadbus = int(loaddatalst [0])
    loadid = '1'             #or loaddatalst [x], x is position of load id in row
    loadp = float(loaddatalst [1])
    loadq = float(loaddatalst [2])
    psspy.load_data_4(loadbus, loadid, 1, [loadp, loadq, 0, 0, 0, 0])

With a second "CSV read block" the data for generators can be updated. Search the internet for "python CSV read", converting data types and the PSSe API for fuctions and data types needed as parameters.

Load data in a CSV file can be read as follow:

import csv
with open('loaddata.csv', 'r') as file:
     reader = csv.reader(file)
for row in reader:
    #format=node number, load MW, load Mvar
    #             10004,       5,         5
    loaddatalst = row.split(',')
    loadbus = int(loaddatalst [0])
    loadid = '1'             #or loaddatalst [x], x is position of load id in row
    loadp = float(loaddatalst [1])
    loadq = float(loaddatalst [2])
    psspy.load_data_4(loadbus, loadid, 1, [loadp, loadid,[_i,_i,_i,_i,_i,_i],[loadp, loadq, 0, 0, 0, 0])

With a second "CSV read block" the data for generators can be updated. Search the internet for "python CSV read", converting data types and the PSSe API for fuctions and data types needed as parameters.

Load data in a CSV file can be read as follow:

import csv
with open('loaddata.csv', 'r') as file:
     reader = csv.reader(file)
for row in reader:
    #format=node number, load MW, load Mvar
    #             10004,       5,         5
    loaddatalst = row.split(',')
    loadbus = int(loaddatalst [0])
int(loaddatalst[0])
    loadid = '1'             #or loaddatalst [x], x is position of load id in row
    loadp = float(loaddatalst [1])
float(loaddatalst[1])
    loadq = float(loaddatalst [2])
float(loaddatalst[2])
    psspy.load_data_4(loadbus, loadid,[_i,_i,_i,_i,_i,_i],[loadp, loadq, 0, 0, 0, 0])

With a second "CSV read block" the data for generators can be updated. Search the internet for "python CSV read", converting data types and the PSSe API for fuctions and data types needed as parameters.

Load data in a CSV file can be read as follow:

import csv
with open('loaddata.csv', 'r') as file:
     reader = csv.reader(file)
for row in reader:
    #format=node number, load MW, load Mvar
    #             10004,       5,         5
    loaddatalst = row.split(',')
    loadbus = int(loaddatalst[0])
    loadid = '1'             #or loaddatalst [x], x is position of load id in row
    loadp = float(loaddatalst[1])
    loadq = float(loaddatalst[2])
    psspy.load_data_4(loadbus, loadid,[_i,_i,_i,_i,_i,_i],[loadp, loadq, 0, 0, 0, 0])

With a second "CSV read block" the data for generators can be updated. Search the internet for "python CSV read", converting data types and the PSSe API for fuctions and data types needed as parameters.

Load data in a CSV file can be read as follow:

import csv
with open('loaddata.csv', 'r') as file:
     reader = csv.reader(file)
for row in reader:
    #format=node number, load MW, load Mvar
    #             10004,       5,         5
    loaddatalst #loaddatalst = row.split(',')
    loadbus = int(loaddatalst[0])
    loadid = '1'             #or loaddatalst [x], x is position of load id in row
    loadp = float(loaddatalst[1])
    loadq = float(loaddatalst[2])
    psspy.load_data_4(loadbus, loadid,[_i,_i,_i,_i,_i,_i],[loadp, loadq, 0, 0, 0, 0])

With a second "CSV read block" the data for generators can be updated. Search the internet for "python CSV read", converting data types and the PSSe API for fuctions and data types needed as parameters.