diff --git a/OPF.m b/OPF.m index 0a17982..29194e3 100644 --- a/OPF.m +++ b/OPF.m @@ -23,12 +23,12 @@ for badDataNode=1:1 PD0=sparse(Busnum,1); QD0=sparse(Busnum,1); %先试一下均匀分布 - PD0(Loadi)=RealPD(Loadi).*(1+unifrnd(-RealPD(Loadi)*sigma,RealPD(Loadi)*sigma,length(Loadi),1)); - QD0(Loadi)=RealQD(Loadi).*(1+unifrnd(-RealQD(Loadi)*sigma,RealQD(Loadi)*sigma,length(Loadi),1)); - mVolt=rVolt.*(1+unifrnd(-rVolt*sigma,rVolt*sigma,1,length(rVolt))); + PD0(Loadi)=RealPD(Loadi).*(1+unifrnd(-3*sigma,3*sigma,length(Loadi),1)); + QD0(Loadi)=RealQD(Loadi).*(1+unifrnd(-3*sigma,3*sigma,length(Loadi),1)); + mVolt=rVolt.*(1+unifrnd(-3*sigma,3*sigma,1,length(rVolt))); - + %正态分布 % PD0(Loadi)=RealPD(Loadi).*(1+normrnd(0,sigma,length(Loadi),1)); % QD0(Loadi)=RealQD(Loadi).*(1+normrnd(0,sigma,length(Loadi),1)); % mVolt=rVolt.*(1+normrnd(0,sigma,length(rVolt),1))';