修复了生成均匀分布的错误
Signed-off-by: dugg@lab-desk <dugg@lab-desk>
This commit is contained in:
parent
27b095fc2f
commit
5bfba00389
8
OPF.m
8
OPF.m
|
|
@ -23,12 +23,12 @@ for badDataNode=1:1
|
||||||
PD0=sparse(Busnum,1);
|
PD0=sparse(Busnum,1);
|
||||||
QD0=sparse(Busnum,1);
|
QD0=sparse(Busnum,1);
|
||||||
%先试一下均匀分布
|
%先试一下均匀分布
|
||||||
PD0(Loadi)=RealPD(Loadi).*(1+unifrnd(-RealPD(Loadi)*sigma,RealPD(Loadi)*sigma,length(Loadi),1));
|
PD0(Loadi)=RealPD(Loadi).*(1+unifrnd(-3*sigma,3*sigma,length(Loadi),1));
|
||||||
QD0(Loadi)=RealQD(Loadi).*(1+unifrnd(-RealQD(Loadi)*sigma,RealQD(Loadi)*sigma,length(Loadi),1));
|
QD0(Loadi)=RealQD(Loadi).*(1+unifrnd(-3*sigma,3*sigma,length(Loadi),1));
|
||||||
mVolt=rVolt.*(1+unifrnd(-rVolt*sigma,rVolt*sigma,1,length(rVolt)));
|
mVolt=rVolt.*(1+unifrnd(-3*sigma,3*sigma,1,length(rVolt)));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%正态分布
|
||||||
% PD0(Loadi)=RealPD(Loadi).*(1+normrnd(0,sigma,length(Loadi),1));
|
% PD0(Loadi)=RealPD(Loadi).*(1+normrnd(0,sigma,length(Loadi),1));
|
||||||
% QD0(Loadi)=RealQD(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))';
|
% mVolt=rVolt.*(1+normrnd(0,sigma,length(rVolt),1))';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue