Block decomposition: for evaluate blocks, move the iteration loop outside the dynamic file

time-shift
Sébastien Villemot 2020-06-15 18:13:51 +02:00
parent bfbff6a2fb
commit 7bec234f7f
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
2 changed files with 9 additions and 2 deletions

View File

@ -57,7 +57,14 @@ for blk = 1:length(M_.block_structure.block)
oo_.deterministic_simulation.block(blk).status = true;
oo_.deterministic_simulation.block(blk).error = 0;
oo_.deterministic_simulation.block(blk).iterations = 0;
[y, T] = feval(funcname, y, oo_.exo_simul, M_.params, oo_.steady_state, T, false, M_.maximum_lag, options_.periods);
if M_.block_structure.block(blk).Simulation_Type == 1
range = M_.maximum_lag+1:M_.maximum_lag+options_.periods;
else
range = M_.maximum_lag+options_.periods:-1:M_.maximum_lag+1;
end
for it_ = range
[y, T] = feval(funcname, y, oo_.exo_simul, M_.params, oo_.steady_state, T, it_, false);
end
elseif M_.block_structure.block(blk).Simulation_Type == 3 || ... % solveForwardSimple
M_.block_structure.block(blk).Simulation_Type == 4 || ... % solveBackwardSimple
M_.block_structure.block(blk).Simulation_Type == 6 || ... % solveForwardComplete

@ -1 +1 @@
Subproject commit f022c0e16e890a5647b16c3ad47547583b794142
Subproject commit ad583adcd4fc3463910708c86ea4bdc0b70a0826