Fixes to solve_algo ≥ 9

— allow solve_algo=9 without block nor bytecode
— allow solve_algo≥9 with block without bytecode
— test solve_algo=9
parent 2015b792
...@@ -23,7 +23,7 @@ if options.block && ~options.bytecode ...@@ -23,7 +23,7 @@ if options.block && ~options.bytecode
ss = x; ss = x;
if M.block_structure_stat.block(b).Simulation_Type ~= 1 && ... if M.block_structure_stat.block(b).Simulation_Type ~= 1 && ...
M.block_structure_stat.block(b).Simulation_Type ~= 2 M.block_structure_stat.block(b).Simulation_Type ~= 2
if options.solve_algo <= 4 if options.solve_algo <= 4 || options.solve_algo >= 9
[y, check] = dynare_solve('block_mfs_steadystate', ... [y, check] = dynare_solve('block_mfs_steadystate', ...
ss(M.block_structure_stat.block(b).variable), ... ss(M.block_structure_stat.block(b).variable), ...
options, b, ss, exo, params, M); options, b, ss, exo, params, M);
......
...@@ -18,7 +18,7 @@ function [steady_state,params,info] = steady_(M_,options_,oo_) ...@@ -18,7 +18,7 @@ function [steady_state,params,info] = steady_(M_,options_,oo_)
% SPECIAL REQUIREMENTS % SPECIAL REQUIREMENTS
% none % none
% Copyright (C) 2001-2017 Dynare Team % Copyright (C) 2001-2020 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
...@@ -40,8 +40,8 @@ if options_.solve_algo < 0 || options_.solve_algo > 12 ...@@ -40,8 +40,8 @@ if options_.solve_algo < 0 || options_.solve_algo > 12
end end
if ~options_.bytecode && ~options_.block && options_.solve_algo > 4 && ... if ~options_.bytecode && ~options_.block && options_.solve_algo > 4 && ...
options_.solve_algo < 10 options_.solve_algo < 9
error('STEADY: you can''t use solve_algo > 4 without block nor bytecode options') error('STEADY: you can''t use solve_algo = {5,6,7,8} without block nor bytecode options')
end end
if ~options_.bytecode && options_.block && options_.solve_algo == 5 if ~options_.bytecode && options_.block && options_.solve_algo == 5
...@@ -52,4 +52,4 @@ if isoctave && options_.solve_algo == 11 ...@@ -52,4 +52,4 @@ if isoctave && options_.solve_algo == 11
error(['SIMUL: you can''t use solve_algo = %u under Octave'],options_.solve_algo) error(['SIMUL: you can''t use solve_algo = %u under Octave'],options_.solve_algo)
end end
[steady_state,params,info] = evaluate_steady_state(oo_.steady_state,M_,options_,oo_,~options_.steadystate.nocheck); [steady_state,params,info] = evaluate_steady_state(oo_.steady_state,M_,options_,oo_,~options_.steadystate.nocheck);
\ No newline at end of file
...@@ -44,10 +44,10 @@ for blockFlag = 0:1 ...@@ -44,10 +44,10 @@ for blockFlag = 0:1
default_solve_algo = 2; default_solve_algo = 2;
default_stack_solve_algo = 0; default_stack_solve_algo = 0;
if ~blockFlag && ~bytecodeFlag if ~blockFlag && ~bytecodeFlag
solve_algos = 1:4; solve_algos = [1:4 9];
stack_solve_algos = [0 6]; stack_solve_algos = [0 6];
elseif blockFlag && ~bytecodeFlag elseif blockFlag && ~bytecodeFlag
solve_algos = [1:4 6:8]; solve_algos = [1:4 6:9];
stack_solve_algos = 0:4; stack_solve_algos = 0:4;
else else
solve_algos = 1:8; solve_algos = 1:8;
......
...@@ -46,10 +46,10 @@ for blockFlag = 0:1 ...@@ -46,10 +46,10 @@ for blockFlag = 0:1
default_solve_algo = 2; default_solve_algo = 2;
default_stack_solve_algo = 0; default_stack_solve_algo = 0;
if !blockFlag && !bytecodeFlag if !blockFlag && !bytecodeFlag
solve_algos = 0:4; solve_algos = [0:4 9];
stack_solve_algos = [0 6]; stack_solve_algos = [0 6];
elseif blockFlag && !bytecodeFlag elseif blockFlag && !bytecodeFlag
solve_algos = [0:4 6:8]; solve_algos = [0:4 6:9];
stack_solve_algos = 0:4; stack_solve_algos = 0:4;
else else
solve_algos = 0:8; solve_algos = 0:8;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment