Home > matpower7.1 > extras > reduction > DoReduction.m

DoReduction

PURPOSE ^

Subroutine DoReduction create the reduced network based on input network

SYNOPSIS ^

function [mpcreduced,BCIRC,ExBus] = DoReduction(DataB,ERP,CIndx,ExBus,NUMB,dim,BCIRC,newbusnum,oldbusnum,mpc)

DESCRIPTION ^

 Subroutine DoReduction create the reduced network based on input network
 data.

   [mpcreduced,BCIRC,ExBus] = DoReduction(DataB,ERP,CIndx,ExBus,NUMB,dim,BCIRC,newbusnum,oldbusnum,mpc,label)

 INPUT DATA:
   DataB: 1*n array, admittance value in input admittance matrix
   ERP: 1*n array, end of row pointer of the input admittance matrix
   CIndx: 1*n array, column indices of every row of the input admittance
       matrix.
   ExBus: 1*n array, external bus indices
   NUMB: 1*n array, bus indices
   dim: scalar, dimension of the input admittance matrix (should be square)
   BCIRC: 1*n array, branch circuit number
   newbusnum: 1*n array, internal bus indices
   oldbusnum: 1*n array, original bus indices

 OUTPUT DATA:
   mpcreduced: struct, reduced model, without external generator placement
       and load redistribution
   BCIRC: updated branch circuit number
   ExBus: updated external bus indices

 NOTE: The reduced model generated by this subroutine doesn't involve
 external generator placement and load redistribution. It's only good for
 analyze the reduced network (toplogy+reactance).

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [mpcreduced,BCIRC,ExBus] = DoReduction(DataB,ERP,CIndx,ExBus,NUMB,dim,BCIRC,newbusnum,oldbusnum,mpc)
0002 % Subroutine DoReduction create the reduced network based on input network
0003 % data.
0004 %
0005 %   [mpcreduced,BCIRC,ExBus] = DoReduction(DataB,ERP,CIndx,ExBus,NUMB,dim,BCIRC,newbusnum,oldbusnum,mpc,label)
0006 %
0007 % INPUT DATA:
0008 %   DataB: 1*n array, admittance value in input admittance matrix
0009 %   ERP: 1*n array, end of row pointer of the input admittance matrix
0010 %   CIndx: 1*n array, column indices of every row of the input admittance
0011 %       matrix.
0012 %   ExBus: 1*n array, external bus indices
0013 %   NUMB: 1*n array, bus indices
0014 %   dim: scalar, dimension of the input admittance matrix (should be square)
0015 %   BCIRC: 1*n array, branch circuit number
0016 %   newbusnum: 1*n array, internal bus indices
0017 %   oldbusnum: 1*n array, original bus indices
0018 %
0019 % OUTPUT DATA:
0020 %   mpcreduced: struct, reduced model, without external generator placement
0021 %       and load redistribution
0022 %   BCIRC: updated branch circuit number
0023 %   ExBus: updated external bus indices
0024 %
0025 % NOTE: The reduced model generated by this subroutine doesn't involve
0026 % external generator placement and load redistribution. It's only good for
0027 % analyze the reduced network (toplogy+reactance).
0028 
0029 %   MATPOWER
0030 %   Copyright (c) 2014-2016, Power Systems Engineering Research Center (PSERC)
0031 %   by Yujia Zhu, PSERC ASU
0032 %
0033 %   This file is part of MATPOWER/mx-reduction.
0034 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0035 %   See https://github.com/MATPOWER/mx-reduction/ for more info.
0036 
0037 %% Define Boundary Buses
0038 [BoundBus]=DefBoundary(mpc,ExBus);
0039 %% Do Pivot including Tinney One
0040 [DataB,ERP,CIndx,PivOrd,PivInd] = PivotData(DataB,ERP,CIndx,ExBus,NUMB,BoundBus);
0041 %% Do LU factorization (Partial)
0042 [ERPU,CIndxU,ERPEQ,CIndxEQ] = PartialSymLU(CIndx,ERP,dim,length(ExBus),BoundBus);
0043 [DataEQ,DataShunt] = PartialNumLU (CIndx,CIndxU,DataB,dim,ERP,ERPU,length(ExBus),ERPEQ,CIndxEQ,BoundBus);
0044 %% Create the reduced model in MATPOWER format
0045 [mpcreduced,BCIRC,ExBus] = MakeMPCr(ERPEQ,DataEQ,CIndxEQ,DataShunt,ERP,DataB,ExBus,PivInd,PivOrd,BCIRC,newbusnum,oldbusnum,mpc,BoundBus);
0046 end

Generated on Fri 09-Oct-2020 11:21:31 by m2html © 2005