www.gusucode.com > matpower工具箱源码程序 > matpower工具箱源码程序/MP2_0/opf_slvr.m

    function code = opf_slvr(alg)
%OPF_SLVR    Which OPF solver is used by alg.
%   code = opf_slvr(alg) returns a solver code given an algorithm code.
%	The codes are:
%		0 - 'constr' from Optimization Toolbox
%		1 - 'LPconstr', dense LP-based solver
%		2 - 'LPconstr', sparse LP-based solver with relaxed constraints
%		3 - 'LPconstr', sparse LP-based solver with full set of constraints

%   MATPOWER Version 2.0
%   by Ray Zimmerman, PSERC Cornell    12/12/97
%   Copyright (c) 1997 by Power System Engineering Research Center (PSERC)
%   See http://www.pserc.cornell.edu/ for more info.

code = rem(alg, 100) / 20;

return;