Merge branch 'evaluate_planner' of git.dynare.org:JohannesPfeifer/dynare

Ref. !1955
pac-components
Sébastien Villemot 2021-11-08 12:19:52 +01:00
commit b55d5e2d9e
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 5 additions and 1 deletions

View File

@ -99,7 +99,11 @@ if options_.ramsey_policy
planner_objective_value = struct('conditional', W, 'unconditional', EW);
else
planner_objective_value = struct('conditional', struct('zero_initial_multiplier', 0., 'steady_initial_multiplier', 0.), 'unconditional', 0.);
ys = oo_.dr.ys;
if isempty(oo_.dr) || ~isfield(oo_.dr,'ys')
error('evaluate_planner_objective requires decision rules to have previously been computed (e.g. by stoch_simul)')
else
ys = oo_.dr.ys;
end
if options_.order == 1 || M_.hessian_eq_zero
[U,Uy] = feval([M_.fname '.objective.static'],ys,zeros(1,exo_nbr), M_.params);