加入了PD的上下限

Signed-off-by: facat <dugg@21cn.com>
This commit is contained in:
facat 2013-04-17 16:18:35 +08:00
parent 56724685da
commit e64070e9a1
4 changed files with 17 additions and 6 deletions

View File

@ -20,6 +20,8 @@ classdef Opti
cl=NaN;%opti toolbox
cu=NaN;%
Balance=NaN;
rPD=NaN;
rQD=NaN;
end
methods

View File

@ -24,14 +24,21 @@ VMatrix=sparse(r,c,VAngel(r)-VAngel(c)-Angel,busNum,busNum);
dP=PG-PD_-diag(Volt)*(Y.*cos(VMatrix))*Volt;
dQ=QG-QD_-diag(Volt)*(Y.*spfun(@sin,VMatrix))*Volt;
output_args=[dP;dQ;VAngel(Balance)];
%% -\PD\QD
%
this.cu=zeros(length(output_args),1);
this.cl=this.cu;
%% -\PD\QD
%
output_args=[output_args;Volt];
output_args=full(output_args);
%
this.cu=[this.cu;1.1*ones(length(Volt),1)];
this.cl=[this.cl;0.9*ones(length(Volt),1)];
%% PD
rPD=this.rPD;
rQD=this.rQD;
output_args=[output_args;PD];
this.cu=[this.cu;1.2*rPD];
this.cl=[this.cl;0.8*rPD];
output_args=full(output_args);
this.cu=full(this.cu);
this.cl=full(this.cl);
end

View File

@ -1,4 +1,4 @@
function [ this ] = init( this,Volt0,PDi,QDi,wPD,wQD,PD0,QD0,Y,Angel,r,c,PG,QG,Balance )
function [ this ] = init( this,Volt0,PDi,QDi,wPD,wQD,PD0,QD0,Y,Angel,r,c,PG,QG,Balance,rPD,rQD )
%INIT Summary of this function goes here
% Detailed explanation goes here
this.PDi=PDi;
@ -15,5 +15,7 @@ this.PG=PG;
this.QG=QG;
this.Balance=Balance;
this.Volt0=Volt0;
this.rPD=rPD;
this.rQD=rQD;
end

View File

@ -64,7 +64,7 @@ QDi=find(QD~=0);
% PD0=PD0(PDi);
% QD0=QD0(QDi);
seOpti=Opti();
seOpti=seOpti.init(Volt0,PDi,QDi,wPD,wQD,PD0,QD0,Y,Angle,r,c,PG,QG,Balance);
seOpti=seOpti.init(Volt0,PDi,QDi,wPD,wQD,PD0,QD0,Y,Angle,r,c,PG,QG,Balance,rPD(PDi),rQD(QDi));
opts = optiset('solver','filtersd');
opts.maxiter=85500;
opts.maxtime=3000;