📄 setup.m
字号:
function a = setup(a)global Busif isempty(a.con), return, enda.n = length(a.con(:,1));[a.bus,a.vbus] = getbus(Bus,a.con(:,1));% fault occurrence and clearing timesidx = find(a.con(:,5) == 0);if ~isempty(idx) a.con(idx,5) = 1e-6; a.con(idx,6) = a.con(idx,6)+1e-6;end% consistency of clearing timesidx = find((a.con(:,6) - a.con(:,5)) < 0);if ~isempty(idx) fm_disp('Warning: The fault clearing time must be greater than the fault time',2); a.con(idx,6) = a.con(idx,6) + a.con(idx,5); fm_disp(fm_strjoin(' Fault #',int2str(idx), ... ' at bus #',Bus.names(a.bus(idx)), ... ': clearing time changed to <', ... num2str(a.con(idx,6)), '> s.'))end% fault status:%% 0 before and after fault% 1 during faulta.u = zeros(a.n,1);% dat:%% 1. fault conductance% 2. fault susceptancex = a.con(:,7)+i*a.con(:,8);x(find(abs(x) == 0)) = i*1e-6;y = 1./x;a.dat= [real(y),imag(y)];a.store = a.con;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -