From fddb3316bdfe46da3f3057cc3de9b843e3fb4b4a Mon Sep 17 00:00:00 2001 From: "dmy@lab" Date: Thu, 21 May 2015 14:50:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E4=B8=89=E7=9B=B8=E4=B8=8D=E5=B9=B3?= =?UTF-8?q?=E8=A1=A1=E5=BA=A6=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dmy@lab --- IPMLoop.m | 10 ++++---- run.m | 73 ++++++++++++++++++++++++++++++------------------------- test.m | 15 +++++++++++- 3 files changed, 59 insertions(+), 39 deletions(-) diff --git a/IPMLoop.m b/IPMLoop.m index eaaa770..421fb72 100644 --- a/IPMLoop.m +++ b/IPMLoop.m @@ -30,7 +30,7 @@ kmax=15; isSetBound=0; largerBound=0; realBound=1; -tic + Ir=real(guessIf1(ismember(Loadi,boundedLoadi)) ); pIr=find(Ir>0); @@ -62,7 +62,7 @@ if realBound==1 upper(pIi+length(Ir))=(1.30)*Ii(pIi); upper(nIi+length(Ir))=(0.7)*Ii(nIi); end - +tic while(abs(Gap)>1e-5) if KK>=kmax break; @@ -108,11 +108,11 @@ deltG=func_deltGstate1(busNum,Loadi,boundedLoadi,I1r,I1i); [Init_Z,Init_L,Init_W,Init_U,Init_Y,V1r,V1i,I1r,I1i]=Modification(Init_Z,Init_L,Init_W,Init_U,Init_Y,deltZ,deltL,deltW,deltU,deltX,deltY,V1r,V1i,I1r,I1i,ContrlCount,Balance,busNum,Loadi,Vref); Gap=(Init_L'*Init_Z-Init_U'*Init_W);+max(abs(deltX)); % Gap=max([max(abs(Mat_H)),max(Lz),max(Lw) ]); -% fprintf('Gap %f :%d\n',full(Gap),KK+1); + fprintf('Gap %f :%d\n',full(Gap),KK+1); KK=KK+1; end -toc -calcuTime=toc/KK; +% toc +calcuTime=toc; % f=sum(([real(I1measurement);imag(I1measurement)]-[I1r;I1i]).^2)+sum((real(V1measurement)-V1r(Loadi)).^2)+sum((imag(V1measurement)-V1i(Loadi)).^2); if abs(Gap)<1e-5 && KK