📄 costs.m
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -