adding check for model size before computing value of planner objective.

time-shift
Michel Juillard 2015-11-08 16:51:06 +01:00
parent 36b804b044
commit 660fc64471
1 changed files with 6 additions and 0 deletions

View File

@ -32,6 +32,12 @@ dr = oo.dr;
exo_nbr = M.exo_nbr;
nstatic = M.nstatic;
nspred = M.nspred;
if nspred > 180
disp(' ')
disp(['evaluate_planner_objective: model too large, can''t evaluate planner ' ...
'objective'])
return NaN
end
beta = get_optimal_policy_discount_factor(M.params,M.param_names);
Gy = dr.ghx(nstatic+(1:nspred),:);