bytecode_steadystate: turn into a local function of evaluate_steady_state
parent
05ba2970be
commit
6bddbca01d
|
@ -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'');');
|
|
|
@ -428,7 +428,7 @@ elseif options.bytecode
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
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.simul.maxit, options.solve_tolf, options.solve_tolx, ...
|
||||||
options, exo_ss, params);
|
options, exo_ss, params);
|
||||||
end
|
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_colval, ...
|
||||||
M.block_structure_stat.block(b).g1_sparse_colptr, T);
|
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)
|
function [r, g1] = block_bytecode_mfs_steadystate(y, b, y_all, exo, params, T, M)
|
||||||
% Wrapper around the static files, for block without bytecode
|
% 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);
|
mfs_idx = M.block_structure_stat.block(b).variable(end-M.block_structure_stat.block(b).mfs+1:end);
|
||||||
|
|
Loading…
Reference in New Issue