From bcfe243e1cd7f26c096c9e6b592b24a628edbdb4 Mon Sep 17 00:00:00 2001 From: wyzdwdz Date: Wed, 21 Oct 2020 22:50:30 +0200 Subject: [PATCH] Fixed little bugs --- pypower/runcpf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pypower/runcpf.py b/pypower/runcpf.py index 72c5e75..1e40a94 100644 --- a/pypower/runcpf.py +++ b/pypower/runcpf.py @@ -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() @@ -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 @@ -335,5 +335,5 @@ def runcpf(basecasedata=None, targetcasedata=None, ppopt=None, fname='', solvedc return results, success -if __name__ == '__name__': +if __name__ == '__main__': runcpf()