fcall.m
来自「这是一个很适合研究和学习用的电力系统仿真软件」· M 代码 · 共 24 行
M
24 行
function p = fcall(p)
global DAE
if ~p.n, return, end
if p.ty1
tg1 = DAE.x(p.tg1(p.ty1));
tg2 = DAE.x(p.tg2(p.ty1));
tg3 = DAE.x(p.tg3(p.ty1));
tin = p.dat1(:,6) + p.dat1(:,4).*(p.con(p.ty1,3)-DAE.x(p.dat1(:,14)));
tin = max(tin,p.con(p.ty1,6));
tin = min(tin,p.con(p.ty1,5));
p.dat1(:,16) = tin;
DAE.f(p.dat1(:,1)) = p.dat1(:,7).*(-tg1 + tin);
DAE.f(p.dat1(:,2)) = p.dat1(:,8).*(-tg2 + p.dat1(:,11).*tg1);
DAE.f(p.dat1(:,3)) = p.dat1(:,9).*(-tg3 + p.dat1(:,13).*(tg2 + p.dat1(:,10).*tg1));
end
if p.ty2
tg = DAE.x(p.tg(p.ty2));
DAE.f(p.dat2(:,1)) = -p.dat2(:,6).*(tg + p.dat2(:,8).*(DAE.x(p.dat2(:,9)) - p.con(p.ty2,3)));
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?