printpf

printpf(baseMVA, bus, gen, branch, f, success, et, fd, mpopt)

printpf() - Prints power flow results.

PRINTPF(RESULTS, FD, MPOPT)
PRINTPF(BASEMVA, BUS, GEN, BRANCH, F, SUCCESS, ET, FD, MPOPT)

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 MPOPT argument, which is a
MATPOWER options struct (see MPOPTION for details).

The data can either be supplied in a single RESULTS struct, 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:
    mpopt = mpoptions('out.gen', 1, 'out.bus', 0, 'out.branch', 0);
    [fd, msg] = fopen(fname, 'at');
    results = runopf(mpc);
    printpf(results);
    printpf(results, fd);
    printpf(results, fd, mpopt);
    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, mpopt);
    fclose(fd);