gams.m

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

M
18
字号
function [Gh,Bh,Ghc,Bhc] = gams(a,method,Gh,Bh,Ghc,Bhc)global Bus GAMS Settingsif ~a.n, return, endnb = Bus.n;if method ~= 1  Gh = Gh + sparse(a.bus,a.bus,a.u.*a.con(:,5),nb,nb);  Bh = Bh + sparse(a.bus,a.bus,a.u.*a.con(:,6),nb,nb);end  if method == 4 | method == 6 | method == 7  Ghc = Ghc + sparse(a.bus,a.bus,a.u.*a.con(:,5),nb,nb);  Bhc = Bhc + sparse(a.bus,a.bus,a.u.*a.con(:,6),nb,nb);end

⌨️ 快捷键说明

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