18 lines
386 B
Mathematica
18 lines
386 B
Mathematica
|
|
function [ output_args ] = obj( this,x )
|
||
|
|
%OBJ Summary of this function goes here
|
||
|
|
% Detailed explanation goes here
|
||
|
|
PDi=this.PDi;
|
||
|
|
QDi=this.QDi;
|
||
|
|
PD=x(1:length(PDi));
|
||
|
|
QD=x(length(PDi)+1:length(PDi)+length(QDi));
|
||
|
|
wPD=this.wPD;
|
||
|
|
wQD=this.wQD;
|
||
|
|
% wVolt=this.wVolt;
|
||
|
|
PD0=this.PD0;
|
||
|
|
QD0=this.QD0;
|
||
|
|
t4=(wPD(PDi).*(PD-PD0(PDi))).^2;
|
||
|
|
t5=(wQD(QDi).*(QD-QD0(QDi))).^2;
|
||
|
|
output_args=sum(t4)+sum(t5);
|
||
|
|
end
|
||
|
|
|