rwl / PYPOWER

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

IndexError due to 'ext2int.py' of 'runpf.py' #82

Open HafizRiaz opened 1 year ago

HafizRiaz commented 1 year ago

Dear Author, i am trying to run a repository that utilizes the PYPOWER's opf.py file to run power flow but when it calls the 'ext2int.py' to convert to continuous indexing starting from 0,it gives following error. IndexError: index 23 is out of bounds for axis 0 with size 23. if ou could help me resolve this issue, i would be thankful to you and it will assist to my phd research. Thanks for consideration.

JunyanHuang commented 11 months ago

Pypower is based Matpower of Matlab, which means it has a fatal flaw -- all indices begin from 1 rather than 0. So you have to mannually adjust it to meet Python's demand