Package pypower :: Module printpf
[hide private]
[frames] | no frames]

Module printpf

source code

Prints power flow results.

Functions [hide private]
 
printpf(baseMVA, bus=None, gen=None, branch=None, f=None, success=None, et=None, fd=None, ppopt=None)
Prints power flow results.
source code
Variables [hide private]
  __package__ = 'pypower'
Function Details [hide private]

printpf(baseMVA, bus=None, gen=None, branch=None, f=None, success=None, et=None, fd=None, ppopt=None)

source code 

Prints power flow results.

Prints power flow and optimal power flow results to fd (a file descriptor which defaults to stdout), with the details of what gets printed controlled by the optional ppopt argument, which is a PYPOWER options vector (see ppoption for details).

The data can either be supplied in a single results dict, or in the individual arguments: baseMVA, bus, gen, branch, f, success and et, where f is the OPF objective function value, success is True if the solution converged and False otherwise, and et is the elapsed time for the computation in seconds. If f is given, it is assumed that the output is from an OPF run, otherwise it is assumed to be a simple power flow run.

Examples:

   ppopt = ppoptions(OUT_GEN=1, OUT_BUS=0, OUT_BRANCH=0)
   fd = open(fname, 'w+b')
   results = runopf(ppc)
   printpf(results)
   printpf(results, fd)
   printpf(results, fd, ppopt)
   printpf(baseMVA, bus, gen, branch, f, success, et)
   printpf(baseMVA, bus, gen, branch, f, success, et, fd)
   printpf(baseMVA, bus, gen, branch, f, success, et, fd, ppopt)
   fd.close()
Authors:
Ray Zimmerman (PSERC Cornell), Richard Lincoln