function code = opf_form(alg)
%OPF_FORM    Which OPF formulation is used by alg.
%   code = opf_form(alg) returns a formulation code given an algorithm code.
%   The codes are:
%       1 - standard, polynomial costs handled in the objective function
%       2 - CCV, piece-wise linear costs handled via constrainted cost vars
%       5 - generalized, includes both of above and more

%   MATPOWER
%   $Id: opf_form.m,v 1.4 2004/08/23 20:56:49 ray Exp $
%   by Ray Zimmerman, PSERC Cornell
%   Copyright (c) 1996-2004 by Power System Engineering Research Center (PSERC)
%   See http://www.pserc.cornell.edu/matpower/ for more info.

code = fix(alg / 100);

return;
