Evaluate the primal and dual objective function using the only the variable in the subdifferential of h_2 %****************************************************************** % ops: % % obj = TEBD_EvalObj1(prob,x,y) % % INPUT: prob = (struct) problem definition % x = 1st block variable % u = 2nd block variable % dh2 = variable in the subdifferential of h_2 % % OUTPUT: obj(1) = primal objective function % obj(2) = dual objective function % % 2EBD-HPE: % Modified by C.Ortiz % Last Modified: 5/31/2013
0001 %Evaluate the primal and dual objective function using 0002 %the only the variable in the subdifferential of h_2 0003 %%****************************************************************** 0004 %% ops: 0005 %% 0006 %% obj = TEBD_EvalObj1(prob,x,y) 0007 %% 0008 %% INPUT: prob = (struct) problem definition 0009 %% x = 1st block variable 0010 %% u = 2nd block variable 0011 %% dh2 = variable in the subdifferential of h_2 0012 %% 0013 %% OUTPUT: obj(1) = primal objective function 0014 %% obj(2) = dual objective function 0015 %% 0016 %% 2EBD-HPE: 0017 %% Modified by C.Ortiz 0018 %% Last Modified: 5/31/2013 0019 function obj = TEBD_EvalObj1(prob,x,u,dh2) 0020 obj(1) = prob.trace(prob.C,x); 0021 0022 obj(2) = - prob.trace(u,dh2); 0023 end