bytecode_steadystate: turn into a local function of evaluate_steady_state

silicon
Sébastien Villemot 2023-02-17 21:34:56 -05:00
parent 05ba2970be
commit 6bddbca01d
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
2 changed files with 5 additions and 23 deletions

View File

@ -1,22 +0,0 @@
function [r, g1] = bytecode_steadystate(y, exo, params)
% Wrapper around the *_static.m file, for use with dynare_solve,
% when block_mfs option is given to steady.
% Copyright © 2009-2020 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
eval('[r, g1] = bytecode( y, exo, params, y, 1, exo, ''evaluate'', ''static'');');

View File

@ -428,7 +428,7 @@ elseif options.bytecode
end
end
else
[ys, check] = dynare_solve('bytecode_steadystate', ys_init, ...
[ys, check] = dynare_solve(@bytecode_steadystate, ys_init, ...
options.simul.maxit, options.solve_tolf, options.solve_tolx, ...
options, exo_ss, params);
end
@ -501,6 +501,10 @@ y_all(mfs_idx) = y;
M.block_structure_stat.block(b).g1_sparse_colval, ...
M.block_structure_stat.block(b).g1_sparse_colptr, T);
function [r, g1] = bytecode_steadystate(y, exo, params)
% Wrapper around the static file, for bytecode (without block)
[r, g1] = bytecode(y, exo, params, y, 1, exo, 'evaluate', 'static');
function [r, g1] = block_bytecode_mfs_steadystate(y, b, y_all, exo, params, T, M)
% Wrapper around the static files, for block without bytecode
mfs_idx = M.block_structure_stat.block(b).variable(end-M.block_structure_stat.block(b).mfs+1:end);