Home > matpower5.1 > t > t_cpf_cb1.m

t_cpf_cb1

PURPOSE ^

T_CPF_CB1 User callback function 1 for continuation power flow testing.

SYNOPSIS ^

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

DESCRIPTION ^

T_CPF_CB1  User callback function 1 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_cb1(k, V_c, lam_c, V_p, lam_p, ...
0002                                         cb_data, cb_state, cb_args, results)
0003 %T_CPF_CB1  User callback function 1 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_cb1.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 
0016 %%-----  INITIAL call  -----
0017 if k == 0
0018     cb_state.cb1.initial = 1;
0019     cb_state.cb1.iteration = 0;
0020     cb_state.cb1.final = 0;
0021 %%-----  FINAL call  -----
0022 elseif nargout == 2
0023     results.cb1.final = 1;
0024 %%-----  ITERATION call  -----
0025 else
0026     cb_state.cb1.iteration = cb_state.cb1.iteration + 1;
0027 end

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