Home > matpower5.1 > t > t_cpf_cb2.m

t_cpf_cb2

PURPOSE ^

T_CPF_CB2 User callback function 2 for continuation power flow testing.

SYNOPSIS ^

function [cb_state, results] = t_cpf_cb2(k, V_c, lam_c, V_p, lam_p,cb_data, cb_state, cb_args, results)

DESCRIPTION ^

T_CPF_CB2  User callback function 2 for continuation power flow testing.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [cb_state, results] = t_cpf_cb2(k, V_c, lam_c, V_p, lam_p, ...
0002                                         cb_data, cb_state, cb_args, results)
0003 %T_CPF_CB2  User callback function 2 for continuation power flow testing.
0004 
0005 %   MATPOWER
0006 %   Copyright (c) 2013-2015 by Power System Engineering Research Center (PSERC)
0007 %   by Ray Zimmerman, PSERC Cornell
0008 %
0009 %   $Id: t_cpf_cb2.m 2644 2015-03-11 19:34:22Z ray $
0010 %
0011 %   This file is part of MATPOWER.
0012 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0013 %   See http://www.pserc.cornell.edu/matpower/ for more info.
0014 
0015 %%-----  INITIAL call  -----
0016 if k == 0
0017     cb_state.cb2.initial = cb_args.cb2.initial;
0018     cb_state.cb2.iteration = 0;
0019     cb_state.cb2.final = 0;
0020 %%-----  FINAL call  -----
0021 elseif nargout == 2
0022     results.cb2.final = cb_args.cb2.final;
0023 %%-----  ITERATION call  -----
0024 else
0025     cb_state.cb2.iteration = cb_state.cb2.iteration + cb_args.cb2.iteration;
0026 end

Generated on Fri 20-Mar-2015 18:23:34 by m2html © 2005