"No network data in memory" error while running a script. Is there a fix for it?

asked 2019-10-29 01:42:10 -0500

Shri gravatar image

updated 2019-10-29 08:58:09 -0500

jconto gravatar image

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]
edit retag flag offensive close merge delete

Comments

You need to either load existing RAW or SAV data or create some network data before you can do a FNSL calculation.

jfconroy gravatar imagejfconroy ( 2019-10-29 05:51:57 -0500 )edit

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.

drsgao gravatar imagedrsgao ( 2019-10-29 06:21:49 -0500 )edit

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?

jconto gravatar imagejconto ( 2019-10-29 09:03:37 -0500 )edit

>>> 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.

drsgao gravatar imagedrsgao ( 2019-10-29 09:48:45 -0500 )edit