"No network data in memory" error while running a script. Is there a fix for it?
Here is my script, not sure why it is not picking up the model.
import time
import psse34
import os,sys
import psspy
import redirect
import glob
import numpy as np
import pandas as pd
timestr = time.strftime("%Y%m%d_%H%M%S")
base_dir = 'C:\Users\Desktop\Load flow'
input_files_dir = 'C:\Users\Load flow\02_sav_case'
output_files_dir = 'C:\Users\Load flow\03_Results'
cwd = os.getcwd()
print ('\nScript running in the working directory:\n%s' % cwd)
_i=psspy.getdefaultint()
_f=psspy.getdefaultreal()
_s=psspy.getdefaultchar()
redirect.psse2py()
psspy.psseinit(80000)
os.chdir(base_dir)
case_name = ['RProponent model)_max_VRR_v1.sav']
suffix = ['High_Load']
def remove_SF():
psspy.machine_chng_2(30313,r"""1""",[_i,_i,_i,_i,_i,_i],[ 20.0,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f])
psspy.machine_chng_2(30312,r"""1""",[_i,_i,_i,_i,_i,_i],[ 20.0,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f])
psspy.fnsl([1,0,0,1,1,0,0,0])
psspy.fnsl([1,0,0,1,1,0,0,0])
psspy.fnsl([1,0,0,1,1,0,0,0])
psspy.fnsl([1,0,0,1,1,0,0,0])
Error MSG:
SIEMENS POWER TECHNOLOGIES INTERNATIONAL
80000 BUS POWER SYSTEM SIMULATOR--PSS(R)E-34.4.0
INITIATED ON TUE, OCT 29 2019 17:50
Messages for api FNSL
No network data in memory (005188)
Messages for api FNSL
No network data in memory (005188)
Messages for api FNSL
No network data in memory (005188)
Messages for api FNSL
No network data in memory (005188)
Messages for api FNSL
No network data in memory (005188)
[None]
[None, None]
[None, None, None]
[None, None, None, None]
[None, None, None, None, None]
[None, None, None, None, None, None]
[None, None, None, None, None, None, None]
[None, None, None, None, None, None, None, None]
[None, None, None, None, None, None, None, None, None]
[None, None, None, None, None, None, None, None, None, None]
[None, None, None, None, None, None, None, None, None, None, None]
[None, None, None, None, None, None, None, None, None, None, None, None]
[None, None, None, None, None, None, None, None, None, None, None, None, None]
[None, None, None, None, None, None, None, None, None, None, None, None, None, None]
You need to either load existing RAW or SAV data or create some network data before you can do a FNSL calculation.
As @jfconroy pointed out. I can see you have init PSSE successful, but after that, you need call the "psspy.case()" API to load the case into the memory to work on it. You probably would want to have a lot at the APIs for getting default values.
In case_name = ['RProponent model)_max_VRR_v1.sav'], there is a ")" char. is this the reason the case is not loaded therefore the error occurs?
>>> case_name = ['RProponent model)_max_VRR_v1.sav'] >>> isinstance(case_name[0], str) True >>> print(case_name[0]) RProponent model)_max_VRR_v1.sav Looks like it is a string.