From 3658b02455fbff26f64ae438fc98688fd09075b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Scylla=29?= <stephane.adjemian@univ-lemans.fr> Date: Fri, 14 Sep 2012 17:01:05 +0200 Subject: [PATCH] Fixed bug. If info==19 (steady state routine returns check=1) info(2) is NaN, so that it is not possible to define an endogenous penalty. In this case we just add one to objective_function_penalty_base. (cherry picked from commit d2912b264c326b3f349984b605787045b028b992) --- matlab/dsge_likelihood.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matlab/dsge_likelihood.m b/matlab/dsge_likelihood.m index 0aaee72158..57b5e2231a 100644 --- a/matlab/dsge_likelihood.m +++ b/matlab/dsge_likelihood.m @@ -248,7 +248,7 @@ end % Return, with endogenous penalty when possible, if dynare_resolve issues an error code (defined in resol). if info(1) == 1 || info(1) == 2 || info(1) == 5 || info(1) == 7 || info(1) ... - == 8 || info(1) == 22 || info(1) == 24 + == 8 || info(1) == 22 || info(1) == 24 || info(1) == 19 fval = objective_function_penalty_base+1; info = info(1); exit_flag = 0; @@ -256,7 +256,7 @@ if info(1) == 1 || info(1) == 2 || info(1) == 5 || info(1) == 7 || info(1) ... DLIK=ones(length(xparam1),1); end return -elseif info(1) == 3 || info(1) == 4 || info(1)==6 ||info(1) == 19 || info(1) == 20 || info(1) == 21 || info(1) == 23 +elseif info(1) == 3 || info(1) == 4 || info(1)==6 || info(1) == 20 || info(1) == 21 || info(1) == 23 fval = objective_function_penalty_base+info(2); info = info(1); exit_flag = 0; -- GitLab