costs.m
来自「这是一个很适合研究和学习用的电力系统仿真软件」· M 代码 · 共 19 行
M
19 行
function [Csa,Csb,Csc,Dsa,Dsb,Dsc] = costs(a)
global Settings
MVA = Settings.mva;
Csa = a.con(:,7)/MVA;
Csb = a.con(:,8);
Csc = MVA*a.con(:,9);
Dsa = a.con(:,10)/MVA;
Dsb = a.con(:,11);
% the coefficient 1e-4 is added to avoid "indifferent" Qg
% injections for multiple Supplies at the same bus.
% it is equivalent to Ps and Pd tiebreaking.
deltaQ = abs(a.con(:,16)-a.con(:,17)).^2;
deltaQ(find(~deltaQ)) = 1;
Dsc = MVA*a.con(:,12)+1e-4./deltaQ;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?