factsetup.m

来自「用于电力系统的一个很好的分析软件」· M 代码 · 共 25 行

M
25 行
字号
function [a,bus1,bus2,x,y] = factsetup(a,idx,Cp,type)if ~a.n, return, endif isempty(idx), return, endbus1 = a.fr(idx);bus2 = a.to(idx);y = a.u./a.con(idx,9);% neglect line resistance, charging and tap ratiojdx = find(Cp);if ~isempty(Cp)  a.con(idx(jdx),[8 10 12]) = 0;  a.con(idx(jdx),11) = 1;endswitch type case 'TCSC'  x = a.u.*Cp./a.con(idx,9)./(1-Cp);  a.con(idx,9) = (1-Cp).*a.con(idx,9); case {'SSSC','UPFC'}  x = Cp.*a.con(idx,9);  a.con(idx,9) = a.con(idx,9) - x;end

⌨️ 快捷键说明

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