Commit 3658b024 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Fixed bug. If info==19 (steady state routine returns check=1) info(2) is NaN,...

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)
parent c74b1d1b
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment