t_cpf_cb2
PURPOSE
T_CPF_CB2 User callback function 2 for continuation power flow testing.
SYNOPSIS
function [nx, cx, done, rollback, evnts, cb_data, results] = t_cpf_cb2(k, nx, cx, px, done, rollback, evnts, cb_data, cb_args, results)
DESCRIPTION
CROSS-REFERENCE INFORMATION
This function calls:
This function is called by:
SOURCE CODE
0001 function [nx, cx, done, rollback, evnts, cb_data, results] = t_cpf_cb2(...
0002 k, nx, cx, px, done, rollback, evnts, cb_data, cb_args, results)
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 if k == 0
0015 cxx = struct( 'initial', cb_args.initial, ...
0016 'iteration', 0, ...
0017 'final', 0 );
0018 nxx = cxx;
0019 cx.cb.cb2 = cxx;
0020 nx.cb.cb2 = nxx;
0021 if ~isfield(cx.cb, 'shared')
0022 cx.cb.shared = '';
0023 nx.cb.shared = '';
0024 end
0025 cx.cb.shared = [cx.cb.shared '2'];
0026 nx.cb.shared = [nx.cb.shared '2'];
0027 else
0028 nxx = nx.cb.cb2;
0029
0030 if k > 0
0031 nxx.iteration = nxx.iteration + cb_args.iteration;
0032 nx.cb.cb2 = nxx;
0033 nx.cb.shared = [nx.cb.shared '2'];
0034
0035 else
0036 results.cb2.initial = nxx.initial;
0037 results.cb2.iteration = nxx.iteration;
0038 results.cb2.final = cb_args.final;
0039 results.shared = nx.cb.shared;
0040 end
0041 end
Generated on Fri 09-Oct-2020 11:21:31 by m2html © 2005