function [v0, vl, vu] = getv(om, name)
%GETV  Returns initial value, lower bound and upper bound for full var vector.
%	(or specific var set)

%   MATPOWER
%   $Id: getv.m,v 1.3 2009/11/04 15:58:44 ray Exp $
%   by Ray Zimmerman, PSERC Cornell
%   Copyright (c) 2008 by Power System Engineering Research Center (PSERC)
%   See http://www.pserc.cornell.edu/matpower/ for more info.

if nargin < 2
	v0 = []; vl = []; vu = [];
	for k = 1:om.var.NS
		name = om.var.order{k};
		v0 = [ v0; om.var.data.v0.(name) ];
		vl = [ vl; om.var.data.vl.(name) ];
		vu = [ vu; om.var.data.vu.(name) ];
	end
else
	if isfield(om.var.idx.N, name)
		v0 = om.var.data.v0.(name);
		vl = om.var.data.vl.(name);
		vu = om.var.data.vu.(name);
	else
		v0 = [];
		vl = [];
		vu = [];
	end
end
