📄 fm_sw.m
字号:
function fm_sw(flag)% FM_SW define swing bus equations%% FM_SW(FLAG)% FLAG 1 -> algebraic equations% 2 -> algebraic Jacobian matrices%%Author: Federico Milano%Date: 11-Nov-2002%Version: 1.0.0%%E-mail: fmilano@thunderbox.uwaterloo.ca%Web-site: http://thunderbox.uwaterloo.ca/~fmilano%% Copyright (C) 2002-2005 Federico Milano%% This toolbox is free software; you can redistribute it and/or modify% it under the terms of the GNU General Public License as published by% the Free Software Foundation; either version 2.0 of the License, or% (at your option) any later version.%% This toolbox is distributed in the hope that it will be useful, but% WITHOUT ANY WARRANTY; without even the implied warranty of% MERCHANDABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU% General Public License for more details.%% You should have received a copy of the GNU General Public License% along with this toolbox; if not, write to the Free Software% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,% USA.global SW DAE Bus Settingsif ~SW.n, return, endswitch flag case 1 DAE.gp(SW.bus) = 0; DAE.gq(SW.bus) = 0; case 2 DAE.J11(SW.bus,:) = 0; DAE.J12(SW.bus,:) = 0; DAE.J21(SW.bus,:) = 0; DAE.J22(SW.bus,:) = 0; DAE.J11(:,SW.bus) = 0; DAE.J12(:,SW.bus) = 0; DAE.J21(:,SW.bus) = 0; DAE.J22(:,SW.bus) = 0; if Settings.octave DAE.J11(SW.bus,SW.bus) = DAE.J11(SW.bus,SW.bus) + eye(SW.n); DAE.J22(SW.bus,SW.bus) = DAE.J22(SW.bus,SW.bus) + eye(SW.n); else DAE.J11(SW.bus,SW.bus) = DAE.J11(SW.bus,SW.bus) + speye(SW.n); DAE.J22(SW.bus,SW.bus) = DAE.J22(SW.bus,SW.bus) + speye(SW.n); endend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -