📄 intervention.m
字号:
function a = intervention(a,t)if ~a.n, return, end% do not repeat computations if the simulation is stuckingif a.time ~= t a.time = t;else returnendglobal Line Bus% Toggle Breaker Statusaction = {'Opening','Closing'};idx = [find(a.t1 == t); find(a.t2 == t)];if ~isempty(idx) a.u(idx) = ~a.u(idx); for i = 1:length(idx) k = idx(i); fm_disp([action{a.u(k)+1},' breaker at bus <', ... Bus.names{a.bus(k)}, ... '> on line from <', ... Bus.names{Line.fr(a.line(k))}, ... '> to <', ... Bus.names{Line.to(a.line(k))}, ... '> for t = ',num2str(t),' s']) % update Line data and admittance matrix Line = setstatus(Line,a.line(k),a.u(k)); % update algebraic variables %conv = fm_nrlf(40,1e-4,1,1); % checking network connectivity fm_flows('connectivity','verbose'); endend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -