Home > solver > TEBD_EvalObj2.m

TEBD_EvalObj2

PURPOSE ^

Evaluate the primal and dual objective function using

SYNOPSIS ^

function obj = TEBD_EvalObj2(prob,x,u,dh2,dh1)

DESCRIPTION ^

Evaluate the primal and dual objective function using 
the both variables in the subdifferentials of h_1 and h_2
%******************************************************************
% ops:
%
%   obj = TEBD_EvalObj2(prob,x,y)
%
%  INPUT:      prob = (struct) problem definition
%              x    = 1st block variable
%              u    = 2nd block variable
%              dh2  = variable in the subdifferential of h_2 
%              dh1  = variable in the subdifferential of h_1
%
%  OUTPUT:     obj(1)  = primal objective function
%              obj(2)  = dual objective function
%                    
% 2EBD-HPE:
% Modified by C.Ortiz
% Last Modified: 5/31/2013

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %Evaluate the primal and dual objective function using
0002 %the both variables in the subdifferentials of h_1 and h_2
0003 %%******************************************************************
0004 %% ops:
0005 %%
0006 %%   obj = TEBD_EvalObj2(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 %%              dh1  = variable in the subdifferential of h_1
0013 %%
0014 %%  OUTPUT:     obj(1)  = primal objective function
0015 %%              obj(2)  = dual objective function
0016 %%
0017 %% 2EBD-HPE:
0018 %% Modified by C.Ortiz
0019 %% Last Modified: 5/31/2013
0020 function obj = TEBD_EvalObj2(prob,x,u,dh2,dh1)
0021 obj(1) = prob.C'*x; 
0022 
0023 obj(2) = -u'*dh2 -x'*dh1; 
0024 end

Generated on Tue 06-Aug-2013 17:07:59 by m2html © 2005