rwl / PYPOWER

Port of MATPOWER to Python
http://rwl.github.io/PYPOWER/api/
Other
340 stars 112 forks source link

savecase fails when solving OPF of IEEE RTS from command line #21

Open rwl opened 9 years ago

rwl commented 9 years ago

As reported by Prabakaran on the mailing list:

I recently installed PYPOWER in my Ubuntu 14.04, Python 2.7.6, scipy 0.13.3 and ran the sample commands given in GitHub project page's readme. When running the command,

$ opf -c case24_ieee_rts --solvedcase=rtsout.py

to solve an OPF for the IEEE Reliability Test System and write the solved case to file.

mfripp commented 9 years ago

If you're getting the message TypeError: %d format: a number is required, not numpy.ndarray, this seems to be a bug in savecase.py. You can fix it by changing line 143 of savecase.py (the file location should be referenced in the traceback that is printed when the error occurs). Near the end of line 143, change bus[:, :MU_VMIN + 1] to bus[i, :MU_VMIN + 1] (i.e., change the first colon to an i).