rwl / PYPOWER

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

IndexError in runpf.py, line 212 #70

Open Learwzr opened 2 years ago

Learwzr commented 2 years ago

I meet an error when using runpf (enforce q limit):

Traceback (most recent call last): File "/data2/wzr/opf/data/generate_data.py", line 31, in results, success = runpf(ppc, opt) File "/data2/wzr/anaconda3/envs/opf/lib/python3.7/site-packages/pypower/runpf.py", line 212, in runpf (bus[gen[:, GEN_BUS], BUS_TYPE] == PV | IndexError: arrays used as indices must be of integer (or boolean) type

Maybe the gen[:, GEN_BUS] is not integer type.

please help!

Bengt commented 2 years ago

If I remember correctly, this is caused by an incompatible version please double check that you installed the correct library versions.