evaluate_steady_state.m: check whether planner_discount is actually set for ramsey

mr#2067
Johannes Pfeifer 2022-06-27 11:17:15 +02:00
parent 5423949047
commit 77d6782cb4
1 changed files with 3 additions and 0 deletions

View File

@ -74,6 +74,9 @@ if options.ramsey_policy
% provided by the block-decomposed routines.
error('The ''block'' option is not compatible with ''ramsey_model''/''ramsey_policy''');
end
if ~isfinite(M.params(strmatch('optimal_policy_discount_factor',M.param_names,'exact')))
fprintf('\nevaluate_steady_state: the planner_discount is NaN/Inf. That will cause problems.\n')
end
if steadystate_flag
% explicit steady state file
[ys,params,info] = evaluate_steady_state_file(ys_init,exo_ss,M, ...