First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
1

MemoryError for running module "pssarrays.accc_violations_report"

asked Aug 14 '14

ypwang gravatar image

Hi,

I just encountered a memory error as follows: ierr = pssarrays.acccviolationsreport(accfile=r'sys02.acc', stype='con', busmsm=0.5, sysmsm=5.0, rating='c', flowlimit=100,rptfile=r"Day1Hr02vilations.txt") File ".\pssarrays.py", line 2234, in acccviolationsreport File ".\pssarrays.py", line 1258, in acccsolution MemoryError

The reason may be as trivial as "not enough memory". But I don't want to rush into this simple answer unless I am sure I rule out all other silly mistakes I made in the python code.

Please advise. Appreciate it.

Comments

You can use the Resource Monitor and watch as the python process creeps up to 2GB and then throws the ``MemoryError`` exception. It's not that hard to hit the 2GB limit (32bit python).

chip gravatar imagechip (Aug 15 '14)

Thank for your valuable suggestion, Chip! I will give it a try.

ypwang gravatar imageypwang (Aug 16 '14)

1 answer

Sort by » oldest newest most voted
1

answered Aug 15 '14

jconto gravatar image

updated Aug 16 '14

The attached file shows that your accc report code works fine in a small system, the savnw case. C:\fakepath\ACCC32.gif - click on the link, select the pic icon and right-click on it to download, rename the gif to zip, unzip, load the savnw case and run the py code on it.

If your memory problems continue, try increasing the bus number parameter during launching PSSE, If the problem continues (maybe too many contingencies at once for a single run), consider multiple runs by grouping contingencies by types (category b, c, d) or by regions (area 1, 2, 3.. or zone 1, 2, 3...)

link

Comments

Your answer makes a lot of sense. When I try to download the savnw case, it says "NOT FOUND" even after changing gif to zip. No worry. I get the idea. I will try to run the savnw case later. Thanks very much for the trick of splitting into smaller groups.

ypwang gravatar imageypwang (Aug 15 '14)

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

Stats

Asked: Aug 14 '14

Seen: 1,421 times

Last updated: Aug 15 '14