Print the current iteration: Prints the proggress at the current iteration of 2EBD-HPE % % TEBD_PrintCurrentIterate(par,runhist,iter,theta,lratio,dratio,residuals) % % input: % - par : (struct) parameters of the algorithm % - runhist : (struct) contains the accumulated running history % - iter : current iteration % - theta : value of the dynamic scaling parameter at the current iteration % - residuals : (struct) contains the specific residuals of the problem at the current iteration % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 2EBD-HPE: % Modified by C.Ortiz % Last Modified: 6/15/2012
0001 %Print the current iteration: Prints the proggress at the current 0002 % iteration of 2EBD-HPE 0003 %% 0004 %% TEBD_PrintCurrentIterate(par,runhist,iter,theta,lratio,dratio,residuals) 0005 %% 0006 %% input: 0007 %% - par : (struct) parameters of the algorithm 0008 %% - runhist : (struct) contains the accumulated running history 0009 %% - iter : current iteration 0010 %% - theta : value of the dynamic scaling parameter at the current iteration 0011 %% - residuals : (struct) contains the specific residuals of the problem at the current iteration 0012 %% 0013 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0014 %% 2EBD-HPE: 0015 %% Modified by C.Ortiz 0016 %% Last Modified: 6/15/2012 0017 function TEBD_PrintCurrentIterate(par,runhist,iter,theta,residuals) 0018 obj = runhist.obj{iter}; 0019 if length(obj) > 1 0020 obj2 = obj(2); 0021 else 0022 obj2 = 0; 0023 end 0024 fprintf( '%5.0d %8.2f | %+13.5e %+13.5e | %8.3e %8.3e %8.3e %+8.3e | %8.3f %8.1e ', ... 0025 iter, runhist.cputime(iter), obj(1),obj2, residuals.resnorm,residuals.pfeas,residuals.dfeas,residuals.gap,par.sigma,theta ); 0026 0027 0028 0029 fprintf('\n');