Skip to content

Commit

Permalink
Merge pull request #62 from wyzdwdz/master
Browse files Browse the repository at this point in the history
CPF: Fixed little bugs
  • Loading branch information
rwl authored Mar 18, 2021
2 parents 78a0f8d + bcfe243 commit 82a73c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pypower/runcpf.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def runcpf(basecasedata=None, targetcasedata=None, ppopt=None, fname='', solvedc

# generator info
ont = find(gent[:, GEN_STATUS] > 0) # which generators are on?
gbust = gent[ont, GEN_BUS].astype(int) # what buses are they at?
# gbust = gent[ont, GEN_BUS].astype(int) # what buses are they at?

# ----- run the power flow -----
t0 = time()
Expand Down Expand Up @@ -140,7 +140,7 @@ def runcpf(basecasedata=None, targetcasedata=None, ppopt=None, fname='', solvedc
if verbose > 2:
print('step %3d : lambda = %6.3f\n' % (0, 0))
elif verbose > 1:
print('step %3d : lambda = %6.3f, %2d Newton steps\n', (0, 0, iterations))
print('step %3d : lambda = %6.3f, %2d Newton steps\n' % (0, 0, iterations))

lamprv = lam # lam at previous step
Vprv = V # V at previous step
Expand Down Expand Up @@ -335,5 +335,5 @@ def runcpf(basecasedata=None, targetcasedata=None, ppopt=None, fname='', solvedc
return results, success


if __name__ == '__name__':
if __name__ == '__main__':
runcpf()

0 comments on commit 82a73c4

Please sign in to comment.