Skip to content

Commit

Permalink
Fixes #57
Browse files Browse the repository at this point in the history
  • Loading branch information
rwl authored May 3, 2020
1 parent 5e71627 commit 7621456
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 @@ -242,7 +242,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 7621456

Please sign in to comment.