Skip to content

Commit

Permalink
Merge pull request #58 from rwl/runpf-bi-astype-int
Browse files Browse the repository at this point in the history
Convert bi array to int type in runpf
  • Loading branch information
rwl authored Mar 15, 2021
2 parents f2903c6 + 7621456 commit 78a0f8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pypower/runpf.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def runpf(casedata=None, ppopt=None, fname='', solvedcase=''):
gen[mx, QG] = fixedQg[mx] ## set Qg to binding
for i in range(len(mx)): ## [one at a time, since they may be at same bus]
gen[mx[i], GEN_STATUS] = 0 ## temporarily turn off gen,
bi = gen[mx[i], GEN_BUS] ## adjust load accordingly,
bi = gen[mx[i], GEN_BUS].astype(int) ## adjust load accordingly,
bus[bi, [PD, QD]] = (bus[bi, [PD, QD]] - gen[mx[i], [PG, QG]])

if len(ref) > 1 and any(bus[gen[mx, GEN_BUS], BUS_TYPE] == REF):
Expand Down

0 comments on commit 78a0f8d

Please sign in to comment.