Perfect foresight + block decomposition: minor simplifications

kalman-mex
Sébastien Villemot 2023-10-24 16:11:56 +02:00
parent 17b016d983
commit caaa70ab7e
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
2 changed files with 2 additions and 5 deletions

View File

@ -65,7 +65,7 @@ if options_.block
end
if options_.bytecode
try
y = bytecode('dynamic', 'block_decomposed', M_, options_, y, exo_simul, M_.params, repmat(steady_state,1, periods+2), periods);
y = bytecode('dynamic', 'block_decomposed', M_, options_, y, exo_simul, M_.params, steady_state, periods);
success = true;
catch ME
if options_.verbosity >= 1

View File

@ -58,11 +58,8 @@ maxerror = 0;
nblocks = length(M_.block_structure.block);
per_block_status = struct('success', cell(1, nblocks), 'error', cell(1, nblocks), 'iterations', cell(1, nblocks));
funcname = [ M_.fname '.dynamic'];
for blk = 1:nblocks
recursive_size = M_.block_structure.block(blk).endo_nbr - M_.block_structure.block(blk).mfs;
y_index = M_.block_structure.block(blk).variable((recursive_size+1):end);
y_index = M_.block_structure.block(blk).variable(end-M_.block_structure.block(blk).mfs+1:end);
fh_dynamic = str2func(sprintf('%s.sparse.block.dynamic_%d', M_.fname, blk));
if M_.block_structure.block(blk).Simulation_Type == 1 || ... % evaluateForward