⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 findantennas.m

📁 用于电力系统的一个很好的分析软件
💻 M
字号:
function [busidx,lineidx] = findantennas(a)% FINDANTENNAS finds buses in antenna and returns the indexes%              of buses and of the unique connected lines%% BUSIDX:  indexes of buses in antenna% LINEIDX: indexes of lines connected to buses in antenna%global Busbusidx = 0;lineidx = [];if ~a.n, return, endnl = [1:a.n];ivec = sparse(nl,a.fr,1,a.n,Bus.n);jvec = sparse(nl,a.to,1,a.n,Bus.n);lineidx = find(sum([ivec;jvec],1)==1);fm_dispif isempty(lineidx)  busidx = 0;  fm_disp('All lines are used for (N-1) contingency evaluations.')else  busidx = find(sum(ivec(:,lineidx)+jvec(:,lineidx),2));  fm_disp('Detected the following antennas:')  fm_disp(fm_strjoin('Bus "',Bus.names(busidx),'" is in antenna.'))  fm_disp(['When these lines are out, connected generators ', ...           'and/or loads will be neglected.'])end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -