Home > matpower6.0 > extras > maxloadlim > print_maxloadlim.m

print_maxloadlim

PURPOSE ^

PRINT_MAXLOADLIM(MPC,RESULTS) prints the results in RESULTS of the

SYNOPSIS ^

function print_maxloadlim(mpc,results)

DESCRIPTION ^

 PRINT_MAXLOADLIM(MPC,RESULTS) prints the results in RESULTS of the 
 maximum loadability problems defined from the base case MPC.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function print_maxloadlim(mpc,results)
0002 % PRINT_MAXLOADLIM(MPC,RESULTS) prints the results in RESULTS of the
0003 % maximum loadability problems defined from the base case MPC.
0004 
0005 %   MATPOWER
0006 %   Copyright (c) 2015-2016, Power Systems Engineering Research Center (PSERC)
0007 %   by Camille Hamon
0008 %
0009 %   This file is part of MATPOWER.
0010 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0011 %   See http://www.pserc.cornell.edu/matpower/ for more info.
0012 
0013 define_constants;
0014 
0015 % Print some global information about the parameters and results of the
0016 % maximum loadability limit problem
0017 fprintf('\n');
0018 fprintf('=======================================\n');
0019 fprintf('      Maximum loadability problem\n');
0020 fprintf('=======================================\n');
0021 fprintf('The stability margin is %.2f MW\n',results.stab_marg*results.baseMVA);
0022 fprintf('The type of bifurcation is %s (%s).\n',...
0023     results.bif.full_name,results.bif.short_name);
0024 if strcmp(results.bif.short_name,'LIB')
0025     fprintf('Generator responsible for LIB: Gen %d connected at bus %d\n',...
0026         results.bif.gen_sll,results.gen(results.bif.gen_sll,GEN_BUS));
0027 end
0028 fprintf('\n--------------------------------------------------\n');
0029 fprintf('   Bus nb    Direction     Load at MLL    Voltages \n');
0030 fprintf('   ------    ---------     -----------    --------\n');
0031 for i = 1:size(results.bus,1)
0032     fprintf('   %4d      %.2f         %8.2f         %4.3f\n',...
0033         results.bus(i,BUS_I),results.dir_mll(i),results.bus(i,PD),results.bus(i,VM));
0034 end
0035 
0036 % Print some global information about the generators and their limits
0037 % First we extract the original voltage set points of the generators
0038 gen_v_set = mpc.gen(:,VG);
0039 
0040 fprintf('\n');
0041 fprintf('=============================================================\n');
0042 fprintf('Reactive power production and voltages at the generators\n');
0043 fprintf('=============================================================\n');
0044 fprintf('   Bus nb      Qgen       Qmin       Qmax        Vm      Vref\n');
0045 fprintf('  --------    -------    ------     ------      -----    -----\n');
0046 for i = 1:size(results.gen,1)
0047     fprintf('   %4d       %7.2f    %7.2f    %7.2f    %5.4f   %5.4f',...
0048         results.gen(i,GEN_BUS),results.gen(i,QG),results.gen(i,QMIN),results.gen(i,QMAX),...
0049         results.bus(results.gen(i,GEN_BUS),VM),gen_v_set(i));
0050     if results.bus(results.gen(i,GEN_BUS),BUS_TYPE) == REF
0051         fprintf('    REF');
0052     end
0053     if strcmp(results.bif.short_name,'LIB') && any(results.bif.gen_sll == i)
0054         fprintf('    LIB');
0055     end
0056     fprintf('\n');
0057 end

Generated on Fri 16-Dec-2016 12:45:37 by m2html © 2005