diff --git a/OPF.m b/OPF.m index df3f0d6..2daf42d 100644 --- a/OPF.m +++ b/OPF.m @@ -7,7 +7,8 @@ clear thesis=ForThesis(1,45); for II=1:1 [kmax,Precision,UAngel,Volt,Busnum,PVi,PVu,Balance,Y,Angle,P0,Q0,r,c,GB,Linei,Linej,Transfori,Transforj,GenU,GenL,GenC,PG,QG,PD,QD,CenterA,PGi,PVQU,PVQL,Liner,Linex,Lineb,Transforr,Transforx,Branchi,Branchg,Branchb,Transfork0]= ... - pf('E:\算例\柳金Ⅰ926_21671693_2012-09-06\newFIle4 - 计算用.txt'); + pf('E:/算例/柳金Ⅰ926_21671693_2012-09-06/newFIle20.txt'); +% pf('E:\算例\柳金Ⅰ926_21671693_2012-09-06\newFIle16.txt'); %pf('D:\Project\青秀降损项目\最小化潮流\最小潮流算例\原始\津头站津视922(3-1)_0.5_120%.txt'); %pf('D:\Project\最小化潮流\最小潮流算例\仙海919.txt'); %pf('c:/file31.txt'); diff --git a/OPF_Init.asv b/OPF_Init.asv index d4c67dd..453a5f4 100644 --- a/OPF_Init.asv +++ b/OPF_Init.asv @@ -20,9 +20,9 @@ wQG=0; %randInt=randperm(size(Loadi,1)); %randPDind=randInt(1:10); randPDind=0; -wPD=1/.05^2*zeros(size(Loadi,1),1); +wPD=1/.05^2*ones(size(Loadi,1),1); wPD(1:2:end)=0; -wQD=1/.05^2*ones(size(Loadi,1),1); +wQD=1/.05^2*zeros(size(Loadi,1),1); wQD(1:2:end)=0; %wD(randPDind)=0;%一些负荷不约束 %wD(7)=0; diff --git a/OPF_Init.m b/OPF_Init.m index 6ffb2e4..4ccea57 100644 --- a/OPF_Init.m +++ b/OPF_Init.m @@ -20,10 +20,10 @@ wQG=0; %randInt=randperm(size(Loadi,1)); %randPDind=randInt(1:10); randPDind=0; -wPD=1/.05^2*zeros(size(Loadi,1),1); -wPD(1:2:end)=0; -wQD=1/.05^2*zeros(size(Loadi,1),1); -wQD(1:2:end)=0; +wPD=1/.05^2*ones(size(Loadi,1),1); +% wPD(1:2:end)=0; +wQD=1/.05^2*ones(size(Loadi,1),1); +% wQD(1:2:end)=0; %wD(randPDind)=0;%一些负荷不约束 %wD(7)=0; % wD(11)=0; diff --git a/case1V.mat b/case1V.mat new file mode 100644 index 0000000..886f9f7 Binary files /dev/null and b/case1V.mat differ diff --git a/case2V.mat b/case2V.mat new file mode 100644 index 0000000..0f74179 Binary files /dev/null and b/case2V.mat differ diff --git a/case3V.mat b/case3V.mat new file mode 100644 index 0000000..3c80983 Binary files /dev/null and b/case3V.mat differ diff --git a/caseM.mat b/caseM.mat new file mode 100644 index 0000000..5d96c58 Binary files /dev/null and b/caseM.mat differ diff --git a/caseR.mat b/caseR.mat new file mode 100644 index 0000000..d20c4f2 Binary files /dev/null and b/caseR.mat differ diff --git a/plotVolt.asv b/plotVolt.asv new file mode 100644 index 0000000..84e68f8 --- /dev/null +++ b/plotVolt.asv @@ -0,0 +1,26 @@ +%% 画电压,为了写论文用 +load('case1V.mat'); +CV1=Volt; +load('case2V.mat'); +CV2=Volt; +load('case3V.mat'); +CV3=Volt; +load('caseR.mat'); +CVR=Volt; +load('caseM.mat'); +CVM=Volt; +subplot(3,2,1) +hist(CVR) +title('真实值') + + +subplot(2,2,3) +hist(CV1) +title('Case 1') +subplot(2,2,4) +hist(CV2) +title('Case 2') +subplot(2,2,5) +hist(CV3) +title('Case 3') + diff --git a/plotVolt.m b/plotVolt.m new file mode 100644 index 0000000..d8503c3 --- /dev/null +++ b/plotVolt.m @@ -0,0 +1,45 @@ +%% 画电压,为了写论文用 +load('case1V.mat'); +CV1=Volt; +load('case2V.mat'); +CV2=Volt; +load('case3V.mat'); +CV3=Volt; +load('caseR.mat'); +CVR=Volt; +load('caseM.mat'); +CVM=Volt; +subplot(3,2,1) +hist(CVR) +title('真实值') +subplot(3,2,2) +hist(CVM) +title('测量值') +subplot(3,2,3) +hist(CV1) +title('Case 1') +subplot(3,2,4) +hist(CV2) +title('Case 2') +subplot(3,2,5) +hist(CV3) +title('Case 3') + + +% figure() +% hold on +% +% plot(CVR) +% title('真实值') +% +% plot(CVM) +% title('测量值') +% +% plot(CV1) +% title('Case 1') +% +% plot(CV2) +% title('Case 2') +% +% plot(CV3) +% title('Case 3')