v4.1: added check and penalty for complex steady state

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2548 ac1d8469-bf42-47a9-8791-bf33cf982152
time-shift
michel 2009-04-02 13:40:56 +00:00
parent 91fb6ee044
commit 4a3baea105
1 changed files with 10 additions and 1 deletions

View File

@ -16,12 +16,15 @@ function [dr,info]=resol(ys,check_flag)
% info=5: Blanchard Kahn conditions are not satisfied:'...' indeterminacy due to rank failure
% info=6: The jacobian evaluated at the steady state is complex.
% info=20: can't find steady state info(2) contains sum of sqare residuals
% info=21: steady state is complex
% info(2) contains sum of sqare of
% imaginary part of steady state
% info=30: Variance can't be computed
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2001-2008 Dynare Team
% Copyright (C) 2001-2009 Dynare Team
%
% This file is part of Dynare.
%
@ -99,6 +102,12 @@ if check1
return
end
if ~isreal(dr.ys)
info(1) = 21;
info(2) = sum(imag(ys).^2);
dr.ys = real(dr.ys);
end
dr.fbias = zeros(M_.endo_nbr,1);
if(options_.model_mode==1)
[dr,info,M_,options_,oo_] = dr1_sparse(dr,check_flag,M_,options_,oo_);